2024-10-13 06:55 AM
Good morning. I want to use my Nucleo to light up the LED of my stm32h747. For this, I first programmed a GPIO output for my nucleo board. I connected a wire and measured 3.4 volts and 120 mA with a multimeter. then, I decided to toggle the wire to port D0 of my stm32h747. I used the schematics to enable the port and then wrote a simple code to see if it worked:
I also toggled another LED(pin I15) to ensure my code worked.
Finally, I connected the wire from my Nucleo to the stm32h747 and two random ground pins from each board. It did not work, and I do not understand what I did wrong in my approach. Maybe I miss something.
best regards
Solved! Go to Solution.
2024-10-13 10:21 AM
Hello @Jad ,
First, please use </> button to paste your code instead of sharing screen shots.
Second, in the while loop you are not toggling a LED you are setting it to the same value of the GPIO input.
@Jad wrote:
Finally, I connected the wire from my Nucleo to the stm32h747 and two random ground pins from each board. It did not work, and I do not understand what I did wrong in my approach. Maybe I miss something.
best regards
So use and add a delay for test:
HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_14);
HAL_Delay(100); /* Add this delay to be able to see the togling */
You need also to provide the GPIO config of the two GPIO pins.
2024-10-13 10:06 AM
It did not work, and I do not understand what I did wrong in my approach.
This is pretty vague. What didn't work? What are you trying to accomplish on the H747?
2024-10-13 10:08 AM
Sorry if I was not clear, the led Lightning of the stm747 did Not work: so it means that geting the gpio input on my stm747 was not correctly toggled I guess
2024-10-13 10:21 AM
Hello @Jad ,
First, please use </> button to paste your code instead of sharing screen shots.
Second, in the while loop you are not toggling a LED you are setting it to the same value of the GPIO input.
@Jad wrote:
Finally, I connected the wire from my Nucleo to the stm32h747 and two random ground pins from each board. It did not work, and I do not understand what I did wrong in my approach. Maybe I miss something.
best regards
So use and add a delay for test:
HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_14);
HAL_Delay(100); /* Add this delay to be able to see the togling */
You need also to provide the GPIO config of the two GPIO pins.
2024-10-13 11:05 AM
@Jad wrote:Sorry if I was not clear, the led Lightning of the stm747 did Not work: so it means that geting the gpio input on my stm747 was not correctly toggled I guess
If you're using a button on the Nucleo to toggle the output going into the H747, then you need to check for button release state too. Right now you only set the Nucleo output to high. Without seeing code on the H747, don't know if you're looking for an interrupt or polling on the GPIO input?
As for your Nucleo, try this to have the button toggle the output
if(state == GPIO_PIN_SET)
{
HAL_GPIO_Write(GPIOI, GOPIO_PIN_14, GPIO_PIN_SET);
}
else if(state == GPIO_PIN_RESET)
{
HAL_GPIO_Write(GPIOI, GOPIO_PIN_14, GPIO_PIN_RESET);
}
2024-10-13 11:06 AM
.... smoke escapes your device ... 120mA is overratings GPIO
2024-10-13 06:52 PM
Take off the wire connect between GPIO and another board, use a multimeter measure the other board input resistance, most like this board input short to GND.