.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

esp-idf debug

Outputting a full log via the serial port when debugging can sometimes be really helpful, because it contains all sorts of state information. idf.py menuconfig In the VS Code “TERMINAL” window, enter: idf.py menuconfig(You may need to use CTRL + ] to end its current mode and get its command prompt first) This will bring […]

Read More

.TWAI general

Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/twai.html Initialise CAN Bus Handling Alerts You need to check for and handle the TWAI_ALERT_BUS_OFF and TWAI_ALERT_BUS_RECOVERED to protect against the CAN bus ceasing to function if there are bus issues. Polling for alerts twai_read_alerts() uses a ticks_to_wait value, whereby if there is no alert it will wait the specified number of FreeRTOS ticks […]

Read More