Closed vojnovski closed 6 years ago
For completeness: currently 0xFBFF
byte is conditionally set to -32
on each firmware start, at src/eeprom.c#L39
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?
Hi @szszszsz, yes, from the same manual, setting it to 0
locks all user flash pages.
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.