2021-07-02 03:42 AM
Hello,
As the questions says, I'm having difficulty programming a Nucleo-F334R8 board directly via the PA13 and PA14 SWD pins.
After removing the jumpers on the built-in ST-link (CN2) I have connected the external ST link directly to the SWD, reset, ground and power pins on CN7. However, the STM32CubeProgrammer is failing to detect the board at all. I have tried multiple settings for 'mode' and 'reset mode' options to no avail, getting a "Error: Problem occured while trying to connect" message every time.
I have also tried with the old ST-LINK utility with the same result. I have tried my external ST-link on an old STM32L-discovery board lying around and was able to read the flash from that fine, so presumably the problem lies with the nucleo part.
Am I missing something here? I can't figure out why this shouldn't work. I had a feeling it may be because the built-in ST-link is still present but I don't want to snap that off the board before I know that the alternative will work.
2021-07-02 07:19 AM
Did you disconnect the on-board ST-Link connection? There are jumpers for SWDIO/SWCLK. Also make sure it's not holding the chip in reset.
Why would you not just use the on-board ST-Link?
2021-07-02 08:02 AM
Yes, I disconnected the two jumpers on CN2 marked "ST-LINK / NUCLEO". The reset pin is being held high (not in reset).
I can't use the on-baod ST-link in the final project... The nucleo is going to be mounted to the underside of a carrier PCB where it is out of sight and inaccessible, but must still be able to be programmed. To do this I've added a header to the top of the carrier PCB for the ST-Link to connect to the SWD pins of the nucleo board. It sounds strange but it's a necessity for the project.
2021-07-02 09:08 AM
You'd need to inject SWDIO/SWCLK on the Target facing side of the CN2 pins
2021-07-05 04:02 AM
Those pins are directly connected to PA13 and PA14 on the nucleo header (CN7), so it should make no difference. Also, when the ST-link has been snapped off those pins won't exist at all...