Hi,
There is the paging mechanism. You can configure all 128 interrupts priority with only 9 registers.
For instance, if you want to have two interrupts with different priority, let’s say:
CAN receive (Vector base + 0x154) and Port L (Vector base + 0x0C0)
Then for CAN receive interrupt:
Vector address/vector size = 0x154 / 4 = 0x55. We use only bit [7..4] for INT_CFADDR configuration. In this case, it is 0x50.
INT_CFADDR = 0x50;
The 3 LSB of 0x55 are 0b101 = 5, therefore for priority configuration of this interrupt use data register 5 and load it with priority you need.
INT_CFDATA5_PRIOLVL = 0x01; /*Priority level of CAN receive */
Similarly for Port L
INT_CFADDR = 0x30;
INT_CFDATA0_PRIOLVL = 0x02; /* Priority level of Port L */
The higher PRIOLVL number means the higher interrupt priority. With PRIOLVL = 0 the corresponding interrupt is disabled.
If more than one interrupt request is configured to the same interrupt priority level the interrupt request with the higher vector address wins.
You may look at S12Z CPU RM for more details about interrupt event principles:
http://www.nxp.com/assets/documents/data/en/reference-manuals/S12ZCPU_RM_V1.pdf
I hope it helps you.
Have a great day,
Daniel