![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: MTimer.c
- Revision:
- 49:53277d871197
- Parent:
- 47:d902ef6f7564
- Child:
- 88:b5c1d9d338d1
diff -r 8697dfe679b9 -r 53277d871197 MTimer.c --- a/MTimer.c Wed Feb 10 15:58:16 2016 +0000 +++ b/MTimer.c Thu Feb 11 02:55:35 2016 +0000 @@ -21,7 +21,9 @@ unsigned int init_timer (unsigned int TimerInterval ) { //start DAC prepearing for writing + //Match Register 0 LPC_TIM1->MR0 = TimerInterval; + //Match Control Register. The MCR is used to control if an interrupt is generated and if the TC is reset when a Match occurs LPC_TIM1->MCR = 3; /* Interrupt and Reset on MR1 */ NVIC_EnableIRQ(TIMER1_IRQn); //LPC_GPIO0->FIOSET |= (1<<5);