cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication error in hTerm: Error in OpenPort: Internal Erorr when initializing 'COM3

crackl1ng
Associate III

Hello STM32-Community,

I'm currently using an STM32L4R with USB Connection to PC. I've "Device_ONly"-Mode in USB_OTG_FS (though I am not 100% sure if required) and USB_Device in STM32CubeMX activated. I included the settings iof USB_DEVICE in the category "Middleware".

So using the USB Connection works with terminal I found online. Sending simple data 0x00, 0x01, 0x02, 0x03 works fine, but any other communication system fails. I tried out MATLAB; hTerm and LabVIEW, none of them could establish a connection between STM32 and PC. Anyone had this issue prior and knows how to resolve it?

Kind regards and thank you in advance

crackl1ng0693W00000NqZatQAF.png0693W00000NqZZgQAN.png0693W00000NqZYUQA3.png

2 REPLIES 2
Pavel A.
Evangelist III

Make sure to handle get & set request for line parameters (baudrate, parity etc.)

I've everything checked twice, though it should "connect" properly, even though those settings arent set correclty, right? I also noticed a small discrepancy. In hardware-manager the device is listed as "Teensy USB Serial", but in STM32 i've had it programmed as STM32 Microsystems something which was set on default. I used an USB Sniffer and it actually found the correct device name as stated in CubeMX. Why is this discrepancy there?