]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio/Source/FreeRTOSConfig.h
Baseline the Giant Gecko demo, which now has the first pass at a low power tickless...
[freertos] / FreeRTOS / Demo / CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio / Source / FreeRTOSConfig.h
index e1591a0f5964e3a87a44fb5b3b5f5a2a41df06d2..f97b23a724e934c981bdac3a13e7bfa975413554 100644 (file)
@@ -86,73 +86,103 @@ extern "C" {
  * See http://www.freertos.org/a00110.html.\r
  *----------------------------------------------------------*/\r
 \r
-/* Available options when configUSE_TICKLESS_IDLE set to 1\r
- * or configUSE_SLEEP_MODE_IN_IDLE set to 1 :\r
- * 1 - EM1, 2 - EM2, 3 - EM3, timer in EM3 is not very accurate*/\r
-#define configSLEEP_MODE                                               ( 2 )\r
+\r
+/* Set configCREATE_LOW_POWER_DEMO to one to run the simple blinky demo low power\r
+example, or 1 to run the more comprehensive test and demo application.  See\r
+the comments at the top of main.c for more information. */\r
+#define configCREATE_LOW_POWER_DEMO    1\r
+\r
+/* Some configuration is dependent on the demo being built. */\r
+#if( configCREATE_LOW_POWER_DEMO == 1 )\r
+\r
+       /* The slow clock used to generate the tick interrupt in the low power demo\r
+       runs at 32768Hz.  Ensure the clock is a multiple of the tick rate. */\r
+       #define configTICK_RATE_HZ                              ( 100 )\r
+\r
+       /* The low power demo uses the tickless idle feature. */\r
+       #define configUSE_TICKLESS_IDLE                 1\r
+\r
+       /* Hook function related definitions. */\r
+       #define configUSE_TICK_HOOK                             ( 0 )\r
+       #define configCHECK_FOR_STACK_OVERFLOW  ( 0 )\r
+       #define configUSE_MALLOC_FAILED_HOOK    ( 0 )\r
+       #define configUSE_IDLE_HOOK                             ( 0 )\r
+\r
+#else\r
+\r
+       /* Some of the standard demo test tasks assume a tick rate of 1KHz, even\r
+       though that is faster than would normally be warranted by a real\r
+       application. */\r
+       #define configTICK_RATE_HZ                              ( 1000 )\r
+\r
+       /* The full demo always has tasks to run so the tick will never be turned\r
+       off.  The blinky demo will use the default tickless idle implementation to\r
+       turn the tick off. */\r
+       #define configUSE_TICKLESS_IDLE                 0\r
+\r
+       /* Hook function related definitions. */\r
+       #define configUSE_TICK_HOOK                             ( 1 )\r
+       #define configCHECK_FOR_STACK_OVERFLOW  ( 1 )\r
+       #define configUSE_MALLOC_FAILED_HOOK    ( 1 )\r
+       #define configUSE_IDLE_HOOK  ( 1 )\r
+\r
+#endif\r
 \r
 /* Main functions*/\r
 #define configUSE_PREEMPTION                                   ( 1 )\r
-#define configUSE_TICKLESS_IDLE                                        ( 1 )\r
 #define configUSE_PORT_OPTIMISED_TASK_SELECTION        ( 1 )\r
+#define configSUPPORT_STATIC_ALLOCATION                        ( 1 )\r
 #define configCPU_CLOCK_HZ                                             (( unsigned long ) 14000000)\r
 #define configMAX_PRIORITIES                                   ( 6 )\r
-#define configTICK_RATE_HZ                                             ( 1000 )\r
-#define configMINIMAL_STACK_SIZE                                 (( unsigned short ) 140)\r
-#define configTOTAL_HEAP_SIZE                                   (( size_t )(40000))\r
+#define configMINIMAL_STACK_SIZE                               (( unsigned short ) 140)\r
+#define configTOTAL_HEAP_SIZE                                  (( size_t )(40000))\r
 #define configMAX_TASK_NAME_LEN                                   ( 10 )\r
-#define configUSE_TRACE_FACILITY                                 ( 0 )\r
+#define configUSE_TRACE_FACILITY                               ( 0 )\r
 #define configUSE_16_BIT_TICKS                                 ( 0 )\r
-#define configIDLE_SHOULD_YIELD                                   ( 0 )\r
-#define configUSE_MUTEXES                                               ( 1 )\r
-#define configUSE_RECURSIVE_MUTEXES                       ( 1 )\r
-#define configUSE_COUNTING_SEMAPHORES                   ( 1 )\r
-#define configUSE_ALTERNATIVE_API                               ( 0 )/* Deprecated! */\r
-#define configQUEUE_REGISTRY_SIZE                               ( 10 )\r
-#define configUSE_QUEUE_SETS                                     ( 0 )\r
-\r
-/* Hook function related definitions. */\r
-#define configUSE_TICK_HOOK                                       ( 1 )\r
-#define configCHECK_FOR_STACK_OVERFLOW                 ( 2 )\r
-#define configUSE_MALLOC_FAILED_HOOK                     ( 1 )\r
-#define configUSE_IDLE_HOOK  ( 1 )\r
+#define configIDLE_SHOULD_YIELD                                        ( 0 )\r
+#define configUSE_MUTEXES                                              ( 1 )\r
+#define configUSE_RECURSIVE_MUTEXES                            ( 1 )\r
+#define configUSE_COUNTING_SEMAPHORES                  ( 1 )\r
+#define configUSE_ALTERNATIVE_API                              ( 0 )/* Deprecated! */\r
+#define configQUEUE_REGISTRY_SIZE                              ( 10 )\r
+#define configUSE_QUEUE_SETS                                    ( 0 )\r
 \r
 /* Run time stats gathering related definitions. */\r
-#define configGENERATE_RUN_TIME_STATS                   ( 0 )\r
+#define configGENERATE_RUN_TIME_STATS                  ( 0 )\r
 \r
 /* Co-routine related definitions. */\r
-#define configUSE_CO_ROUTINES                                   ( 0 )\r
-#define configMAX_CO_ROUTINE_PRIORITIES                   ( 1 )\r
+#define configUSE_CO_ROUTINES                                  ( 0 )\r
+#define configMAX_CO_ROUTINE_PRIORITIES                        ( 1 )\r
 \r
 /* Software timer related definitions. */\r
-#define configUSE_TIMERS                                                 ( 1 )\r
-#define configTIMER_TASK_PRIORITY                               ( configMAX_PRIORITIES - 1 ) /* Highest priority */\r
-#define configTIMER_QUEUE_LENGTH                                 ( 10 )\r
-#define configTIMER_TASK_STACK_DEPTH                     ( configMINIMAL_STACK_SIZE )\r
+#define configUSE_TIMERS                                               ( 1 )\r
+#define configTIMER_TASK_PRIORITY                              ( configMAX_PRIORITIES - 1 ) /* Highest priority */\r
+#define configTIMER_QUEUE_LENGTH                               ( 10 )\r
+#define configTIMER_TASK_STACK_DEPTH                   ( configMINIMAL_STACK_SIZE )\r
 \r
 /* Interrupt nesting behaviour configuration. */\r
-#define configKERNEL_INTERRUPT_PRIORITY                   ( 255 )\r
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY     ( 191 ) /* equivalent to 0xa0, or priority 5. */\r
+#define configKERNEL_INTERRUPT_PRIORITY                        ( 255 )\r
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY   ( 191 ) /* equivalent to 0xa0, or priority 5. */\r
 \r
 /* Optional functions - most linkers will remove unused functions anyway. */\r
-#define INCLUDE_vTaskPrioritySet                                 ( 1 )\r
-#define INCLUDE_uxTaskPriorityGet                               ( 1 )\r
-#define INCLUDE_vTaskDelete                                       ( 1 )\r
-#define INCLUDE_vTaskSuspend                                     ( 1 )\r
+#define INCLUDE_vTaskPrioritySet                               ( 1 )\r
+#define INCLUDE_uxTaskPriorityGet                              ( 1 )\r
+#define INCLUDE_vTaskDelete                                            ( 1 )\r
+#define INCLUDE_vTaskSuspend                                   ( 1 )\r
 #define INCLUDE_xResumeFromISR                                 ( 1 )\r
-#define INCLUDE_vTaskDelayUntil                                   ( 1 )\r
+#define INCLUDE_vTaskDelayUntil                                        ( 1 )\r
 #define INCLUDE_vTaskDelay                                             ( 1 )\r
 #define INCLUDE_xTaskGetSchedulerState                 ( 1 )\r
-#define INCLUDE_xTaskGetCurrentTaskHandle               ( 1 )\r
-#define INCLUDE_uxTaskGetStackHighWaterMark       ( 0 )\r
+#define INCLUDE_xTaskGetCurrentTaskHandle              ( 1 )\r
+#define INCLUDE_uxTaskGetStackHighWaterMark            ( 0 )\r
 #define INCLUDE_xTaskGetIdleTaskHandle                 ( 0 )\r
 #define INCLUDE_xTimerGetTimerDaemonTaskHandle ( 0 )\r
-#define INCLUDE_pcTaskGetTaskName                               ( 0 )\r
-#define INCLUDE_eTaskGetState                                   ( 1 )\r
+#define INCLUDE_pcTaskGetTaskName                              ( 0 )\r
+#define INCLUDE_eTaskGetState                                  ( 1 )\r
 #define INCLUDE_xTimerPendFunctionCall                 ( 1 )\r
 \r
 /* Stop if an assertion fails. */\r
-#define configASSERT( x )         if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
+#define configASSERT( x )      if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
 \r
 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS\r
 standard names. */\r