Page 1 of 1

how fast can a GPIO change direction?

Posted: Sat Jun 05, 2021 10:01 am
by ffrige
I need to read data from a Tamagawa encoder over a differential line. I am planning to use RMT to send request bits and to read the response. However, I only have one pin left in the ESP32, so I need to switch its direction from output to input between the request and the response. According to the Tamagawa specifications, the encoder starts responding 3us after it receives the request. Can the ESP32 switch the direction of a GPIO pin within that time frame? I could not find the info on the datasheet.
Thank you!

Re: how fast can a GPIO change direction?

Posted: Sat Jun 05, 2021 7:02 pm
by WiFive
Check out the 1-wire drivers on GitHub. The pin can be in input output open drain mode.