ESP32 tick rate - 200Hz desired - Unable to Change

ESP32-DevKitC-32U running under VisualMicro in Visual Studio. Same behavior in Arduino 1.8.15.

Unlike many of the other posts, I want to reduce the default tick rate (set to 1000Hz; 1ms) to 200Hz (5ms). I have a non time critical app which is currently running under µCOS-II at 200Hz.

I have changed the value of configTICK_RATE_HZ to 200, but it has no effect. Still running at 1msec tick.

Thanks in advance, David

Hi David,

first thing I’d check: Could it be that there are two instances of freertosconfig.h, and the one containing your change is ignored?

I’ve only found one. According to esp32, you have to change the configuration via their IDF app; as the Arduino libraries are preset.

Could you provide more details on your project build system specifically as to how FreeRTOS Kernel gets included into your project ? Is it included as an external library or from within ESP32 IDF ? If within ESP32 IDF, then you may need to look at these config parameters: Project Configuration - ESP32 - — ESP-IDF Programming Guide latest documentation
Also its best to get recommendations from Espressif forums if FreeRTOS is compiled from within as an ESP-IDF project.

FreeRTOS is running under Visual Studio, with the Visual Micro plugin to support the Arduino framework. The ESP32 library was installed in the Arduino IDE via the Boards Manager. The project board is the ESP32-DEVKITC32U from Espressif.

I tried to install the ESP-IDF Windows Installer - Open Source IoT Development Framework for ESP32. from the Espressif website, but the install fails repeatedly. Using the system now at the default tick of 1ms.

It sounds like configTICK_RATE_HZ is already defined by another header, and you may need to update the order of includes in the project file such that the directory containing your header with the desired tick rate is included first by the compiler. I would also suggest consulting the VisualMicro forums as they would be able to help you more with your specific issue.