cancel
Showing results for 
Search instead for 
Did you mean: 

USB High Speed - CDC_Transmit_HS is always busy and callback is not called

Jorge Alves
Associate III

Dear ST,

I'm developing a project to send ADC data via USB high-speed to an external device (PC) with STM32H7S78-DK. I'm trying to establish communication via USB, but I'm having trouble with the CDC_Transmit_HS function, which always returns busy. Additionally, the callback CDC_TransmitCplt_HS() is never called, and the USBD_CDC_DataIn() function is not invoked. The hcdc->TxState = 0 is always different from 0. I don't understand why it is happening.

The USB init, I think it is ok, because I can identify it at an external computer with the correct description and 480 Mbit/s of USB High speed.

These are my configurations of USB:

JorgeAlves_1-1755107751791.png

JorgeAlves_2-1755107774781.png

JorgeAlves_3-1755107897224.png

The Global Interrupt for USB is also available.



This is the clock configuration:

JorgeAlves_4-1755107958926.png

 

 

This is my code at the main, I just developed a code to send "hello" every second, and if it is Busy, it will print an increment value on the LCD

JorgeAlves_0-1755107602325.png

This is my  USB init function:

JorgeAlves_5-1755108300636.png


Do you know what the solution can be to the CDC transmission issue with USB high-speed data transfer?

 

Best Regards,

Jorge Alves

 




3 REPLIES 3
TDK
Super User

Where is usb_buf located? Somewhere the USB DMA can access?

If you feel a post has answered your question, please click "Accept as Solution".

The usb_buf is located at  0x24000400

JorgeAlves_0-1755164504006.png

 

Can USB access it, right?

Dear ST, 

Do you have any update? 

Regards,

Jorge