/*\r
FreeRTOS V7.1.0 - Copyright (C) 2011 Real Time Engineers Ltd.\r
- \r
+\r
\r
***************************************************************************\r
* *\r
xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H2QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask2 );\r
xTaskCreate( prvLowerPriorityNormallyEmptyTask, ( signed portCHAR * ) "LQRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL );\r
xTaskCreate( prv1stHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask1 );\r
- xTaskCreate( prv2ndHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 );\r
+ xTaskCreate( prv2ndHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H2QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 );\r
xTaskCreate( prvLowerPriorityNormallyFullTask, ( signed portCHAR * ) "LQRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL );\r
\r
/* Create the queues that are accessed by multiple tasks and multiple\r
\r
static void prvHigherPriorityNormallyEmptyTask( void *pvParameters )\r
{\r
-unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxErrorCount1 = 0, uxErrorCount2 = 0;\r
+unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxInterrupts, uxErrorCount1 = 0, uxErrorCount2 = 0;\r
\r
/* The timer should not be started until after the scheduler has started.\r
More than one task is running this code so we check the parameter value\r
\r
uxTask1 = 0;\r
uxTask2 = 0;\r
+ uxInterrupts = 0;\r
\r
/* Loop through the array, checking that both tasks have\r
placed values into the array, and that no values are missing.\r
/* Value was placed into the array by task 2. */\r
uxTask2++;\r
}\r
+ else if( ucNormallyEmptyReceivedValues[ ux ] == intqSECOND_INTERRUPT )\r
+ {\r
+ uxInterrupts++;\r
+ }\r
}\r
}\r
\r
uxErrorCount2 = 0;\r
}\r
\r
+ if( uxInterrupts == 0 )\r
+ {\r
+ prvQueueAccessLogError( __LINE__ );\r
+ }\r
+\r
/* Clear the array again, ready to start a new cycle. */\r
memset( ucNormallyEmptyReceivedValues, 0x00, sizeof( ucNormallyEmptyReceivedValues ) );\r
\r
\r
static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )\r
{\r
-unsigned portBASE_TYPE uxValueToTx, ux;\r
+unsigned portBASE_TYPE uxValueToTx, ux, uxInterrupts;\r
\r
/* The parameters are not being used so avoid compiler warnings. */\r
( void ) pvParameters;\r
task recognises a time out when it is unsuspended. */\r
xWasSuspended = pdTRUE;\r
\r
+ /* Check interrupts are also sending. */\r
+ uxInterrupts = 0U;\r
+\r
/* Start at 1 as we expect position 0 to be unused. */\r
for( ux = 1; ux < intqNUM_VALUES_TO_LOG; ux++ )\r
{\r
/* A value was missing. */\r
prvQueueAccessLogError( __LINE__ );\r
}\r
+ else if( ucNormallyFullReceivedValues[ ux ] == intqSECOND_INTERRUPT )\r
+ {\r
+ uxInterrupts++;\r
+ }\r
+ }\r
+\r
+ if( uxInterrupts == 0 )\r
+ {\r
+ /* No writes from interrupts were found. Are interrupts\r
+ actually running? */\r
+ prvQueueAccessLogError( __LINE__ );\r
}\r
\r
/* Reset the array ready for the next cycle. */\r