I am using FreeRtos 7.1.0 on LPC1768/1769 controller. I use a demo program CORTEX_LPC1768_GCC_RedSuite with some modifications. I have added few new tasks among them two which deal respectively with UART1 and UART2. These tasks coup with ISRs to send and to get data in/out from UARTs.
After let say 3 - 4 hours of operation the systems comes to the endless operation in the:
list.c vListInsert function.
According to the suggestion in the list.c file I have extended the stack size for all tasks but it did not help. I suspect that the problem could be due to the priority assignment. I have set all task to the priority 3 as shown below:
Page will refresh every 2 seconds.
Task State Priority Stack #
uIP R 3 366 0
IDLE R 0 106 4
RC5 B 3 126 3
RX1 Input B 3 288 7
SHT75 B 3 104 1
Input B 3 102 2
RX2 Input B 3 240 6
Tmr Svc B 1 118 5
Refresh count = 288
The ISRs which deal with UART1 and UART2 are base on the xQueueSendFromISR and xQueueReceiveFromISR functions. Actually I use the code for UART1 and UART2 which was done for C:\FreeRTOSV7.1.0\Demo\ARM7_LPC2106_GCC\serial .
I have commented out only the end of ISR since it did not compile:
//if( xHigherPriorityTaskWoken )
// /* Clear the ISR in the VIC. */
// VICVectAddr = serCLEAR_VIC_INTERRUPT;
I do not know if the last line VICVectAddr = serCLEAR_VIC_INTERRUPT is mandatory for the proper operation?