What is the value of portTICK_PERIOD_MS and configTICK_RATE_HZ on the ESP32 using PlatformIO?
When you use PlatformIO with the Arduino framework in its default configuration on the ESP32, configTICK_RATE_HZ
is set to 1000
. In other words, FreeRTOS has a default tick frequency of 1kHz
. This is defined in sdkconfig.h
:
#define CONFIG_FREERTOS_HZ 1000
Hence portTICK_PERIOD_MS
is 1
. In my opinion, a tick rate of 1kHz is a sane configuration for most usecases.
I found the value by using the following code on an ESP32:
Serial.println("Timing: ");
Serial.println(portTICK_PERIOD_MS);
Serial.println(configTICK_RATE_HZ);