cancel
Showing results for 
Search instead for 
Did you mean: 

USB Device hangs on high data rate in STM32H750VB

Saagar
Associate

I am reaching out to request your assistance with an issue we are encountering on the STM32H750VB microcontroller related to USB data transmission. The problem arises when operating at high data rates, specifically with external USB synchronization and high BPM settings (e.g., 999 BPM) with a 1/32T scale. In this scenario, the USB device stops sending data altogether, with no messages being transmitted.

Upon debugging, we found that the condition if ((epint & USB_OTG_DIEPINT_TXFE) == USB_OTG_DIEPINT_TXFE) in the USB interrupt handling code is not being satisfied after the USB stops transmitting. This suggests that the USB buffer may not be empty, leading us to believe there could be a buffer-related issue.

To address this, we increased the buffer size using the following configuration: HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x200); HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x200); HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 1, 0x200);

However, even after adjusting the buffer size, the issue persists, and the USB device continues to hang under the same conditions.

We kindly request your support in diagnosing and resolving this issue as it is critical to our project. Any guidance or suggestions you can provide would be greatly appreciated.

1 REPLY 1
FBL
ST Employee

Hi @Saagar 

Which USB class being used? Could you share your USB full initialization?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.