Troubleshooting IO pins

Default assignment to special functions Some ESP32 devices default to assignment of the IO pins via the IO matrix to specific peripherals (e.g. ESP32S3 JTAG pins). Try using call gpio_reset_pin() on a problem pin before you configure it: Output drive capability Output pins can have the drive current capability adjusted using gpio_set_drive_capability() – see here.

Read More

Special pin assignments

JTAG pins Some ESP32 devices (e.g. ESP32 C3 and S3) default to JTAG assignment of the IO pins via the IO matrix and the pins won’t work as general IO until you call gpio_reset_pin(): USB pins Some ESP32 devices (e.g. ESP32 S3) default to USB of their IO pins via the IO matrix and the […]

Read More

Serial number

The ESP32 doesn’t have a unique serial number specifically, but it is programmed with a unique MAC address at manufacture. See here for how to read it.

Read More

MAC address

An explanation on how mac addresses are derived on the ESP32: https://docs.espressif.com/projects/esp … dress.html An explanation for how many universal (unique) mac addresses are allocated to each ESP32 https://docs.espressif.com/projects/esp … ystem.html Read MAC Address 8 bytes are stroed in total. 6 bytes for MAC-48, 8 bytes for EUI-64 Display device MAC address to console

Read More

.AtoD – One Shot mode

Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/adc_oneshot.html Hardware Limitations Note that ADC1 and ADC2 usage are shared by some peripherals, such as the random number generator and WiFi. Speed adc_oneshot_read() was fast in our tests, taking approx 130uS on an ESP32 S3 CMakeLists.txt REQUIRES Ensure the following is added to the REQUIRES section of your CMakeLists.txt file in the \main […]

Read More

Sharing IO Pins

Sharing IO pins – UART You need the two UART pins available for programming use (if you’re not using the ESP32 USB interface) even if you want to use the JTAG interface (you need to fall back to the serial interface at times, its the default means of programming the ESP32). You can share them […]

Read More

.NVS Library general

Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/storage/nvs_flash.html Initialse NVS Needs to be done before your program tries to access the NVS Write value Read value

Read More

Handling NACK response

This can be an important normal task, for instance when retrying an eeprom waiting for its last write burn cycle to complete before it will respond again. We needed to do this on both the ESP32 S3 and the ESP32 S2 and found different issues on each (it seemed the Espressif I2C implementation is pretty […]

Read More

Error codes

List of error code values https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/error-codes.html

Read More