Code won't run after power cycling when debugger isn't connected
- 3 replies
- 4757 views
The code runs perfectly fine, and as expected when I don't have a USB connected, given that I push the Reset button (B2) on my Nucleo-F746ZG.
The problem is that when I remove power from the system, and re-power it, it seems to not reset.
I have jumnpers connected to both pairs of pins in CN4 (though removing them didnt help)
I also have the jumper at JP3 to EV5.
The power supply seems stable enough (attached a picture called Oscillioscope_power_supply.png)
I tried adding a tantalum capacitor (6.8uF, 16Vmax) to the circuit to reduce the ripples, though it didnt work.
JP4,JP5,JP6, and JP7 have jumpers attached.
After power cycling LD4 is blinking slowly with red, indicating that it is waiting for a USB connection (?)
I launched using RUN, console log is in console_log.txt, the logfile STMCubeIDE recorded is also attached as com_controller.build.log
Parameter settings for RCC:

I have tried adding NVIC_SystemReset(); to the hard fault handler in stmf7xx_it.c.
Stating again at the end here, the system works perfectly once I press the Reset button, but the system is intended to be placed somewhere where the only way I have to interact with it is to turn the power off and on again (STM is to be placed inside watertight acrylic container, where power can be turned off and on using a reed relay and a magnet, the magnet is about 40cm away from the STM, and does not seem to impact the STM).
Any tips for how I can go forward?
