2018-10-05 03:14 PM
Hi.
My code generation is almost done. I want to lock the code so that no one else can conveniently reach and use my code. I want that for future development to erase the code and reprogram it. I read some information provided by ST and I think I have to use protection level 1.Is this correct?
I use EEPROM emulation in my project, so the pages that are for EEPROM emulation must not be protected. I took s glance at option bytes in STlink utility and there was a table of pages with a checkbox beside. I need to check only the pages that my user code is in it,don't I?
2018-10-05 05:29 PM
It shouldn't effect your ability read/write/erase flash sectors internally.
2018-10-06 03:40 AM
Protection Level 1 helps you to protect your code against read, write or erase using debug mode, bootloader modes. Any attempt will give an error. Also, the next time you change the protection level, suppose from level 1 to level 0, will cause a mass erase of the flash memory, rendering the chip blank.
The sectors shown can be protected against write operations through debug mode by selecting the corresponding check boxes.
2018-10-22 08:58 AM
Hello again guys.
I tested the protecytion level 1 .It is just what i want,but there is a problem.I use eeprom emulation and this protection do not let this task.
I asked someone and he told me to write a boot loader.He said that you can put some irrelevant code at the start of your code and give the true start address to the boot loader.So if someone get your hex from the chip he does not know the start address and then cant use the code.
I dont know how to write boot loader and how to write some irrelevant data at the top of my code.