mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks.
This commit is contained in:
parent
512c86194f
commit
ae6d081ebe
|
@ -27,22 +27,21 @@
|
||||||
</builder>
|
</builder>
|
||||||
<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"/>
|
<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"/>
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1502006385" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1502006385" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
</tool>
|
</tool>
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1021181093" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1021181093" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
</tool>
|
</tool>
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.164584712" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.164584712" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
</tool>
|
</tool>
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="Common Demo Files|FreeRTOS.org Source|Source|Minimal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="Common Demo Files|FreeRTOS.org Source|Source|Minimal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="FreeRTOS.org Source"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common Demo Files"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common Demo Files"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -220,6 +219,7 @@
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
||||||
<project-mappings/>
|
<project-mappings/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
|
|
@ -10,12 +10,8 @@
|
||||||
<triggers>clean,full,incremental,</triggers>
|
<triggers>clean,full,incremental,</triggers>
|
||||||
<arguments>
|
<arguments>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
<key>?children?</key>
|
||||||
<value>clean</value>
|
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\\\\\\\\\|\\\\\\\|\||</value>
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>?name?</key>
|
<key>?name?</key>
|
||||||
|
@ -26,48 +22,52 @@
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||||
<value>true</value>
|
<value>all</value>
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
|
||||||
<value>cs-make</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.contents</key>
|
|
||||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
|
||||||
<value>${workspace_loc:/RTOSDemo}</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
|
||||||
<value>false</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
|
||||||
<value>false</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
<value></value>
|
<value></value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
|
<value>cs-make</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||||
|
<value>${workspace_loc:/RTOSDemo}</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||||
|
<value>clean</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
|
<value>false</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||||
<value>all</value>
|
<value>all</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>?children?</key>
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\\\\\\\\\|\\\\\\\|\||</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
<value>all</value>
|
<value>false</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#define configUSE_TICK_HOOK 1
|
#define configUSE_TICK_HOOK 1
|
||||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 )
|
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 )
|
||||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 70 )
|
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 60 )
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) )
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||||
#define configUSE_TRACE_FACILITY 1
|
#define configUSE_TRACE_FACILITY 1
|
||||||
|
@ -95,6 +95,7 @@ to exclude the API function. */
|
||||||
|
|
||||||
|
|
||||||
#define configKERNEL_INTERRUPT_PRIORITY 255
|
#define configKERNEL_INTERRUPT_PRIORITY 255
|
||||||
|
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xa0, or priority 5. */
|
||||||
|
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
117
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c
Normal file
117
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.c
Normal file
|
@ -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() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
58
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h
Normal file
58
Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/IntQueueTimer.h
Normal file
|
@ -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
|
||||||
|
|
|
@ -73,6 +73,8 @@ SOURCE= main.c \
|
||||||
$(DEMO_COMMON_DIR)/GenQTest.c \
|
$(DEMO_COMMON_DIR)/GenQTest.c \
|
||||||
$(DEMO_COMMON_DIR)/QPeek.c \
|
$(DEMO_COMMON_DIR)/QPeek.c \
|
||||||
$(DEMO_COMMON_DIR)/recmutex.c \
|
$(DEMO_COMMON_DIR)/recmutex.c \
|
||||||
|
$(DEMO_COMMON_DIR)/IntQueue.c \
|
||||||
|
./IntQueueTimer.c \
|
||||||
./webserver/uIP_Task.c \
|
./webserver/uIP_Task.c \
|
||||||
./webserver/emac.c \
|
./webserver/emac.c \
|
||||||
./webserver/httpd.c \
|
./webserver/httpd.c \
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
#include "GenQTest.h"
|
#include "GenQTest.h"
|
||||||
#include "QPeek.h"
|
#include "QPeek.h"
|
||||||
#include "recmutex.h"
|
#include "recmutex.h"
|
||||||
|
#include "IntQueue.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ static void prvSetupHardware( void );
|
||||||
* Configures the high frequency timers - those used to measure the timing
|
* Configures the high frequency timers - those used to measure the timing
|
||||||
* jitter while the real time kernel is executing.
|
* jitter while the real time kernel is executing.
|
||||||
*/
|
*/
|
||||||
extern void vSetupTimer( void );
|
extern void vSetupHighFrequencyTimer( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The idle hook is used to run a test of the scheduler context switch
|
* The idle hook is used to run a test of the scheduler context switch
|
||||||
|
@ -242,6 +242,7 @@ int main( void )
|
||||||
vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
|
vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
|
||||||
vStartQueuePeekTasks();
|
vStartQueuePeekTasks();
|
||||||
vStartRecursiveMutexTasks();
|
vStartRecursiveMutexTasks();
|
||||||
|
vStartInterruptQueueTasks();
|
||||||
|
|
||||||
/* Start the tasks defined within this file/specific to this demo. */
|
/* Start the tasks defined within this file/specific to this demo. */
|
||||||
xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
|
@ -253,7 +254,7 @@ int main( void )
|
||||||
|
|
||||||
/* Configure the high frequency interrupt used to measure the interrupt
|
/* Configure the high frequency interrupt used to measure the interrupt
|
||||||
jitter time. */
|
jitter time. */
|
||||||
vSetupTimer();
|
vSetupHighFrequencyTimer();
|
||||||
|
|
||||||
/* Start the scheduler. */
|
/* Start the scheduler. */
|
||||||
vTaskStartScheduler();
|
vTaskStartScheduler();
|
||||||
|
@ -291,7 +292,7 @@ void vApplicationTickHook( void )
|
||||||
{
|
{
|
||||||
static xOLEDMessage xMessage = { "PASS" };
|
static xOLEDMessage xMessage = { "PASS" };
|
||||||
static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||||
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
/* Called from every tick interrupt. Have enough ticks passed to make it
|
/* Called from every tick interrupt. Have enough ticks passed to make it
|
||||||
time to perform our health status check again? */
|
time to perform our health status check again? */
|
||||||
|
@ -341,6 +342,11 @@ static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
{
|
{
|
||||||
xMessage.pcMessage = "ERROR IN HOOK";
|
xMessage.pcMessage = "ERROR IN HOOK";
|
||||||
}
|
}
|
||||||
|
else if( xAreIntQueueTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
xMessage.pcMessage = "ERROR IN INT QUEUE";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Send the message to the OLED gatekeeper for display. */
|
/* Send the message to the OLED gatekeeper for display. */
|
||||||
xHigherPriorityTaskWoken = pdFALSE;
|
xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
@ -354,7 +360,7 @@ void vOLEDTask( void *pvParameters )
|
||||||
xOLEDMessage xMessage;
|
xOLEDMessage xMessage;
|
||||||
unsigned portLONG ulY, ulMaxY;
|
unsigned portLONG ulY, ulMaxY;
|
||||||
static portCHAR cMessage[ mainMAX_MSG_LEN ];
|
static portCHAR cMessage[ mainMAX_MSG_LEN ];
|
||||||
extern unsigned portLONG ulMaxJitter;
|
extern volatile unsigned portLONG ulMaxJitter;
|
||||||
unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;
|
unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;
|
||||||
const unsigned portCHAR *pucImage;
|
const unsigned portCHAR *pucImage;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ extern void xPortPendSVHandler(void);
|
||||||
extern void xPortSysTickHandler(void);
|
extern void xPortSysTickHandler(void);
|
||||||
extern void vPortSVCHandler( void );
|
extern void vPortSVCHandler( void );
|
||||||
extern void Timer0IntHandler( void );
|
extern void Timer0IntHandler( void );
|
||||||
|
extern void vT2InterruptHandler( void );
|
||||||
|
extern void vT3InterruptHandler( void );
|
||||||
extern void vEMAC_ISR(void);
|
extern void vEMAC_ISR(void);
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
@ -53,7 +55,7 @@ extern void vEMAC_ISR(void);
|
||||||
//
|
//
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#ifndef STACK_SIZE
|
#ifndef STACK_SIZE
|
||||||
#define STACK_SIZE 64
|
#define STACK_SIZE 120
|
||||||
#endif
|
#endif
|
||||||
static unsigned long pulStack[STACK_SIZE];
|
static unsigned long pulStack[STACK_SIZE];
|
||||||
|
|
||||||
|
@ -107,7 +109,7 @@ void (* const g_pfnVectors[])(void) =
|
||||||
IntDefaultHandler, // Timer 0 subtimer B
|
IntDefaultHandler, // Timer 0 subtimer B
|
||||||
IntDefaultHandler, // Timer 1 subtimer A
|
IntDefaultHandler, // Timer 1 subtimer A
|
||||||
IntDefaultHandler, // Timer 1 subtimer B
|
IntDefaultHandler, // Timer 1 subtimer B
|
||||||
IntDefaultHandler, // Timer 2 subtimer A
|
vT2InterruptHandler, // Timer 2 subtimer A
|
||||||
IntDefaultHandler, // Timer 2 subtimer B
|
IntDefaultHandler, // Timer 2 subtimer B
|
||||||
IntDefaultHandler, // Analog Comparator 0
|
IntDefaultHandler, // Analog Comparator 0
|
||||||
IntDefaultHandler, // Analog Comparator 1
|
IntDefaultHandler, // Analog Comparator 1
|
||||||
|
@ -119,7 +121,7 @@ void (* const g_pfnVectors[])(void) =
|
||||||
IntDefaultHandler, // GPIO Port H
|
IntDefaultHandler, // GPIO Port H
|
||||||
IntDefaultHandler, // UART2 Rx and Tx
|
IntDefaultHandler, // UART2 Rx and Tx
|
||||||
IntDefaultHandler, // SSI1 Rx and Tx
|
IntDefaultHandler, // SSI1 Rx and Tx
|
||||||
IntDefaultHandler, // Timer 3 subtimer A
|
vT3InterruptHandler, // Timer 3 subtimer A
|
||||||
IntDefaultHandler, // Timer 3 subtimer B
|
IntDefaultHandler, // Timer 3 subtimer B
|
||||||
IntDefaultHandler, // I2C1 Master and Slave
|
IntDefaultHandler, // I2C1 Master and Slave
|
||||||
IntDefaultHandler, // Quadrature Encoder 1
|
IntDefaultHandler, // Quadrature Encoder 1
|
||||||
|
|
|
@ -85,7 +85,7 @@ volatile unsigned portLONG ulMaxJitter = 0;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vSetupTimer( void )
|
void vSetupHighFrequencyTimer( void )
|
||||||
{
|
{
|
||||||
unsigned long ulFrequency;
|
unsigned long ulFrequency;
|
||||||
|
|
||||||
|
@ -121,12 +121,14 @@ void Timer0IntHandler( void )
|
||||||
{
|
{
|
||||||
unsigned portLONG ulDifference;
|
unsigned portLONG ulDifference;
|
||||||
volatile unsigned portLONG ulCurrentCount;
|
volatile unsigned portLONG ulCurrentCount;
|
||||||
static portLONG ulMaxDifference = 0, ulLastCount = 0;
|
static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;
|
||||||
|
|
||||||
/* We use the timer 1 counter value to measure the clock cycles between
|
/* We use the timer 1 counter value to measure the clock cycles between
|
||||||
the timer 0 interrupts. */
|
the timer 0 interrupts. */
|
||||||
ulCurrentCount = timerTIMER_1_COUNT_VALUE;
|
ulCurrentCount = timerTIMER_1_COUNT_VALUE;
|
||||||
|
|
||||||
|
TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );
|
||||||
|
|
||||||
if( ulCurrentCount < ulLastCount )
|
if( ulCurrentCount < ulLastCount )
|
||||||
{
|
{
|
||||||
/* How many times has timer 1 counted since the last interrupt? */
|
/* How many times has timer 1 counted since the last interrupt? */
|
||||||
|
@ -141,8 +143,6 @@ static portLONG ulMaxDifference = 0, ulLastCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulLastCount = ulCurrentCount;
|
ulLastCount = ulCurrentCount;
|
||||||
|
|
||||||
TimerIntClear( TIMER0_BASE, TIMER_TIMA_TIMEOUT );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue