2013-05-26 11:51 AM
Hello
After I have finished my project I need to protect my code from being read from JTAG or from serial bootloader , Could you guid me or show me how can I protect my code ? I am using keil . , STM32f407. Thank you in advanced Esat2013-05-26 11:13 PM
The easiest way would be, that you set the option byte to read level 1 (menu Target - Option Bytes, do NOT use read level 2 - except you want to configure it such, that absolutely no more re-programming possible on the chip).
You can also program the option byte quite easily from inside your software. You can also do it during Flash programming via Keil - you have to look for an example of Keil, where they use the programming cycle Flash + Option Byte (Project settings, Utilities/Debug).2013-05-27 07:55 AM
Thank you Bil
I still could not do that . I am using keil .. Could you show a code for this or exmple , please?2013-06-11 03:44 AM
Hello,
You can do it with an easy way using the ST-Link utility tool that you can download from this page:http://www.st.com/web/en/catalog/tools/PF258168
. All the required documentation is available on the same page. Best Regards, ST.MCUTo give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-06-20 02:24 AM
Thank you Mayla
I dont have st_link , I have ulink2 keil , is there away in the software for example a function , that protect the code ?2013-06-20 06:35 AM
You can put in your code:
FLASH_OB_Unlock();
FLASH_OB_RDPConfig(OB_RDP_Level_1);
FLASH_OB_Launch();
FLASH_OB_Lock();