EFM8 is not locked at the end of the programming/flashing process
vojnovski opened this issue · 5 comments
Is there a reason why the EFM8 is not locked at the end of the programming process?
It could be done as specified here: https://www.silabs.com/community/mcu/8-bit/knowledge-base.entry.html/2016/01/13/locking_flash_using-RdLy, setting 0xFBFF (the EFM8 Lock Byte: https://www.silabs.com/documents/public/data-sheets/efm8ub1-datasheet.pdf) to 0x00 with the linker.
For completeness: currently 0xFBFF
byte is conditionally set to -32
on each firmware start, at src/eeprom.c#L39
u2f-zero/firmware/src/eeprom.c
Lines 31 to 40 in 6a177ca
Yes, this locks the eeprom from debugger read out. Thanks!
Just to explain -32
- according to [1] this locks first 32 pages (32x512=16kB) of user flash.
[1] Reference Manual, Chapter 4.3.1, page 27, https://www.silabs.com/documents/public/reference-manuals/EFM8UB1-RM.pdf
@vojnovski Do you know, whether 0
would work the same and lock all the pages?