cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5A5 vs. STM32U575 - as USB PA11, PA12

tjaekel
Lead

I am confused:
I have a PCB designed for STMU575 and I am using USB FS - works.
USB DM and DP are pins PA11 and PA12.

On U575:
- all fine as USB FS, available via AF10 (PA11 = OTG_FS_DM, OTG_FS_DM) - works

I have checked the packages and pin assignments and saw: U5A5 is identical with U5A5 (and I want to solder U5A5 due to larger memories instead of U575).

But UA5A datasheet is a bit different on PA11, PA12:

1. it mentions "OTG_HS_DM(boot)" as "additional functions"
2. in pin mux ALT table: there is nothing under ALT10 - there is NOT an ALT option to configure PA11, PA12 as USB pin

tjaekel_0-1704347098608.png

My questions:

a) changing from U575 to a U5A5 on same PCB and package (LQPF64) - are PA11 and PA12 usable in the same way as USB (FS)?

b) if changing to U5A5 and PA11, PA12 become OTG_HS_DM, OTH_HS_DP now: does it mean I have to configure now USB HS instead of USB FS (as on U575)?

c) how to configure ALT function of USB_HS (if not listed in table) for U5A5?

 

10 REPLIES 10

My project is here:

https://github.com/tjaekel/NUCLEO-U5A5JZ-Q_QSPI 

I think, important is:

  • USB HS works only with an external HSE (XTAL or OSC)
  • the accuracy of this external clock source has to be good
  • configure a PLL (e.g. PLL1), PLL1P, to get 32 MHz out from PLL
  • use the DIV2 divider on USB config

ATT: I saw, that not all possible combinations of PLL config is working, e.g. PLLM seems to be as "must be 1".

  //8 MHz OSC, my board
  RCC_OscInitStruct.PLL.PLLM = 1;	//2;  ==> THIS FAILS on USB
  RCC_OscInitStruct.PLL.PLLN = 40;	//20; ==> THIS FAILS on USB
  RCC_OscInitStruct.PLL.PLLP = 10;	//32 MHz, USB with PLL2_P_DIV2! (as 16 MHz)
  RCC_OscInitStruct.PLL.PLLQ = 2;
  RCC_OscInitStruct.PLL.PLLR = 2;	//should result in 160 MCU clock
  RCC_OscInitStruct.PLL.PLLRGE = RCC_PLLVCIRANGE_1;
PeriphClkInit.UsbPhyClockSelection = RCC_USBPHYCLKSOURCE_PLL1_DIV2;

 So, with your 32 MHz HSE, try this PLL config:

//with 32MHz HSE: 
.PLL.PLLM            = 1,
.PLL.PLLN            = 10,
.PLL.PLLP            = 10,     //32MHz for USB, use RCC_USBPHYCLKSOURCE_PLL1_DIV2
.PLL.PLLQ            = 2,
.PLL.PLLR            = 2,
.PLL.PLLRGE          = RCC_PLLVCIRANGE_1,
.PLL.PLLFRACN        = 0,