[Nucleo] Issues with Serial Port initialization after plugging in through built-in ST-link
Hi all!
First time poster.
I'm working on a prototype that utilizes a Nucleo-G474RE to move some motors and read some sensors. The design is working great and my code is running as it should. However, recently I've been having some issues with the virtual COM-port on my Nucleo board. Whenever I program the device, it works perfectly.
When I unplug and replug the USB however, my serial connection doesn't respond in any way. This is true even when I plug in a completely fresh Nucleo directly to my PC, powered by 5V_STLK, no peripherals. The status LEDs on the device do function as expected, but no messages are received or transmitted.
Plugging in and then resetting the micro or removing and replacing JP6 fixes the issue, making the serial work again.
There has been a firmware update to the ST-Link 3 that's built in, and we made some minor changes to the code, but even rolling back to a known working version of our firmware does not help. I want to share our source, but it's for a customer, so I don't think I can.
Things I've tried:
- Rolling back my firmware to a known version
- Using a different board
- Isolating the nucleo from the rest of the device
- Putting a 1 second delay at the start of Main()
- Removing the watchdog timer from my firmware
The issue exists in Windows as well Linux (in a VM), using terminal, putty and arduino IDE serial monitor.
I'm kind of starting to think the issue is with the ST-link firmware. I would love some help. My embedded engineer has given up and tells me to resort to manually resetting or reflashing the micro every time we need to use the machine, but that's unsatisfying to me.
Best wishes,
Thomas
