changeset 131:035672b72f9b

nuc-fw: sans-GSM tick timer and Init_Unmask_IT() implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 01 Nov 2013 22:59:49 +0000
parents 8b0793c67f9f
children 2c5160a9d652
files nuc-fw/bsp/init_target.c nuc-fw/bsp/niq32.c
diffstat 2 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nuc-fw/bsp/init_target.c	Fri Nov 01 08:03:23 2013 +0000
+++ b/nuc-fw/bsp/init_target.c	Fri Nov 01 22:59:49 2013 +0000
@@ -14,9 +14,14 @@
 #include "armio.h"
 #include "timer.h"
 #include "inth.h"
+#include "iq.h"
 #include "rhea_arm.h"
 #include "ulpd.h"
 
+#if !CONFIG_GSM
+#include "timer2.h"
+#endif
+
 /* TPU_FREEZE is defined in l1_const.h */
 #include "../L1/include/l1_confg.h"
 #include "../L1/include/l1_const.h"
@@ -356,6 +361,31 @@
       TM_EnableTimer (1);
       TM_EnableTimer (2);
 
+      #if !CONFIG_GSM
+	Dtimer2_Init_cntl (1875, 1, 0, 1);
+      #endif
+
     #endif  /* (OP_L1_STANDALONE == 0) */
 
 }
+
+/*
+ * Init_Unmask_IT() is the last function called from Application_Initialize();
+ * it also had to be reconstructed from disassembly.
+ */
+
+void Init_Unmask_IT(void)
+{
+#if CONFIG_GSM
+	IQ_Unmask(IQ_FRAME);
+#endif
+	IQ_Unmask(IQ_UART_IRDA_IT);
+	IQ_Unmask(IQ_UART_IT);
+#if 0
+	IQ_Unmask(IQ_ARMIO);
+	IQ_Unmask(IQ_API);
+#endif
+#if !CONFIG_GSM
+	IQ_Unmask(IQ_TIM2);
+#endif
+}
--- a/nuc-fw/bsp/niq32.c	Fri Nov 01 08:03:23 2013 +0000
+++ b/nuc-fw/bsp/niq32.c	Fri Nov 01 22:59:49 2013 +0000
@@ -489,7 +489,10 @@
  void IQ_TimerHandler2(void)
 {
   IQ_TimerCount2++;  
- }
+  #if !CONFIG_GSM
+    TMT_Timer_Interrupt();
+  #endif
+}
 
 #if 0 //(L1_DYN_DSP_DWNLD == 1)
 /*-------------------------------------------------------*/