ESP32 tristate weirdness?

toybuilder
Posts: 5
Joined: Thu Jan 31, 2019 6:02 pm

ESP32 tristate weirdness?

Postby toybuilder » Thu Jan 31, 2019 6:25 pm

I have an NodeMCU-32S using a ESP32 WROOM module which I am interfacing to a Displaytech INT024BTFT LCD module. The LCD module has a LCD controller (timing+"graphics engine") and an Atmega (which pre-configures the device at power up) that connects to the host via a parallel bus and some control lines.

To understand the problem, I need to first go on a slight background on the LCD module -- the on-module Atmega processor grabs is activated at module power-on and sends a bunch of setup commands to the LCD controller (about 2 seconds of activity) before relinquishing control to the host system. During that time, the host system is supposed to keep the bus and control lines tri-stated so that there is no signal conflict. (Side note: Displatech's errata on the INT024BTFT erroneously states that the startup activity is 0.5 seconds long. It took a while for me to sort this out, but this is not the cause of my current question.)

I have successfully interfaced the LCD module to an Atmel Xmega-based devboard so that the whole setup when the system is powered on. My next step is to migrate the LCD module to the ESP32 -- and that's where I am running into a weird issue.

A) If I power on the LCD module with the NodeMCU-32S turned OFF and with reset held low(EN=0), the LCD module configuration works correctly, and when I then power on the NodeMCU-32S, the system works fine.

B) If I power on the LCD module with the NodeMCU-32S turned ON and with reset held low, the LCD module configuration fails, and the display does not work correctly.

C) If I start with the NodeMCU-32S turned ON and running code that holds all the data bus and control signal pins in tri-state, and then power on the LCD module, the LCD module configuration also fails, and the display does not work correctly.


I am doing this using the Arduino environment with the ESP32 board support package. I am configuring the pins to tristate using the pinMode(pin,INPUT); and digitalWrite(pin,0); calls. However, my problem also exists when the ESP32 is powered on by held in reset.

I am using GPIO's that (AFAICT) are not pulled up/down in the NodeMCU-32S board (which is really a header-breakout for all intents and purposes), nor within the WROOM module itself. Does the ESP32 not hold the pins in tristate during reset? I didn't see anything definitive about that in the TRM or datasheets for the ESP32 or the WROOM module.

Thanks!

toybuilder
Posts: 5
Joined: Thu Jan 31, 2019 6:02 pm

Re: ESP32 tristate weirdness?

Postby toybuilder » Fri Feb 01, 2019 2:27 pm

Sorry for replying to my own post, but it turns out (with help from a comment from Reddit) that the initial pin state is described in the ESP32 datasheet, nearly at the end of the document in the Appendix, in the A.4. IO_MUX table.

At reset, output drivers are turned off, BUT a number of pins have weak pullups and pulldowns.

Who is online

Users browsing this forum: No registered users and 124 guests