]> 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:43:50 +0000 (02:43 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 25 Jul 2008 02:43:50 +0000 (02:43 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@420 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/.cproject
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/.project
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/FreeRTOSConfig.h
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c [new file with mode: 0644]
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h [new file with mode: 0644]
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/Makefile
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/main.c
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/startup.c
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/timertest.c

index f0306170d77c9a550b911b3038ba3f765c9b4be6..83a1bf61578d9d9be63a986dadb10c24bc8756cd 100644 (file)
 </builder>\r
 <tool id="org.eclipse.cdt.build.core.settings.holder.libs.260784574" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>\r
 <tool id="org.eclipse.cdt.build.core.settings.holder.1502006385" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">\r
-<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.578007234" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"/>\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.578007234" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.685511860" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
 </tool>\r
 <tool id="org.eclipse.cdt.build.core.settings.holder.1021181093" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">\r
-<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1567637665" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"/>\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1567637665" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1828415025" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
 </tool>\r
 <tool id="org.eclipse.cdt.build.core.settings.holder.164584712" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">\r
-<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1309366258" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"/>\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1309366258" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1667472855" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
 </tool>\r
 </toolChain>\r
 </folderInfo>\r
 <sourceEntries>\r
 <entry excluding="Common Demo Files|FreeRTOS.org Source|Source|Minimal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="FreeRTOS.org Source"/>\r
 <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common Demo Files"/>\r
 </sourceEntries>\r
 </configuration>\r
 <storageModule moduleId="org.eclipse.cdt.core.language.mapping">\r
 <project-mappings/>\r
 </storageModule>\r
+<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>\r
 </cconfiguration>\r
 </storageModule>\r
 <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
index e635b964b999516ebf2d6b767d5095ecddea4e60..fc195c95e16291f78baa768935b8d678358498f5 100644 (file)
                        <triggers>clean,full,incremental,</triggers>\r
                        <arguments>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\r
-                                       <value>clean</value>\r
-                               </dictionary>\r
-                               <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>\r
-                                       <value>true</value>\r
+                                       <key>?children?</key>\r
+                                       <value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\\\\\\\\\|\\\\\\\|\||</value>\r
                                </dictionary>\r
                                <dictionary>\r
                                        <key>?name?</key>\r
                                        <value>true</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.stopOnError</key>\r
-                                       <value>true</value>\r
+                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>\r
+                                       <value>all</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.buildCommand</key>\r
-                                       <value>cs-make</value>\r
+                                       <key>org.eclipse.cdt.make.core.buildArguments</key>\r
+                                       <value></value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.contents</key>\r
-                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>\r
+                                       <key>org.eclipse.cdt.make.core.buildCommand</key>\r
+                                       <value>cs-make</value>\r
                                </dictionary>\r
                                <dictionary>\r
                                        <key>org.eclipse.cdt.make.core.buildLocation</key>\r
                                        <value>${workspace_loc:/RTOSDemo}</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>\r
-                                       <value>false</value>\r
+                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\r
+                                       <value>clean</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.contents</key>\r
+                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>\r
                                </dictionary>\r
                                <dictionary>\r
                                        <key>org.eclipse.cdt.make.core.enableAutoBuild</key>\r
                                        <value>false</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>\r
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>\r
                                        <value>true</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.buildArguments</key>\r
-                                       <value></value>\r
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>\r
+                                       <value>true</value>\r
                                </dictionary>\r
                                <dictionary>\r
                                        <key>org.eclipse.cdt.make.core.fullBuildTarget</key>\r
                                        <value>all</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>?children?</key>\r
-                                       <value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\\\\\\\\\|\\\\\\\|\||</value>\r
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>\r
+                                       <value>true</value>\r
                                </dictionary>\r
                                <dictionary>\r
-                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>\r
-                                       <value>all</value>\r
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>\r
+                                       <value>false</value>\r
                                </dictionary>\r
                        </arguments>\r
                </buildCommand>\r
index 5cca372567c5a0cf905e6b84c73ff9fec7c5db91..190b7341c14d62d999c298f4c98550a86864a954 100644 (file)
@@ -65,7 +65,7 @@
 #define configUSE_TICK_HOOK                            1\r
 #define configCPU_CLOCK_HZ                             ( ( unsigned portLONG ) 50000000 )\r
 #define configTICK_RATE_HZ                             ( ( portTickType ) 1000 )\r
-#define configMINIMAL_STACK_SIZE               ( ( unsigned portSHORT ) 70 )\r
+#define configMINIMAL_STACK_SIZE               ( ( unsigned portSHORT ) 60 )\r
 #define configTOTAL_HEAP_SIZE                  ( ( size_t ) ( 24000 ) )\r
 #define configMAX_TASK_NAME_LEN                        ( 12 )\r
 #define configUSE_TRACE_FACILITY               1\r
@@ -94,7 +94,8 @@ to exclude the API function. */
 \r
 \r
 \r
-#define configKERNEL_INTERRUPT_PRIORITY 255\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_Eclipse/RTOSDemo/IntQueueTimer.c b/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/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_Eclipse/RTOSDemo/IntQueueTimer.h b/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/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 bc37f9d1bcbab71ee05083159efab499ffde5841..84c98d9e3d9f03108b9a2a7fe9bc17af554b2f54 100644 (file)
@@ -73,6 +73,8 @@ SOURCE=       main.c \
                $(DEMO_COMMON_DIR)/GenQTest.c \\r
                $(DEMO_COMMON_DIR)/QPeek.c \\r
                $(DEMO_COMMON_DIR)/recmutex.c \\r
+               $(DEMO_COMMON_DIR)/IntQueue.c \\r
+               ./IntQueueTimer.c \\r
                ./webserver/uIP_Task.c \\r
                ./webserver/emac.c \\r
                ./webserver/httpd.c \\r
index bc4ae506d484226f69371d8cc37835825cf38a24..acdc92f7e400b3de1b2c7cc53d80d1bce9dd7a74 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
  * for messages - waking and displaying the messages as they arrive.\r
  *\r
  * "Check" hook -  This only executes every five seconds from the tick hook.\r
- * Its main function is to check that all the standard demo tasks are still \r
- * operational.  Should any unexpected behaviour within a demo task be discovered \r
- * the tick hook will write an error to the OLED (via the OLED task).  If all the \r
- * demo tasks are executing with their expected behaviour then the check task \r
+ * Its main function is to check that all the standard demo tasks are still\r
+ * operational.  Should any unexpected behaviour within a demo task be discovered\r
+ * the tick hook will write an error to the OLED (via the OLED task).  If all the\r
+ * demo tasks are executing with their expected behaviour then the check task\r
  * writes PASS to the OLED (again via the OLED task), as described above.\r
  *\r
  * "uIP" task -  This is the task that handles the uIP stack.  All TCP/IP\r
@@ -83,7 +83,7 @@
 \r
 \r
 \r
-/************************************************************************* \r
+/*************************************************************************\r
  * Please ensure to read http://www.freertos.org/portLM3Sxxxx_Eclipse.html\r
  * which provides information on configuring and running this demo for the\r
  * various Luminary Micro EKs.\r
 #include "GenQTest.h"\r
 #include "QPeek.h"\r
 #include "recmutex.h"\r
-\r
+#include "IntQueue.h"\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -193,7 +193,7 @@ 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
  * The idle hook is used to run a test of the scheduler context switch\r
@@ -213,7 +213,7 @@ unsigned portLONG ulIdleError = pdFALSE;
 \r
 /*-----------------------------------------------------------*/\r
 \r
-/************************************************************************* \r
+/*************************************************************************\r
  * Please ensure to read http://www.freertos.org/portLM3Sxxxx_Eclipse.html\r
  * which provides information on configuring and running this demo for the\r
  * various Luminary Micro EKs.\r
@@ -226,7 +226,7 @@ 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
+       /* Create the uIP task if running on a processor that includes a MAC and\r
        PHY. */\r
        if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )\r
        {\r
@@ -242,6 +242,7 @@ int main( void )
     vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );\r
     vStartQueuePeekTasks();\r
     vStartRecursiveMutexTasks();\r
+    vStartInterruptQueueTasks();\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
@@ -253,8 +254,8 @@ int main( void )
 \r
        /* Configure the high frequency interrupt used to measure the interrupt\r
        jitter time. */\r
-       vSetupTimer();\r
-       \r
+       vSetupHighFrequencyTimer();\r
+\r
        /* Start the scheduler. */\r
        vTaskStartScheduler();\r
 \r
@@ -272,17 +273,17 @@ void prvSetupHardware( void )
     {\r
         SysCtlLDOSet( SYSCTL_LDO_2_75V );\r
     }\r
-       \r
+\r
        /* Set the clocking to run from the PLL at 50 MHz */\r
        SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ );\r
-       \r
+\r
        /*      Enable Port F for Ethernet LEDs\r
                LED0        Bit 3   Output\r
                LED1        Bit 2   Output */\r
        SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOF );\r
        GPIODirModeSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3), GPIO_DIR_MODE_HW );\r
-       GPIOPadConfigSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3 ), GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD );  \r
-       \r
+       GPIOPadConfigSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3 ), GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD );\r
+\r
        vParTestInitialise();\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -291,7 +292,7 @@ void vApplicationTickHook( void )
 {\r
 static xOLEDMessage xMessage = { "PASS" };\r
 static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
-static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
 \r
        /* Called from every tick interrupt.  Have enough ticks passed to make it\r
        time to perform our health status check again? */\r
@@ -299,7 +300,7 @@ static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
        if( ulTicksSinceLastDisplay >= mainCHECK_DELAY )\r
        {\r
                ulTicksSinceLastDisplay = 0;\r
-               \r
+\r
                /* Has an error been found in any task? */\r
                if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
                {\r
@@ -341,6 +342,11 @@ static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
                {\r
                        xMessage.pcMessage = "ERROR IN HOOK";\r
                }\r
+               else if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+                       xMessage.pcMessage = "ERROR IN INT QUEUE";\r
+               }\r
+               \r
 \r
                /* Send the message to the OLED gatekeeper for display. */\r
                xHigherPriorityTaskWoken = pdFALSE;\r
@@ -354,7 +360,7 @@ void vOLEDTask( void *pvParameters )
 xOLEDMessage xMessage;\r
 unsigned portLONG ulY, ulMaxY;\r
 static portCHAR cMessage[ mainMAX_MSG_LEN ];\r
-extern unsigned portLONG ulMaxJitter;\r
+extern volatile unsigned portLONG ulMaxJitter;\r
 unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;\r
 const unsigned portCHAR *pucImage;\r
 \r
@@ -369,10 +375,10 @@ void ( *vOLEDClear )( void ) = NULL;
        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
+       for the evaluation kit being used. */\r
        switch( HWREG( SYSCTL_DID1 ) & SYSCTL_DID1_PRTNO_MASK )\r
        {\r
-               case SYSCTL_DID1_PRTNO_6965     :        \r
+               case SYSCTL_DID1_PRTNO_6965     :\r
                case SYSCTL_DID1_PRTNO_2965     :       vOLEDInit = OSRAM128x64x4Init;\r
                                                                                vOLEDStringDraw = OSRAM128x64x4StringDraw;\r
                                                                                vOLEDImageDraw = OSRAM128x64x4ImageDraw;\r
@@ -380,8 +386,8 @@ void ( *vOLEDClear )( void ) = NULL;
                                                                                ulMaxY = mainMAX_ROWS_64;\r
                                                                                pucImage = pucBasicBitmap;\r
                                                                                break;\r
-                                                                               \r
-               case SYSCTL_DID1_PRTNO_1968     :       \r
+\r
+               case SYSCTL_DID1_PRTNO_1968     :\r
                case SYSCTL_DID1_PRTNO_8962 :   vOLEDInit = RIT128x96x4Init;\r
                                                                                vOLEDStringDraw = RIT128x96x4StringDraw;\r
                                                                                vOLEDImageDraw = RIT128x96x4ImageDraw;\r
@@ -389,7 +395,7 @@ void ( *vOLEDClear )( void ) = NULL;
                                                                                ulMaxY = mainMAX_ROWS_96;\r
                                                                                pucImage = pucBasicBitmap;\r
                                                                                break;\r
-                                                                               \r
+\r
                default                                         :       vOLEDInit = vFormike128x128x16Init;\r
                                                                                vOLEDStringDraw = vFormike128x128x16StringDraw;\r
                                                                                vOLEDImageDraw = vFormike128x128x16ImageDraw;\r
@@ -400,27 +406,27 @@ void ( *vOLEDClear )( void ) = NULL;
        }\r
 \r
        ulY = ulMaxY;\r
-       \r
+\r
        /* Initialise the OLED and display a startup message. */\r
-       vOLEDInit( ulSSI_FREQUENCY );   \r
+       vOLEDInit( ulSSI_FREQUENCY );\r
        vOLEDStringDraw( "POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );\r
        vOLEDImageDraw( pucImage, 0, mainCHARACTER_HEIGHT + 1, bmpBITMAP_WIDTH, bmpBITMAP_HEIGHT );\r
-       \r
+\r
        for( ;; )\r
        {\r
                /* Wait for a message to arrive that requires displaying. */\r
                xQueueReceive( xOLEDQueue, &xMessage, portMAX_DELAY );\r
-       \r
+\r
                /* Write the message on the next available row. */\r
                ulY += mainCHARACTER_HEIGHT;\r
                if( ulY >= ulMaxY )\r
                {\r
                        ulY = mainCHARACTER_HEIGHT;\r
                        vOLEDClear();\r
-                       vOLEDStringDraw( pcWelcomeMessage, 0, 0, mainFULL_SCALE );                      \r
+                       vOLEDStringDraw( pcWelcomeMessage, 0, 0, mainFULL_SCALE );\r
                }\r
 \r
-               /* Display the message along with the maximum jitter time from the \r
+               /* Display the message along with the maximum jitter time from the\r
                high priority time test. */\r
                sprintf( cMessage, "%s [%uns]", xMessage.pcMessage, ulMaxJitter * mainNS_PER_CLOCK );\r
                vOLEDStringDraw( cMessage, 0, ulY, mainFULL_SCALE );\r
index c01ae4d88338f937efa5db3761aafec891ec131e..3a7420c8e5010d1fedf9200b4421c13b10510881 100644 (file)
@@ -45,6 +45,8 @@ extern void xPortPendSVHandler(void);
 extern void xPortSysTickHandler(void);\r
 extern void vPortSVCHandler( void );\r
 extern void Timer0IntHandler( void );\r
+extern void vT2InterruptHandler( void );\r
+extern void vT3InterruptHandler( void );\r
 extern void vEMAC_ISR(void);\r
 \r
 //*****************************************************************************\r
@@ -53,7 +55,7 @@ extern void vEMAC_ISR(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];\r
 \r
@@ -107,7 +109,7 @@ void (* const g_pfnVectors[])(void) =
     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
@@ -119,7 +121,7 @@ void (* const g_pfnVectors[])(void) =
     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 2f3a68b83cca5a7cd200dfc4940257ec55872f59..df636b7cfbe7a57c18e53ce11d4a447734023333 100644 (file)
@@ -85,7 +85,7 @@ volatile unsigned portLONG ulMaxJitter = 0;
 \r
 /*-----------------------------------------------------------*/\r
 \r
-void vSetupTimer( void )\r
+void vSetupHighFrequencyTimer( void )\r
 {\r
 unsigned long ulFrequency;\r
 \r
@@ -121,12 +121,14 @@ void Timer0IntHandler( void )
 {\r
 unsigned portLONG ulDifference;\r
 volatile unsigned portLONG ulCurrentCount;\r
-static portLONG ulMaxDifference = 0, ulLastCount = 0;\r
+static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;\r
 \r
        /* We use the timer 1 counter value to measure the clock cycles between\r
        the timer 0 interrupts. */\r
        ulCurrentCount = timerTIMER_1_COUNT_VALUE;\r
 \r
+       TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );\r
+       \r
        if( ulCurrentCount < ulLastCount )\r
        {       \r
                /* How many times has timer 1 counted since the last interrupt? */\r
@@ -141,8 +143,6 @@ static portLONG ulMaxDifference = 0, ulLastCount = 0;
        }\r
        \r
        ulLastCount = ulCurrentCount;\r
-\r
-    TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );\r
 }\r
 \r
 \r