2015-08-19 06:16 AM
I am using STM32f407 and STM32f302 for a project and Finished, now I need to protect the code so no one can upload the hex from my controller ?? can anyone direct me where to look ?
#read #flash #stm32f2015-08-19 06:40 AM
Hi ahmed.kareem,
Just you have to go to STM32 ST-LINK utility: Target->Option Bytes:Select the flash protection mode (Write protection/ Read/Write protection) and the sectors that you need to protect.-Syrine-2015-08-19 07:14 AM
For more information about flash memory protection techniques, you may refer to the
-Syrine-2015-08-19 07:25 AM
Dear Syrine
Thanks for your response, I am using segger programmer/debuger Ultra+ ,,, would ST-link utility support my device ?I will look into it nowThanksKareem2015-08-19 07:30 AM
No, it just works with the ST-LINK, but those things are trivially cheap in comparison.
You can write the Options Bytes with your own code too.2015-08-19 07:47 AM
Hi ahmed.kareem,
It is possible by software,I suggest you to have a look to this project:STM32Cube_FW_F4_V1.7.0\Projects\STM324x9I_EVAL\Examples\FLASH\FLASH_WriteProtection:This example guides you through the different configuration steps, by mean of HAL API, on how to enable and disable the write protection for internal FLASH memory integrated within STM32F4xx devices.-Syrine-