* file.\r
*/\r
static void prvCheckTask( void *pvParameters );\r
-\r
+static void vRegTest1Task( void *pvParameters );\r
+static void vRegTest2Task( void *pvParameters );\r
\r
/*-----------------------------------------------------------*/\r
+static volatile unsigned portLONG ulRegTest1Counter = 0, ulRegTest2Counter = 0;\r
\r
int main( void )\r
{\r
vStartQueuePeekTasks();\r
vStartRecursiveMutexTasks();\r
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );\r
+ vStartInterruptQueueTasks();\r
+\r
+ xTaskCreate( vRegTest1Task, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( vRegTest2Task, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
\r
/* Create the check task. */\r
xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0;\r
+unsigned ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
portTickType xLastExecutionTime;\r
\r
( void ) pvParameters;\r
{\r
ulError |= 0x01UL;\r
}\r
- else if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+\r
+ if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
{\r
ulError |= 0x02UL;\r
}\r
- else if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+\r
+ if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
{\r
ulError |= 0x04UL;\r
}\r
- else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+\r
+ if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
{\r
ulError |= 0x10UL;\r
}\r
- else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+\r
+ if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
{\r
ulError |= 0x20UL;\r
}\r
- else if( xArePollingQueuesStillRunning() != pdTRUE )\r
+\r
+ if( xArePollingQueuesStillRunning() != pdTRUE )\r
{\r
ulError |= 0x40UL;\r
}\r
- else if( xIsCreateTaskStillRunning() != pdTRUE )\r
+\r
+ if( xIsCreateTaskStillRunning() != pdTRUE )\r
{\r
ulError |= 0x80UL;\r
}\r
- else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
+\r
+ if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
{\r
ulError |= 0x100UL;\r
}\r
- else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+\r
+ if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
{\r
ulError |= 0x200UL;\r
}\r
- else if( xAreComTestTasksStillRunning() != pdTRUE )\r
+\r
+ if( xAreComTestTasksStillRunning() != pdTRUE )\r
{\r
ulError |= 0x400UL;\r
}\r
\r
+ if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+ {\r
+ ulError |= 0x800UL;\r
+ }\r
+\r
+ if( ulLastRegTest1Count == ulRegTest1Counter )\r
+ {\r
+ ulError |= 0x1000UL;\r
+ }\r
+\r
+ if( ulLastRegTest2Count == ulRegTest2Counter )\r
+ {\r
+ ulError |= 0x1000UL;\r
+ }\r
+\r
+ ulLastRegTest1Count = ulRegTest1Counter;\r
+ ulLastRegTest2Count = ulRegTest2Counter;\r
+\r
if( ulError != 0 )\r
{\r
ulTicksToWait = mainERROR_PERIOD;\r
\r
void prvSetupHardware( void )\r
{\r
+extern void mcf5xxx_wr_cacr( unsigned portLONG );\r
+\r
+ /* Enable the cache. */\r
+ mcf5xxx_wr_cacr( MCF5XXX_CACR_CENB | MCF5XXX_CACR_CINV | MCF5XXX_CACR_DISD | MCF5XXX_CACR_CEIB | MCF5XXX_CACR_CLNF_00 );\r
+\r
/* Multiply 8Mhz reference crystal by 8 to achieve system clock of 64Mhz. */\r
MCF_CLOCK_SYNCR = MCF_CLOCK_SYNCR_MFD( 2 );\r
\r
\r
for( ;; );\r
}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vRegTest1Task( void *pvParameters )\r
+{\r
+ ( void ) pvParameters;\r
\r
+ asm volatile ( "reg_test_1_start: \n\t"\r
+ " moveq #1, %d0 \n\t"\r
+ " moveq #2, %d1 \n\t"\r
+ " moveq #3, %d2 \n\t"\r
+ " moveq #4, %d3 \n\t"\r
+ " moveq #5, %d4 \n\t"\r
+ " moveq #6, %d5 \n\t"\r
+ " moveq #7, %d6 \n\t"\r
+ " moveq #8, %d7 \n\t"\r
+ " move #9, %a0 \n\t"\r
+ " move #10, %a1 \n\t"\r
+ " move #11, %a2 \n\t"\r
+ " move #12, %a3 \n\t"\r
+ " move #13, %a4 \n\t"\r
+ " move #14, %a5 \n\t"\r
+ " move #15, %a6 \n\t"\r
+ " \n\t"\r
+ " cmpi.l #1, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #2, %d1 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #3, %d2 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #4, %d3 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #5, %d4 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #6, %d5 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #7, %d6 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " cmpi.l #8, %d7 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a0, %d0 \n\t"\r
+ " cmpi.l #9, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a1, %d0 \n\t"\r
+ " cmpi.l #10, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a2, %d0 \n\t"\r
+ " cmpi.l #11, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a3, %d0 \n\t"\r
+ " cmpi.l #12, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a4, %d0 \n\t"\r
+ " cmpi.l #13, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a5, %d0 \n\t"\r
+ " cmpi.l #14, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " move %a6, %d0 \n\t"\r
+ " cmpi.l #15, %d0 \n\t"\r
+ " bne reg_test_1_error \n\t"\r
+ " movel ulRegTest1Counter, %d0 \n\t"\r
+ " addql #1, %d0 \n\t"\r
+ " movel %d0, ulRegTest1Counter \n\t"\r
+ " bra reg_test_1_start \n\t"\r
+ "reg_test_1_error: \n\t"\r
+ " bra reg_test_1_error \n\t"\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vRegTest2Task( void *pvParameters )\r
+{\r
+ ( void ) pvParameters;\r
+\r
+ asm volatile ( "reg_test_2_start: \n\t"\r
+ " moveq #10, %d0 \n\t"\r
+ " moveq #20, %d1 \n\t"\r
+ " moveq #30, %d2 \n\t"\r
+ " moveq #40, %d3 \n\t"\r
+ " moveq #50, %d4 \n\t"\r
+ " moveq #60, %d5 \n\t"\r
+ " moveq #70, %d6 \n\t"\r
+ " moveq #80, %d7 \n\t"\r
+ " move #90, %a0 \n\t"\r
+ " move #100, %a1 \n\t"\r
+ " move #110, %a2 \n\t"\r
+ " move #120, %a3 \n\t"\r
+ " move #130, %a4 \n\t"\r
+ " move #140, %a5 \n\t"\r
+ " move #150, %a6 \n\t"\r
+ " \n\t"\r
+ " cmpi.l #10, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #20, %d1 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #30, %d2 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #40, %d3 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #50, %d4 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #60, %d5 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #70, %d6 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " cmpi.l #80, %d7 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a0, %d0 \n\t"\r
+ " cmpi.l #90, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a1, %d0 \n\t"\r
+ " cmpi.l #100, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a2, %d0 \n\t"\r
+ " cmpi.l #110, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a3, %d0 \n\t"\r
+ " cmpi.l #120, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a4, %d0 \n\t"\r
+ " cmpi.l #130, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a5, %d0 \n\t"\r
+ " cmpi.l #140, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " move %a6, %d0 \n\t"\r
+ " cmpi.l #150, %d0 \n\t"\r
+ " bne reg_test_2_error \n\t"\r
+ " movel ulRegTest1Counter, %d0 \n\t"\r
+ " addql #1, %d0 \n\t"\r
+ " movel %d0, ulRegTest2Counter \n\t"\r
+ " bra reg_test_2_start \n\t"\r
+ "reg_test_2_error: \n\t"\r
+ " bra reg_test_2_error \n\t"\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
\r