Skip to main content
Visitor II
September 25, 2024
Solved

Ux_Device_CDC_ACM example for Nucleo-H7S3L8 times out on USB_CoreReset

  • September 25, 2024
  • 2 replies
  • 1111 views

Hello

Im stuck getting the Ux_Device_CDC_ACM  example working.

To reproduce

- Get the example Ux_Device_CDC_ACM  from the X-CUBE_AZRTOS_H7S3L8 V1.0.0 

 - I set the Boot_XIP.hex in to the debugger configuration (In the readme both Boot_XIP.hex and Boot_XIP.elf are mentioned but only Boot_XIP.hex exists in STM32Cube_FW_H7RS_V1.1.0\Projects\NUCLEO-H7S3L8\Templates\Template_XIP\Binary ) . And move it to the bottom

- I add the MX25UW25645G_STM32H7R38-NUCLEO.stldr as external loader

After starting the debugging, the code gets stuck at USB_CoreReset() while waiting for the USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST to clear. 

Possible Fixes

  • An other Thread recomends setting __HAL_RCC_SYSCFG_CLK_ENABLE(); in HAL_PCD_MspInit() but this macro does not exist in the stm32h7rsxx_hal_rcc.h
  • Regenerating the code from the .ioc leads to many .LD-Files which lead to compilation errors (size overrunds)

I would really appreciate if someone could help me out.

 

 

    This topic has been closed for replies.
    Best answer by LukeTheEngineer

    Hi 

    i found the issue: 

    I was using the wrong bootloader: In the Ux_Device_CDC_ACM\Binary folder there is the proper Boot_XIP.elf

    This fixes the issue and i have a running example now.

    Best

    Luke

     

     

     

    2 replies

    Technical Moderator
    October 3, 2024

    Hi @LukeTheEngineer 

    Do you want to run your application code from the external or the internal Flash? The example provided is implemented in external flash. To do that, you need first to enable XSPI1_HSLV Option Byte.

    FBL_0-1727953210416.png

     

    Then check using CubeProgrammer if using the Nucleo H7S3L8 (not MX25UW25645G_STM32H7R38-NUCLEO.stldr as you mentioned)

    FBL_1-1727953233299.png

    Finally, you can run the application and ping pong between the USB com port and USB STLink VCP without issues.

    FBL_2-1727953323846.png

    Note! X-CUBE_AZRTOS_H7S3L8 V1.0.0 package doesn't provide IOC files for MX code generation! 

    Visitor II
    October 7, 2024

    Hi, thanks for the reply.

    I now enabled the XSPI1_HSLV Option Byte. This did not lead to a noticable change. The program still starts to run and gets stuck in USB_CoreReset. 

    I set the loader to MX25UW25645G_STM32H7S3L8-NUCLEO.stldr 

    LukeTheEngineer_0-1728284526405.png

    Note: The MX25UW25645G_STM32H7R38-NUCLEO.stldr mentioned in the README actually does not exist on my system - i already had the H7S3L8 variant selected and just reported the wrong one.

     

    Additional Information: 

    The selection of the Boot_XIP:

    LukeTheEngineer_1-1728285508391.png

    I rule out hardware issues, since I got the CDC_Standalone example to run sucessfully. 

    At the moment I don't define USE_DYNAMIC_MEMORY_ALLOCATION 

    What other information would be usefull? 

     

     

     

     

     

     

     

     

    LukeTheEngineerAuthorAnswer
    Visitor II
    October 7, 2024

    Hi 

    i found the issue: 

    I was using the wrong bootloader: In the Ux_Device_CDC_ACM\Binary folder there is the proper Boot_XIP.elf

    This fixes the issue and i have a running example now.

    Best

    Luke