/* Priority grouping: The interrupt controller (NVIC) allows the bits
that define each interrupt's priority to be split between bits that
define the interrupt's pre-emption priority bits and bits that define
the interrupt's sub-priority. For simplicity all bits must be defined
to be pre-emption priority bits. The following assertion will fail if
this is not the case (if some bits represent a sub-priority).
If CMSIS libraries are being used then the correct setting can be
achieved by calling NVIC_SetPriorityGrouping( 0 ); before starting the
scheduler. */
configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) == 0x0000 );
After I call NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); the priority bits in AIRCR are set to 3, not zero. To get things to work I had to change the assertion to
configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) == [b]0x0300[/b] );
Is that a bug in the port.c file? It seems to work ok once I’ve changed it.
I find it still has hard-aborts in ISR’s but I’ll do some more reading before asking for help.
PeterPS Some of the info is here to help someone else who comes across the same problem