2014-07-07 07:48 AM
Hi everybody,
I'm working with an ST-LINK from a discovery board STM32F4 to debug an external application on a custom board which embedded an STM32F0 (my target). The ST-LINK seem to be good because there's no problem to perform read and write operation on the discovery MCU (stm32f4). So i connect the SWD signals to the custom board's MCU as describe bellow:SWCLK: PA14GND: GNDSWDIO: PA13RESET: Reset pinMy first problem is that i need to choose ''connect under reset'' in the st-link utility while i have a blank MCU. (i don't understand why because there's no pin config yet)The second problem is that the software is able to read the memory content but it can't write anything in the flash memory. 3 pop up displayed: ''Elf loader could not be transfered to the device. Change ....'' then ''Error occured during memory writing!'' and finally ''Can not connect to device!''The Log show:15:28:02 : Could not set Option bytes!
Please reset the target and retry. 16:30:10 : Elf Loader could not be transfered to device. Change 'Target/Settings/Connetion' mode to <<Connect Under Reset>> and Try again. 16:31:29 : Error occured during memory writing! 16:31:56 : Can not connect to device! I had a look on memory protection but st link utility seem to unlock the memory himself. Am i right ?I would like to understand if it's an hardware or a software issue.I also attach the SWDIO oscilloscope signals if it can help. Thanks in advance.2014-07-07 07:56 AM
To support an F0 device you'd need to make sure you have sufficiently current firmware on the F4-DISCO.
You need to also make sure you have adequately disconnected the F4 from the ST-LINK, via the jumpers and solder-bridges, so that it doesn't interfere with the operation of the F0 you have now attached.2014-07-07 08:08 AM
Thanks for the reply,
SB11 is OFF, jumpers are OFF and the firmware is V2J17F0.I have successfully tested the process with this ST-LINK and a F0 DISCOVERY board.But still not working on my custom board.I have successfully programmed the board in DFU mode if it can help.2015-04-07 07:40 AM
I have the same problem, except that I don't get the ''Can not connect to device!'' error in the end.
I've uploaded a binary file to the chip before and I can still connect to it and read its contents, but erasing any blocks leads to the error. I'm using STM32F051C8T6 on a custom board.2015-04-09 06:12 AM
Bump.
2015-04-12 07:25 AM
Bump #2.
2015-04-12 09:05 AM
The pool here is pretty shallow. I have very marginal interest in Cortex-M0 parts. Instead of bumping threads, ask yourself why it might be ignored.
You have a similar problem, but different? You have an error, it's different but there's no log or diagnostic output. You have the same firmware, perhaps not? You have a different board? You've tested the JTAG/SWD interface with any other equipment? Does an F0-DISCO work? Does a ST-LINK V2 work? Does the behaviour change if you strap BOOT0 High? May be you both have errors in your board designs.2015-04-13 06:17 AM
Thanks for your reply, you've practically solved my problem. Issue was that I completely neglected the BOOT0 pin and it was floating. When bound to ground, flashing and erasing the chip works fine.