2025-08-08 4:41 AM
Hi,
I am trying to solve a strange programming related problem I am now having after updating the reset circuit of my STM32F439-based board. Below is a comparison between my old and my new circuit:
The reason I made these changes is because this is a large board which resulted in noise pickup issues on the on the very long nRESET trace when it was just "floating high". My plan was to solve that by actively driving it high instead. I also wanted to add a feature where I could use one of the MCU's GPIO pins to trigger a full board (not just MCU) reset programmatically by pulling the nRESET signal low.
The changes seem to have fixed the two problems I had but have now introduced a new problem where I cannot program the board easily with an ST-Link (V3 MINIE) anymore. I normally use probe-rs for programming, but have verified that the official STM32CubeProgrammer shows very similar issues.
When I try to program with "connect under reset", then it seems that the ST-Link almost never drives its nRESET output low and thus programming fails unless I manually drive the signal low at the correct time by pressing the physical reset button which is connected to the same net. Nothing on this net can force the signal high so this cannot be a result of contention, it has to be that the ST-Link is not even trying to pull the signal low for some reason.
Another problem I now have is that after I manage to get it programmed, the MCU now halts (possibly because of a crash but I am not sure) until I either manually get the debugger to resume execution or if I detach the debugger. Physically pressing reset while the debugger is still attached is not enough to make it run, but repowering the board without the debugger attached is enough. This is strange because I am not telling the debugger to halt the MCU after programming and my previous board did not have this issue. STM32CubeProgrammer reports this as "Warning: The core is halted" after programming finishes whereas probe-rs makes it look like a crash of sorts.
My question is whether there are "hidden" requirements on the nRESET pin of the MCU that can explain all this strange behavior. Specifically, is there something that can go wrong when nRESET is being actively driven high rather than pulled high? Perhaps the MCU itself needs to be able to pull this signal low under certain conditions?
Solved! Go to Solution.
2025-08-08 5:44 AM
I have now removed the buffer (U2) and this seems to have solved the issue. It seems that the STM32 does indeed need to (very momentarily) pull its own nRESET pin low at certain times during programming to reset properly.
Probe-rs still does not work with "connect under reset" for some reason even though STM32CubeProgrammer now works perfectly. I'm not really sure what the issue there could be though since it worked fine with the old board. At this point the only remaining difference is that the ST-Link cannot see when the STM32 pulls its own nRESET pin low and the reset pulse from the ST-Link gets slightly stretched.
P.S. I also switched to a reset controller IC with a much shorter delay since the one I originally chose likely stretched the reset pulse from the ST-Link too much. But I am not sure if this was strictly needed.
2025-08-08 5:44 AM
I have now removed the buffer (U2) and this seems to have solved the issue. It seems that the STM32 does indeed need to (very momentarily) pull its own nRESET pin low at certain times during programming to reset properly.
Probe-rs still does not work with "connect under reset" for some reason even though STM32CubeProgrammer now works perfectly. I'm not really sure what the issue there could be though since it worked fine with the old board. At this point the only remaining difference is that the ST-Link cannot see when the STM32 pulls its own nRESET pin low and the reset pulse from the ST-Link gets slightly stretched.
P.S. I also switched to a reset controller IC with a much shorter delay since the one I originally chose likely stretched the reset pulse from the ST-Link too much. But I am not sure if this was strictly needed.