I saw previous posts about this odd error but no explanation about what the issue is.
We have two ESP32s3 applications both of which use a hardware timer. They both use the timer in a similar way, but with one small difference.
In both cases we configure and then enable the timer, in exactly the same way, before use, but do not start it.
In one app we then start the timer periodically from the main loop, with no problems.
In the other app, we start the timer in response to a UART break interrupt. Under IDF 5.3 we had the following error message:
gptimer_start(399): timer is not enabled yet
However, if we just ignore the error message, the timer works perfectly well. It is very strange, I am absolutely certain that the timer IS enabled.
This morning I updated to IDF 5.4 and run the exact same code, I now get a different message:
gptimer_start(399): timer is not ready for a new start
Same problem (which is not really a problem), new error message. Again it functions perfectly well, just generates this unwanted error.
I noticed this post discusses the same thing, it appears to be related to UART use (which we are indeed doing on both applications)
viewtopic.php?t=34746
I also tried a little hack of not enabling the timer until just before it is started (i.e. in response to the break interrupt), and I get the same issue.
What is going on? The issue has clearly had attention in 5.4, as the error message has been updated, but the behaviour makes no sense. And according to timer documentation, the timer start function is OK to use in ISR.
timer is not enabled yet / timer is not ready fro a new start ... ?
-
- Posts: 1994
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: timer is not enabled yet / timer is not ready fro a new start ... ?
Could be some memory corruption on the timer handle's value, or on the timer's memory itself. Or the task and ISR seeing different timer handle values for some other reason.
Can you create a minimal example reproducing the issue?
Can you create a minimal example reproducing the issue?
Who is online
Users browsing this forum: Hiroki and 94 guests