From: ESP32 Technical Reference Manual, Version 2.9
"Register 4.13: GPIO_STRAP_REG (0x0038)
GPIO_STRAPPING GPIO strapping results: Bit5-bit0 of boot_sel_chip[5:0] correspond to MTDI,
GPIO0, GPIO2, GPIO4, MTDO, GPIO5, respectively. "
I cannot find a definition for what GPIO4 bit does ?
Does anyone know ?
ESP32 Strapping bits - what does GPIO4 do ?
Re: ESP32 Strapping bits - what does GPIO4 do ?
I think you've found a good catch here. We are becoming (correctly) lawyers on these specifications. The ESP32 Data Sheet claims that there are 5 bits available for strapping detection while the technical reference manual says that there are 6 bits available. The 6th bit being GPIO4.
It may simply be that the ESP32 does indeed record the power on status of these 6 pins and makes them available to software ... however, the ESP32 bootloader actually only uses five of them as described in the Data Sheet in its section 2.4. It may simply be that the signal on GPIO4 is indeed remembered at power-on and available for query but the ESP32 doesn't have a need for it and hence it could be left for user code to do something special. I could imagine a button associated with this pin that when held on power-on would set the bit allowing the user code to query "Was the button held at power on?" and hence be a special function.
It may simply be that the ESP32 does indeed record the power on status of these 6 pins and makes them available to software ... however, the ESP32 bootloader actually only uses five of them as described in the Data Sheet in its section 2.4. It may simply be that the signal on GPIO4 is indeed remembered at power-on and available for query but the ESP32 doesn't have a need for it and hence it could be left for user code to do something special. I could imagine a button associated with this pin that when held on power-on would set the bit allowing the user code to query "Was the button held at power on?" and hence be a special function.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 9770
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 Strapping bits - what does GPIO4 do ?
It actually is used to select a few options in the more obscure bootstrap methods that the ESP32 has that normally aren't available - things like legacy boot modes, ATE testing modes, diagnostics modes etc. If you use the normal boot modes, the pin is recorded but ignored by the ROM - you probably are actually able to use it in the sense that kolban describes.
Re: ESP32 Strapping bits - what does GPIO4 do ?
This is indeed valuable information ! Thank you so much !
Who is online
Users browsing this forum: No registered users and 63 guests