2015-02-02 11:40 PM
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 ?
#stm322015-02-02 11:52 PM
2015-02-02 11:54 PM
can anybody help me ?
Thanks.2015-02-03 02:03 AM
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.2015-02-03 05:16 AM
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.2015-02-03 06:17 PM
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=false2015-02-03 06:42 PM
Does setting BOOT0 High allow you to program the part? Yes/No
2015-02-03 07:08 PM
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 ?2015-02-03 07:22 PM
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.2015-02-03 08:21 PM
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