Skip to content

Espressif: increase CONFIG_FREERTOS_HZ from 100 to 1000 #9133

@dhalbert

Description

@dhalbert

In ESP_IDF, CONFIG_FREERTOS_HZ is the tick rate at which FreeRTOS does preemptive context switching. Currently we have CONFIG_FREERTOS_HZ = 100 (10 msecs), which is the default. However, it's very often set to 1000 (1 msec):

  • Many examples in ESP-IDF use 1000.
  • MicroPython's bstack sdkconfig uses 1000.
  • ESP-IDF Arduino uses 1000, to allow delay() to be more accurate for small values.
  • People who want faster HID need to change this to achieve faster output. This is also related to the bInterval value in the HID device descriptor, which is default 8, or 8 msecs.

I haven't found a lot of discussion about any detriments of using a faster tick rate. I assume there is some increased overhead, but it may not be significant.

As an experiment, let's bump it to 1000 for 9.1.0 and see what people notice.

(Motivated by long thread with @jzhvymetal in discord and brief discussion with @tannewt there.)

Metadata

Metadata

Assignees

Labels

espressifapplies to multiple Espressif chips

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions