cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE doesn't seem to be initialising GPIO correctly for STM32H755/745 Nucleo board.

MWhit.1
Associate

Hi, so I'm new to ARM and got a STM32H755 Nucleo board. Using the STM32cubeIDE to auto generate code, I spent hours trying to follow tutorials and get the blink code working until someone mentioned to me that the auto generated MX_GPIO_Init code is a lot shorter than other boards code. The STM32745 is also like this but checking out the 723 and l4 series from youtube videos, they all contain extra instantiation code mine doesn't. This seems like a bug to me and looks like what's causing me not to get a blinking LED with the usual HAL calls, unless there's some other main.c file I'm missing since it's a dual core MCU.

This is the only code generated for my MX_GPIO_Init():

static void MX_GPIO_Init(void)

{

 /* GPIO Ports Clock Enable */

 __HAL_RCC_GPIOC_CLK_ENABLE();

 __HAL_RCC_GPIOH_CLK_ENABLE();

 __HAL_RCC_GPIOA_CLK_ENABLE();

 __HAL_RCC_GPIOB_CLK_ENABLE();

 __HAL_RCC_GPIOD_CLK_ENABLE();

 __HAL_RCC_GPIOG_CLK_ENABLE();

}

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Assign the pin you want to use in the M7 core to the M7 context if you want it initialized there.

0693W000006I7EAQA0.png

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

View solution in original post

3 REPLIES 3
TDK
Guru

Assign the pin you want to use in the M7 core to the M7 context if you want it initialized there.

0693W000006I7EAQA0.png

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

Oh, I'm an idiot. I tried changing that earlier, before I knew about the GPIO_init but I must not of built the project properly or something.

Thanks. :downcast_face_with_sweat:

Don't beat yourself up over it. It really should be set to CM7 by default. There are near-zero applications where the user wants to assign a pin a function and yet not initialize that pin anywhere. And the option is hidden within the GPIO menu.
If you feel a post has answered your question, please click "Accept as Solution".