<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Paul,<div class=""><br class=""></div><div class="">serial port error 22 means that the selected device is not currently enabled in the device manager. You’re correct in your assumption that in the case of your STM32 device, it might simply take too long for the serial port service is ready before CoolTerm tries to reopen. CoolTerm won’t try to re-connect until it sees the COM port again. Perhaps, in the case of your STM32 device, it takes some time after the port reappears before it’s actually ready. I will see if I can implement a delay between the time the port is rediscovered and the time CoolTerm attempts to reopen it.</div><div class=""><br class=""></div><div class="">Roger</div><div class=""><br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 25, 2021, at 7:20 AM, Paul Newf <<a href="mailto:paul.newf@gmail.com" class="">paul.newf@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Just tried this but doesn't seem to be working reliably for me :(<div class="">a) I'm using a VCP (Virtual Com Port emulated through USB pins on an STM32L496).</div><div class=""><div class="">b) It does work when used with an FTDI serial cable (USB to UART cable adds a UART by USB)</div><div class="">c) I haven't tested the Com Port through the STLink 14pin UART connection yet (I'll have a PCB with that in about a week)</div><div class=""><br class=""></div><div class="">What happens with VCP on STM32:</div><div class="">- Coolterm *sometimes* gives a popup: [CoolTerm - Warning][A Serial Port Error <font color="#ff9900" class="">Occurred</font>] [22: Error 22]<br class=""></div><div class="">-- The popup seems to always occur when I reset the STM CPU (loose VCP emulation while USB code restarts)</div><div class="">-- The popup sometimes occurs if I disconnect USB cable, wait, reconnect (possibly every second time it works)</div><div class="">-- Possibly related to timing of how fast port reappears?</div><div class=""><br class=""></div><div class="">These Coolterm settings didn't seem to affect it?<br class=""></div><div class="">[disabled] Options - Misc - Automatically connect on open* (also tried enabled)</div><div class="">[enabled]
Options - Misc -
Automatically disconnect on close* (Also Tried Disabled)</div><div class=""> *I tried a few combinations of these but didn't seem to affect Auto Reconnect of my VCP device</div><div class=""><br class=""></div><div class="">From CoolTerm Change Log: 1.9.0b1<br class=""></div><div class="">- Added code to detect sudden removal of serial devices. When a port is currently open, it will be closed when the device suddenly disappears.<br class=""></div><div class="">- Added code to detect re-appearance of serial devices. If a device has suddenly disappeared before while the port was open, CoolTerm will attempt to re-open the port. This is useful when attached microcontrollers are being rebooted.<br class=""></div><div class=""><br class=""></div><div class="">Paul</div></div></div>
_______________________________________________<br class="">CoolTerm-Betas mailing list<br class=""><a href="mailto:CoolTerm-Betas@the-meiers.org" class="">CoolTerm-Betas@the-meiers.org</a><br class="">http://the-meiers.org/mailman/listinfo/coolterm-betas_the-meiers.org<br class=""></div></blockquote></div><br class=""></div></div></body></html>