cancel
Showing results for 
Search instead for 
Did you mean: 

with Evaluation STM32H7 board, LEDs do not work properly.

OhBang
Associate II

In my first stm32 project, I wanted to turn on and off LD1~LD4 on EVAL-STM32H757 board.

LD2 and LD4 worked good, but LD1 and LD3 did not work.

I set IOC file only RCC and GPIO and Clock Configuration with no error.

  • GPIO Pins : PK3, PK4, PK5, PK6 as GPIO Outputs(corresponding LD1, LD2, LD3, LD4 respectively)

====

 while (1)

 {

 HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_3); // not working

 HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_4);

 HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_5); // not working

 HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_6);

 HAL_Delay(50);

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

 }

 /* USER CODE END 3 */

======

Did I missed something?

5 REPLIES 5
Pavel A.
Evangelist III

Are all these LEDs directly connected to GPIOs? On some similar H7 EVAL boards two of 4 LEDs are connected thru I/O expander on I2C.

OhBang
Associate II

All LEDs are connected to MCU directly. I checked in Altium schematics from STmicro and official manual.

Evaluation board is an ST micro product - STM32H757-EVAL.

With provided hex sample, LD1 is turned on and off.

R294,R295,R296,R297 are not mounted in pcb.

0693W00000WHoiPQAT.png

Check GPIOK register settings, and code actually initializing the pins.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

In addition to Tesla's reply, some "BSP" features are enabled by a config .h file or preprocessor defines (smth. related to the board name). Make sure this is correct in your project. This can affect initialization of these LED GPIOs.

OhBang
Associate II

Problem solved.

It was hard to set GPIO registers manually, so I set on .ioc file.

GPIOs of STM32H7 should be assigned to core M7 or M4 properly(also Pull-up or Pull-down option and output level option) as picture shows.

0693W00000WJa4oQAD.png