diff options
author | richardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2008-04-16 08:00:30 +0000 |
---|---|---|
committer | richardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2008-04-16 08:00:30 +0000 |
commit | 39a369502fad44306b96f0974708ecf2a24ec0e3 (patch) | |
tree | 11617bda93a4c297065e801bca662efb0d58a7dc /Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c | |
parent | 84b008e6eb8caf1bd5c98ab8381c9c1cb69b91ee (diff) | |
download | freertos-39a369502fad44306b96f0974708ecf2a24ec0e3.tar.gz freertos-39a369502fad44306b96f0974708ecf2a24ec0e3.tar.bz2 freertos-39a369502fad44306b96f0974708ecf2a24ec0e3.tar.xz |
Update to V5.0.0.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@324 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c')
-rw-r--r-- | Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c b/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c index c17c9fe4..994efcdb 100644 --- a/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c +++ b/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c @@ -1,5 +1,5 @@ /*
- FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
+ FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@@ -81,7 +81,7 @@ zero. */ void Timer0IntHandler( void );
/* Stores the value of the maximum recorded jitter between interrupts. */
-unsigned portLONG ulMaxJitter = 0;
+volatile unsigned portLONG ulMaxJitter = 0;
/*-----------------------------------------------------------*/
@@ -102,6 +102,9 @@ unsigned long ulFrequency; /* Just used to measure time. */
TimerLoadSet(TIMER1_BASE, TIMER_A, timerMAX_32BIT_VALUE );
+ /* Ensure interrupts do not start until the scheduler is running. */
+ portDISABLE_INTERRUPTS();
+
/* The rate at which the timer will interrupt. */
ulFrequency = configCPU_CLOCK_HZ / timerINTERRUPT_FREQUENCY;
TimerLoadSet( TIMER0_BASE, TIMER_A, ulFrequency );
@@ -116,7 +119,8 @@ unsigned long ulFrequency; void Timer0IntHandler( void )
{
-unsigned portLONG ulDifference, ulCurrentCount;
+unsigned portLONG ulDifference;
+volatile unsigned portLONG ulCurrentCount;
static portLONG ulMaxDifference = 0, ulLastCount = 0;
/* We use the timer 1 counter value to measure the clock cycles between
|