cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F013C8T6 (blue pill) flash error

DTung.2
Associate II

I am using STM32F103C8T6 with libopencm3 and FreeRTOS. Some programs I have can only flash once, even though the code function properly. The second time I flash it will say something like "unknown chip id! 0x3748. Failed to connect to target". I have to set boot0 jumper to VDD, and issue "st-flash erase" from console, then set boot0 jumper back to GND to reset the board.

My question is: Is this normal? If not, what could be the problem? How can I narrow down the issue? It really is inconvenient to go through so many steps to flash a new code.

3 REPLIES 3
Uwe Bonnes
Principal III

Check that you do not have a STM32F103 clone!

No. It is from STM.

DTung.2
Associate II

In case anyone curious about what happens to this problem, I found I have disabled JTAG and SWD accidentally in the programs so the flash function is not working.

About the approach I used to debug this problem, I disable my program block by block until I narrow down the problem.