A stack overflow in task USB MSC has been detected We suddenly started getting the following error when inserting a USB memory stick “***ERROR*** A stack overflow in task USB MSC has been detected.” Changing .stack_size from 2048 to 3072 fixed it:
All posts by
File access functions
Path to SD Card drive Everything else… See here.
Directories
You can use directories, an example path:
Quadrature encoder input
See Espressif example here
Incremental counter from 1 pin
Using the “Pulse Count Controller” (PCNT) CMakeLists.txt REQUIRES Ensure the following is added to the REQUIRES section of your CMakeLists.txt file in the \main folder: Configuring Reading value More useful version
Shelly devices
There’s a whole range of really cool Shelly modules for use in the home, here’s a Knowledgebase https://kb.shelly.cloud/knowledge-base/ UK store https://shellystore.co.uk/
Light sleep
In light sleep mode, digital peripherals, most of the RAM, and CPUs are clock-gated, and supply voltage is reduced. Upon exit from light sleep, peripherals and CPUs resume operation, their internal state is preserved. Documentation https://docs.espressif.com/projects/esp-idf/en/v4.4.5/esp32c3/api-reference/system/sleep_modes.html Example light sleep function Used with ESP32 C3
PWM
See LEDC PWM section
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 […]