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

Missing NVIC Registers #49

Closed
jman168 opened this issue Sep 5, 2024 · 3 comments
Closed

Missing NVIC Registers #49

jman168 opened this issue Sep 5, 2024 · 3 comments

Comments

@jman168
Copy link

jman168 commented Sep 5, 2024

When working with the RT1176_M7 I discovered that the NVIC peripheral is missing registers. For example, I need to enable the PIT2 interrupt (IRQ number 156), so I go to set bit 28 of NVICISER4, but oh no, there's no NVICISER4, it stops at NVICISER3! There are four 32 bit wide NVIC IRQ enable registers which works out to 128 IRQs, but looking at the reference manual there's over 200. Looking at the SVD file, they're missing there as well for some reason. I haven't looked at any other processors, but I know that for the M4 and M7 of the RT1176 this is an issue. It's also missing the IRQ priority and associated registers, it's as if the SVD just cuts off almost half of the IRQs.

@jman168
Copy link
Author

jman168 commented Sep 5, 2024

Found something interesting, if you look at the SVD from the most recent NXP SDK (2.16.0), it does have the missing registers. Might be as simple as just updating the SVD in this repo? I'm not sure what the process for that looks like or how many things that would break in the process.

@mciantyre
Copy link
Member

Would the cortex-m crate work for you? Their NVIC API is convenient, and imxrt-ral should play well with it. Enabling the PIT2 interrupt would look like

unsafe { cortex_m::peripheral::NVIC::unmask(imxrt_ral::Interrupt::PIT2) };

If you're a real do-it-yourself-er, here's the raw registers.


We intentionally removed NVIC from the 1000 series in #17. I'm inclined to remove the NVIC from the 1176 for consistency.

@mciantyre
Copy link
Member

#50 removes all NVIC registers from the 1176.

@mciantyre mciantyre closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants