WiFi interfering with esp_timer High Resolution Timer
Posted: Sat Dec 22, 2018 4:47 am
I have a control application that needs to run every 500 us (2 kHz). I am using esp_timer() at 500 us, to run the control code. (I send a semaphore to the Control Task each time the esp_timer interrupt fires.) . I have the Control Task pinned to Core 1.
I also am using ESP-NOW (WiFi) on Core 0.
My problem is that when I initialize WiFi (on Core 0), the esp_timer interrupt is affected. It "jitters" by 100 us or more. (more than 20% error)
=> It appears that using ESP-NOW WiFi causes my 2 kHz timer interrupt to not be accurate.
Questions:
Can I run esp_timer() on Core 1 ONLY, so that it is not affected by the WiFi task(s) on Core 0?
Is there a way to configure the esp_timer, or the WiFi, so that the esp_timer is able to accurately run at 2 Khz?
Thanks!
Phil.
I also am using ESP-NOW (WiFi) on Core 0.
My problem is that when I initialize WiFi (on Core 0), the esp_timer interrupt is affected. It "jitters" by 100 us or more. (more than 20% error)
=> It appears that using ESP-NOW WiFi causes my 2 kHz timer interrupt to not be accurate.
Questions:
Can I run esp_timer() on Core 1 ONLY, so that it is not affected by the WiFi task(s) on Core 0?
Is there a way to configure the esp_timer, or the WiFi, so that the esp_timer is able to accurately run at 2 Khz?
Thanks!
Phil.