cancel
Showing results for 
Search instead for 
Did you mean: 

STM32's Debug Mode?

jki79ros81
Associate II
Posted on November 16, 2008 at 05:19

STM32's Debug Mode?

4 REPLIES 4
jki79ros81
Associate II
Posted on May 17, 2011 at 12:51

I set read-out protect flash by FLASH_ReadOutProtection(ENABLE) ;

, then my code not work and can't Un-protect it.

In datasheet say follow.

''Once the protection byte has been programmed to a value:

Main Flash memory read access is not allowed except for the user code (when booting from main Flash memory itself with the debug mode not active).

....''

What is the Debug Mode?

Why my code not work?

Thank you for any response.

16-32micros
Associate III
Posted on May 17, 2011 at 12:51

Hi ,

Debug Mode is when the Core and STM32 is controlled/connected to a JTAG tool like J-link, U-link, R-link etc..

In your case, once you have enabled the read-out protection, you have 2 solutions :

1) Boot from RAM and load a program to RAM that can remove this Read-out protection that will automatically erase the flash contents and then disable the protection after a reset cycle/Power On reset.

In case you are using J-link from IAR/Segger you can use a new utility called JlinkSTM32.exe ( that will do this for you) . It allows to remove the read-out protection of STM32 devices. Software and Documentation pack V3.96a:

http://www.segger.com/download_jlink.html

, R-flasher from Raisonance should do the same as well.

2) Use the Flash Loader demonstrator v1.2 and boot from systemMemory mode and then remove the protection.

Hope this helps you.

Cheers,

STOne-32.

jki79ros81
Associate II
Posted on May 17, 2011 at 12:51

Hi, STOne-32!

Thank you for your help.

As you said,Debug Mode is when the Core and STM32 is controlled/connected to a JTAG tool, then when I disconnect the U-Link, main flash memory read access must be allowed from user code?

I tried, it is not allowed.

How must run FLASH_ReadOutProtection(DISABLE)?

Thank you!!!

franco2399
Associate II
Posted on May 17, 2011 at 12:51

ehh......

can somebode reset the read out protection????

The read out protection must block the code reading to everybody intrusion!!

If it is possible to reset the protection this function is not well working.

Please STOne-32, could clarify this your declaration????

Thanks