2023-07-03 12:08 AM
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?
Solved! Go to Solution.
2023-08-01 02:16 PM
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:
It is further detailed in the reference manual's RCC section:
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.
2023-07-03 11:24 AM
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".
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
2023-07-26 03:46 AM
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
2023-08-01 02:16 PM
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:
It is further detailed in the reference manual's RCC section:
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.
2023-08-01 02:54 PM
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.
2023-08-02 02:43 AM
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
2023-08-02 01:01 PM
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)
2023-08-04 08:20 AM
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... ;)
2024-01-14 05:41 PM
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").
2024-04-03 03:44 AM
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?