2021-02-26 11:25 AM
Hi, I'm trying to follow this tutorial :- https://youtu.be/Hk--a4K497M -- demonstrating how to transmit simple string to PC via usb virtual com port. Unfortunately, I'm getting no output on my serial port.
During debugging, I found that CDC_Transmit_FS() always returns USBD_BUSY since hcdc->TxState never goes to zero. Also, hcdc->RxBuffer and hcdc->TxBuffer throw an error stating cannot access memory at a certain address.
Things I have tried :-
1) increase heap and stack size to 800 and 1200 respectively.
2) change USB_HS_MAX_PACKET_SIZE and CDC_DATA_HS_MAX_PACKET_SIZE to 256.
3) Adding more delay before CDC_Transmit_FS().
PS: I'm able to send and receive data via USB using MBed online compiler's library (Serial (USBTX, USBRX)).
OS: Windows 10, Serial port monitor : CoolTerm , Toolchain: STM32CubeIDE.
Solved! Go to Solution.
2021-02-26 12:16 PM
Have a look at attached. We use the VCP/CDC for diagnostics. This is a print of our internal wiki notes about it...
Basic issue:
Paul
2021-02-26 12:16 PM
Have a look at attached. We use the VCP/CDC for diagnostics. This is a print of our internal wiki notes about it...
Basic issue:
Paul
2021-02-27 01:13 AM
Hi, thanks for replying !
I tried teraterm, USB CDC transmission is still not working (still stuck in usbd_busy loop) however USART via USART2 is now working !