cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-H7S3L8 USB HS Timeout on USB_CoreReset function

andr3
Associate II

Hello,

I am trying to use the USB HS on the Nucleo-H7S3L8 dev board.

I was using the USB HS on the STM32H7A3ZI, it was using the physical layer but limited to FS, and it was easy to configure, but i need to change boards to have the HS USB.

The ioc is configured with basics only:

Rcc - HSE - Crystal/ceramic resonator

USB_OTG_HS - Device_only

USB_Device - Virtual COM Port

The clock configuration does not show conflicts and USBOHS is 60MHz.

The project was imported from a template and has Boot project only.

When debugging the code the function  MX_USB_DEVICE_Init() gives timeout, more specifically on the USB_CoreReset function.

Thanks for your help!

7 REPLIES 7
FBL
ST Employee

Hello @andr3 

Have you tried the following example STM32CubeH7RS/Projects/NUCLEO-H7S3L8/Applications/USB_Device/CDC_Standalone at main · STMicroelectronics/STM32CubeH7RS (github.com)

Otherwise, I suggest you share your project. Remember, to guarantee a correct operation for the USB OTG_HS peripheral, the AHB frequency must be higher than 30 MHz.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
andr3
Associate II

Hello @FBL i edited my post to include project on attachment. I have tried to import the cdc standalone to the STM32CubeIDE but it kept giving me an error copying(image). So i opened it manually. I am still not sure how to compile this multi project and upload to the board eve following the um3294 steps. Thanks for your help!

error importing.jpg

FBL
ST Employee

Hi @andr3 

This is known issue, similar issue in this post Fail to perform local copy - STMicroelectronics Community

Try to run the example manually from direct path

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
andr3
Associate II

Yes i can import it manually, but can you help me upload both boot and application to the board? It is build each one individually and running each one? Or is there a command to build and upload both at the same time?

@andr3 Check HSLV1 and HSLV2 option bytes. They should be enabled.

Then, depending on your toolchain follow the readme to flash the code.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
andr3
Associate II

@FBL I am still not able to compile/flash the cdc_standalone. I am still failing to understand how to flash both elf files and debug the application one.
Nevertheless, i was able to crate a project with USB HS working!
My project only has the Boot subproject.

I will leave the IOC file attached for future reference.

It has SBS activated with -  HSLV for XSPIM2 enabled
PWR activated - with USB regulator ticked and USB_HS_REGEN enabled
USB_DEVICE is activated and configured as VCP
I also changed some settings on RCC and on Cortex M7 Boot

After applying these changes the USB code was not timing out. Right now i only have some issues when debugging because the VCP is not showing on the device manager. But when running the code without the debug the VCP shows and i can communicate with the device.

Hi @andr3 

Did you follow readme step by step? 

STM32CubeIDE

To configure STM32CubeIDE Debug Configuration, you must do the following :

 

For "CDC_Standalone_Boot" project :

Add the adequate external loader (MX25UW25645G_STM32H7R38-NUCLEO.stldr file) in Project->Debugger Configuration

For "CDC_Standalone_Appli" project :

1. Add the adequate external loader (MX25UW25645G_STM32H7R38-NUCLEO.stldr file) in Project->Debugger Configuration

2. Add in the startup the CDC_Standalone_Boot in Project->Debugger Configuration

3. Move up the application in the startup

  1. Open your toolchain
  2. Open CDC_Standalone workspace file .project

Optional:

  • Select the “CDC_Standalone_Boot” project
  • Build the project
  • If the project is not compiled, Appli debugging will manage its compilation for debugging
  • With the debug icon select the configuration “CDC_Standalone_Boot Debug”. This operation loads the boot in internal Flash.
  1. Select the “CDC_Standalone_Appli” project
  2. Build the project
  3. With the Debug icon select the configuration “CDC_Standalone_Appli Debug”. First, load the Boot binary in internal Flash, then, load the Appli binary in External memory available on NUCLEO-H7S3L8 board
  4. Run the example

Note

The application uses the external HSE clock as system clock source.

 

If still failing, try full chip erase and erase external memory.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!