Skip to content
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

Add test for immediate wakeups by interrupt #7

Open
jefftenney opened this issue Aug 19, 2021 · 0 comments
Open

Add test for immediate wakeups by interrupt #7

jefftenney opened this issue Aug 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@jefftenney
Copy link
Owner

jefftenney commented Aug 19, 2021

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.

@jefftenney jefftenney added the enhancement New feature or request label Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant