CLEON  Version 1
Cloud-Offloaded GPS Receiver
hal_timer.c
Go to the documentation of this file.
1 
7 #include "cleon_conf.h"
8 #include "app_define.h"
9 #include "sys_define.h"
10 #include "hal_define.h"
11 #include "fs_define.h"
12 
13 // Second and millisecond time tick
16 
17 /*----------------------------------------------------------------------------*/
26 {
28 }
29 
30 /*----------------------------------------------------------------------------*/
39 {
40  TA1CCTL0 = CCIE; // CCR0 toggle mode
41  TA1CCR0 = 12000; // Set it to 12000 to generate 1ms tick with 12MHz clock source
42  TA1CTL = TASSEL_2 + MC_1 + TACLR; // SMCLK, up mode, clear TAR
43 }
44 
45 //------------------------------------------------------------------------------
46 // TIMER1_A0 Interrupt Service Routine
47 //------------------------------------------------------------------------------
48 #pragma vector=TIMER1_A0_VECTOR
49 __interrupt void TIMER1_A0_VECTOR_ISR (void)
50 {
51  uniMillisecondTimeTick.ullMillisecondTimeTick += 10000;
52 }