2025-10-06 5:45 AM
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.
Solved! Go to Solution.
2025-10-09 6:25 AM
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.
2025-10-09 8:55 AM
Okay, attached is a minimal example that does not work.
All I did was create a new project for this NUCLEO board, boot only. Enabled USB and USBPD. Enabled the middleware for them. Enabled the USB and USB-HS regen under PWR. Set middleware as CDC. Connected to computer with USB A to C cable, so PD should not be relevant anyway.
I used the CubeMX solver to sort out the clock. It has chosen to use the HSI for everything.
It does not enumerate.
2025-10-14 2:18 AM
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.
2025-10-14 9:46 AM - edited 2025-10-14 11:19 AM
I just tried: make CDC on H7S3nucleo , core at 360M , just in Cube set USB_HS:
first try, connect to PC (LinuxMX) :
So Cube seems working as it should.
And can see connected working:
2025-10-15 4:30 AM
AScha.3, would you mind sharing your .ico file? Thanks.
2025-10-15 4:43 AM
Ok, but its at home; so at the earliest in about 6 h.
+
btw
Have you enabled the XIP2 high speed in option bytes ??
If not, do it, otherwise you never will get it running. (check+set with CubeProgrammer.)
2025-10-15 10:04 AM - edited 2025-10-16 8:27 AM
2025-10-16 5:01 AM
Thanks. Do you mean XSPI1? I tried setting those option bytes, but it didn't help.
I tried to import your .ico file, but I get a build error. Missing "buf" in linked_list.c. Anyway, I notice that your configuration does not use boot, it only has the application. I am only using boot as I want to use the internal flash memory and won't exceed its size. Could that be an issue?
2025-10-16 8:22 AM - edited 2025-10-16 8:26 AM
XIP2 is XSPI2 . :)
>I want to use the internal flash memory and won't exceed its size. Could that be an issue?
no, just set all you want for the "boot" then.
But...why use such monster cpu and using only the small boot flash?
+
you asked for ioc only, so i did.
buf is
int16_t buf[1024] __attribute__ ((aligned(32)));But if not needing SAI and DMA , just disable it in ioc , so its away.
2025-10-17 1:11 AM