See LEDC PWM section
All posts by
Crashing issues
Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/fatal-errors.html Settings you can utilise Panic handler behaviour (CONFIG_ESP_SYSTEM_PANIC configuration) What happens when a fatal issue occurs and what is output can be changed, including having the CPU halt if you wish: menuconfig > Component config > ESP System Settings > Panic handler behaviour
.6 Releasing a project
ESP32 release config Check the ESP32 settings as detailed on this page menuconfig particular settings to check: Panic handler behaviour (CONFIG_ESP_SYSTEM_PANIC configuration) What happens when a fatal issue occurs and the CPU has to halt.Component config > ESP System Settings > Panic handler behaviour = Print registers and reboot Releasing files and setup for production […]
File access issues
fgets() does not handle 0x0d only Macintosh formatted text files In our use of fgets() (2023-11) using fgets with the esp-idf failed with mac formatted text files. The missing 0x0a LF character meant it did not detect the end of each line.
Unexpected Maker
Offer a cool range of nano modules incorporating ESP32 https://unexpectedmaker.com/
.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 […]
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 […]
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 […]
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
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 […]
