2024-06-05 01:41 AM
Hi all,
I buy a nucleo-h7s3l8 but I don't how to program and debug it
H7s3l8 mcu is different from other stm32 mcu that I use before
My question is as follows
I want to make the nucleo-h7s3l8 to a USB device.How to operate STM32CubeMx to craeate project? The UCPD must enable?or enable USBD is enough
2024-06-05 07:02 AM - edited 2024-06-05 07:03 AM
Hello @prometheans152
The boot project will be loaded into the internal flash of 64 K. In general the internal flash is dedicated to boot the application that is loacted into external memories. This is similar to other STM32 platforms where the code is executed from internal flash, but your binary size is limitted to 64 k.
2) Yes you can comment it or replace with while(1) if you plan to use the internal flash only. You may also to delete the extra code related to XSPI config or unused peripherals in your boot project.
3) You need to enable both UCPD and USB OTG-FS (or HS) as the USB connector in the board is type C. If you are using STM32CubeMX you need also to enable the USB stacks according to your application from Middelware.
4) Can you check HSLV option bytes if you are running your application from external flash.
User Option Bytes requirement (with STM32CubeProgrammer tool)
Best Regards
2024-06-05 10:22 AM
1~2 question is done.I get a boot project and without ext flash.
In the 3. question, I follow HID example to config my project cubemx and run scuuess(without enter error handler in debug mode).But HID is not work(PC do not detect).
Have any spec or doc to teach how to config and programing UCPD and USBD in HAL
In the 4. question, I don't understand what you say.Can you detailed description
2024-06-06 04:21 AM - edited 2024-06-06 04:23 AM
Question 3/4:
Each STM32 Device has HW options bits that we need to program before using the device (known also as fuse in some communities).
In question 3 you are testing the HID example provided by the STM32CubeH7S package. It is working in debug mode but not in run mode. One reason may be because the HSLV option bits are not enabled.
The code is located into an external flash that is connected via XSPI2 interface. According to MB1737, which gives the schematic of the board, the XSPI2 (VDD_OCTO2) is supplied by 1V8.
With 1v8 you need to enable the VDDIO_HSLV and XSPI2_HSLV option bits as you are running at High speed (200 Mhz for XSPI2 in the provided example). This can be programmed by STM32CubeProgrammer --> OB --> user configuration.
For more details refer to RM0477, section 5.9.32 and 5.4.6.
– VDDIO_HSLV: enables the configuration of pads below 2.5 V for VDDIO power rail if set to 1.
– XSPI1_HSLV: enable I/O XSPIM_P1 high-speed option if set to 1.
– XSPI2_HSLV: enable I/O XSPIM_P2 high-speed option if set to 1.
The speed of the device I/Os are optimized when device voltage is low
(VDDIO_HSLV=XSPI1_HSLV= XSPI2_HSLV= 1)
In your case XSPI1 is not used so you need VDDIO_HSLV=XSPI2_HSLV= 1
2024-06-06 05:51 AM
4. question is first, I run the HID example success after I read this post https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-h7s3l8-booting-to-application-via-bootloader/m-p/662075#M18342.
In 3. question.I think you dont get me. Maybe my description is so bad.
In 3. question,I create a just boot project succeess(run success).
After that, I add the USBD and UCPD in this project(the UPCD config is follow HID example) and deubg not error.
But finally HID device is not work.I dont know why
Do you have any tutorial/spec/doc to teach how to use ucpd.The UCPD add make the USB is not easy as before
(I had add the hid repport function in my code. I copy that from HID example)