/* Setup timer 1 compare match to generate a tick interrupt.  */
static void prvSetupTimerInterrupt(void)
/* Setup timer 1 compare match to generate a tick interrupt.  */
static void prvSetupTimerInterrupt(void)
{
const unsigned long ulCompareMatch = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) / portCLOCK_DIV;
	MSTPCR &= ~portMSTP13;
	TCR1 = portCLEAR_ON_TGRA_COMPARE_MATCH | portCLOCK_DIV_64;
	TGR1A = ulCompareMatch;
	TIER1 |= portTGRA_INTERRUPT_ENABLE;
	TSTR |= portTIMER_CHANNEL;
}