******************************************************************************* Function name: delayMs
**** Descriptions: Start the timer delay in milo seconds
** until elapsed
**** parameters: timer number, Delay value in milo second
**** Returned value: None
*******************************************************************************/void delayMs(uint8_t timer_num,uint32_t delayInMs){if( timer_num ==0){
LPC_TIM0->TCR =0x02;/* reset timer */
LPC_TIM0->PR =0x00;/* set prescaler to zero */
LPC_TIM0->MR0 = delayInMs *(9000000/1000-1);
LPC_TIM0->IR =0xff;/* reset all interrrupts */
LPC_TIM0->MCR =0x04;/* stop timer on match */
LPC_TIM0->TCR =0x01;/* start timer *//* wait until delay time has elapsed */while(LPC_TIM0->TCR &0x01);}elseif( timer_num ==1){
LPC_TIM1->TCR =0x02;/* reset timer */
LPC_TIM1->PR =0x00;/* set prescaler to zero */
LPC_TIM1->MR0 = delayInMs *(9000000/1000-1);
LPC_TIM1->IR =0xff;/* reset all interrrupts */
LPC_TIM1->MCR =0x04;/* stop timer on match */
LPC_TIM1->TCR =0x01;/* start timer *//* wait until delay time has elapsed */while(LPC_TIM1->TCR &0x01);}return;}/******************************************************************************** Function name: Timer0_IRQHandler**** Descriptions: Timer/Counter 0 interrupt handler**** parameters: None** Returned value: None** ******************************************************************************/void TIMER0_IRQHandler (void){///////////////////////////////////////
main file
nt main (void){
SystemInit();
SystemClockUpdate();
init_timer (0,71999999);
enable_timer(0);
LPC_TIM0->TCR =1;
NVIC_EnableIRQ(TIMER0_IRQn);while(1){}}
My query is how to calculate time interval .
what is the clk value
Time interval 71999999=1sec i got from oscilloscope .