Skip to main content
Associate
May 23, 2024
Question

GPIO CONFIGURATION IN TRISTATE mode

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

 

This topic has been closed for replies.

4 replies

Danish1
Lead III
May 23, 2024

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.

Michal Dudka
Lead
May 23, 2024

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

Andrew Neil
Super User
May 23, 2024

@Mahalakshmisudhakar wrote:

 We need to access output pin in tristate mode


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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ST Employee
May 23, 2024

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