Hello, I meet some problem on COM-Port(RS232) programming recently.
I use a USB-to-RS23 converter IC name CP2102(from Silicon Lab) for the front end of 8051 device. The 8051 will do some jobs for me after receiving the instruction from PC(software). The communication between PC and UART is done by Windows API, WriteFile and ReadFile.

My problem is that sometimes the PC software will lost the handle of COM-Port which is already get and works well. Why?

Is there any hardware release mechanism by Windows?
Because I use 4 COM-Ports at once and the software may idle 1 min between each instruction. Will Window release the hardware resource(COM Port) because I use 4 at once and idle?

If so, how to solve the problem?

Thanks for help.