cancel
Showing results for 
Search instead for 
Did you mean: 

unable to program or erase the flash

lakshmikantha85
Associate II
Posted on October 02, 2011 at 15:31

Hi,

I want to use PA13 (multiplexed with JTMS) as GPIO pin of stm32f103. So i configured AFIO_MAPR reg (SWJ_CFG[2:0] - 100 --> JTAG-DP Disabled and SW-DP Disabled) .

Now i am unable to program or erase flash. Please help.

2 REPLIES 2
Posted on October 02, 2011 at 19:04

Use to BOOTx pins so it runs the system loader, and not your code that disables the JTAG.

In the future consider checking a GPIO pin before disabling the JTAG, or providing a serial console to re-enable it for programming, or sending firmware updates directly.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Dmitry Novikov
Associate II
Posted on December 21, 2016 at 09:22

Hi, I have the same error and found 3 another threads with this. Looks like there is error with writing to AFIO->MAPR register.

https://community.st.com/0D50X00009XkYWnSAN