Reliable GPTimer interrupts <50µs
Posted: Sat Dec 17, 2022 8:46 pm
Is there a way to get reliable GPTimer interrupts in the ~50µs range which are not blocked by WiFi? I've a project which relies on accurate timings and I would prefer to handle those in an "per interrupt" fashion and not using the RMT peripheral or similar. However once WiFi is enabled and data is transmitted the interrupts can be blocked up to several milliseconds! So basically with the default settings of having WiFi on core0 you can kiss any realtime behavior goodbye...
Things get better when moving WiFi and TCP/IP to core1 by using:
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=y
CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1=y
but the jitter is still insane... This is supposed to be a 50µs toggle... Any suggestions how to drastically improve this?
Things get better when moving WiFi and TCP/IP to core1 by using:
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=y
CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1=y
but the jitter is still insane... This is supposed to be a 50µs toggle... Any suggestions how to drastically improve this?