Skip to main content
Graduate II
October 6, 2025
Solved

NUCLEO-H7S3L8 HSE times out

  • October 6, 2025
  • 7 replies
  • 977 views

I am trying to set up a basic USB project on a NUCLEO-H7S3L8. It works okay with the HSI, but I need the HSE. I can see that the board has a 24MHz crystal fitted and resistors on SB14 and SB15. It's unmodified from the factory.

HAL_RCC_OscConfig() always returns with a timeout when trying to activate the HSE. I've tried various settings but can't get it to work.

I have attached my .ico file. The code is just what CubeMX generates. Thanks.

    This topic has been closed for replies.
    Best answer by AScha.3

    So here ioc , only using internal flash.

    7 replies

    Super User
    October 6, 2025

    Did you set it like this ?

    AScha3_0-1759756684796.png

    + in clock tree set the 24M

    AScha3_1-1759756733437.png

    It should work then. (My H7S3 does.)

     

    quaAuthor
    Graduate II
    October 6, 2025

    qua_0-1759757349801.png

     

    qua_1-1759757370871.png

    Looks like it is set correctly.

    Super User
    October 6, 2025

    Did you set it like this ?

    AScha3_1-1759758741512.png

     

    ... and USB:

    AScha3_0-1759758704754.png

     

    quaAuthor
    Graduate II
    October 6, 2025

    qua_0-1759760790473.png

     

    Technical Moderator
    October 7, 2025

    Hello,

    I tested your ioc file and generated a project and it's working fine from my side on a NUCLEO-H7S3L8.

    May be you need to check OSC_OUT pin with an oscilloscope:

    mALLEm_0-1759829316359.png

    I suspect an issue in your board.

    Do you have another board that you can run the test with?

    quaAuthor
    Graduate II
    October 7, 2025

    AScha.3 that works for me too.  mƎALLEm I can see a 24MHz sine wave on that pin.

    I have made some progress though. I found that certain settings that CubeMX says are okay don't actually seem to work. I initially had the HSE divided by 12 into the PLLs. Changing it to divided by 2 (and adjusting the multiplier to give 600MHz) allows it to get past setting the system clock.

    It's odd that the timeout is with setting up the HSE rather than the PLL, and odd that it works for other people. I will continue to investigate.

    quaAuthor
    Graduate II
    October 8, 2025

    I think this is that old issue with CubeMX where sometimes it just doesn't build working code, but if you change things enough eventually whatever needs to be fixed gets fixed and the code is okay. Copying the .ico file to a new project works for me too.

    I am not able to use USB CDC to work, but it's probably the same sort of bug.

    Technical Moderator
    October 8, 2025

    @qua wrote:

    Copying the .ico file to a new project works for me too.


    Is there any specific difference in the path?

    Did you detect any difference in the generated code between both cases?

    quaAuthor
    Graduate II
    October 9, 2025

    The CDC example has "Drivers\BSP\STM32H7RSxx_Nucleo\stm32h7rsxx_nucleo_usbpd_pwr.c" and .h, mine doesn't. Weird as I selected the same Nucleo board when creating the project. I wonder if there is some issue related to it not setting up the USB power properly. I'll find some time to do a proper fresh project.

    quaAuthor
    Graduate II
    October 14, 2025

    Is there a minimal working example to compare to? There is the CDC demo but it seems to but outdated and more than just minimum for this board. Makes comparison difficult.

    Super User
    October 14, 2025

    I just tried: make CDC on H7S3nucleo , core at 360M , just in Cube set USB_HS:

    AScha3_1-1760460363042.png

     

     first try, connect to PC (LinuxMX) :

    AScha3_0-1760460275173.png

    So Cube seems working as it should.

    And can see connected working:

    AScha3_0-1760465964482.png

     

    quaAuthor
    Graduate II
    October 15, 2025

    AScha.3, would you mind sharing your .ico file? Thanks.

    quaAuthor
    Graduate II
    October 24, 2025

    Yes, I re-loaded your .ico from scratch and it still didn't work.

    I feel the same, it's usually an issue with the code that stops it working, but maybe I was blaming CubeMX because I've had issues like that before with it, when it was in fact the hardware.

    I really just want to test the USB HS to see what kind of throughput I can get.

    Super User
    October 24, 2025

    So it seems, something happened .

    Sure, there was no ESD ?

    Clear way to test would be, you buy a new board and load the program to test it.

    If it works fine, but the old dont, then, if board is almost new, return for exchange.

    quaAuthor
    Graduate II
    October 24, 2025

    Yeah, I might stick a new board on my next Digikey order. Or I might just look at other devices with USB HS capability.

    Unfortunately ST don't offer many Nucleo boards with USB HS. They have some F4 parts with it, but don't seem to have any evaluation boards. Microchip are no better, no eval boards for their HS capable ARM parts. I kinda want ethernet too, although it's less important.