tillitis / tillitis-key1

Board designs, FPGA verilog, firmware for TKey, the flexible and open USB security key 🔑
https://www.tillitis.se
395 stars 24 forks source link

Force CPU-hang on errors in FW #112

Closed secworks closed 6 months ago

secworks commented 1 year ago

I suggest that errors caught by the FW should be handled by forcing the CPU to hang, not by jumping to an error loop that does the LED blinking. A SW loop could possibly be forced to jump somewhere. By triggering an illegal instruction, the CPU will hang and stop executing. The external effect will be the same - blinking red.

dehanj commented 1 year ago

Use assert_fail() from tkey-libs. This will harmonize code used and lower the amount of code to maintain.

mchack-work commented 1 year ago

See https://github.com/tillitis/tillitis-key1/issues/129

dehanj commented 6 months ago

Closes with #168