Since I changed computer, the communications serie bugs in an eratic way after a random number of requests generally between 2000 and 150000.
Spending time trying to understand and solve the problem I never had before with the serial link, if it worked once it would work forever.
Soon enough I realized that all I had to do was to close and re-open the communication on the PC side to get around the problem but without ever finding the source of the problem.
I tested several versions of mbed-os, mbed (LPC1768, K64F), PC side communication interface (LabVIEW, TeraTerm) to isolate the problem as much as possible.
A small TeraTerm script realized to automate the requests and to observe only the stability of the communication allowed me to exclude LabVIEW from my suspects.
; sample macro of Tera Term connect '/C=x'. setbaud 230400 timeout=2 result=1 while result=1 sendln 'm?;trig?;pos?;targ?'. recvln endwhile disconnect 0 exit
The script works in conjunction with this test program: DebugUSB3
TeraTerm must be configured in LF for transmission and the script must be a .ttl file.
Stability was found after testing this duo on several PCs including my old one.
each time it was Windows 10 pro 64Bits but on those which did not have a problem there was USB2 contrary to the recent PCs with USB3.
So I come here to share the problem because it’s beyond my skills.
Do you have the same problem?
Is it USB3?
How can I fix it?
Thank you in advance for your help,