Skip to main content
Visitor II
December 7, 2022
Solved

STM32U5 USB Eye diagram

  • December 7, 2022
  • 2 replies
  • 1550 views

Hello,

I'm working on STM32U5. We integrated the USB lib without AzureRTOS using the stm32_mw_usb_device (from STM github) as example.

I use my STM32U5 as a USB device CDC, using the USB_OTG_FS. Everything seems to be working fine (Linux can mount it and send/receive data to/from it).

Now, I want to test the eye diagram required by the USB 2.0 specification but I could not find any example code for this.

I saw in the code a function called "USBD_RunTestMode()" but unfortunately, it is empty.

Do you have an example of this ?

If not, could you give me some hints on how I should do this ?

Thank you.

Best regards,

Stephane

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

    Have you studied the Reference Manual for your stm32?

    In the stm32f4xx Reference Manual there is a whole chapter on its full-speed USB-OTG-FS, and another on its USB-OTG-HS interfaces.

    In (for example) OTG_FS there is OTG_FS Host port control and status register (OTG_FS_HPRT) which has bits PTCTL: Port test control

    "The application writes a nonzero value to this field to put the port into a Test mode, and the corresponding pattern is signaled on the port.

    0000: Test mode disabled

    0001: Test_J mode

    0010: Test_K mode

    0011: Test_SE0_NAK mode

    0100: Test_Packet mode

    0101: Test_Force_Enable"

    2 replies

    Danish1Answer
    Graduate
    December 7, 2022

    Have you studied the Reference Manual for your stm32?

    In the stm32f4xx Reference Manual there is a whole chapter on its full-speed USB-OTG-FS, and another on its USB-OTG-HS interfaces.

    In (for example) OTG_FS there is OTG_FS Host port control and status register (OTG_FS_HPRT) which has bits PTCTL: Port test control

    "The application writes a nonzero value to this field to put the port into a Test mode, and the corresponding pattern is signaled on the port.

    0000: Test mode disabled

    0001: Test_J mode

    0010: Test_K mode

    0011: Test_SE0_NAK mode

    0100: Test_Packet mode

    0101: Test_Force_Enable"

    Visitor II
    December 7, 2022

    Hello Danish,

    Thank you for highlighting this !

    I'll look into it !

    Best regards,

    Stephane