summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-07-25 02:42:33 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-07-25 02:42:33 +0000
commita7d18b29188007eea4a38cf978f848baf0ea41fa (patch)
tree18eeec3e7384267e00861c323bd83a86cb0dd118
parent75c6b6f842e36cc410e54db45f4b59ccd07036bf (diff)
downloadfreertos-a7d18b29188007eea4a38cf978f848baf0ea41fa.tar.gz
freertos-a7d18b29188007eea4a38cf978f848baf0ea41fa.tar.bz2
freertos-a7d18b29188007eea4a38cf978f848baf0ea41fa.tar.xz
Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@419 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h28
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c117
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h58
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp13
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c137
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c8
-rw-r--r--Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c5
7 files changed, 296 insertions, 70 deletions
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
index a05433d6..6d7f9f77 100644
--- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
@@ -37,13 +37,13 @@
Please ensure to read the configuration and relevant port sections of the
online documentation.
- http://www.FreeRTOS.org - Documentation, latest information, license and
+ http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
- http://www.SafeRTOS.com - A version that is certified for use in safety
+ http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
- http://www.OpenRTOS.com - Commercial support, development, porting,
+ http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -73,6 +73,7 @@
#define configIDLE_SHOULD_YIELD 0
#define configUSE_CO_ROUTINES 0
#define configUSE_MUTEXES 1
+#define configUSE_RECURSIVE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
@@ -81,16 +82,17 @@
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskCleanUpResources 0
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-
-
-#define configKERNEL_INTERRUPT_PRIORITY 255
+#define INCLUDE_vTaskPrioritySet 1
+#define INCLUDE_uxTaskPriorityGet 1
+#define INCLUDE_vTaskDelete 1
+#define INCLUDE_vTaskCleanUpResources 0
+#define INCLUDE_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+
+#define configKERNEL_INTERRUPT_PRIORITY 255
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xa0, or priority 5. */
#endif /* FREERTOS_CONFIG_H */
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c
new file mode 100644
index 00000000..6c39bcd1
--- /dev/null
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c
@@ -0,0 +1,117 @@
+/*
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
+
+ This file is part of the FreeRTOS.org distribution.
+
+ FreeRTOS.org is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ FreeRTOS.org is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with FreeRTOS.org; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ A special exception to the GPL can be applied should you wish to distribute
+ a combined work that includes FreeRTOS.org, without being obliged to provide
+ the source code for any proprietary components. See the licensing section
+ of http://www.FreeRTOS.org for full details of how and when the exception
+ can be applied.
+
+ ***************************************************************************
+ ***************************************************************************
+ * *
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
+ * and even write all or part of your application on your behalf. *
+ * See http://www.OpenRTOS.com for details of the services we provide to *
+ * expedite your project. *
+ * *
+ ***************************************************************************
+ ***************************************************************************
+
+ Please ensure to read the configuration and relevant port sections of the
+ online documentation.
+
+ http://www.FreeRTOS.org - Documentation, latest information, license and
+ contact details.
+
+ http://www.SafeRTOS.com - A version that is certified for use in safety
+ critical systems.
+
+ http://www.OpenRTOS.com - Commercial support, development, porting,
+ licensing and training services.
+*/
+
+/* Scheduler includes. */
+#include "FreeRTOS.h"
+
+/* Demo includes. */
+#include "IntQueueTimer.h"
+#include "IntQueue.h"
+
+/* Library includes. */
+#include "hw_ints.h"
+#include "hw_memmap.h"
+#include "hw_types.h"
+#include "interrupt.h"
+#include "sysctl.h"
+#include "lmi_timer.h"
+
+#define tmrTIMER_2_FREQUENCY ( 2000UL )
+#define tmrTIMER_3_FREQUENCY ( 2001UL )
+
+void vInitialiseTimerForIntQueueTest( void )
+{
+unsigned long ulFrequency;
+
+ /* Timer 2 and 3 are utilised for this test. */
+ SysCtlPeripheralEnable( SYSCTL_PERIPH_TIMER2 );
+ SysCtlPeripheralEnable( SYSCTL_PERIPH_TIMER3 );
+ TimerConfigure( TIMER2_BASE, TIMER_CFG_32_BIT_PER );
+ TimerConfigure( TIMER3_BASE, TIMER_CFG_32_BIT_PER );
+
+ /* Set the timer interrupts to be above the kernel. The interrupts are
+ assigned different priorities so they nest with each other. */
+ IntPrioritySet( INT_TIMER2A, configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 );
+ IntPrioritySet( INT_TIMER3A, configMAX_SYSCALL_INTERRUPT_PRIORITY );
+
+ /* Ensure interrupts do not start until the scheduler is running. */
+ portDISABLE_INTERRUPTS();
+
+ /* The rate at which the timers will interrupt. */
+ ulFrequency = configCPU_CLOCK_HZ / tmrTIMER_2_FREQUENCY;
+ TimerLoadSet( TIMER2_BASE, TIMER_A, ulFrequency );
+ IntEnable( INT_TIMER2A );
+ TimerIntEnable( TIMER2_BASE, TIMER_TIMA_TIMEOUT );
+
+ /* The rate at which the timers will interrupt. */
+ ulFrequency = configCPU_CLOCK_HZ / tmrTIMER_3_FREQUENCY;
+ TimerLoadSet( TIMER3_BASE, TIMER_A, ulFrequency );
+ IntEnable( INT_TIMER3A );
+ TimerIntEnable( TIMER3_BASE, TIMER_TIMA_TIMEOUT );
+
+ /* Enable both timers. */
+ TimerEnable( TIMER2_BASE, TIMER_A );
+ TimerEnable( TIMER3_BASE, TIMER_A );
+}
+/*-----------------------------------------------------------*/
+
+void vT2InterruptHandler( void )
+{
+ TimerIntClear( TIMER2_BASE, TIMER_TIMA_TIMEOUT );
+ portEND_SWITCHING_ISR( xFirstTimerHandler() );
+}
+/*-----------------------------------------------------------*/
+
+void vT3InterruptHandler( void )
+{
+ TimerIntClear( TIMER3_BASE, TIMER_TIMA_TIMEOUT );
+ portEND_SWITCHING_ISR( xSecondTimerHandler() );
+}
+
+
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h
new file mode 100644
index 00000000..797e6303
--- /dev/null
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h
@@ -0,0 +1,58 @@
+/*
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
+
+ This file is part of the FreeRTOS.org distribution.
+
+ FreeRTOS.org is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ FreeRTOS.org is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with FreeRTOS.org; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ A special exception to the GPL can be applied should you wish to distribute
+ a combined work that includes FreeRTOS.org, without being obliged to provide
+ the source code for any proprietary components. See the licensing section
+ of http://www.FreeRTOS.org for full details of how and when the exception
+ can be applied.
+
+ ***************************************************************************
+ ***************************************************************************
+ * *
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
+ * and even write all or part of your application on your behalf. *
+ * See http://www.OpenRTOS.com for details of the services we provide to *
+ * expedite your project. *
+ * *
+ ***************************************************************************
+ ***************************************************************************
+
+ Please ensure to read the configuration and relevant port sections of the
+ online documentation.
+
+ http://www.FreeRTOS.org - Documentation, latest information, license and
+ contact details.
+
+ http://www.SafeRTOS.com - A version that is certified for use in safety
+ critical systems.
+
+ http://www.OpenRTOS.com - Commercial support, development, porting,
+ licensing and training services.
+*/
+
+#ifndef INT_QUEUE_TIMER_H
+#define INT_QUEUE_TIMER_H
+
+void vInitialiseTimerForIntQueueTest( void );
+portBASE_TYPE xTimer0Handler( void );
+portBASE_TYPE xTimer1Handler( void );
+
+#endif
+
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp
index d72b28a5..4c2affb4 100644
--- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp
@@ -306,7 +306,7 @@
<option>
<name>CCOptStrategy</name>
<version>0</version>
- <state>0</state>
+ <state>1</state>
</option>
<option>
<name>CCOptLevelSlave</name>
@@ -588,7 +588,7 @@
</option>
<option>
<name>IlinkMapFile</name>
- <state>0</state>
+ <state>1</state>
</option>
<option>
<name>IlinkLogFile</name>
@@ -792,6 +792,12 @@
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
</file>
<file>
+ <name>$PROJ_DIR$\..\Common\Minimal\IntQueue.c</name>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\IntQueueTimer.c</name>
+ </file>
+ <file>
<name>$PROJ_DIR$\main.c</name>
</file>
<file>
@@ -804,6 +810,9 @@
<name>$PROJ_DIR$\..\Common\Minimal\QPeek.c</name>
</file>
<file>
+ <name>$PROJ_DIR$\..\Common\Minimal\recmutex.c</name>
+ </file>
+ <file>
<name>$PROJ_DIR$\..\Common\Minimal\semtest.c</name>
</file>
<file>
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
index a45ad623..c5ccd579 100644
--- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
@@ -37,13 +37,13 @@
Please ensure to read the configuration and relevant port sections of the
online documentation.
- http://www.FreeRTOS.org - Documentation, latest information, license and
+ http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
- http://www.SafeRTOS.com - A version that is certified for use in safety
+ http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
- http://www.OpenRTOS.com - Commercial support, development, porting,
+ http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -83,13 +83,18 @@
-/*************************************************************************
+/*************************************************************************
* Please ensure to read http://www.freertos.org/portlm3sx965.html
* which provides information on configuring and running this demo for the
* various Luminary Micro EKs.
*************************************************************************/
-
+/* Set the following option to 1 to include the WEB server in the build. By
+default the WEB server is excluded to keep the compiled code size under the 32K
+limit imposed by the KickStart version of the IAR compiler. The graphics
+libraries take up a lot of ROM space, hence including the graphics libraries
+and the TCP/IP stack together cannot be accommodated with the 32K size limit. */
+#define mainINCLUDE_WEB_SERVER 0
/* Standard includes. */
@@ -125,6 +130,8 @@
#include "bitmap.h"
#include "GenQTest.h"
#include "QPeek.h"
+#include "recmutex.h"
+#include "IntQueue.h"
/*-----------------------------------------------------------*/
@@ -191,9 +198,9 @@ static void prvSetupHardware( void );
* Configures the high frequency timers - those used to measure the timing
* jitter while the real time kernel is executing.
*/
-extern void vSetupTimer( void );
+extern void vSetupHighFrequencyTimer( void );
-/*
+/*
* Hook functions that can get called by the kernel.
*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName );
@@ -211,7 +218,7 @@ const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";
/*-----------------------------------------------------------*/
-/*************************************************************************
+/*************************************************************************
* Please ensure to read http://www.freertos.org/portlm3sx965.html
* which provides information on configuring and running this demo for the
* various Luminary Micro EKs.
@@ -224,22 +231,32 @@ int main( void )
are received via this queue. */
xOLEDQueue = xQueueCreate( mainOLED_QUEUE_SIZE, sizeof( xOLEDMessage ) );
- /* Create the uIP task if running on a processor that includes a MAC and
- PHY. */
- if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )
- {
- xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
- }
-
/* Start the standard demo tasks. */
- vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
- vCreateBlockTimeTasks();
- vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
- vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
- vStartQueuePeekTasks();
-
+ vStartInterruptQueueTasks();
+ vStartRecursiveMutexTasks();
+ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
+ vCreateBlockTimeTasks();
+ vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
+ vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
+ vStartQueuePeekTasks();
+
+ /* Exclude some tasks if using the kickstart version to ensure we stay within
+ the 32K code size limit. */
+ #if mainINCLUDE_WEB_SERVER != 0
+ {
+ /* Create the uIP task if running on a processor that includes a MAC and
+ PHY. */
+ if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )
+ {
+ xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
+ }
+ }
+ #endif
+
+
+
/* Start the tasks defined within this file/specific to this demo. */
xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
@@ -249,10 +266,9 @@ int main( void )
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* Configure the high frequency interrupt used to measure the interrupt
- jitter time. The Keil port does not yet include the
- configKERNEL_INTERRUPT_PRIORITY functionality so cannot perform this test. */
- vSetupTimer();
-
+ jitter time. */
+ vSetupHighFrequencyTimer();
+
/* Start the scheduler. */
vTaskStartScheduler();
@@ -303,9 +319,17 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
xMessage.pcMessage = "ERROR IN GEN Q";
}
- else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
+ else if( xIsCreateTaskStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN CREATE";
+ }
+ else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN MATH";
+ }
+ else if( xAreIntQueueTasksStillRunning() != pdTRUE )
{
- xMessage.pcMessage = "ERROR IN PEEK Q";
+ xMessage.pcMessage = "ERROR IN INT QUEUE";
}
else if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
@@ -315,23 +339,23 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
xMessage.pcMessage = "ERROR IN BLOCK TIME";
}
- else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
- {
- xMessage.pcMessage = "ERROR IN SEMAPHORE";
- }
- else if( xArePollingQueuesStillRunning() != pdTRUE )
- {
- xMessage.pcMessage = "ERROR IN POLL Q";
- }
- else if( xIsCreateTaskStillRunning() != pdTRUE )
- {
- xMessage.pcMessage = "ERROR IN CREATE";
- }
- else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
- {
- xMessage.pcMessage = "ERROR IN MATH";
- }
-
+ else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN SEMAPHORE";
+ }
+ else if( xArePollingQueuesStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN POLL Q";
+ }
+ else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN PEEK Q";
+ }
+ else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
+ {
+ xMessage.pcMessage = "ERROR IN REC MUTEX";
+ }
+
/* Send the message to the OLED gatekeeper for display. */
xHigherPriorityTaskWoken = pdFALSE;
xQueueSendFromISR( xOLEDQueue, &xMessage, &xHigherPriorityTaskWoken );
@@ -345,7 +369,8 @@ xOLEDMessage xMessage;
unsigned portLONG ulY, ulMaxY;
static portCHAR cMessage[ mainMAX_MSG_LEN ];
extern volatile unsigned portLONG ulMaxJitter;
-const unsigned portCHAR *pucImage;
+unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;
+const unsigned portCHAR *pucImage = NULL;
/* Functions to access the OLED. The one used depends on the dev kit
being used. */
@@ -354,6 +379,9 @@ void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLON
void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;
void ( *vOLEDClear )( void ) = NULL;
+ /* Just for demo purposes. */
+ uxUnusedStackOnEntry = uxTaskGetStackHighWaterMark( NULL );
+
/* Map the OLED access functions to the driver functions that are appropriate
for the evaluation kit being used. */
switch( HWREG( SYSCTL_DID1 ) & SYSCTL_DID1_PRTNO_MASK )
@@ -364,7 +392,6 @@ void ( *vOLEDClear )( void ) = NULL;
vOLEDImageDraw = OSRAM128x64x4ImageDraw;
vOLEDClear = OSRAM128x64x4Clear;
ulMaxY = mainMAX_ROWS_64;
- pucImage = pucBasicBitmap;
break;
case SYSCTL_DID1_PRTNO_1968 :
@@ -373,7 +400,6 @@ void ( *vOLEDClear )( void ) = NULL;
vOLEDImageDraw = RIT128x96x4ImageDraw;
vOLEDClear = RIT128x96x4Clear;
ulMaxY = mainMAX_ROWS_96;
- pucImage = pucBasicBitmap;
break;
default : vOLEDInit = vFormike128x128x16Init;
@@ -381,9 +407,7 @@ void ( *vOLEDClear )( void ) = NULL;
vOLEDImageDraw = vFormike128x128x16ImageDraw;
vOLEDClear = vFormike128x128x16Clear;
ulMaxY = mainMAX_ROWS_128;
- pucImage = pucGrLibBitmap;
- break;
-
+ break;
}
ulY = ulMaxY;
@@ -391,6 +415,19 @@ void ( *vOLEDClear )( void ) = NULL;
/* Initialise the OLED and display a startup message. */
vOLEDInit( ulSSI_FREQUENCY );
vOLEDStringDraw( "POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );
+
+ switch( HWREG( SYSCTL_DID1 ) & SYSCTL_DID1_PRTNO_MASK )
+ {
+ case SYSCTL_DID1_PRTNO_6965 :
+ case SYSCTL_DID1_PRTNO_2965 :
+ case SYSCTL_DID1_PRTNO_1968 :
+ case SYSCTL_DID1_PRTNO_8962 : pucImage = pucBasicBitmap;
+ break;
+
+ default : pucImage = pucGrLibBitmap;
+ break;
+ }
+
vOLEDImageDraw( pucImage, 0, mainCHARACTER_HEIGHT + 1, bmpBITMAP_WIDTH, bmpBITMAP_HEIGHT );
for( ;; )
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c
index e99ae922..1e4c6332 100644
--- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c
@@ -58,6 +58,8 @@ extern void __iar_program_start(void);
extern void xPortPendSVHandler(void);
extern void xPortSysTickHandler(void);
extern void vPortSVCHandler(void);
+extern void vT2InterruptHandler( void );
+extern void vT3InterruptHandler( void );
extern void vEMAC_ISR( void );
extern Timer0IntHandler( void );
@@ -67,7 +69,7 @@ extern Timer0IntHandler( void );
//
//*****************************************************************************
#ifndef STACK_SIZE
-#define STACK_SIZE 64
+#define STACK_SIZE 120
#endif
static unsigned long pulStack[STACK_SIZE] @ ".noinit";
@@ -134,7 +136,7 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
IntDefaultHandler, // Timer 0 subtimer B
IntDefaultHandler, // Timer 1 subtimer A
IntDefaultHandler, // Timer 1 subtimer B
- IntDefaultHandler, // Timer 2 subtimer A
+ vT2InterruptHandler, // Timer 2 subtimer A
IntDefaultHandler, // Timer 2 subtimer B
IntDefaultHandler, // Analog Comparator 0
IntDefaultHandler, // Analog Comparator 1
@@ -146,7 +148,7 @@ __root const uVectorEntry __vector_table[] @ ".intvec" =
IntDefaultHandler, // GPIO Port H
IntDefaultHandler, // UART2 Rx and Tx
IntDefaultHandler, // SSI1 Rx and Tx
- IntDefaultHandler, // Timer 3 subtimer A
+ vT3InterruptHandler, // Timer 3 subtimer A
IntDefaultHandler, // Timer 3 subtimer B
IntDefaultHandler, // I2C1 Master and Slave
IntDefaultHandler, // Quadrature Encoder 1
diff --git a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
index 1f0320fe..e770011b 100644
--- a/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
+++ b/Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c
@@ -86,7 +86,7 @@ volatile unsigned portLONG ulMaxJitter = 0;
/*-----------------------------------------------------------*/
-void vSetupTimer( void )
+void vSetupHighFrequencyTimer( void )
{
unsigned long ulFrequency;
@@ -120,7 +120,8 @@ unsigned long ulFrequency;
void Timer0IntHandler( void )
{
-unsigned portLONG ulDifference, ulCurrentCount;
+unsigned portLONG ulDifference;
+volatile unsigned portLONG ulCurrentCount;
static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;
/* We use the timer 1 counter value to measure the clock cycles between