cancel
Showing results for 
Search instead for 
Did you mean: 

How to use nucleo-h7s3l8

prometheans152
Associate II

 

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

  1. If I use STM32CubeMx to create project.I will get two subproject boot and appli in Stm32CubeIde.Can I just program BOOT project ?
  2. Follow first question . Can I  comment out "if (BOOT_OK !=BOOT_Application())" If I just program BOOT project , 
  3. prometheans152_0-1717576760426.jpeg

     

     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

  4.  I want to try nucleo-h7s3l8 HID example,but I don't know how to do it. I follow the readme to program but it is not work.  I use debug mode to trace nucleo-h7s3l8. Because  "BOOT_Application()"  is not return BOOT_OK, so nucleo-h7s3l8 enter the "Error_Handler".
    What should I do if I want to try the Example?
4 REPLIES 4
CMYL
ST Employee

Hello @prometheans152 

 

  1. yes you can only generate the boot project: In the STM32CubeMx --> project manager --> keep the Boot project only.

CMYL_0-1717594676831.png

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)

    • XSPI2_HSLV=1 I/O XSPIM_P2 High speed option enabled

Best Regards

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

CMYL
ST Employee

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.

 

CMYL_0-1717672342804.png

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

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)