Skip to main content
fema
Associate III
March 23, 2020
Solved

STM32H750 GPIO G11 not work as output mode

  • March 23, 2020
  • 3 replies
  • 1104 views

I have two hardware boards mount with STM32H750 . I want to set the GPIO G11 to high , the code as below :

 __HAL_RCC_GPIOG_CLK_ENABLE();

   HAL_GPIO_WritePin(GPIOG, GPIO_PIN_11, GPIO_PIN_SET); 

   GPIO_InitStruct.Pin    = GPIO_PIN_11;

   GPIO_InitStruct.Mode   = GPIO_MODE_OUTPUT_PP;

   GPIO_InitStruct.Pull   = GPIO_PULLUP;

   GPIO_InitStruct.Speed   = GPIO_SPEED_FREQ_LOW; 

HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);

One board work but another don't .

The corresponding bit on the "GPIO input data register" on failure board will not set after i run the above codes.

Any idea ?

Thanks

This topic has been closed for replies.
Best answer by TDK

If the pin is shorted to ground through a hardware error, setting it to output high will have no effect other than sinking ~30mA of current. The IDR will still show up as low even if the ODR bit is high. Might be what is happening here.

3 replies

TDK
TDKBest answer
Super User
March 23, 2020

If the pin is shorted to ground through a hardware error, setting it to output high will have no effect other than sinking ~30mA of current. The IDR will still show up as low even if the ODR bit is high. Might be what is happening here.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
March 23, 2020

Going to have to validate the design more critically. Make sure you don't have other things on the net, and that all the VDD pins are connected.

Review the register content in the debugger.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
fema
femaAuthor
Associate III
March 24, 2020

Thanks for your reply , That was our fault after hardware guys confirmed the G11 short to ground through another failure component .