In the PIC32MX there is only one Shadow Register Set that can be assigned to one interrupt level and this is done via the DEVCFG3 configuration register.
However the PIC32MZ has seven (7) Shadow Register Set and each interrupt priority can have its own Shadow Register Set via the PRISS register.
I tried a simple example but the compiler still refuses it.
Here the code snippet.
Code: Select all
program Test_interrupt
sub procedure Timer1Int() iv IVT_TIMER_1 ilevel 7 ics ICS_SRS
end sub
sub procedure Timer2Int() iv IVT_TIMER_2 ilevel 6 ics ICS_SRS
end sub
main:
INTCON.MVEC = 1
PRISS = %01110110010101000011001000010000
end.
Why would the compiler complain about that? Isn't the PRISS register configured correctly?
And in the project properties there is no way to set that, it has the same interface as the PIC32 MX i.e. choose which priority uses the SRS.
Can somebody give me a hint about how to use that?
Thanks.