]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4F_CEC1302_Keil_GCC/main.c
Add software timer use to the new MPU demo.
[freertos] / FreeRTOS / Demo / CORTEX_M4F_CEC1302_Keil_GCC / main.c
index feb080b872204dcaee6864aedaa6849d029af078..817d1c9316c085d783c3ec19c18f671b6658d514 100644 (file)
@@ -76,6 +76,9 @@
  * more comprehensive test and demo application is implemented and described in\r
  * main_full.c.\r
  *\r
+ * The simple blinky demo uses aggregated interrupts.  The full demo uses\r
+ * disaggregated interrupts.\r
+ *\r
  * This file implements the code that is not demo specific, including the\r
  * hardware setup and standard FreeRTOS hook functions.\r
  *\r
@@ -147,10 +150,18 @@ int main( void )
        of this file. */\r
        #if( configCREATE_LOW_POWER_DEMO == 1 )\r
        {\r
+               /* The low power demo also demonstrated aggregated interrupts, so clear\r
+               the interrupt control register to disable the alternative NVIC vectors. */\r
+               mainEC_INTERRUPT_CONTROL = pdFALSE;\r
+\r
                main_low_power();\r
        }\r
        #else\r
        {\r
+               /* The full demo also demonstrated disaggregated interrupts, so set the\r
+               interrupt control register to enable the alternative NVIC vectors. */\r
+               mainEC_INTERRUPT_CONTROL = pdTRUE;\r
+\r
                main_full();\r
        }\r
        #endif\r
@@ -168,9 +179,6 @@ extern unsigned long __Vectors[];
        /* Disable M4 write buffer: fix CEC1302 hardware bug. */\r
        mainNVIC_AUX_ACTLR |= 0x07;\r
 \r
-       /* Enable alternative NVIC vectors. */\r
-       mainEC_INTERRUPT_CONTROL = pdTRUE;\r
-\r
        system_set_ec_clock();\r
 \r
        /* Assuming downloading code via the debugger - so ensure the hardware\r