cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030K6T6 can only be programed with ST-LINK once

tomjianchun
Associate II
Posted on February 03, 2015 at 08:40

my design using STM32F030K6T6, see attached schematics, and using SWD to program, with ST-LINK(Version is at attached picture), I can only program STM32F030K6T6 one time, after code (which is simple toggle one LED on/off) is running, ST-LINK can never connect to STM32F030K6T6 again, what is the reason ?

#stm32
14 REPLIES 14
tomjianchun
Associate II
tomjianchun
Associate II
Posted on February 03, 2015 at 08:54

can anybody help me ?

Thanks.

AvaTar
Lead
Posted on February 03, 2015 at 11:03

Your code is probably buggy and uncooperative.

Startup your board in the system mode (BOOT0/BOOT1 pin), and use the FlashLoader Demonstrator software (from ST) to do a mass erase.

There are several descriptions of this procedure here on this forum.

Posted on February 03, 2015 at 14:16

Have you tried the ''Connect Under Reset'' options?

If your code is broken you can disconnect the SWD pins, or interfere with the GPIO configuration. Pulling BOOT0 High and resetting will stop your broken code from running, and you should be able to reflash the device.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
tomjianchun
Associate II
Posted on February 04, 2015 at 03:17

Thank you for your help, I am just use STM32Cube to generate one simple LED toggle code. I don't why this code has buggy, and this code looks running corrently in the board, and my ST-LINK has no''Connect Under Reset'' option, in Target ---settings, there are only two options, either ''Normal'' or ''hot plug'' , I am using the latest V3.5 version ST-LINK downloaded from ST web

________________

Attachments :

3.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0tm&d=%2Fa%2F0X0000000bfI%2F0esgKhlW_IqHE0MHcXJyEIIf4sU7Nm72gXW1PQO1Hbk&asPdf=false
Posted on February 04, 2015 at 03:42

Does setting BOOT0 High allow you to program the part? Yes/No

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
tomjianchun
Associate II
Posted on February 04, 2015 at 04:08

yes, exactly, as I configure BOOT0 as high , My ST-LINK can connect to micro, and programming.

Thank you very much.

but what is the root cause ?

tomjianchun
Associate II
Posted on February 04, 2015 at 04:22

Is my understanding correct ?

since my code has bug, so in BOOT0=Low, as my code is running, ST-LINK can not connect to micro, and

as I set BOOT0=high, my code is not running, and ST-LINK can connect to micro ?

Thanks.

Posted on February 04, 2015 at 05:21

Correct

There are several things, the most frequent are breaking the GPIO pins used for SWD/JTAG connectivity, or powering down the device.

Look at if you are doing anything with PA13/PA14

Look at if you're using WFI or low power modes

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..