Rev 41 | Rev 81 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 41 | Rev 60 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | DateTime_t SystemTime; |
62 | DateTime_t SystemTime; |
Line 63... | Line 63... | ||
63 | 63 | ||
64 | //---------------------------------------------------------------------------------------------------- |
64 | //---------------------------------------------------------------------------------------------------- |
65 | void TIM1_IRQHandler(void) |
65 | void TIM1_IRQHandler(void) |
66 | { |
66 | { |
- | 67 | if(TIM_GetFlagStatus(TIM1, TIM_FLAG_OC1) == SET) |
|
67 | TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit |
68 | { |
68 | TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
- | |
69 | 69 | TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
|
70 | CountMilliseconds++; |
70 | CountMilliseconds++; |
- | 71 | //if (GPIO_ReadBit(GPIO6, GPIO_Pin_3)) GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_RESET); else GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_SET); |
|
71 | //if (GPIO_ReadBit(GPIO6, GPIO_Pin_3)) GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_RESET); else GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_SET); |
72 | TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit |
72 | 73 | } |
|
73 | // write any value to VIC0 Vector address register |
74 | // write any value to VIC0 Vector address register |
74 | VIC0->VAR = 0xFF; |
75 | VIC0->VAR = 0xFF; |
Line 75... | Line 76... | ||
75 | } |
76 | } |