How to program config data in a read-protected device
Hi all,
I am using the STM32L011G3U6 with 8kB FLASH.
We deliver this chip programmed with a firmware that is read protected (RDPROT = Level 1)
Our customer should be able to write certain data in predefined non-volatile memory (let's say EEPROM) to control certain firmware parameters (for instance, how often a LED blinks).
This configuration programming is neither via ST-LINK, my preferred method, nor Bootloader UART commands possible since memory is protected.
I cannot separate the code from the program data and then read-protect the 4kB code-sector via WRPi bits in Optional Bytes. My code is 6,5kB with compiler option armcc compiler option set to -O3 (the highest optimization possible).
To avoid the former data/code separation there is a compiler option:
armcc --no_literal_pools --max_string_in_code=0
recommend it in
but it did not work.
My firmware did not react.
My only idea would be to implement a UART command interpreter that receives customer commands with the address and value to program in memory.
Any other idea?
Thanks a lot for your input.
#read-protection #rdprot #program-memory