]> git.sur5r.net Git - freertos/commitdiff
Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 25 Jul 2008 02:42:33 +0000 (02:42 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 25 Jul 2008 02:42:33 +0000 (02:42 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@419 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_LM3Sxxxx_IAR_Keil/FreeRTOSConfig.h
Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.c [new file with mode: 0644]
Demo/CORTEX_LM3Sxxxx_IAR_Keil/IntQueueTimer.h [new file with mode: 0644]
Demo/CORTEX_LM3Sxxxx_IAR_Keil/RTOSDemo.ewp
Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
Demo/CORTEX_LM3Sxxxx_IAR_Keil/startup_ewarm.c
Demo/CORTEX_LM3Sxxxx_IAR_Keil/timertest.c

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