Hi Dan,
Greetings from the S32 SDK Team!
Your proposal has been discussed internally within our team. We have agreed that the current interrupt model is not the best as it could be, so we are implementing some changes, based on your feedback:
- the priority level will be settable even though the interrupt is not active
- INT_SYS_EnableIRQ() will not change an already set priority
and, based on other past experiences:
- INT_SYS_EnableIRQ() will enable the interrupt only on the current core, avoiding spurious interrupts on the other cores
The changes are in the final stages of testing, and should be available with the next release, coming soon.
Your proposal:
deprecate the call to any interrupt manager (INT_SYS_*()) functions from the other sdk drivers such that only user code makes changes to the INTC registers
Is not as simple as it might seem. Though it is a sound proposal, it would automatically require that all applications explicitly enable the interrupts required by the drivers that are used.
This impacts both the ease-of-use aspect, as now there are extra steps involved when adding a new driver to the project, and also portability of the project. Say you want to move your great project from one platform to another. In some cases, the interrupt names (*_IRQn), are not the same, so you have to figure out which names to use for the new project. This is time that we don't want our users to waste! The drivers can take care of this.
There are plenty of cases where different interrupt priorities are a necessity. We don't want to restrict the possibilities for our users. But also we strive to achieve a balance between configurability and usability. Hopefully with the changes we are adding, the mix is just right.
Best regards,
The S32 SDK Team