void vApplicationTickHook( void );\r
\r
/* Prototype for the IRQ handler called by the generic Cortex-A5 RTOS port\r
-layer. The address of the ISR is passed into this function as a parameter.\r
-Note this level of indirection could be removed by creating a SAMA5 specific\r
-port layer that calls the IRQ directly from the port layer rather than via this\r
-application callback. */\r
-void vApplicationIRQHandler( uint32_t ulInterruptVectorAddress );\r
+layer. */\r
+void vApplicationIRQHandler( void );\r
\r
/*-----------------------------------------------------------*/\r
\r
int main( void )\r
{\r
-//extern int atmel_main( void );\r
-//atmel_main();\r
-\r
/* Configure the hardware ready to run the demo. */\r
prvSetupHardware();\r
\r
/* Disable watchdog */\r
WDT_Disable( WDT );\r
\r
- /* Set protect mode in the AIC for easier debugging. */\r
-// AIC->AIC_DCR |= AIC_DCR_PROT;\r
+ /* Set protect mode in the AIC for easier debugging. THIS IS COMMENTED OUT\r
+ AS IT RESULTS IN SPURIOUS INTERRUPTS.\r
+ AIC->AIC_DCR |= AIC_DCR_PROT; */\r
\r
/* Configure ports used by LEDs. */\r
vParTestInitialise();\r
\r
-//_RB_ CP15_EnableIcache();\r
+ #if defined (ddram)\r
+ {\r
+ MMU_Initialize( ( uint32_t * ) 0x20C000 );\r
+ CP15_EnableMMU();\r
+ CP15_EnableDcache();\r
+ CP15_EnableIcache();\r
+ }\r
+ #endif\r
}\r
/*-----------------------------------------------------------*/\r
\r
internally by FreeRTOS API functions that create tasks, queues, software\r
timers, and semaphores. The size of the FreeRTOS heap is set by the\r
configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */\r
- taskDISABLE_INTERRUPTS();\r
- for( ;; );\r
+\r
+ /* Force an assert. */\r
+ configASSERT( ( volatile void * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* Run time stack overflow checking is performed if\r
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook\r
function is called if a stack overflow is detected. */\r
- taskDISABLE_INTERRUPTS();\r
- for( ;; );\r
+\r
+ /* Force an assert. */\r
+ configASSERT( ( volatile void * ) NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
\r
/* The function called by the RTOS port layer after it has managed interrupt\r
entry. */\r
-void vApplicationIRQHandler( uint32_t ulInterruptVectorAddress )\r
+void vApplicationIRQHandler( void )\r
{\r
typedef void (*ISRFunction_t)( void );\r
ISRFunction_t pxISRFunction;\r
volatile uint32_t * pulAIC_IVR = ( uint32_t * ) configINTERRUPT_VECTOR_ADDRESS;\r
\r
- /* On the SAMA5 the parameter is a pointer to the ISR handling function. */\r
- pxISRFunction = ( ISRFunction_t ) ulInterruptVectorAddress;\r
+ /* Obtain the address of the interrupt handler from the AIR. */\r
+ pxISRFunction = ( ISRFunction_t ) *pulAIC_IVR;\r
\r
/* Write back to the SAMA5's interrupt controller's IVR register in case the\r
CPU is in protect mode. If the interrupt controller is not in protect mode\r
then this write is not necessary. */\r
- *pulAIC_IVR = 0;\r
+ *pulAIC_IVR = ( uint32_t ) pxISRFunction;\r
\r
/* Ensure the write takes before re-enabling interrupts. */\r
__DSB();\r
pxISRFunction();\r
}\r
\r
-\r