Skip to content

IRQManager doesn't implement some interrupt types #310

Closed
@delta-G

Description

@delta-G

There are a number of peripherals available on the R4, some we have the FSP code for and some we don't. However they all function and many require interrupts that aren't implemented in the IRQManager class.

One important example of this is the Capacitive Touch Sensing Unit.

While it is possible to write directly to the IELSRn registers and the vector table, the IRQManager has claimed responsibility for all of the slots in the ICU. If you attach an interrupt directly there's no way to let IRQManager know to advance last_interrupt_index and so any future interrupts attached through IRQManager may overwrite the one you attached.

There is a hack that I've published that involves attaching an unused interrupt and then changing the entries manually. But I don't think this should be the standard way to do things.

It would be difficult to add support for every possible interrupt that could be attached. But it would be fairly simple to add a function that takes a code from table 13.4 in the Hardware Manual and a function pointer and sets the IELSRn register, puts your pointer in the vector table, and advances last_interrupt_index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions