2025-02-10 7:35 AM - edited 2025-02-10 7:47 AM
Hi,
I am trying to setup an USB HS CDC example with NUCLEO-H7S3L8.
After setting up the projects for both CDC_Standalone and NUCLEO-H7S3L8 board example (for the latter I manually enabled the USB HS Device from CubeMX), I successfully ran each example to run from the external OSPI memory connected to the XSPI2 port.
STM32CubeMX standalone version is 6.13.0, while STM32CubeIDE version is 1.17.0.
STM32H7RS package version is the STM32Cube_FW_H7RS_V1.1.0.
1) I understand that setting up the CDC_Standalone example should result in a working example, but it does not.
2) The USPD interface is an TCPP03-M20, the BSP included in the board example (not the CDC_Standalone example) comes with a driver for this device which I understand it is automatically used by quickly looking at the code, but it seems it is not working neither.
"Not working" means that the USB device is not detected from the PC.
So for both cases, the function USBPD_DPM_Run() called into the main while loop hangs the execution of the firmware.
Is this behavior a known issue?
Is it needed some manual modification I am not aware of?
Thanks in advance for any hint.
s.
EDIT: I have attached the ioc file I am using.
2025-02-11 1:48 AM
Hello @simo zz,
Have you tried the following application CDC_Standalone available in STM32CubeH7RS :
It includes an .ioc file and could be useful for your implementation.
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH
2025-02-11 2:04 AM - edited 2025-02-12 8:39 AM
Hello @Dor_RH,
The CDC_Standalone ioc I am using is already taken from the STM32CubeH7RS pack, saved to a custom home directory to do not "contaminate" the original one provided with the pack.
I have the feeling that the example is incomplete and wrong for setting up the USB HS.
For example, looking at the board schematics, TCPP03 is connected to ADC1 INP6 PF12, while the original CDC_Standalone ioc enables INP0 on PA0.
Also, TCPP03 is connected to I2C3, while the original CDC_Standalone ioc file uses I2C2.
These are not the only differences between schematics and ioc file..
s.
2025-02-16 7:06 AM - edited 2025-02-16 11:12 PM
Hello @Dor_RH ,
Could you please share more info about how to correctly setup the CDC_Standalone example ?
As I wrote in my previous post, I think the original ioc file is missing some setup:
1) The board uses ADC1 and ADC2 connected to the Tcpp03 USB C power manager, while the ioc file uses ADC1.
2) I2C3 is used in the board with Tcpp03 communication, while I2C2 only is enabled into the ioc.
Also, in addition to USPD and USB Device middle wares, I don't understand if it is required to enable TCPP application with or without RTOS..
For the tests I have done, the application remains stuck into USBPD_DPM_Run, and this function is not inserted into the main loop if RTOS is enabled. If not, the USB setup fails in USB_CoreReset (with or without the USB regulator enabled)... Of course I am quiet confused.
The CDC_Standalone readme file says:
1) It is mandatory to check that the jumper below is connected: JP4 (USB-PD)
But there is no jumper JP4 on NUCLEO-H7S3L8.
2) The DTCM (0x20000000) memory region should not be used by application in case USB DMA is enabled
3) Should make sure to configure the USB pool memory region with attribute "Non-Cacheable" to ensure coherency between CPU and USB DMA
Not sure how to set 2) and 3) in the CubeMX tabs. Should these option already set as default into the ioc file?
Definitely it seems that the example is not provided as ready-to-use in a few minutes, and it's hard to me to believe I have to implement the drivers from scratch.
Any hint will be appreciated.
Thanks,
s.
2025-02-18 9:15 AM
Hello @simo zz,
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH
2025-02-18 11:01 AM - edited 2025-02-18 11:03 AM
Hello @Dor_RH,
I am already checking the schematics as you may already read from my first post. OK for JP3, I assumed this but the readme is wrong.
I also already have enabled TCPP with USBPD. In almost every attempt, compiling results in missing sources or errors. God knows what STM32CubeMX does in background...
No way this example works for USB HS Device as it is provided, even more without a simple how to guide.
In addition, it is clear that asking clarifications regarding this example it's a huge waste of time.
Regards,
s.
2025-02-20 6:17 AM - edited 2025-02-20 6:17 AM
I finally managed to bring up CDC USB HS device port on NUCLEO-H7S3L8, after manual modifications to the sources.
s.