cancel
Showing results for 
Search instead for 
Did you mean: 

How to Blink onboard LED on a NUCLEO-H755ZI-Q WITHOUT using BSP - only HAL?

smallkitties3
Visitor

Have got the NUCLEO-H755ZI-Q board with the STM32H755ZI chip on it and able to use the BSP package and drive the three LEDs and also perform debugging.

However, whenever tried to build a new project and select STM32H755ZI (not NUCLEO-H755ZI-Q) and configure the project based on the settings in NUCLEO-H755ZI-Q the code does not run. Nor is debugging possible. Also, used the neat Compare Projects tool; but nothing that would impact it stood out.

Have already looked in this online ST-forum and the https://github.com/STMicroelectronics/STM32CubeH7/tree/master and cannot find a simple example of configuring a blinky for a this dual-core or any other - that does not rely on BSP.

All is needed are snapshots of the STM32CubeMX setup.

Thank you and peace to all.

3 REPLIES 3
gbm
Lead III

What kind of help do you expect without providing any code nor CubeMX picture? All you need to do is to configure the LED port line as output in CubeMX, then add 4 lines of code to SysTick ISR.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
SofLit
ST Employee

Hello @smallkitties3 and welcome to the community,


Simply, click on "Unselect All" button to prevent CubeMx to generate the BSP code and configure the GPIOs according to your needs.

SofLit_0-1734598976222.png

I've attached a project where Green, Red, Yellow leds are toggling on NUCLEO-H755 board. The project was generated with CubeMx v6.13 starting from a the board (Bsp generation disabled from the beginning).

Hope that answers your question.

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.

@smallkitties3 wrote:

 the code does not run. Nor is debugging possible. 


What, exactly, do you mean by that?

What happens when you try to debug?

 

To answer the question in your title: "How to Blink onboard LED on a NUCLEO-H755ZI-Q WITHOUT using BSP - only HAL?" - you simply use the HAL_GPIO_... functions to turn the LED on & off:

  • HAL_GPIO_WritePin( led_GPIO_port, led_GPIO_Pin, GPIO_PIN_RESET )
  • HAL_GPIO_WritePin( led_GPIO_port, led_GPIO_Pin, GPIO_PIN_SET )

or

  • HAL_GPIO_TogglePin( led_GPIO_port, led_GPIO_Pin )