cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help with UVC Implementation on STM32U5G9J-DK2 Board

saikumar
Associate III

Hi everyone,

I am using the STM32U5G9J-DK2 board and have generated the USB Video Class (UVC) code using CubeMX. However, I am new to both this board and UVC, and I am facing difficulties in understanding how to proceed further.

I couldn't find any specific examples or resources related to UVC implementation for this board. If anyone has already worked on UVC with this board or has any example code, it would be a great help.

Looking forward to your responses!

Thank you in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hi @saikumar 

Unfortunately, there is not direct example device supporting UVC class. Only for H7RS, we provide an example using classic ST USB library. I hope it could be helpful.

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.

View solution in original post

2 REPLIES 2
FBL
ST Employee

Hi @saikumar 

Unfortunately, there is not direct example device supporting UVC class. Only for H7RS, we provide an example using classic ST USB library. I hope it could be helpful.

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.

Hi Sir,

Firstly, I want to thank you for your help earlier. Your guidance has been incredibly valuable.

I’m reaching out with another issue I’m facing while implementing USB UVC (Uncompressed) on the STM32U5G9J-DK2 board.
The setup is working fine, and I can get image output with USBD_VIDEO_EPIN_HS_MPS under 1400U. However, when I try to increase the endpoint packet size by setting:


#define USBD_VIDEO_EPIN_HS_MPS 1400U

to a value greater than 1400U, the device stops being recognized in Device Manager.

For my application, I need to increase this value up to 5000U to achieve a higher data rate.

The problem is that the ux_device_stack_class_register  function in  MX_USBX_Device_Init()   returns UX_ERROR, which causes the code to get stuck in the following loop:

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


I’ve attached a ZIP file of my code for your reference, as well as a screenshot of the image output in VLC Media Player to show the current status.

Do you have any suggestions or ideas on how I can achieve this larger packet size or increase the data rate to meet my requirements?

Thank you once again for your time and support!

 

(Proper source code formatting applied; instructions here for future reference)