\r
/*-----------------------------------------------------------*/\r
\r
-/* Interrupt handler in which the jitter is measured. */\r
-static void prvTimer2IntHandler( void );\r
+/* Interrupt wrapper and handler in which the jitter is measured. */\r
+void vTimer2_ISR_Wrapper( void ) __attribute__((naked));\r
+static void prvTimer2_ISR_Handler( void ) __attribute__((noinline));\r
\r
-/* Stores the value of the maximum recorded jitter between interrupts. */\r
+/* Stores the value of the maximum recorded jitter between interrupts. This is\r
+displayed on one of the served web pages. */\r
volatile unsigned short usMaxJitter = 0;\r
\r
+/* Counts the number of high frequency interrupts - used to generate the run\r
+time stats. */\r
+volatile unsigned long ulHighFrequencyTickCount = 0UL;\r
+\r
/*-----------------------------------------------------------*/\r
\r
void vSetupHighFrequencyTimer( void )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-#pragma interrupt ( prvTimer2IntHandler( vect = _VECT( _CMT2_CMI2 ), enable ) )\r
-static void prvTimer2IntHandler( void )\r
+void vTimer2_ISR_Wrapper( void )\r
+{\r
+ portENTER_INTERRUPT();\r
+ prvTimer2_ISR_Handler();\r
+ portEXIT_INTERRUPT();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvTimer2_ISR_Handler( void )\r
{\r
volatile unsigned short usCurrentCount;\r
static unsigned short usMaxCount = 0;\r
\r
usMaxCount = usCurrentCount;\r
}\r
- \r
+\r
+ /* Used to generate the run time stats. */\r
+ ulHighFrequencyTickCount++;\r
+ \r
/* Clear the timer. */\r
timerTIMER_3_COUNT_VALUE = 0;\r
\r