2025-04-24 2:33 AM - edited 2025-04-24 2:51 AM
Hi,
I am working on STM32H757I-EVAL. I am new to STM32 boards. I am using STM32 Cube IDE version 1.18.0. I started with the basic task - blinking led. I have written the code but it is not reflecting on the board.
I have configured this task for four LEDs, I have set PK3, PK4, PK5, PK6 as GPIO Output. In pinout and configuration under system core, I have selected GPIO and configured every pins. Pin context assignment - ARM Cortex M7, GPIO Output level - Low, GPIO mode - output push and pull, GPIO Pull up / pull down - No pull up and no pull down, Max output speed - low.
In RCC mode and configuration, HSE, LSE - Crystal/ ceramic resonator
I have attached image of clock configuration.
Code: in while (1) block
// Turn on PK3, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);
// Turn on PK4, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);
// Turn on PK5, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);
// Turn on PK6, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_SET);
HAL_Delay(500);
I am not getting the desired output. out of 4 only 3 led is on and it is not blinking. I wanted to know if there is any mistake in the configuration and setup.
I think I have made some mistake here in RCC and clock config, when HSE - bypass clock source, and in clock configuration input freq as 25 MHz. No LED is on for the above code
Thankyou.