cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo H755 LED3 not turning on (PB14) in IPC Example

Duc
Associate III

 

Hi everyone,

I am working on a project with the STM32H755ZI-Q (Nucleo H755ZI-Q) board, and I am following this tutorial for Inter-Processor Communication (IPC) using OpenAMP: Link to tutorial.

The setup involves two processors (M4 and M7). Here's the LED behavior that I have implemented:

  • LED1 (PB0) is assigned to M4.

  • LED2 (PE1) and LED3 (PB14) are assigned to M7.

  • When M7 sends a message to M4, M4 replies, and LED1 turns ON.

  • If M7 receives the expected message, LED2 turns ON; otherwise, LED3 should turn ON.

The issue:

Everything seems to work fine when LED2 is assigned to M7 (PB14), as it turns ON as expected. However, when I swap the assignments and move LED2 to LED3 (PB14), LED3 doesn’t turn on, despite the message being received and processed correctly.

I have tried putting LED3 in a while loop in the main function and toggling it manually with:

HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);

but still, LED3 (PB14) does not turn ON.

Has anyone encountered a similar issue or can suggest where the problem might lie?

Any help would be greatly appreciated!

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

I'm not sure what is actually the problem,

but based on your zip file, here attached are "main.c" files where I got the RED LED turn on instead of the ORANGE LED when receiving the right message.

View solution in original post

12 REPLIES 12
TDK
Super User

Ensure it is assigned a core context and is being initialized as a GPIO output.

If in doubt, look at the GPIOB register and ensure MODER bits are as expected.

If you feel a post has answered your question, please click "Accept as Solution".
Duc
Associate III

Hi @TDK,

Thanks for the reminder! Those are things I always keep in mind when working with GPIO initialization and configuration.

Duc_0-1754582237440.png

 

Mike_ST
ST Employee

Hello,

Share code, ioc file, if you can.

Use a voltmeter to check PB14 output on CN8. Q3 transistor or LD3 LED might be non working.

 

Duc
Associate III

Hi @Mike_ST ,

I’ve tested my LEDs with the Blinky code, and everything is working fine. Here’s the code I’m using:

 

TDK
Super User
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
	  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET);
  }

It's probably working as intended but gets changed in the main loop before you can visually notice.

If you feel a post has answered your question, please click "Accept as Solution".
Duc
Associate III

 

Hi @TDK ,
I initially thought that might be the issue, but after switching to HAL_GPIO_WritePin(), it still didn’t work. I want LED3 to work in the callback function when a message is received by M7 — LED2 works fine there, but LED3 doesn’t. I even tried putting LED3 in a while loop to check if it would work, but it still didn’t in either case.

TDK
Super User

Remove the code in the main loop where you continuously set the pin state high. That's the issue.

If you feel a post has answered your question, please click "Accept as Solution".
Duc
Associate III

Hi @TDK ,

It seems there was a misunderstanding. The issue I'm currently facing is with LED3. Initially, I had it placed only in the callback, not in the main loop. However, LED3 wouldn't turn on, even when I set the pin state to high. So, I moved it into the main loop to test it further. But even then, when I set the pin state to high, the LED still wouldn't turn on.

To isolate the problem, I created a new project just to blink the LEDs, and in that setup, the LEDs work as expected.

I believe running that code on the Nucleo H755ZI-Q board will provide you with clearer results.

Duc
Associate III

Hi @Mike_ST ,

Do you have any recommendations for addressing this issue?