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