2019-05-06 11:25 PM
I'm using True Studio to compile a sample PWM program and using ST-LINK to program the device. It worked for the first 20 or so iterations but now it won't connect. It gives me this message:
OK I go to settings and there is no where to select "Connect Under Reset" nor is there anywhere to select a lower SWD Frequency. I had changed the ABH prescaler in clock configuration of MXCube from /1 to /16 going by the PWM example I found, but when I tried to change it to / 64 it quit working.
2019-05-06 11:31 PM
I guess I wiped out the on-board ST-LINK since I was connected via the USB port. But I have a ST-LINK V2 programmer so I probably just need to connected it to the (4) SWD pins on the board.
2019-05-06 11:52 PM
Assuming pin 1 of the SWD port is near the usb end of the card I connected according to the table 2 on page 24 of the manual:
1) VDD
2) SWCLK
3) GND
4) SWDIO
2019-05-07 12:31 AM
Nope, that didn't work. I think there's a way to reflash it using the serial port...
2019-05-07 06:53 AM
OK, you have to hold down the reset button for at least 1 second and then try to connect, then release the reset button.
2019-05-07 07:21 AM
So perhaps your code is reconfiguring the SWD/JTAG pins, or going into a low power mode. The other alternative is to strap BOOT0 HIGH, or select "Connect Under Reset" type options, which requires you also wire up NRST
2019-05-07 08:00 AM
Which STM32 part number and is it custom board ? If yes, which signals are connected between STM32 and STLinkV2?
2019-05-07 12:44 PM
It's the STM32F100RB. I was using VCC (3v3), gnd, SWDIO and SWCLK. It works fine now connected to the USB port after I hit reset just after trying to connect with the ST-LINK utility. I had the same problem with an STM32F103C8T (Blue Pill) for a while and I'm wondering if it caused another problem I asked about in one of my other posts.
2019-05-07 12:47 PM
https://community.st.com/s/feed/0D50X0000AhOHAY
I had a problem with the Blue Pill's outputs not working. The only pins that work are A0->A3, A9, A10 & B12.