Skip to content

CONFIG_FREERTOS_HZ=1000 should be added to sdkconfig.defaults for examples #846

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

Closed
egnor opened this issue Jul 5, 2022 · 3 comments
Closed

Comments

@egnor
Copy link
Contributor

egnor commented Jul 5, 2022

If the scheduler HZ is <1000, then small calls to the Arduino delay() function (such as delay(5)) will return immediately. The default HZ is 100. I recommend adding CONFIG_FREERTOS_HZ=1000 to the sdkconfig.defaults for espidf-arduino-blink and espidf-arduino-wifiscan, since people often clone these projects. I'm happy to create a PR for this if you think it makes sense.

(Also, the Arduino core should be better implemented so it works even with chunkier scheduling HZ. I'll file a separate bug about that.)

@egnor
Copy link
Contributor Author

egnor commented Jul 7, 2022

Note, espressif/arduino-esp32#6955 (if accepted) will force this issue.

@ikhwanperwira
Copy link

Yeah I thought so, I expect I get current millisecond from this functionxTaskGetTickCount , But what I get is centisecond lol. Turns I need set to CONFIG_FREERTOS_HZ=1000 in sdkconfig,

@Jason2866
Copy link
Contributor

Please close. Feature is added in espressif32 Arduino github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants