cancel
Showing results for 
Search instead for 
Did you mean: 

control of my stm32 with an external board

Jad
Associate III

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: 

Capture d’écran 2024-10-13 à 15.48.09.png

Jad_0-1728827361944.png

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

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

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.

 

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.

View solution in original post

6 REPLIES 6
Karl Yamashita
Lead III

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?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

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  

SofLit
ST Employee

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.

 

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.

@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);
	}

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

.... smoke escapes your device  ... 120mA is overratings GPIO

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.