# HG changeset patch # User Mychaela Falconia # Date 1589518455 0 # Node ID 9a8a20d45be7cb6ebeb974dfdfe47c08d678e806 # Parent 9582c4e406072e3071acf7d194b9824e5b73bf09 Timer2 for Nucleus RTOS ticks diff -r 9582c4e40607 -r 9a8a20d45be7 src/cs/drivers/drv_core/inth/niq32.c --- a/src/cs/drivers/drv_core/inth/niq32.c Fri May 15 04:43:00 2020 +0000 +++ b/src/cs/drivers/drv_core/inth/niq32.c Fri May 15 04:54:15 2020 +0000 @@ -489,12 +489,14 @@ /* Return : none */ /* Functionality : Handle Timer 2 interrupts */ /*--------------------------------------------------------------*/ - void IQ_TimerHandler2(void) +void IQ_TimerHandler2(void) { IQ_TimerCount2++; - } + /* FC FFS editor */ + TMT_Timer_Interrupt(); +} + #if(L1_DYN_DSP_DWNLD == 1) - /*-------------------------------------------------------*/ /* IQ_ApiHandler() */ /*-------------------------------------------------------*/ diff -r 9582c4e40607 -r 9a8a20d45be7 src/cs/system/main/init.c --- a/src/cs/system/main/init.c Fri May 15 04:43:00 2020 +0000 +++ b/src/cs/system/main/init.c Fri May 15 04:54:15 2020 +0000 @@ -138,6 +138,9 @@ #include "ulpd/ulpd.h" +/* FC FFS editor */ +#include "timer2.h" + #if (PSP_STANDALONE == 0) #if (OP_L1_STANDALONE == 0) extern void ffs_main_init(void); @@ -802,6 +805,10 @@ TM_EnableTimer (1); TM_EnableTimer (2); + /* FC FFS editor */ + Dtimer2_Init_cntl (1875, 1, 0, 1); + Dtimer2_Start (1); + #endif /* (OP_L1_STANDALONE == 0) */ #endif /* #if (BOARD == 5) */ @@ -937,4 +944,6 @@ #if (L1_DYN_DSP_DWNLD == 1) IQ_Unmask(IQ_API); #endif + /* FC FFS editor */ + IQ_Unmask(IQ_TIM2); }