Reset watchdog timer and yield in FreeRTOS

You need to yield to FreeRTOS periodically which will also reset the watchdog timer. If you have a simple main loop application (e.g. you are only using one RTOS task) then this is a way to do that, but with the catch you have to release operation for the RTOS tick time (default 10mS): If […]

Read More

USB issues

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:

Read More

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

Read More

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/

Read More

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

Read More