[HELP] STM32H750 USB HS ULPI Support,

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

JunASAKA
Posts: 4
Joined: Mon Mar 27, 2023 5:08 am

[HELP] STM32H750 USB HS ULPI Support,

Postby JunASAKA » Mon Mar 27, 2023 6:36 am

Hey there,

I am tring to use a USB PHY ULPI module to run USB HS on STM32H750 chip with ChibiOS.
After configured

Code: Select all

#define STM32_USB_USE_OTG1                  FALSE
#define STM32_USB_USE_OTG2                  TRUE
#define STM32_USE_USB_OTG2_HS               TRUE
// ...and...
#define BOARD_OTG2_USES_ULPI

and also modified the certain GPIO Pin set to alternate mode. But the device doesn't work with the PC "unable to enumerate USB device".
Also, when I turning to the stm32 datesheet, it told me "OTG-HS1 supports both full-speed and high-speed operations, while OTG-HS2 supports only full-speed operations." Does it mean that I should define "STM32_USE_USB_OTG1_HS" as TRUE instead of the "OTG2" one? (I tried but nothing happened.)
So I am wondering how could I do to make the ULPI PHY work?

Appreciate,
Jun ASAKA.

User avatar
Giovanni
Site Admin
Posts: 14319
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1053 times
Been thanked: 894 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Mon Mar 27, 2023 6:51 am

Hi,

The one with HS should be STM32_USB_USE_OTG2 (which internally uses OTG_HS as defined in ST headers). The board file must define BOARD_OTG2_USES_ULPI.

Which board are you using? there could be a problem in clock settings and/or GPIO settings.

Giovanni

JunASAKA
Posts: 4
Joined: Mon Mar 27, 2023 5:08 am

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby JunASAKA » Mon Mar 27, 2023 11:43 am

Giovanni wrote:Hi,

The one with HS should be STM32_USB_USE_OTG2 (which internally uses OTG_HS as defined in ST headers). The board file must define BOARD_OTG2_USES_ULPI.

Which board are you using? there could be a problem in clock settings and/or GPIO settings.

Giovanni


Thanks for your reply. I am using the board made by myself. I will check the clock and IO configuration.

Thanks,
Jun ASAKA.

JunASAKA
Posts: 4
Joined: Mon Mar 27, 2023 5:08 am

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby JunASAKA » Mon Mar 27, 2023 3:33 pm

Giovanni wrote:Hi,

The one with HS should be STM32_USB_USE_OTG2 (which internally uses OTG_HS as defined in ST headers). The board file must define BOARD_OTG2_USES_ULPI.

Which board are you using? there could be a problem in clock settings and/or GPIO settings.

Giovanni


Hi,
After digging up the GPIO and clock config, the problem still exists.
I did these:

    Code: Select all

    #define STM32_USB_USE_OTG1                  FALSE
    #define STM32_USB_USE_OTG2                  TRUE
    #define STM32_USE_USB_OTG2_HS               TRUE
    into mcuconf.h

    Code: Select all

    #define BOARD_OTG2_USES_ULPI
    into board.h
    set all ULPI related IO Pins to alternate 10 mode, floating, with max speed
    set the clock tree in mcuconf.h as the same as the working one generated by CubeMX
And the USB still unable to be enumerated.
I also tried the default clock tree configuration in the mcuconf.h form STM32H750XB_DISCOVERY board (the HSE frequency is same as my board), and the problem just remained unchanged. So is there any slips in my configuration caused the issue?

Regards,
Jun ASAKA.

User avatar
Giovanni
Site Admin
Posts: 14319
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1053 times
Been thanked: 894 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Mon Mar 27, 2023 7:00 pm

Hi,

STM32_USE_USB_OTG2_HS does not exists so it is pointless to add it, in mcuconf.h there are all valid settings.

I don't have an H750 board with ULPI so cannot test this configuration, ULPI has only been tested on other devices (F769).

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14319
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1053 times
Been thanked: 894 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Mon Mar 27, 2023 7:25 pm

I am asking on Discord ChibiOS server if somebody used ULPI on H7. BTW, feel free to join and ask questions also there.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14319
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1053 times
Been thanked: 894 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Tue Mar 28, 2023 7:26 am

Hi,

I got confirmation of ULPI working on STM32H743 on Discord, there must be some missing detail in your setup.

Giovanni

JunASAKA
Posts: 4
Joined: Mon Mar 27, 2023 5:08 am

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby JunASAKA » Tue Mar 28, 2023 7:40 am

Giovanni wrote:Hi,

I got confirmation of ULPI working on STM32H743 on Discord, there must be some missing detail in your setup.

Giovanni

Ok, thanks a lot.
I'll check my config again.

Jun ASAKA.


Return to “STM32 Support”

Who is online

Users browsing this forum: Bing [Bot] and 12 guests