Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Espressif: increase CONFIG_FREERTOS_HZ from 100 to 1000 #9133

Closed
dhalbert opened this issue Apr 2, 2024 · 0 comments · Fixed by #9134
Closed

Espressif: increase CONFIG_FREERTOS_HZ from 100 to 1000 #9133

dhalbert opened this issue Apr 2, 2024 · 0 comments · Fixed by #9134
Assignees
Labels
espressif applies to multiple Espressif chips
Milestone

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Apr 2, 2024

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.)

@dhalbert dhalbert added the espressif applies to multiple Espressif chips label Apr 2, 2024
@dhalbert dhalbert added this to the 9.1.0 milestone Apr 2, 2024
@dhalbert dhalbert self-assigned this Apr 2, 2024
@dhalbert dhalbert linked a pull request Apr 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant