What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'?

micro9997
Posts: 2
Joined: Mon May 08, 2023 10:11 am

What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'?

Postby micro9997 » Sat Apr 13, 2024 2:01 pm

What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'?

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'

Postby ESP_Sprite » Sun Apr 14, 2024 1:17 am

I don't think you can, not without recompiling the ESP-IDF libraries Arduino uses. Is there any reason you need to? If you need high-resolution timer callbacks, it's usually better to use things like ESP-IDFs esp_timer rather than increasing the tick rate.

micro9997
Posts: 2
Joined: Mon May 08, 2023 10:11 am

Re: What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'

Postby micro9997 » Sun Apr 14, 2024 3:59 pm

ESP_Sprite wrote:
Sun Apr 14, 2024 1:17 am
I don't think you can, not without recompiling the ESP-IDF libraries Arduino uses. Is there any reason you need to? If you need high-resolution timer callbacks, it's usually better to use things like ESP-IDFs esp_timer rather than increasing the tick rate.
I also think about recompilation! Yeah. That’s the real problem behind this. Right?

I have to implement a 400Hz loop. Can you guide me to do this properly?

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: What is the proper way to modify 'CONFIG_FREERTOS_HZ' in 'Arduino ESP32', similar to using 'menuconfig' in 'ESP-IDF'

Postby ESP_Sprite » Mon Apr 15, 2024 2:55 am

Check esp_timer, it should be easily able to give you 400Hz. You can also use one of the hardware timers;I think Arduino has support for those built-in.

Who is online

Users browsing this forum: No registered users and 45 guests