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

NVIC (timer) interrupt: no preemption without dynamic priority level #233

Open
b-zee opened this issue Apr 28, 2022 · 2 comments
Open

NVIC (timer) interrupt: no preemption without dynamic priority level #233

b-zee opened this issue Apr 28, 2022 · 2 comments
Labels
question Further information is requested

Comments

@b-zee
Copy link

b-zee commented Apr 28, 2022

According to section 2.3.2 in the RP2040 Datasheet:

a lower-priority interrupt can be preempted by a higher-priority interrupt

for interrupts with the same dynamic priority level, the lower-numbered IRQ has higher priority

During testing I have not been able to have the TIMER_IRQ_1 preempted by TIMER_IRQ_0 (without setting the dynamic level). When setting the dynamic level of TIMER_IRQ_1 to 3, it does get interrupted by TIMER_IRQ_0, but according to the cited documentation that should not be necessary.

@b-zee
Copy link
Author

b-zee commented Apr 28, 2022

After some thinking it seems my mental model isn't exactly right. Although the documentation isn't exactly correctly describing it either.

It seems that the priority in terms of preemption is different from the order in which pending exceptions are activated. I think these are both referred to as 'priorities', while there is a difference. Perhaps someone more enlightened than me can put this in more succinct wording to highlight that my observed behavior is the correct behavior according to the ARMv6-M architecture...

@aallan aallan added the question Further information is requested label May 4, 2022
@aallan
Copy link
Contributor

aallan commented Mar 2, 2023

Does raspberrypi/pico-sdk#245 resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants