]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c
Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks.
[freertos] / Demo / CORTEX_LM3Sxxxx_Eclipse / RTOSDemo / timertest.c
index 2f3a68b83cca5a7cd200dfc4940257ec55872f59..df636b7cfbe7a57c18e53ce11d4a447734023333 100644 (file)
@@ -85,7 +85,7 @@ volatile unsigned portLONG ulMaxJitter = 0;
 \r
 /*-----------------------------------------------------------*/\r
 \r
-void vSetupTimer( void )\r
+void vSetupHighFrequencyTimer( void )\r
 {\r
 unsigned long ulFrequency;\r
 \r
@@ -121,12 +121,14 @@ void Timer0IntHandler( void )
 {\r
 unsigned portLONG ulDifference;\r
 volatile unsigned portLONG ulCurrentCount;\r
-static portLONG ulMaxDifference = 0, ulLastCount = 0;\r
+static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;\r
 \r
        /* We use the timer 1 counter value to measure the clock cycles between\r
        the timer 0 interrupts. */\r
        ulCurrentCount = timerTIMER_1_COUNT_VALUE;\r
 \r
+       TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );\r
+       \r
        if( ulCurrentCount < ulLastCount )\r
        {       \r
                /* How many times has timer 1 counted since the last interrupt? */\r
@@ -141,8 +143,6 @@ static portLONG ulMaxDifference = 0, ulLastCount = 0;
        }\r
        \r
        ulLastCount = ulCurrentCount;\r
-\r
-    TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );\r
 }\r
 \r
 \r