Plugging in USB to STLINK-V3E on a Nucleo-144 (UM2407) board for the STM32H743 causes software reset
Setup:
I am developing an application where the Nucleo-144 board sits in a cabinet adjacent to a computer. The Nucleo-144 board is powered externally via a 12v power supply. I have selected this with the vin jumper and confirmed that JP2 is bridging pins 3-4. Finally, within the cabinet, the nucleo-144 board controls if the computer gets AC power via a relay. In addition to this relay, I need to be able to talk to the computer via serial to echo some messages and display power supply updates. There is a small daughter board we have designed that sits on top of the Nucleo-144 board that controls the relay as well as a power button (what we are triggering the relay with) and a pwm signal.
The problem:
The problem starts when I plug in a USB from the computer to the STLINK-V3E USB Micro-B connector (CN1) on the Nucleo-144 board. Nothing happens when the computer is off which makes sense. However, when the computer boots up and during enumeration (presumably?) the board resets. This causes the pc to lose power temporarily (due to the relay opening), causing it to turn off. This reset of the board is what I'm trying to prevent because it turns off the computer (due to the gpio going low for a moment).
What I Have Already Done:
This does not happen when the data pins of the USB are removed. Additionally, I have scoped VDD and have not seen any transients. As for what is causing the reset, I'm not sure. It seems both the external and software reset flags are set when it boots up again (found this out by using the USB for serial communication after the described condition occurs). It also has nothing to do with this computer directly, the board resets when any computer is connected to it. Lastly, I have scoped the nrst line and seen two low pulses with the JP3 connector disconnected. I'm not sure what is causing these though given that JP3 is disconnected.
My Guess:
My impression is that the STLINK-V3E has something to do with this, but the problem still occurs when I remove the nrst jumper (JP3), so I'm not sure how the STLINK-V3E could be causing this? And because this does not occur when the USB only supplies voltage, that seems to confirm to me that when the STLINK-V3E initially starts it is causing some reset condition that is affecting the microcontroller despite the jumper being removed.
Conclusion:
I could swap the USB I'm using to the other one (CN13), but I liked the idea of having access to the STLINK-V3E. However, if this is what I have to do to prevent my board from resetting I'm okay with that. If anyone had an idea on how to prevent this board reset on USB enumeration I would greatly appreciate the information. Also, if anyone had suggestions on additional debugging steps I could take, I would also appreciate those. If attaching the code could be helpful I'll do that as well. Thanks in advance!
