Wind up the baud rate on the TriCore UART to obtain an extra level of interrupt nesting.

Set the UART into loopback mode so a jumper is not required.
This commit is contained in:
Richard Barry 2011-11-18 11:25:19 +00:00
parent b89f1a729a
commit 9d4616eb55
6 changed files with 277 additions and 248 deletions

View File

@ -76,7 +76,6 @@
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\recmutex.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\recmutex.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\semtest.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\semtest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\list.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\list.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\MPU_Wrappers.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\port.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\port.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\porttrap.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\porttrap.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\MemMang\heap_2.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\MemMang\heap_2.o&quot;"/>
@ -87,6 +86,7 @@
<listOptionValue builtIn="false" value="&quot;RTOSDemo\ThirdPartyCode\cpufreq.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\ThirdPartyCode\cpufreq.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\main.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\main.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\serial.o&quot;"/> <listOptionValue builtIn="false" value="&quot;RTOSDemo\serial.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\InterruptNestTest.o&quot;"/>
</option> </option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.1129393828" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="&quot;..\ld\iROM.ld&quot;" valueType="string"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.1129393828" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="&quot;..\ld\iROM.ld&quot;" valueType="string"/>
</tool> </tool>
@ -547,7 +547,6 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/include}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${TRICORE_TOOLS}/tricore/include&quot;"/>
</option> </option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.assembler.symbols.defined.212143771" name="Defined symbols (-D)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.assembler.symbols.defined" valueType="definedSymbols"> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.assembler.symbols.defined.212143771" name="Defined symbols (-D)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.assembler.symbols.defined" valueType="definedSymbols">
<listOptionValue builtIn="false" value=""/> <listOptionValue builtIn="false" value=""/>
@ -557,7 +556,6 @@
<tool id="com.rt.hightec.buildsystem.tricore.new.compiler.c.1160628898" name="TriCore C Compiler" superClass="com.rt.hightec.buildsystem.tricore.new.compiler.c"> <tool id="com.rt.hightec.buildsystem.tricore.new.compiler.c.1160628898" name="TriCore C Compiler" superClass="com.rt.hightec.buildsystem.tricore.new.compiler.c">
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.symbols.defined.827024089" name="Defined symbols (-D)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.symbols.defined" valueType="stringList"> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.symbols.defined.827024089" name="Defined symbols (-D)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.symbols.defined" valueType="stringList">
<listOptionValue builtIn="false" value="TRIBOARD_TC1782"/> <listOptionValue builtIn="false" value="TRIBOARD_TC1782"/>
<listOptionValue builtIn="false" value="BUILD_FOR_RAM_EXECUTION"/>
</option> </option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.general.paths.666426724" name="Include Paths" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.general.paths" valueType="includePath"> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.general.paths.666426724" name="Include Paths" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.general.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/Common_Demo_Source/include}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/Common_Demo_Source/include}&quot;"/>
@ -566,7 +564,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Source/portable/PLS/TriCore_1782_MPU}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Source/portable/PLS/TriCore_1782_MPU}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}&quot;"/>
</option> </option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization.1251458415" name="Optimization Level" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization" value="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.code.optimization.0" valueType="enumerated"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization.1251458415" name="Optimization Level" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization" value="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.code.optimization.s" valueType="enumerated"/>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options.538537192" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options" valueType="stringList"> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options.538537192" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options" valueType="stringList">
<listOptionValue builtIn="false" value="-Wextra"/> <listOptionValue builtIn="false" value="-Wextra"/>
<listOptionValue builtIn="false" value="-ffunction-sections"/> <listOptionValue builtIn="false" value="-ffunction-sections"/>
@ -582,9 +580,37 @@
</option> </option>
</tool> </tool>
<tool id="com.rt.hightec.buildsystem.tricore.new.linker.c.1929159535" name="TriCore C Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.c"> <tool id="com.rt.hightec.buildsystem.tricore.new.linker.c.1929159535" name="TriCore C Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.c">
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink.236609617" name="Link order" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink" valueType="stringList"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink.236609617" name="Link order" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\BlockQ.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\GenQTest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\PollQ.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\QPeek.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\TimerDemo.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\blocktim.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\comtest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\countsem.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\death.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\dynamic.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\flash.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\flop.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\integer.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\recmutex.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\semtest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\list.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\port.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\porttrap.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\MemMang\heap_2.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\queue.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\tasks.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\timers.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\InterruptNestTest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\ParTest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\ThirdPartyCode\cpufreq.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\main.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\serial.o&quot;"/>
</option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.1135546526" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="&quot;..\ld\iRAM.ld&quot;" valueType="string"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.1135546526" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="&quot;..\ld\iRAM.ld&quot;" valueType="string"/>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options.695697518" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options" valueType="stringList"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options.695697518" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options"/>
</tool> </tool>
<tool id="com.rt.hightec.buildsystem.tricore.new.linker.cpp.2086148347" name="TriCore C++ Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.cpp"> <tool id="com.rt.hightec.buildsystem.tricore.new.linker.cpp.2086148347" name="TriCore C++ Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.cpp">
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.998677471" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="..\ld\iRAM.ld&quot;" valueType="string"/> <option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.998677471" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="..\ld\iRAM.ld&quot;" valueType="string"/>

View File

@ -9,6 +9,10 @@
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers>
<arguments> <arguments>
<dictionary>
<key>?children?</key>
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||</value>
</dictionary>
<dictionary> <dictionary>
<key>?name?</key> <key>?name?</key>
<value></value> <value></value>
@ -31,7 +35,7 @@
</dictionary> </dictionary>
<dictionary> <dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key> <key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/FreeRTOS_Demo/iRAM}</value> <value>${workspace_loc:/FreeRTOS_Demo/iROM}</value>
</dictionary> </dictionary>
<dictionary> <dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key> <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>

File diff suppressed because one or more lines are too long

View File

@ -168,7 +168,6 @@ static void prvPortHighFrequencyTimerHandler( int iArg )
static volatile unsigned long ulExecutionCounter = 0UL; static volatile unsigned long ulExecutionCounter = 0UL;
unsigned long ulHigherPriorityTaskWoken = pdFALSE; unsigned long ulHigherPriorityTaskWoken = pdFALSE;
COUNT_NEST();
/* Just to avoid compiler warnings about unused parameters. */ /* Just to avoid compiler warnings about unused parameters. */
( void ) iArg; ( void ) iArg;
@ -192,5 +191,4 @@ COUNT_NEST();
} }
portYIELD_FROM_ISR( ulHigherPriorityTaskWoken ); portYIELD_FROM_ISR( ulHigherPriorityTaskWoken );
ulNest--;
} }

View File

@ -1,4 +1,3 @@
volatile unsigned long ulNest = 0UL, ulMaxNest = 0UL;
/* /*
FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd. FreeRTOS V7.0.2 - Copyright (C) 2011 Real Time Engineers Ltd.
@ -60,11 +59,17 @@ volatile unsigned long ulNest = 0UL, ulMaxNest = 0UL;
* *
* To create a very simple LED flasher example, set the * To create a very simple LED flasher example, set the
* mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY constant (defined below) to 1. When * mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY constant (defined below) to 1. When
* this is done, only the standard demo flash tasks are created, whereby three * this is done, only the standard demo flash tasks are created. The standard
* tasks each toggle an LED at a fixed but different frequency. * demo flash example creates three tasks, each toggle an LED at a fixed but
* different frequency.
* *
* To create a more comprehensive test and demo application, set * To create a more comprehensive test and demo application, set
* mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0. * mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0.
*
* Two build configurations are provided, one that executes from RAM and one
* that executes from Flash. The RAM build uses size optimisation, the Flash
* build has optimisation completely turned off. The documentation page for
* this port on the FreeRTOS.org web site provides full information.
****************************************************************************** ******************************************************************************
* *
* main() creates all the demo application tasks and timers, then starts the * main() creates all the demo application tasks and timers, then starts the
@ -96,7 +101,10 @@ volatile unsigned long ulNest = 0UL, ulMaxNest = 0UL;
* ***NOTE*** This demo uses the standard comtest tasks, which has special * ***NOTE*** This demo uses the standard comtest tasks, which has special
* hardware requirements as a loopback connector, or UART echo server are * hardware requirements as a loopback connector, or UART echo server are
* required. See the documentation page for this demo on the FreeRTOS.org web * required. See the documentation page for this demo on the FreeRTOS.org web
* site for more information. * site for more information. Note that the comtest tasks were tested by
* placing the UART into loopback mode directly in the serial initialisation
* sequence, and as such, the baud rate used has not been verified as actually
* being correct.
*/ */
/* Standard includes. */ /* Standard includes. */
@ -129,7 +137,8 @@ volatile unsigned long ulNest = 0UL, ulMaxNest = 0UL;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* Constants for the ComTest tasks. */ /* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 ) #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 200000 )
#define mainCOM_TEST_LED ( 5 ) #define mainCOM_TEST_LED ( 5 )
/* Priorities for the demo application tasks. */ /* Priorities for the demo application tasks. */
@ -147,12 +156,16 @@ error. */
#define mainERROR_FLASH_PERIOD_MS ( ( portTickType ) 500 / portTICK_RATE_MS ) #define mainERROR_FLASH_PERIOD_MS ( ( portTickType ) 500 / portTICK_RATE_MS )
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 ) #define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )
/* Constant used by the standard timer test functions. */ /* Constant used by the standard timer test functions. The timers created by
#define mainTIMER_TEST_PERIOD ( 50 ) the timer test functions will all have a period that is a multiple of this
value. */
#define mainTIMER_TEST_PERIOD ( 200 )
/* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo. /* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo.
Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more
comprehensive test application. See the comments at the top of this file. */ comprehensive test application. See the comments at the top of this file, and
the documentation page on the http://www.FreeRTOS.org web site for more
information. */
#define mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY 0 #define mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY 0
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -177,13 +190,13 @@ static void prvSetupHardware( void );
/* /*
* Writes to and checks the value of each register that is used in the context * Writes to and checks the value of each register that is used in the context
* of a task. * of a task. See the comments at the top of this file.
*/ */
static void prvRegisterCheckTask1( void *pvParameters ); static void prvRegisterCheckTask1( void *pvParameters );
static void prvRegisterCheckTask2( void *pvParameters ); static void prvRegisterCheckTask2( void *pvParameters );
/* /*
* Specific check to see if the Register test functions are still operating * Specific check to see if the register test functions are still operating
* correctly. * correctly.
*/ */
static portBASE_TYPE prvAreRegTestTasksStillRunning( void ); static portBASE_TYPE prvAreRegTestTasksStillRunning( void );
@ -215,11 +228,11 @@ int main( void )
/* Setup the hardware for use with the TriCore evaluation board. */ /* Setup the hardware for use with the TriCore evaluation board. */
prvSetupHardware(); prvSetupHardware();
/* Start standard demo/test application tasks. See the comments at the /* Start standard demo/test application flash tasks. See the comments at
top of this file. The LED flash tasks are always created. The other tasks the top of this file. The LED flash tasks are always created. The other
are only created if mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY is set to 1 (at tasks are only created if mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY is set to
the top of this file). See the comments at the top of this file for more 1 (at the top of this file). See the comments at the top of this file for
information. */ more information. */
vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
/* The following function will only create more tasks and timers if /* The following function will only create more tasks and timers if

View File

@ -99,7 +99,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
{ {
unsigned long ulReloadValue = 0UL; unsigned long ulReloadValue = 0UL;
ulReloadValue = ( configPERIPHERAL_CLOCK_HZ / ( 32 * ulWantedBaud ) ) - 1; ulReloadValue = ( configPERIPHERAL_CLOCK_HZ / ( 48UL * ulWantedBaud ) ) - 1UL;
if( NULL == xSerialTransmitQueue ) if( NULL == xSerialTransmitQueue )
{ {
@ -126,7 +126,13 @@ unsigned long ulReloadValue = 0UL;
/* Reconfigure and re-initialise the Operation. */ /* Reconfigure and re-initialise the Operation. */
ASC0_PISEL.reg = 0UL; ASC0_PISEL.reg = 0UL;
ASC0_CON.reg = 0x00008011; /* 1 Start, 1 Stop, 8 Data, No Parity, No Error Checking, Receive On, Module On. */ ASC0_CON.reg = 0UL;
ASC0_CON.bits.M = 0x01; /* 8bit async. */
ASC0_CON.bits.REN = 0x01; /* Receiver enabled. */
ASC0_CON.bits.FDE = 0x01; /* Fractional divider enabled. */
ASC0_CON.bits.BRS = 0x01; /* Divide by three. */
ASC0_CON.bits.LB = 0x01; /* Loopback enabled. */
ASC0_CON.bits.R = 0x01; /* Enable the baud rate generator. */
/* Install the Tx interrupt. */ /* Install the Tx interrupt. */
if( 0 != _install_int_handler( configINTERRUPT_PRIORITY_TX, prvTxBufferInterruptHandler, 0 ) ) if( 0 != _install_int_handler( configINTERRUPT_PRIORITY_TX, prvTxBufferInterruptHandler, 0 ) )
@ -188,8 +194,6 @@ static void prvTxBufferInterruptHandler( int iArg )
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
unsigned char ucTx; unsigned char ucTx;
COUNT_NEST();
/* Just to remove compiler warnings about unused parameters. */ /* Just to remove compiler warnings about unused parameters. */
( void ) iArg; ( void ) iArg;
@ -210,7 +214,6 @@ COUNT_NEST();
/* Finally end ISR and switch Task. */ /* Finally end ISR and switch Task. */
portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
ulNest--;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -218,7 +221,7 @@ static void prvRxInterruptHandler( int iArg )
{ {
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
unsigned char ucRx; unsigned char ucRx;
COUNT_NEST();
/* Just to remove compiler warnings about unused parameters. */ /* Just to remove compiler warnings about unused parameters. */
( void ) iArg; ( void ) iArg;
@ -236,7 +239,6 @@ COUNT_NEST();
/* Finally end ISR and switch Task. */ /* Finally end ISR and switch Task. */
portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
ulNest--;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/