for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
loop of list.c
3) Code hangs in
while( uxMissedTicks > ( unsigned portBASE_TYPE ) 0 )
loop of tasks.c (due to uxMissedTicks being a very large number i.e. >0xFF000000)
I have searched this forum and found several posts that seem to be for this issue revolving around the setup of interrupts. I have the following settings:
#define configKERNEL_INTERRUPT_PRIORITY 0xFF // Equivalent to priority 15 (lowest)#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0x00 // Equivalent to priority 0 (highest) Which should allow me to use interrupts with priorities between 1 and 15 I think. I am setting the interrupts I use to priority 13 with the following code:
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
NVIC_InitStructure.NVIC_IRQChannel = SPI1_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 13;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
To check this I look in the Peripherals->Core Peripherals->NVIC window and I can see that the interrupts that I’m using are all set to priority 13. There seems to be five interrupts enabled (other than the ones I define):
- Non-maskable interrupt NMI (priority = -2)- Hard fault HARDFAULT (priority = -1)
- System service call SVCALL (priority = 0)
- Pend system service PENDSV (priority = 15)
- System tick timer SYSTICK (priority = 15) Does this look correct for these? Another cause from the forum posts is a stack overflow. I have switched on the FreeRTOS stack checking with
#define configCHECK_FOR_STACK_OVERFLOW 2
and provided a vApplicationStackOverflowHook() function to catch a stack overflow. This never gets reached so my assumption is that the problem is not a stack issue.
Does anyone have any thoughts on what I might be doing wrong?
Thanks.