- /* Set the timer interrupts to be above the kernel. The interrupts are\r
- assigned different priorities so they nest with each other. */\r
-// IPR( TMR0, CMIA0 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;\r
-// IPR( TMR2, CMIA2 ) = ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 2 );\r
+ /* Map TMR0 CMIA0 interrupt to vector slot B number 128 and set\r
+ priority above the kernel's priority, but below the max syscall\r
+ priority. */\r
+ ICU.SLIBXR128.BYTE = 3; /* Three is TMR0 compare match A. */\r
+ IPR( PERIB, INTB128 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;\r
+ IEN( PERIB, INTB128 ) = 1;\r
+\r
+ /* Ensure that the flag is set to 0, otherwise the interrupt will not be\r
+ accepted. */\r
+ IR( PERIB, INTB128 ) = 0;\r
+\r
+ /* Do the same for TMR2, but to vector 129. */\r
+ ICU.SLIBXR129.BYTE = 9; /* Nine is TMR2 compare match A. */\r
+ IPR( PERIB, INTB129 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 2;\r
+ IEN( PERIB, INTB129 ) = 1;\r
+ IR( PERIB, INTB129 ) = 0;\r