Subversion Repositories NaviCtrl

Rev

Rev 360 | Rev 378 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 360 Rev 362
Line 55... Line 55...
55
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
55
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
56
#include "91x_lib.h"
56
#include "91x_lib.h"
57
#include "timer1.h"
57
#include "timer1.h"
58
#include "uart1.h"
58
#include "uart1.h"
59
#include "config.h"
59
#include "config.h"
-
 
60
#include "main.h"
Line 60... Line 61...
60
 
61
 
61
u32 CountMilliseconds;
62
u32 CountMilliseconds;
Line 62... Line 63...
62
DateTime_t SystemTime;
63
DateTime_t SystemTime;
Line 69... Line 70...
69
        if(TIM_GetFlagStatus(TIM1, TIM_FLAG_OC1) == SET)
70
        if(TIM_GetFlagStatus(TIM1, TIM_FLAG_OC1) == SET)
70
        {
71
        {
71
                TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit
72
                TIM_ClearFlag(TIM1, TIM_FLAG_OC1); // clear irq pending bit
72
                TIM1->OC1R += 200;    // Timerfreq is 200kHz, generate an interrupt every 1ms
73
                TIM1->OC1R += 200;    // Timerfreq is 200kHz, generate an interrupt every 1ms
73
                CountMilliseconds++;
74
                CountMilliseconds++;
74
               
-
 
-
 
75
        if(SD_WatchDog) SD_WatchDog--;
-
 
76
                if(MainWatchDog) MainWatchDog--;
75
                // generate SW Interrupt to make a regular timing 
77
                // generate SW Interrupt to make a regular timing 
76
                // independent from the mainloop at the lowest IRQ priority
78
                // independent from the mainloop at the lowest IRQ priority
77
                VIC_SWITCmd(EXTIT3_ITLine, ENABLE);    
79
                VIC_SWITCmd(EXTIT3_ITLine, ENABLE);    
78
        }
80
        }