-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[BUG] Wifi/BLE Causing a problem with GPTIMER Dispatch - ESP-IDF V5.3.1 as of commit a0f798cfc4bbd624aab52b2c194d219e242d80c1 (IDFGH-14009) #14832
Comments
Maybe because the gptimer interrupt is preemptted by wifi. A quick workaround could be, create two tasks, one is pined to core 0 and another is pined to core 1. (hope you're using esp32 or esp32s3 because they have dual cores). Then do gptimer initialization in core1, and do wifi/ble initialization in core 0. |
@filzek Do you mean it was working in esp-idf 4.x ? |
Yes as hardware timers are free to use in sdk 3.x and 4.x we are able to isolate the timer and use one or two timers and control completely the execution without any miss. Even controlling within ble or wifi in use, the timer dispatch takes place in front everything and was very accurate. In sdk 4.x this could cause registry corruption in the esp32 older than revision 3.0 and this registry corruption crashes the wifi and make it's unusable until a physical power off. We will try tomorrow and workaround to move all tasks to core 0, and only use the ISR and Timer on core 1 to see if this problem still happen, if so, espressif team shall enter deep to fix it. |
We have change BLE Nimble to be on core 0 as well Wifi already was on core 0. Same problems, changes nothing, same behavior, GPTIMER do not respond correctly and stay missing dispatch with sometimes more than 700us window. GPTIMER and ISR are setup form a PINNED TASK on core 1, and the problem is exactly the same. |
@suda-morris, @AxelLin, The Bluetooth control layer was running in the CORE 1 so we moved it to CORE 0. The problem has reduced, but still happen, so, this way still not doable to run, need to find a fix for the timer. We need a TIMER that true BREAKS everything and run whatsoever we need, so, if the system need to run, ok, but if we tell that we want to run an ISR and a GPTIMER accurate, it shall move to the ABOVE all other tasks and execute. The functions runs in a 2us code execution time in GPTIMER and 1us in the ISR GPIO LEVEL, so, this should not break anything and we were supose to take in place of anything. |
Task Name Status Prio HWM Task# Affinity So, this is the tasks list/ |
Answers checklist.
General issue report
Since SDK 5, we have been facing the same issue, and even after fixes to the Wi-Fi, the bug continues to affect the GPTIMER.
Create an ISR to trigger at intervals of 10, 17, 20, 457, and 7500 microseconds, executing 2 µs of code within it.
Set up a GPTIMER with the following configuration:
The intr_priority setting (1, 2, or 3) does not seem to affect the outcome— the same issues occur regardless.
The time_lapse_action simply toggles GPIO23 and GPIO26 at each dispatch, flipping their states.
The issue is that the GPTIMER experiences "blockouts" from 50 µs to 850 µs with no execution at all, which is completely unacceptable.
So, is there any way to fix it?
The text was updated successfully, but these errors were encountered: