2025-07-30 6:36 PM - edited 2025-07-30 6:37 PM
Hi all! I'm using the Nucleo-H755ZI-Q board and trying to write a simple program where the LED should turn on (and stay on) only when I press the USER button (the blue one on the board). I’ve shared a screenshot of my code below. The code builds and debugs without any errors, but when I run it, the LED just starts blinking on its own... even when I haven’t pressed the button. What’s more interesting is that when I stop the program in the IDE, the LED keeps blinking, and it only stops if I enter debug mode again. I expected the LED to stay off by default and turn on steadily only when the button is pressed. Also, after flashing and starting debug, I only see a "Resume" button instead of "Run"... Not sure if that means something’s wrong or if it’s normal. Any help figuring this out would be great!my program
2025-07-30 8:34 PM
> the LED just starts blinking on its own
Which LED?
This is a dual core device, what is the CM4 core doing?
Hit pause and see where execution is at. Set a breakpoint within the if statement to see if it gets hit.
2025-07-30 9:36 PM
Hi,
I'm trying to turn on the LD1 LED on the NUCLEO board, which is on pin PB0 according to the .ioc file. The CM4 core doesn't seem to be doing anything. I assumed that just writing code for the CM7 core would be enough. When I click "Pause" during debugging, it either stops in the STM32H7xx_hal_gpio.c file or inside the while(1) loop in main.c of the CM7 core. (The while(1) code is in the screenshot I shared in the original post.)
I also have another question: under the Board Project Options, should I select or unselect the User LEDs and Buttons? I assumed that selecting them is necessary in order to use them.
I also tried using break point in while(1) to see if that will do any difference but no the LED just blinks and it doesnt stop
2025-07-31 7:12 AM
Might want to erase the chip so any CM4 firmware isn't active.