</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
<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
#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
\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
--- /dev/null
+/*\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
--- /dev/null
+/*\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
$(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
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
\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
* 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
\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
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
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
\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
{\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
{\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
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
{\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
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
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
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
ulMaxY = mainMAX_ROWS_96;\r
pucImage = pucBasicBitmap;\r
break;\r
- \r
+\r
default : vOLEDInit = vFormike128x128x16Init;\r
vOLEDStringDraw = vFormike128x128x16StringDraw;\r
vOLEDImageDraw = vFormike128x128x16ImageDraw;\r
}\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
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
//\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
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
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
\r
/*-----------------------------------------------------------*/\r
\r
-void vSetupTimer( void )\r
+void vSetupHighFrequencyTimer( void )\r
{\r
unsigned long ulFrequency;\r
\r
{\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
}\r
\r
ulLastCount = ulCurrentCount;\r
-\r
- TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );\r
}\r
\r
\r