#define configCPU_CLOCK_HZ ( 16000000UL ) \r
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )\r
-#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )\r
#define configMAX_TASK_NAME_LEN ( 10 )\r
#define configUSE_TRACE_FACILITY 0\r
#define configUSE_MALLOC_FAILED_HOOK 1\r
#define configUSE_APPLICATION_TASK_TAG 0\r
\r
+#if __DATA_MODEL__ == __DATA_MODEL_SMALL__\r
+ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )\r
+#else\r
+ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )\r
+#endif\r
+\r
/* Co-routine definitions. */\r
#define configUSE_CO_ROUTINES 0\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
/* The MSP430X port uses a callback function to configure its tick interrupt.\r
This allows the application to choose the tick interrupt source.\r
-configTICK_INTERRUPT_VECTOR must also be set in FreeRTOSConfig.h to the correct\r
+configTICK_VECTOR must also be set in FreeRTOSConfig.h to the correct\r
interrupt vector for the chosen tick interrupt source. This implementation of\r
vApplicationSetupTimerInterrupt() generates the tick from timer A0, so in this\r
-case configTICK_INTERRUPT_VECTOR is set to TIMER0_A0_VECTOR. */\r
-#define configTICK_INTERRUPT_VECTOR TIMER0_A0_VECTOR\r
+case configTICK__VECTOR is set to TIMER0_A0_VECTOR. */\r
+#define configTICK_VECTOR TIMER0_A0_VECTOR\r
\r
/* Prevent the following definitions being included when FreeRTOSConfig.h\r
is included from an asm file. */\r
#ifdef __ICC430__\r
extern void vConfigureTimerForRunTimeStats( void );\r
- extern inline unsigned long ulGetRunTimeStatsTime( void );\r
extern volatile unsigned long ulStatsOverflowCount;\r
#endif /* __ICCARM__ */\r
\r
+/* Configure a 16 bit timer to generate the time base for the run time stats.\r
+The timer is configured to interrupt each time it overflows so a count of\r
+overflows can be kept - that way a 32 bit time value can be constructed from\r
+the timers current count value and the number of overflows. */\r
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()\r
-#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeStatsTime()\r
-\r
+ \r
+/* Construct a 32 bit time value for use as the run time stats time base. This\r
+comes from the current value of a 16 bit timer combined with the number of times\r
+the timer has overflowed. */\r
+#define portALT_GET_RUN_TIME_COUNTER_VALUE( ulCountValue ) \\r
+ { \\r
+ /* Stop the counter counting temporarily. */ \\r
+ TA1CTL &= ~MC__CONTINOUS; \\r
+ \\r
+ /* Check to see if any counter overflow interrupts are pending. */ \\r
+ if( ( TA1CTL & TAIFG ) != 0 ) \\r
+ { \\r
+ /* An overflow has occurred but not yet been processed. */ \\r
+ ulStatsOverflowCount++; \\r
+ \\r
+ /* Clear the interrupt. */ \\r
+ TA1CTL &= ~TAIFG; \\r
+ } \\r
+ \\r
+ /* Generate a 32 bit counter value by combinging the current peripheral \\r
+ counter value with the number of overflows. */ \\r
+ ulCountValue = ( ulStatsOverflowCount << 16UL ); \\r
+ ulCountValue |= ( unsigned long ) TA1R; \\r
+ TA1CTL |= MC__CONTINOUS; \\r
+ }\r
#endif /* FREERTOS_CONFIG_H */\r
\r