cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G484VE - GPIO status while powering on.

BSUJA.1
Associate

I have designed a target board based on STM32G484VE and I am encountering a problem with GPIO outputs while powering on.

The requirement is no output should get high status while powering on or during reset. So I have configured the IOs using CUBEMX and all the outputs are configured as PushPull with Pulldown enabled.

But when the board is powered on all the outputs are activated momentarily and it gets to its normal status of being low.

BOR level is set at 3. Is there anything else , that I should take care of .

HAL program on GPIO - for reference :

/*Configure GPIO pin Output Level */

 HAL_GPIO_WritePin(GPIOE, SUC_VAL_Pin|IRRIG_VAL_Pin|ALT_VAL_Pin|VAC_VAL_Pin

             |EJE_VAL_Pin|SPARE_Pin|REF_VAL_Pin|CUTTERB_Pin

             |CUTTERA_Pin, GPIO_PIN_RESET);

 /*Configure GPIO pins : SUC_VAL_Pin IRRIG_VAL_Pin ALT_VAL_Pin VAC_VAL_Pin

              EJE_VAL_Pin SPARE_Pin REF_VAL_Pin CUTTERB_Pin

              CUTTERA_Pin */

 GPIO_InitStruct.Pin = SUC_VAL_Pin|IRRIG_VAL_Pin|ALT_VAL_Pin|VAC_VAL_Pin

             |EJE_VAL_Pin|SPARE_Pin|REF_VAL_Pin|CUTTERB_Pin

             |CUTTERA_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_PULLDOWN;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Most GPIO pins are in high impedance analog mode during startup. There is no way to change this. The configuration you choose in CubeMX doesn't get activated until your program starts to run. There are some exceptions, but they are all listed in the GPIOx register values in the reference manual.

0693W00000Lxik5QAB.png 

If you need pins to stay low, you will need to add an external pulldown.

Specifying a pulldown on an output pin does nothing but potentially waste current if the pull resistor is fighting the current output level.

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

View solution in original post

2 REPLIES 2
TDK
Guru

Most GPIO pins are in high impedance analog mode during startup. There is no way to change this. The configuration you choose in CubeMX doesn't get activated until your program starts to run. There are some exceptions, but they are all listed in the GPIOx register values in the reference manual.

0693W00000Lxik5QAB.png 

If you need pins to stay low, you will need to add an external pulldown.

Specifying a pulldown on an output pin does nothing but potentially waste current if the pull resistor is fighting the current output level.

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

Thanks a lot TDK. I will go with your suggestion of adding an external pulldown.