2025-04-24 2:33 AM - last edited on 2025-05-14 12:56 AM by mƎALLEm
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.
2025-04-24 9:01 AM - edited 2025-04-24 9:02 AM
Hi @priya_12,
Can you please tell me which pin is not blinking?
And make sure that R202, R201, R200, and R199 for pins PK3, PK4, PK5, and PK6 are implemented and not removed.
Thank you.
ELABI.1
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.
2025-04-24 12:42 PM
LD3 is not turning on, LD1,LD2,LD4 are on but not blinking.
How do I check if resistors are implemented? It is internally connected already right?
2025-04-24 12:53 PM - edited 2025-04-24 12:55 PM
Hello @priya_12 ,
First, please kindly use </> button to paste a code. See this post. I've edited your post.
Second, to be efficient please attach your complete project including the ioc file.
What @ELABI.1 said is to check these resistors as it could someone else unsolder them:
But since all LEDs are on except LD3 you need to check the availability of R200.
2025-04-24 11:01 PM
2025-04-25 2:46 AM
You didn't attach you complete project. The complete project is not the .project file but all the folder. Please attach your complete project.
2025-05-14 12:57 AM
Hello,
Could you please state on this thread? Please accept as solution the comment that provided you the answer.
Otherwise, provide how you did solve it and accept it as solution.
We are providing efforts on the community and we need to close as much as possible the resolved cases to make the solutions visible for other users.
Thank your for your understanding.