Showing results for 
Search instead for 
Did you mean: 

COM port drop out

Associate II

I have a written C# windows application that receive data continuously from MCP2221A. MCP2221A receive data from STM32 UART through receive data line. When the laptop goes for sleep (in battery mode), it send a suspend signal (it will go low) to the MCP2221A. And MCP2221A will goes for sleep. When the laptop wakes up, MCP2221A will wake up start to receive data and transmit. But since the wake up COM port is drop down on the C# windows application. And the windows application does not show data even though MCP2221A sending a data. I don't know what's going on there?


Do you close the COM port when Windows tells you it's about to shutdown?

I can't speak to ST's VCP/CDC and driver robustness in this regard. Or Microchips'

Unless you're in a position to work on those, I might suggest looking at how well a SiLabs USB-to-CMOS Serial works in the same scenario.

On the STM32 side, you'd probably want to look at the UART to see if any noise or framing errors are stuck and need to be cleared.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

@cjaya.2 When your PC is about to sleep and after it resumes from sleep, Windows will send a notification to your app. Just handle these notifications correctly (close and reopen the COM port) and enjoy. Ask your favorite AI for example code or visit the Microsoft's .NET forums.