Add variable to keep a count of the high frequency time tick occurrences. This is then used by the run time stats gathering macros.

pull/4/head
Richard Barry 16 years ago
parent c66301ac9e
commit 2293b8ca53

@ -83,8 +83,12 @@ zero. */
void Timer0IntHandler( void );
/* Stores the value of the maximum recorded jitter between interrupts. */
volatile unsigned portLONG ulMaxJitter = 0;
volatile unsigned portLONG ulMaxJitter = 0UL;
/* Counts the total number of times that the high frequency timer has 'ticked'.
This value is used by the run time stats function to work out what percentage
of CPU time each task is taking. */
volatile unsigned portLONG ulHighFrequencyTimerTicks = 0UL;
/*-----------------------------------------------------------*/
void vSetupHighFrequencyTimer( void )
@ -145,6 +149,11 @@ static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;
}
ulLastCount = ulCurrentCount;
/* Keep a count of the total number of 20KHz ticks. This is used by the
run time stats functionality to calculate how much CPU time is used by
each task. */
ulHighFrequencyTimerTicks++;
}

Loading…
Cancel
Save