GPIO32 and GPIO33 on DevkitC V4 (Wroom)
Posted: Sun Mar 18, 2018 3:41 pm
Hi,
I was unable to confidently derive from (the schematics in) the documentation if there is a 32kHz crystal attached to the RTC GPIO pins 32 and 33 of the ESP32 DevkitC V4. In earlier versions of the Wroom datasheet (ESP-WROOM-03 Specifications, Version 1.0, 2015.12) there is one depicted but not in the current version. Can you please clarify in which models there is (n)one?
The reason why I was investigating this question at all was because I was trying to use the pins as GPIOs and noticed very erratic behavior (exceptions, reboot loops etc) when doing so. Eventually I came to the conclusion that the RTC GPIO pins have to be switched to general general purpose pins (thanks to some bits in the forum). To use them I had to configure them normally with gpio_config() but additionally change their functionality with rtc_gpio_deinit(). As far as I can tell this changes bits 17 and 18 of RTCIO_XTAL_32K_PAD_REG to 0. However, according to the datasheet this is the reset value (Register 4.52 in the ESP32 Technical Reference Manual, Version 2.9). So I conclude that something in the firmware generated by the IDF enables the RTC muxing before my application starts. This seems to be a bug to me if the RTC functionality cannot/is not used anyway on my hardware and should be more clearly documented as it was very surprising. What is responsible for the RTC functionality to be enabled by default?
I was unable to confidently derive from (the schematics in) the documentation if there is a 32kHz crystal attached to the RTC GPIO pins 32 and 33 of the ESP32 DevkitC V4. In earlier versions of the Wroom datasheet (ESP-WROOM-03 Specifications, Version 1.0, 2015.12) there is one depicted but not in the current version. Can you please clarify in which models there is (n)one?
The reason why I was investigating this question at all was because I was trying to use the pins as GPIOs and noticed very erratic behavior (exceptions, reboot loops etc) when doing so. Eventually I came to the conclusion that the RTC GPIO pins have to be switched to general general purpose pins (thanks to some bits in the forum). To use them I had to configure them normally with gpio_config() but additionally change their functionality with rtc_gpio_deinit(). As far as I can tell this changes bits 17 and 18 of RTCIO_XTAL_32K_PAD_REG to 0. However, according to the datasheet this is the reset value (Register 4.52 in the ESP32 Technical Reference Manual, Version 2.9). So I conclude that something in the firmware generated by the IDF enables the RTC muxing before my application starts. This seems to be a bug to me if the RTC functionality cannot/is not used anyway on my hardware and should be more clearly documented as it was very surprising. What is responsible for the RTC functionality to be enabled by default?