cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx forgets to initialize GPIO pins for STM32H745-DISCO board

Michael98006
Associate III

When comparing main.c created by CubeMx 5.3.0 for IAR with default peripheral initialization option selected for STM32H745-DISCO vs Nucleo-STM32H743 boards, it becomes obvious that for the Discovery board, GPIO doesn't get initialized, whereas for the Nucleo board, the code similar to following is added for each GPIO pin:

 /*Configure GPIO pins : LD1_Pin LD3_Pin */

 GPIO_InitStruct.Pin = LD1_Pin|LD3_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

Anyone else seen this problem?

1 REPLY 1