You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug recently fixed in lptimTick.c (2021.08.11) could cause an assertion failure after "immediate" wake-ups from tickless idle. The only other bug in lptimTick.c (fixed 2020.07.10) was also caused by immediate wake-ups -- and landed on the exact same assertion failure (ugh). We should add a test that induces immediate wake-ups, and not just for an ISR but to make a task ready. The woken task should sometimes return very quickly to a blocked state, to address the bug fixed 2020.07.10. The tasks running during this test should also sometimes produce an expected idle time at or above the maximum, in combination with a very quick return to the blocked state, to address the bug fixed 2021.08.11.
Note that the core clock may need to increase from 48 MHz to 80 MHz, and we may need to avoid stop mode, to induce the edge and corner cases of interest. See comments in lptimTick.c regarding counting a tick a little early when precision is enabled.
Also note that the immediate wake-ups may sometimes, but must not always, induce an abort from tickless idle. An abort condition does not test the edge and corner cases of interest. The interrupts used for early wake-up must not come so rapidly that they effectively prevent tickless idle.
Ideally the fixes could be temporarily removed to verify that the new test creates the desired conditions. A long soak may be required.
The text was updated successfully, but these errors were encountered:
A bug recently fixed in lptimTick.c (2021.08.11) could cause an assertion failure after "immediate" wake-ups from tickless idle. The only other bug in lptimTick.c (fixed 2020.07.10) was also caused by immediate wake-ups -- and landed on the exact same assertion failure (ugh). We should add a test that induces immediate wake-ups, and not just for an ISR but to make a task ready. The woken task should sometimes return very quickly to a blocked state, to address the bug fixed 2020.07.10. The tasks running during this test should also sometimes produce an expected idle time at or above the maximum, in combination with a very quick return to the blocked state, to address the bug fixed 2021.08.11.
Note that the core clock may need to increase from 48 MHz to 80 MHz, and we may need to avoid stop mode, to induce the edge and corner cases of interest. See comments in lptimTick.c regarding counting a tick a little early when precision is enabled.
Also note that the immediate wake-ups may sometimes, but must not always, induce an abort from tickless idle. An abort condition does not test the edge and corner cases of interest. The interrupts used for early wake-up must not come so rapidly that they effectively prevent tickless idle.
Ideally the fixes could be temporarily removed to verify that the new test creates the desired conditions. A long soak may be required.
The text was updated successfully, but these errors were encountered: