Skip to main content
Visitor II
November 29, 2023
Question

STM32H723VET6 ULPI problem

  • November 29, 2023
  • 4 replies
  • 1847 views

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?

 

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    November 29, 2023

    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.

    MAKAAuthor
    Visitor II
    November 29, 2023

    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?

    Technical Moderator
    November 29, 2023

    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.

    MAKAAuthor
    Visitor II
    November 29, 2023

    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?

     

     

     

    MAKAAuthor
    Visitor II
    November 29, 2023

    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.