From 4887461e35b64c697cbabaf0268c77ae68576c5e Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Thu, 22 Mar 2018 20:50:53 +0100 Subject: * Increased number of events on SYSTEM.CNF. Minor changes? --- Source/System.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/System.c') diff --git a/Source/System.c b/Source/System.c index 864e2fc..2a3513a 100644 --- a/Source/System.c +++ b/Source/System.c @@ -67,6 +67,11 @@ static unsigned char sine_counter; * *******************************************************************/ void SystemInit(void) { + enum + { + RCNT2_100US_TICK_COUNTER = 0xA560 + }; + //Reset global timer global_timer = 0; //Reset 1 second timer @@ -118,7 +123,9 @@ void SystemInit(void) SystemSetStackPattern(); - SetRCntHandler(&ISR_RootCounter2, 2, 0xA560); + // Configure root counter 2 so that ISR_RootCounter2 + // is executed every 100 us. + SetRCntHandler(&ISR_RootCounter2, 2, RCNT2_100US_TICK_COUNTER); SystemEnableRCnt2Interrupt(); } -- cgit v1.2.3