Hi all,
I have some boards with an STM32F030F4, which are programmed and working. I wanted to erase and reprogram one, I have connected the ST-Link V2 programmer, but what ever I do always get the message 'cannot connect to target'.
I have probed the microcontroller pins (SWDIO, SCLK, and reset) and there are definitely perfectly good data signals getting to it. I have configured the the programmer to 'connect under reset' and the device is definitely held in reset (confimed by probing the reset pin and by the fact the application already on there stops running, and restarts when the programmer is disconnected). I have tried every possible serial frequency setting, connecting the boot0 pin to vdd and ground, nothing. I know these devices are good, because they were programmed by a 'copy' st-link programmer and they have working firmware on them. The read protection bit might be set, but I don't care, I just want to erase the device (even choosing 'erase memory' in the st link program just says cannot connect to device). I know the programmer works because I have been using it for other things. I even tried the 'copy' STlink programmer that I know was used to program them (the exact actual device), but still 'cannot connect'.
Any ideas from the STM32 aficionados out there? I feel like I must be doing something blindingly obviously stupid. If it has something to do with the protection bit, how can I erase the flash? As far as I have read I think I am doing everything right (and this is not just one board either, same results with 2 different ones...)