cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H7S3L8 HSE times out

qua
Senior

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.

26 REPLIES 26

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.

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.

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.

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

 

If you feel a post has answered your question, please click "Accept as Solution".

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

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.)

If you feel a post has answered your question, please click "Accept as Solution".

Have you enabled the XIP2 high speed in option bytes ??

+

test...ioc

If you feel a post has answered your question, please click "Accept as Solution".

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?

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.

 

If you feel a post has answered your question, please click "Accept as Solution".

So here ioc , only using internal flash.

If you feel a post has answered your question, please click "Accept as Solution".