Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ESP32-S3 crushing when using ONEWIRE protocol and Hardware Serial #11390

Closed
gideonmaina started this conversation in Question - Community Help
Discussion options

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

  1. The DHT is connected to GPIO 36 via an instance of the Adafruit DHT library class. DHT dht(DHTPIN, DHTTYPE);
  2. A Particulate Matter sensor connected to GPIO pins 21 and 45 for RX and TX, respectively, on UART 1.
  3. 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.

You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

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.

You must be logged in to vote
0 replies
Comment options

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

You must be logged in to vote
2 replies
Comment options

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"

Screenshot 2025年05月26日 at 12 45 51
Comment options

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /