I got myself an STM32F411RCT6 and my ST-Link V2 is not detecting it using SWD, but I am able to program other STM32s using an even simpler setup, so I think there is something specific about this MCU that I'm missing. I've combed through the datasheet and looked at other schematics for the same chip, but I can't figure out what I'm doing wrong or missing.
- The ST-Link V2 supplies the power to the circuit (3.3v) and has only 4 wires connected (3.3v, GND, SWDIO, and SWCLK) I have no hardware reset on the programmer (My other STM32s use software resetting) but I did add a reset switch to the circuit to manually reset the chip.
- With the analog supply (VDDA) connected to 3.3v, the VCAP1 pin generates +- 1.2v (As it should, according to the datasheet). I initially did not connect VDDA to 3.3v, and the VCAP1 voltage was at 0v, but when bridging certain pins on the left side of the QFP64 chip with my finger, the VCAP1 voltage jumped to +- 0.7v, and the ST-Link V2 was able to detect the chip (I discovered this accidentally, and can reproduce it 🤷♂️). It is not a reliable trick to try programming the chip with, but it makes me think that my problem lies with one or more of the pins on the left side of the package.
- The circuit on the schematic was the end result of my troubleshooting, I initially connected only one VDD and VSS pin, as well as the SWDIO and SWCLK pins to try and program it, and that is how I discovered the weird finger trick above - I can program my other STM32s (MM32F031C6T6) by only connecting the 4 pins from the ST-Link V2 (No capacitors, no oscillator, and no connections or switches on the BOOT and reset pins)
- I reset the chip with the BOOT0 pin pulled high to see if maybe I need to use the bootloader, but it did nothing.
- The HSE is not in use (I think) because it has not been programmed to use it yet, but I added it to my circuit as the intended oscillator. (The HSE also wasn't connected when the weird finger magic from the previous point happened)
- I have a 100nf capacitor connected between each of the VDD pins and GND, but I simplified my schematic.
- When connecting VDDA to 3.3v, I cannot reproduce the finger trick above, even though the VCAP1 voltage does jump around a bit when doing it.
Update: I soldered a USB connection on to the circuit and changed the oscillator to a 25mhz one, and also removed the series resistor, to see if I can boot the chip into DFU mode, and this works, but only for a few seconds (Windows device manager shows the STM32 Bootloader USB device, and after a few seconds it disappears). After it disconnects from USB, it cannot be rebooted back into DFU mode again, unless I've left it powered off for a minute or so.
I also tried what was suggested in the comments with the capacitor on the reset switch, but as expected, this made no difference.
I tried connecting to it using STM32CubeProgrammer, and the USB connection also disappears the moment I connect to it. I then found the with STM32CubeProgrammer I can connect to it using SWD, but I cannot write to, or erase the chip, it throws errors, but this connection remains conencted as long as I don't try writing to the chip.
I've looked at the ADAFruit STM32F411 Blackpill board to follow their circuit as closely as possible, but I'm not having any luck getting it to work reliably.
Below is the updated schematic.
Hopefully someone can help point out where I'm going wrong.