-
Notifications
You must be signed in to change notification settings - Fork 157
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
SCB::vect_active() should be 9 bits #332
Comments
Yep, 9 bits. On cortex-m4 and -m7 the maximum number of interrupts is 240, which I expect is where this bug originally came from, but on -m33 it's allowed to be up to 480, which would definitely cause issues. This is basically what motivated removing bare_metal::Nr in favour of traits per architecture platform, and cortex_m::InterruptNumber being a u16... unfortunately this got missed, and since it's a breaking change it will have to wait for 0.8 I guess. |
Could we add a new method that takes a U16 without removing the u8 one? That way we can support new targets, and just switch over the U16 one to be an alias for the future 8->16 upgraded method? |
373: `SCB.ICSR.VECTACTIVE` is 9 bits, not 8 r=adamgreig a=TDHolmes Closes #332 Co-authored-by: Tyler Holmes <[email protected]>
332: Fix links in CHANGELOG.md r=adamgreig a=mattico Co-authored-by: Matt Ickstadt <[email protected]>
Currently
vect_active()
returns the irq number as a u8, but the SCB.ICSR.VECTACTIVE field is 9 (or more?) bits. This means that the interrupt numbers will wrap on chips with a lot of interrupts.The text was updated successfully, but these errors were encountered: