64,12 → 64,13 |
//---------------------------------------------------------------------------------------------------- |
void TIM1_IRQHandler(void) |
{ |
TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit |
TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
|
CountMilliseconds++; |
//if (GPIO_ReadBit(GPIO6, GPIO_Pin_3)) GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_RESET); else GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_SET); |
|
if(TIM_GetFlagStatus(TIM1, TIM_FLAG_OC1) == SET) |
{ |
TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
CountMilliseconds++; |
//if (GPIO_ReadBit(GPIO6, GPIO_Pin_3)) GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_RESET); else GPIO_WriteBit(GPIO6, GPIO_Pin_3, Bit_SET); |
TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit |
} |
// write any value to VIC0 Vector address register |
VIC0->VAR = 0xFF; |
} |
100,7 → 101,7 |
|
VIC_Config(TIM1_ITLine, VIC_IRQ, 5); |
VIC_ITCmd(TIM1_ITLine, ENABLE); |
|
|
SystemTime.Year = 0; |
SystemTime.Month = 0; |
SystemTime.Day = 0; |