From 8ba0e9ff6f65b6ad73267c71d71c04eff11c6f20 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 2 Jan 2011 18:31:30 +0000 Subject: [PATCH] Minor updates to the MSP430X CCS4 demo application. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1212 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Demo_Source/FreeRTOSConfig.h | 8 ++++---- Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/main.c | 13 ++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/FreeRTOSConfig.h b/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/FreeRTOSConfig.h index 6ca457319..c2d245c79 100644 --- a/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/FreeRTOSConfig.h +++ b/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/FreeRTOSConfig.h @@ -111,11 +111,11 @@ to exclude the API function. */ /* The MSP430X port uses a callback function to configure its tick interrupt. This allows the application to choose the tick interrupt source. -configTICK_INTERRUPT_VECTOR must also be set in FreeRTOSConfig.h to the correct -interrupt vector for the chosen tick interrupt source. This implementation of +configTICK_VECTOR must also be set in FreeRTOSConfig.h to the correct interrupt +vector for the chosen tick interrupt source. This implementation of vApplicationSetupTimerInterrupt() generates the tick from timer A0, so in this -case configTICK_INTERRUPT_VECTOR is set to TIMER0_A0_VECTOR. */ -#define configTICK_INTERRUPT_VECTOR TIMER0_A0_VECTOR +case configTICK_VECTOR is set to TIMER0_A0_VECTOR. */ +#define configTICK_VECTOR TIMER0_A0_VECTOR extern void vConfigureTimerForRunTimeStats( void ); extern unsigned long ulGetRunTimeStatsTime( void ); diff --git a/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/main.c b/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/main.c index 813ab6a23..2c83cbf97 100644 --- a/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/main.c +++ b/Demo/MSP430X_MSP430F5438_CCS4/Demo_Source/main.c @@ -183,6 +183,9 @@ information. */ /* The maximum number of lines of text that can be displayed on the LCD. */ #define mainMAX_LCD_LINES ( 8 ) + +/* Just used to ensure parameters are passed into tasks correctly. */ +#define mainTASK_PARAMETER_CHECK_VALUE ( ( void * ) 0xDEAD ) /*-----------------------------------------------------------*/ /* @@ -265,7 +268,7 @@ void main( void ) /* Create the LCD, button poll and register test tasks, as described at the top of this file. */ - xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, NULL, mainLCD_TASK_PRIORITY, NULL ); + xTaskCreate( prvLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE * 2, mainTASK_PARAMETER_CHECK_VALUE, mainLCD_TASK_PRIORITY, NULL ); xTaskCreate( prvButtonPollTask, ( signed char * ) "BPoll", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); @@ -304,6 +307,14 @@ unsigned char ucLine = 1; can be viewed in the terminal IO window within the IAR Embedded Workbench. */ printf( "%d bytes of heap space remain unallocated\n", ( int ) xPortGetFreeHeapSize() ); fflush( stdout ); + + /* Just as a test of the port, and for no functional reason, check the task + parameter contains its expected value. */ + if( pvParameters != mainTASK_PARAMETER_CHECK_VALUE ) + { + halLcdPrintLine( "Invalid parameter", ucLine, OVERWRITE_TEXT ); + ucLine++; + } for( ;; ) { -- 2.39.5