2022-11-08 01:07 AM
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.
====
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?
2022-11-08 03:20 AM
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.
2022-11-08 05:52 PM
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.
2022-11-08 06:11 PM
Check GPIOK register settings, and code actually initializing the pins.
2022-11-09 04:36 AM
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.
2022-11-27 05:57 PM
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.