Skip to main content
Graduate
November 22, 2024
Solved

Need Help with UVC Implementation on STM32U5G9J-DK2 Board

  • November 22, 2024
  • 1 reply
  • 1277 views

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.

 

    This topic has been closed for replies.
    Best answer by FBL

    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.

    1 reply

    FBLAnswer
    Technical Moderator
    November 22, 2024

    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.

    saikumarAuthor
    Graduate
    November 27, 2024

    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)