-
Notifications
You must be signed in to change notification settings - Fork 7.7k
ESP32-S3 crushing when using ONEWIRE protocol and Hardware Serial #11390
-
I am experiencing something strange when using a DHT sensor and Hardware Serials with the ESP32-S3-WROOM-1 chip.
Everything works fine when using hardware serial peripherals only, or when working with the DHT sensor only, but not simultaneously.
To Reproduce
PlatformIO
platform = espressif32 ; confirmed this to be v6.10
board_build.f_cpu = 240000000L
board_upload.maximum_ram_size = 8388608
Hardware configuration
- The DHT is connected to GPIO 36 via an instance of the Adafruit DHT library class.
DHT dht(DHTPIN, DHTTYPE); - A Particulate Matter sensor connected to GPIO pins 21 and 45 for RX and TX, respectively, on UART 1.
- A GSM module connected to GIPO pins 17 and 18 for RX and TX, respectively, on UART 2.
Observations
- Calling either of the Hardware Serial begin functions causes the program to crash after
dht.begin()and restarts! - Calling
dht.begin()after either one of the hardware serials is started does not cause an issue, but immediately crashes after calling the second hardware serial begin function. - This also happened when I was incorporating an SD card that caused similar issues.
- Unit tests run perfectly.
Just wondering if anyone has ever experienced this peculiar issue.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
I figured the issue arises from the memory type configuration on PlatformIO board config for ESP32-S3N16R8. qio_opi works well without introducing the DHT which changes the pin mode for GPIO 36 to INPUT_PULLUP or OUTPUT and setting the state to HIGH.
A board configuration that has "memory_type": "dio_qspi" and "flash_mode": "dio" resolved the issue.
I will test other configurations that work and list them here to close the discussion.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
From the documentation:
When using Octal Flash or Octal PSRAM, GPIO33 to GPIO37 are also connected to SPIIO4 to SPIIO7 and SPIDQS, making them unsuitable for other applications.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/gpio.html
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
It doesn't make sense, especially for novices, why they would expose the pins.
I tried out all possible configurations available and came up with this table for posterity. I settled with "memory_type": "qio_qspi" and "flash_mode":"qio"
Beta Was this translation helpful? Give feedback.
All reactions
-
Actually, the boot loader and firmware may start some of the different Flash / PSRAM modes using or not such GPIOs.
Those pins may be broken out in the board, but if they can be used or not depends on the SW that runs in the S3.
Therefore, it can be customized as necessary.
Beta Was this translation helpful? Give feedback.