.Debugging

Fatal errors of the ESP32 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/fatal-errors.html Stopping the ESP32 resetting immediately when it has a segmentation fault etc In menuconfig (setting gear icon in bottom blue bar) set “Panic handler behaviour” to “Print registers and halt” Breakpointing on panic If CONFIG_ESP_DEBUG_OCDAWARE is enabled (default=enabled), the panic handler will detect whether a JTAG debugger is connected […]

Read More

Serial output viewing

To view the serial output of an ESP32 without using an IDE the following guide can be used. Install PuTTY PuTTY is a standard tool that provides a simple terminal interface. https://www.chiark.greenend.org.uk/~sgtatham/putty/ Connect Hardware In our setup we used an ESP-Prog as the USB / Serial adaptor, connected to our ESP32 via the 6 pin […]

Read More

AtoD voltage range

N.B. you do not necessarily get a range all the way to 3.3V VCC!!!! On the ESP32S2 using adc_cali_raw_to_voltage() the max voltage we could read was 2.643V with atten = ADC_ATTEN_DB_11 The ESP32 has an AtoD Vref of approx 1.1V, but this is nominal and it can be in the range 1.0 to 1.2V. An […]

Read More

Log messages via JTAG interface

Passing log messages over the JTAG interface, instead of UART0 Espressif resources https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/app_trace.html#app-trace-logging-to-host Getting it working esp_app_trace.h needs app_trace adding to your AMakeLists.txt Then in your project: A work in progress…so far we’ve been unable to make this feature actually work…!Got to here: https://www.esp32.com/viewtopic.php?f=13&t=33205&p=112706#p112706

Read More

Using UART0, disable logging output

Disable UART logging within the config. Write your own log function with esp_log_set_vprintf. Disable UART0 bootloader and log output Run “idf.py menuconfig”, as explained on this page. Bootloader config > Bootloader log verbosity Default is “Info”, change it to “No output” to disable bootloader output Component config > Log output > Default log verbosity Default is […]

Read More

Our I2C Master universal code

We try to use common defines for I2C master code in our projects, so it’s easy to jump between different microcontrollers and processors. This is quite challenging with the ESP32, because its setup and then do as a single operation approach is very different to the raw operation by operation approach a microtroller will typically […]

Read More