cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO CONFIGURATION IN TRISTATE mode

Mahalakshmisudhakar
Associate II

shall we able to configure stm32g431mb gpio to high impedence state when configured as output pin. We need to access output pin in tristate mode

 

4 REPLIES 4
Danish1
Lead III

Look at the Reference Manual for your stm32.

This will tell you how bits in the appropriate GPIOx->MODER control whether a pin is output or input.

When you want to go from output to tri-state (digital input) you can reprogram those bits.

There probably is a HAL way to do this, but I don't find it adequately documented.

Of course. Set output type to mode "open drain" and write "high" to pin. Then it will be output in HiZ.


@Mahalakshmisudhakar wrote:

 We need to access output pin in tristate mode


What do you mean by that? What "access" ?

Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,
Jake

ST Support