cancel
Showing results for 
Search instead for 
Did you mean: 

Read Out Protection

Arman Ilmak
Senior

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?

3 REPLIES 3

It shouldn't effect your ability read/write/erase flash sectors internally.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GenuineDeveloper
Associate III

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.

Arman Ilmak
Senior

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.