cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723VET6 ULPI problem

MAKA
Associate II

Hi,

I'm having problems with STM32H723VET6 (100 pin device) and ULPI using USB3343. After ULPI reset USB3343 starts the USB clock (60MHz). But when I enable MCU ULPI clock with __HAL_RCC_USB1_OTG_HS_ULPI_CLK_ENABLE() the USB clock is stopped and never turns on again. This results in timeout errors in HAL_PCD_Init() so USB never starts up.

Everything else seems to work. I have already tried 2 sets of STM32H723VET6 and USB3343 chips but the error is exactly the same.

I have used STM32H723ZGT6 (144 pin device) with USB3343 on previous designs without any issues so this should not be a problem of my design.

Has anybody used USB HS successfully with STM32H723VET6?

 

5 REPLIES 5
FBL
ST Employee

Hello @MAKA 

 

Please note the HW changes to H723VET6 to use USB_OTG_HS_ULPI_CK remaps from Pin29 -PA5 to Pin41 -PA5. Make sure that all ULPI pins are connected to the correct pins.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MAKA
Associate II

I've used CubeMX for the mapping and all ULPI pins seem to be correct (USB_OTG_HS_ULPI_CK at pin29). All other peripherals I'm using (I2C, SPI, SAI) are working. Only USB HS / ULPI does not work.

It seems most STM32H7 ULPI related problems posted in this community seem to be related to 100 pin devices. What is the reason for that?

FBL
ST Employee

Hello @MAKA 

 

As I mentioned in my previous post. there are some hardware changes in the package of H723. You need to adjust the mapping according to the pins number. So, yes, as you mentioned, only USB HS ULPI pins are impacted to this remapping.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MAKA
Associate II

ULPI GPIOs are set in usbd_conf.c which was generated by CubeMX. I don't see how the pins could be set wrong. My HW also uses same pins as CubeMX.

If I enable core ULPI clock prior to resetting USB3343 the USB clock stops a bit later at USB_CoreInit():

/* Core Soft Reset */

USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;

 

If I then comment out the above line USB clock keeps running and USB initialization succeeds but enumeration fails (host cannot recognize the device) as the USB HS core is not working properly.

According to USB3343 datasheet the USB clock is stopped in low power or suspend mode. Is it possible that core reset sets USB3343 to suspend mode but does not restart it?

 

 

 

MAKA
Associate II

By changing the GPIO speed settings (USB_OTG_HS_ULPI_STP to GPIO_SPEED_FREQ_LOW) the USB clock does not stop anymore after core reset or it restarts properly. So I believe this is a timing issue. USB3343 datasheet states this about exiting low power mode:

Should the Link de-assert STP before DIR is de-asserted, the USB334x will detect this as a false
resume request and return to Low Power Mode.

Unfortunately even though USB HS seems to start properly host still does not recognize the device so more debugging needed.