cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Increasing USBD_VIDEO_EPIN_HS_MPS for UVC Implementation on STM32U5G9J-DK2

saikumar
Associate III

Hello,

I am facing an issue while implementing USB UVC (Uncompressed) on the STM32U5G9J-DK2 board.

The setup works fine with USBD_VIDEO_EPIN_HS_MPS set to 1400U, and I can achieve image output. However, increasing the endpoint packet size beyond 1400U (e.g., up to 4000U) causes the device to stop being recognized in Device Manager.

The issue appears during the initialization process, where the ux_device_stack_class_register function in MX_USBX_Device_Init() returns UX_ERROR.

This results in the code getting stuck in the following loop:

status = MX_USBX_Device_Init(memory_ptr);
if (status != UX_SUCCESS)
{
     while(1)
     {
     }
}

For my application, I need to achieve a higher data rate, which requires increasing the endpoint packet size. If I can increase the value of USBD_VIDEO_EPIN_HS_MPS, it would allow me to send larger packets, which is essential for achieving my data rate goal.

I’ve attached a ZIP file containing my code for reference, along with a screenshot of the current image output in VLC Media Player.

Could you provide guidance on how to configure the endpoint packet size to meet my requirements or suggest alternative approaches to increase the data rate?

Thank you for your support!

0 REPLIES 0