hi everyone i am using lpc54so18 evk board
i need generate 25 clock pulse for encoder input so i am developing SSI protocol with gpio toggle so i am facing issue with ctimer i need to how to set match value and prescale for 250kz frequency and match value for 25 times interrupt generation so please help any one
thanks
PRINTF("SSI INTERFACE USING GPIO\r\n");
srcClock_Hz = CTIMER_CLK_FREQ;
PRINTF("CTIMER_CLK_FREQ %d\r\n",CTIMER_CLK_FREQ);
CTIMER_GetDefaultConfig(&config);
config.prescale = CTIMER_CLK_FREQ /1000 - 1 ;// 1ms tick
// timerClock = srcClock_Hz / (config.prescale+1);
//PRINTF("timerclock %d\r\n",timerClock);
CTIMER_Init(CTIMER, &config);
matchConfig.enableCounterReset = true;
matchConfig.enableCounterStop = false;
matchConfig.matchValue = 25;//timerClock/480;//timerClock/2; //timerClock/0.024;//CTIMER_CLK_FREQ;//CTIMER_CLK_FREQ/4000000;
PRINTF("matchValue %d\r\n",matchConfig.matchValue);
matchConfig.outControl = kCTIMER_Output_Toggle;
matchConfig.outPinInitState = true;
matchConfig.enableInterrupt = true;