Skip to main content
Visitor II
July 3, 2023
Solved

STM32U5 and USB HS

  • July 3, 2023
  • 4 replies
  • 7191 views

Hi all
I'm configuring STM32U5A5VJT to work with the USB HS crystaless. From the Cube it seems to be possibile to use one of the integrated oscillators as clock source for the USB HS but this is not mentioned in the datasheet.

I'm afraid that it could work but not in all the situations such as with high and low temperature.

Moreover in the STM32L4 I can use the 32768 crystal as calibrator for the internal oscillator that feeds the USB clock but in this case we are in USB FS while for U5 it's USB HS
My question is: Is the HSE crystal mandatory for USB HS?

    This topic has been closed for replies.
    Best answer by Lukasz Nowak

    I have just hit the same issue. And it looks like it is a bug in STM32CubeMx configurator (it should throw an error if you try to use crystal-less on chips with USB HS).

    I believe the crystal-less is only supported with STM32U5 FS chips (535/545/575/585). The chips which have the HS PHY (595/5A5/599/5A9) require an external crystal. The datasheet specifies that quite clearly:

    stm32_u59x_usb_1.png

    It is further detailed in the reference manual's RCC section:

    stm32_u59x_usb_2.png

    The red-dashed lines show differences between FS and HS chips.

    In order for crystal-less to work, the clock recovery system (CRS) must be used which works only with the HSI48 oscillator. HSI48 can be selected as a source for the FS block, but the HS block requires a PLL/HSE clock - HSI48 is not available there.

    4 replies

    ST Employee
    July 3, 2023

    Hi @dodotronic ,

    From the reference manual RM0456 rev 4, the USB High Speed has for clock source, the HSE and the PLL1Q. Please refer to the figure 36 "Clock tree for STM32U5 Series". 

    Aime_1-1688407922663.png
    In that case I would say that it is not mandatory to use an external HSE crystal for the USB HS.
    Please make sure that you respect the minimum input frequency (30MHz) the characteristics mentioned in the datasheet for the USB HS (Table 161 and 162). 

    Just to be sure that you will not face any issue, can you be more accurate about the high and low temperatures that you mentioned?

    Best regards,
    Aime

     

     

    Visitor II
    July 26, 2023

    Hi @Aime

    I'm some doubth if the USB HS could work in all situation and if it accomplish the USB specifications. One of the mail issue for an RC oscillator is the variation in all the temperature range of the micro. In the datasheet it seems to be possible to use a 32.768 crystal as reference for the internal RC oscillator for the USB FS but when they talk about the HS it seems to be possible to use only HSE as reference.

    Best

    Iv

    Graduate
    August 1, 2023

    I have just hit the same issue. And it looks like it is a bug in STM32CubeMx configurator (it should throw an error if you try to use crystal-less on chips with USB HS).

    I believe the crystal-less is only supported with STM32U5 FS chips (535/545/575/585). The chips which have the HS PHY (595/5A5/599/5A9) require an external crystal. The datasheet specifies that quite clearly:

    stm32_u59x_usb_1.png

    It is further detailed in the reference manual's RCC section:

    stm32_u59x_usb_2.png

    The red-dashed lines show differences between FS and HS chips.

    In order for crystal-less to work, the clock recovery system (CRS) must be used which works only with the HSI48 oscillator. HSI48 can be selected as a source for the FS block, but the HS block requires a PLL/HSE clock - HSI48 is not available there.

    ST Employee
    August 2, 2023

    Hi @Lukasz Nowak ,

    That is right, the USB HS is only available on STM32U59x/5Ax devices which require an external HSE crystal or to be clocked with the PLL1/Q.
    And STM32CubeMX should trigger a error or it shouldn't be possible to choose an internal oscillator in that case.

    Which version of STM32CubeMX are you using?

    Thanks
    Aime

    Graduate
    August 2, 2023

    Hi Aime,

    I am using:

    STM32CubeMX - STM32 Device Configuration Tool
    Version: 6.9.0-RC9
    Build: 20230705-1724 (UTC)

    launched from:

    STM32CubeIDE
    Version: 1.13.0
    Build: 17399_20230707_0829 (UTC)
    Graduate
    August 1, 2023

    Furthermore, USB HS specification requires 500ppm accuracy on the clock (0.05%), I don't think it is possible to achieve that with an RC oscillator, even with the CRS trimming.

    USB FS accuracy requirement is 0.25% which is achievable with trimming, so crystal-less is possible.

    Graduate
    April 3, 2024

         But now I have tried it, it is also possible to use HSI as the clock source, is this a special case or can it indeed be used as the clock source? If the product is released in batches and the HSI is used as the USB HS clock source, will it often fail and the yield rate is not high?

    Visitor II
    April 5, 2024

    As I understand the datasheet: for USB HS - you have to use a good external XTAL or CMOS OSC and use HSE as the clock source for USB. The internal HSE OSC (as an RC) is not stable and accurate enough (too much jitter and not the required ppm on clock deviation for USB).

    Visitor II
    April 6, 2024

    ok thanks a lot!