cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 and USB HS

dodotronic
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Lukasz Nowak
Associate III

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.

View solution in original post

11 REPLIES 11
Aime
ST Employee

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

 

 

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

Lukasz Nowak
Associate III

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.

Lukasz Nowak
Associate III

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.

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

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)
require an external HSE crystal or to be clocked with the PLL1/Q.

So we can run it from PLL1 based on HSI or MSI? Of course, we cannot. Good luck catching all of the possible combinations for everything everywhere... 😉

It is working now for me (with external 8 MHz HSE as CMOS OSC). No need to have a real XTAL on board.

It needs a special ClockConfig (not all possible PLL settings are working).

More details here:

STM32U5A5: USB HS without XTAL oscillator - WORKS - STMicroelectronics Community

and my project is here:

GitHub - tjaekel/STM32U5A5-VCP_UART: VCP UART on U5A5 NUCLEO and my board

Have fun with the U5A5 (which I like really..., just a bit "delicate").

Barfield
Associate II

     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?