Add FreeRTOS+CLI examples to the Renesas RZ/T demos.

Fix some compiler warnings.
Correct spellings in comments.
This commit is contained in:
Richard Barry 2015-10-10 10:29:29 +00:00
parent 96ff3925d2
commit c6a4e3191e
54 changed files with 1467 additions and 383 deletions

View File

@ -70,8 +70,7 @@
/******************************************************************************
*
* See the following URL for information on the commands defined in this file:
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml
* http://www.FreeRTOS.org/cli
*
******************************************************************************/
@ -339,7 +338,7 @@ static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWri
{
const char *pcParameter;
BaseType_t xParameterStringLength, xReturn;
static BaseType_t lParameterNumber = 0;
static UBaseType_t uxParameterNumber = 0;
/* Remove compile time warnings about unused parameters, and check the
write buffer is not NULL. NOTE - for simplicity, this example assumes the
@ -348,7 +347,7 @@ static BaseType_t lParameterNumber = 0;
( void ) xWriteBufferLen;
configASSERT( pcWriteBuffer );
if( lParameterNumber == 0 )
if( uxParameterNumber == 0 )
{
/* The first time the function is called after the command has been
entered just a header string is returned. */
@ -356,7 +355,7 @@ static BaseType_t lParameterNumber = 0;
/* Next time the function is called the first parameter will be echoed
back. */
lParameterNumber = 1L;
uxParameterNumber = 1U;
/* There is more data to be returned as no parameters have been echoed
back yet. */
@ -368,7 +367,7 @@ static BaseType_t lParameterNumber = 0;
pcParameter = FreeRTOS_CLIGetParameter
(
pcCommandString, /* The command string itself. */
lParameterNumber, /* Return the next parameter. */
uxParameterNumber, /* Return the next parameter. */
&xParameterStringLength /* Store the parameter string length. */
);
@ -377,24 +376,24 @@ static BaseType_t lParameterNumber = 0;
/* Return the parameter string. */
memset( pcWriteBuffer, 0x00, xWriteBufferLen );
sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );
strncat( pcWriteBuffer, pcParameter, xParameterStringLength );
sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber );
strncat( pcWriteBuffer, pcParameter, ( size_t ) xParameterStringLength );
strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );
/* If this is the last of the three parameters then there are no more
strings to return after this one. */
if( lParameterNumber == 3L )
if( uxParameterNumber == 3U )
{
/* If this is the last of the three parameters then there are no more
strings to return after this one. */
xReturn = pdFALSE;
lParameterNumber = 0L;
uxParameterNumber = 0;
}
else
{
/* There are more parameters to return after this one. */
xReturn = pdTRUE;
lParameterNumber++;
uxParameterNumber++;
}
}
@ -406,7 +405,7 @@ static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBuf
{
const char *pcParameter;
BaseType_t xParameterStringLength, xReturn;
static BaseType_t lParameterNumber = 0;
static UBaseType_t uxParameterNumber = 0;
/* Remove compile time warnings about unused parameters, and check the
write buffer is not NULL. NOTE - for simplicity, this example assumes the
@ -415,7 +414,7 @@ static BaseType_t lParameterNumber = 0;
( void ) xWriteBufferLen;
configASSERT( pcWriteBuffer );
if( lParameterNumber == 0 )
if( uxParameterNumber == 0 )
{
/* The first time the function is called after the command has been
entered just a header string is returned. */
@ -423,7 +422,7 @@ static BaseType_t lParameterNumber = 0;
/* Next time the function is called the first parameter will be echoed
back. */
lParameterNumber = 1L;
uxParameterNumber = 1U;
/* There is more data to be returned as no parameters have been echoed
back yet. */
@ -435,7 +434,7 @@ static BaseType_t lParameterNumber = 0;
pcParameter = FreeRTOS_CLIGetParameter
(
pcCommandString, /* The command string itself. */
lParameterNumber, /* Return the next parameter. */
uxParameterNumber, /* Return the next parameter. */
&xParameterStringLength /* Store the parameter string length. */
);
@ -443,13 +442,13 @@ static BaseType_t lParameterNumber = 0;
{
/* Return the parameter string. */
memset( pcWriteBuffer, 0x00, xWriteBufferLen );
sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );
strncat( pcWriteBuffer, pcParameter, xParameterStringLength );
sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber );
strncat( pcWriteBuffer, ( char * ) pcParameter, ( size_t ) xParameterStringLength );
strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );
/* There might be more parameters to return after this one. */
xReturn = pdTRUE;
lParameterNumber++;
uxParameterNumber++;
}
else
{
@ -461,7 +460,7 @@ static BaseType_t lParameterNumber = 0;
xReturn = pdFALSE;
/* Start over the next time this command is executed. */
lParameterNumber = 0;
uxParameterNumber = 0;
}
}

View File

@ -164,7 +164,7 @@ xComPortHandle xPort;
xPort = xSerialPortInitMinimal( configCLI_BAUD_RATE, cmdQUEUE_LENGTH );
/* Send the welcome message. */
vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, strlen( pcWelcomeMessage ) );
vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, ( unsigned short ) strlen( pcWelcomeMessage ) );
for( ;; )
{
@ -183,7 +183,7 @@ xComPortHandle xPort;
if( cRxedChar == '\n' || cRxedChar == '\r' )
{
/* Just to space the output from the input. */
vSerialPutString( xPort, ( signed char * ) pcNewLine, strlen( pcNewLine ) );
vSerialPutString( xPort, ( signed char * ) pcNewLine, ( unsigned short ) strlen( pcNewLine ) );
/* See if the command is empty, indicating that the last command
is to be executed again. */
@ -203,7 +203,7 @@ xComPortHandle xPort;
xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );
/* Write the generated string to the UART. */
vSerialPutString( xPort, ( signed char * ) pcOutputString, strlen( pcOutputString ) );
vSerialPutString( xPort, ( signed char * ) pcOutputString, ( unsigned short ) strlen( pcOutputString ) );
} while( xReturned != pdFALSE );
@ -215,7 +215,7 @@ xComPortHandle xPort;
ucInputIndex = 0;
memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );
vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) );
vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, ( unsigned short ) strlen( pcEndOfOutputMessage ) );
}
else
{
@ -260,7 +260,7 @@ void vOutputString( const char * const pcMessage )
{
if( xSemaphoreTake( xTxMutex, cmdMAX_MUTEX_WAIT ) == pdPASS )
{
vSerialPutString( xPort, ( signed char * ) pcMessage, strlen( pcMessage ) );
vSerialPutString( xPort, ( signed char * ) pcMessage, ( unsigned short ) strlen( pcMessage ) );
xSemaphoreGive( xTxMutex );
}
}

View File

@ -123,7 +123,7 @@ vRegTest1Implementation
vmov d14, r4, r5
vmov d15, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg1_loop
; Yield to increase test coverage
@ -317,7 +317,7 @@ vRegTest2Implementation
vmov d14, r4, r5
vmov d15, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg2_loop
; Check all the VFP registers still contain the values set above.

View File

@ -142,7 +142,7 @@ vRegTest1Implementation
vmov d30, r4, r5
vmov d31, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg1_loop
; Yield to increase test coverage
@ -434,7 +434,7 @@ vRegTest2Implementation
vmov d30, r4, r5
vmov d31, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg2_loop
; Check all the VFP registers still contain the values set above.

View File

@ -135,7 +135,7 @@ vRegTest1Implementation:
vmov d30, r4, r5
vmov d31, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg1_loop:
/* Yield to increase test coverage */
@ -425,7 +425,7 @@ vRegTest2Implementation:
vmov d30, r4, r5
vmov d31, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg2_loop:
/* Check all the VFP registers still contain the values set above.

View File

@ -146,7 +146,7 @@ vRegTest1Implementation
vmov d30, r4, r5
vmov d31, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg1_loop
; Yield to increase test coverage
@ -438,7 +438,7 @@ vRegTest2Implementation
vmov d30, r4, r5
vmov d31, r6, r7
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
reg2_loop
; Check all the VFP registers still contain the values set above.

View File

@ -135,7 +135,7 @@ vRegTest1Implementation:
vmov d30, r4, r5
vmov d31, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg1_loop:
/* Yield to increase test coverage */
@ -425,7 +425,7 @@ vRegTest2Implementation:
vmov d30, r4, r5
vmov d31, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg2_loop:
/* Check all the VFP registers still contain the values set above.

View File

@ -44,6 +44,7 @@
<option id="com.renesas.cdt.core.Compiler.option.deviceShortName.897790463" name="DeviceShortName" superClass="com.renesas.cdt.core.Compiler.option.deviceShortName" value="R7S910018" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Compiler.option.includeFileDir.1914876765" name="Include file directories" superClass="com.renesas.cdt.core.Compiler.option.includeFileDir" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/bin/newlib/libc/sys/arm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Full_Demo/FreeRTOS-Plus-CLI}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Full_Demo}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Full_Demo/Standard_Demo_Tasks/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/FreeRTOS_Source/include}&quot;"/>
@ -138,16 +139,13 @@
<listOptionValue builtIn="false" value="&quot;.\libTutorial.a&quot;"/>
</option>
<option id="com.renesas.cdt.core.Linker.option.commandFileOverride.622113609" name="Command file overide" superClass="com.renesas.cdt.core.Linker.option.commandFileOverride" value="com.renesas.cdt.core.Linker.option.commandFileOverride.externalLinkerScript" valueType="enumerated"/>
<option command=" -T&quot;C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR_ARM\HardwareDebug\LinkerSubCommand.tmp&quot; -T" id="com.renesas.cdt.core.Linker.option.file.464254322" name="File" superClass="com.renesas.cdt.core.Linker.option.file" value="&quot;${workspace_loc:/${ProjName}/System/GCC/GNU_LINKER_ATCM.ld}&quot;" valueType="string"/>
<option command=" -T&quot;C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR\HardwareDebug\LinkerSubCommand.tmp&quot; -T" id="com.renesas.cdt.core.Linker.option.file.464254322" name="File" superClass="com.renesas.cdt.core.Linker.option.file" value="&quot;${workspace_loc:/${ProjName}/System/GCC/GNU_LINKER_ATCM.ld}&quot;" valueType="string"/>
</tool>
<tool id="com.renesas.cdt.rz.hardwaredebug.win32.tool.objcopy.Id.1674695683" name="Objcopy" superClass="com.renesas.cdt.rz.hardwaredebug.win32.tool.objcopy.Id"/>
</toolChain>
</folderInfo>
<fileInfo id="com.renesas.cdt.rz.hardwaredebug.win32.configuration.Id.137003302.1449590210" name="reg_test_IAR.asm" rcbsApplicability="disable" resourcePath="src/Full_Demo/reg_test_IAR.asm" toolsToInvoke="com.renesas.cdt.rz.hardwaredebug.win32.tool.compiler.Id.542544613.984236333">
<tool id="com.renesas.cdt.rz.hardwaredebug.win32.tool.compiler.Id.542544613.984236333" name="Compiler" superClass="com.renesas.cdt.rz.hardwaredebug.win32.tool.compiler.Id.542544613"/>
</fileInfo>
<sourceEntries>
<entry excluding="src/Full_Demo/reg_test_IAR.asm|src/cg_src/r_cg_s12ad_user.c|src/cg_src/r_cg_scifa.c|src/cg_src/r_cg_s12ad.c|src/cg_src/r_cg_scifa_user.c|src/cg_src/r_cg_cmt.c|System/GCC/src/siorw.c|System/GCC/src/siochar.c|System/GCC/src/gnu_io.c|System/GCC/src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="src/Full_Demo/reg_test_IAR.asm|src/cg_src/r_cg_s12ad_user.c|src/cg_src/r_cg_s12ad.c|src/cg_src/r_cg_cmt.c|System/GCC/src/siorw.c|System/GCC/src/siochar.c|System/GCC/src/gnu_io.c|System/GCC/src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>

View File

@ -30,11 +30,26 @@
<type>2</type>
<locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI>
</link>
<link>
<name>src/Full_Demo/FreeRTOS-Plus-CLI</name>
<type>2</type>
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI</locationURI>
</link>
<link>
<name>src/Full_Demo/Sample-CLI-commands.c</name>
<type>1</type>
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c</locationURI>
</link>
<link>
<name>src/Full_Demo/Standard_Demo_Tasks</name>
<type>2</type>
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI>
</link>
<link>
<name>src/Full_Demo/UARTCommandConsole.c</name>
<type>1</type>
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c</locationURI>
</link>
<link>
<name>src/Full_Demo/Standard_Demo_Tasks/include</name>
<type>2</type>
@ -42,6 +57,78 @@
</link>
</linkedResources>
<filteredResources>
<filter>
<id>1444470719732</id>
<name></name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-RTOSDemo.ewd</arguments>
</matcher>
</filter>
<filter>
<id>1444470719742</id>
<name></name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-RTOSDemo.eww</arguments>
</matcher>
</filter>
<filter>
<id>1444470719742</id>
<name></name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-RTOSDemo.ewp</arguments>
</matcher>
</filter>
<filter>
<id>1444470719757</id>
<name></name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-RTOSDemo.ewt</arguments>
</matcher>
</filter>
<filter>
<id>1444470719769</id>
<name></name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-RTOSDemo.dep</arguments>
</matcher>
</filter>
<filter>
<id>1444470719775</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-Debug</arguments>
</matcher>
</filter>
<filter>
<id>1444470719782</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-setting</arguments>
</matcher>
</filter>
<filter>
<id>1444470719788</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-settings</arguments>
</matcher>
</filter>
<filter>
<id>1442133034715</id>
<name>System</name>

View File

@ -3,7 +3,7 @@
<configuration id="com.renesas.cdt.rz.hardwaredebug.win32.configuration.Id.137003302" name="HardwareDebug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="com.renesas.cdt.common.build.spec.RZGCCBuiltinSpecsDetector" console="false" env-hash="1695716901026871493" id="RZGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GNUARM-NONE GCCBuildinCompilerSettings" options-hash="857384749" parameter="arm-none-eabi-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<provider class="com.renesas.cdt.common.build.spec.RZGCCBuiltinSpecsDetector" console="false" env-hash="-453079405608331002" id="RZGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GNUARM-NONE GCCBuildinCompilerSettings" options-hash="857384749" parameter="arm-none-eabi-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -13,7 +13,7 @@
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R7S910018"/>
<booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/>
<booleanAttribute key="com.renesas.cdt.core.verboseMode" value="false"/>
<stringAttribute key="com.renesas.cdt.debug.ioview.dsf.registerSelection" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;selectedRegisterList ioFilePath=&quot;C:\DevTools\Renesas\e2_studio\internal\IoFiles\RZ\R7S910018.sfrx&quot;/&gt;&#13;&#10;"/>
<stringAttribute key="com.renesas.cdt.debug.ioview.dsf.registerSelection" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;selectedRegisterList ioFilePath=&quot;C:\DevTools\Renesas\e2_studio_4\internal\IoFiles\RZ\R7S910018.sfrx&quot;/&gt;&#13;&#10;"/>
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${eclipse_home}..\internal\IoFiles\RZ\R7S910018.sfrx"/>
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>
<listAttribute key="com.renesas.cdt.launch.dsf.downloadImages">
@ -46,7 +46,7 @@
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_R4F_RZ_T_GCC_IAR_ARM\HardwareDebug\RTOSDemo.x"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_R4F_RZ_T_GCC_IAR\HardwareDebug\RTOSDemo.x"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value="0"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
@ -54,10 +54,10 @@
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_R4F_RZ_T_GCC_IAR_ARM\HardwareDebug\RTOSDemo.x"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_R4F_RZ_T_GCC_IAR\HardwareDebug\RTOSDemo.x"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value="0"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
@ -69,11 +69,11 @@
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="HardwareDebug/RTOSDemo.x"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTOSDemo"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.renesas.cdt.rz.hardwaredebug.win32.configuration.Id.137003302"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/RTOSDemo"/>

View File

@ -233,7 +233,7 @@
<option>
<name>CCAllowList</name>
<version>1</version>
<state>11111110</state>
<state>00000000</state>
</option>
<option>
<name>CCDebugInfo</name>
@ -308,6 +308,7 @@
<state>$PROJ_DIR$\src\cg_src</state>
<state>$PROJ_DIR$\..\Common\include</state>
<state>$PROJ_DIR$\src\Full_Demo</state>
<state>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-CLI</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -327,7 +328,7 @@
</option>
<option>
<name>CCOptLevel</name>
<state>3</state>
<state>0</state>
</option>
<option>
<name>CCOptStrategy</name>
@ -336,7 +337,7 @@
</option>
<option>
<name>CCOptLevelSlave</name>
<state>3</state>
<state>0</state>
</option>
<option>
<name>CompilerMisraRules98</name>
@ -1990,6 +1991,12 @@
<name>$PROJ_DIR$\..\Common\Minimal\TimerDemo.c</name>
</file>
</group>
<group>
<name>FreeRTOS+CLI</name>
<file>
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-CLI\FreeRTOS_CLI.c</name>
</file>
</group>
<file>
<name>$PROJ_DIR$\src\Full_Demo\IntQueueTimer.c</name>
</file>
@ -1999,6 +2006,12 @@
<file>
<name>$PROJ_DIR$\src\Full_Demo\reg_test_IAR.asm</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\Sample-CLI-commands.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\UARTCommandConsole.c</name>
</file>
</group>
<group>
<name>Renesas_cg_src</name>
@ -2029,6 +2042,12 @@
<file>
<name>$PROJ_DIR$\src\cg_src\r_cg_rspi_user.c</name>
</file>
<file>
<name>$PROJ_DIR$\src\cg_src\r_cg_scifa.c</name>
</file>
<file>
<name>$PROJ_DIR$\src\cg_src\r_cg_scifa_user.c</name>
</file>
<file>
<name>$PROJ_DIR$\src\cg_src\r_cg_systeminit.c</name>
</file>

View File

@ -74,10 +74,18 @@
EXTERN FreeRTOS_IRQ_Handler
EXTERN vCMT_1_Channel_0_ISR
EXTERN vCMT_1_Channel_1_ISR
EXTERN r_scifa2_txif2_interrupt
EXTERN r_scifa2_rxif2_interrupt
EXTERN r_scifa2_drif2_interrupt
EXTERN r_scifa2_brif2_interrupt
PUBLIC FreeRTOS_Tick_Handler_Entry
PUBLIC vCMT_1_Channel_0_ISR_Entry
PUBLIC vCMT_1_Channel_1_ISR_Entry
PUBLIC r_scifa2_txif2_interrupt_entry
PUBLIC r_scifa2_rxif2_interrupt_entry
PUBLIC r_scifa2_drif2_interrupt_entry
PUBLIC r_scifa2_brif2_interrupt_entry
FreeRTOS_Tick_Handler_Entry:
/* Save used registers (probably not necessary). */
@ -113,5 +121,53 @@ vCMT_1_Channel_1_ISR_Entry:
/* Restore used registers then branch to the FreeRTOS IRQ handler. */
POP {r0-r1}
B FreeRTOS_IRQ_Handler
/*-----------------------------------------------------------*/
END
r_scifa2_txif2_interrupt_entry:
/* Save used registers (probably not necessary). */
PUSH {r0-r1}
/* Save the address of the C portion of this handler in pxISRFunction. */
LDR r0, =pxISRFunction
LDR R1, =r_scifa2_txif2_interrupt
STR R1, [r0]
/* Restore used registers then branch to the FreeRTOS IRQ handler. */
POP {r0-r1}
B FreeRTOS_IRQ_Handler
/*-----------------------------------------------------------*/
r_scifa2_rxif2_interrupt_entry:
/* Save used registers (probably not necessary). */
PUSH {r0-r1}
/* Save the address of the C portion of this handler in pxISRFunction. */
LDR r0, =pxISRFunction
LDR R1, =r_scifa2_rxif2_interrupt
STR R1, [r0]
/* Restore used registers then branch to the FreeRTOS IRQ handler. */
POP {r0-r1}
B FreeRTOS_IRQ_Handler
/*-----------------------------------------------------------*/
r_scifa2_drif2_interrupt_entry:
/* Save used registers (probably not necessary). */
PUSH {r0-r1}
/* Save the address of the C portion of this handler in pxISRFunction. */
LDR r0, =pxISRFunction
LDR R1, =r_scifa2_drif2_interrupt
STR R1, [r0]
/* Restore used registers then branch to the FreeRTOS IRQ handler. */
POP {r0-r1}
B FreeRTOS_IRQ_Handler
/*-----------------------------------------------------------*/
r_scifa2_brif2_interrupt_entry:
/* Save used registers (probably not necessary). */
PUSH {r0-r1}
/* Save the address of the C portion of this handler in pxISRFunction. */
LDR r0, =pxISRFunction
LDR R1, =r_scifa2_brif2_interrupt
STR R1, [r0]
/* Restore used registers then branch to the FreeRTOS IRQ handler. */
POP {r0-r1}
B FreeRTOS_IRQ_Handler
END

View File

@ -4,9 +4,9 @@
<Desktop>
<Static>
<Debug-Log>
<ColumnWidth0>20</ColumnWidth0>
<ColumnWidth1>1622</ColumnWidth1>
</Debug-Log>
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
<Build>
<ColumnWidth0>20</ColumnWidth0>
<ColumnWidth1>1216</ColumnWidth1>
@ -15,31 +15,31 @@
</Build>
<Workspace>
<ColumnWidths>
<Column0>194</Column0>
<Column1>27</Column1>
<Column2>27</Column2>
<Column3>27</Column3>
</ColumnWidths>
<Column0>178</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Disassembly>
<col-names>
<item>Disassembly</item>
<item>_I0</item>
</col-names>
<item>Disassembly</item><item>_I0</item></col-names>
<col-widths>
<item>500</item>
<item>20</item>
</col-widths>
<item>500</item><item>20</item></col-widths>
<DisasmHistory/>
<PreferedWindows>
<Position>2</Position>
<ScreenPosX>0</ScreenPosX>
<ScreenPosY>0</ScreenPosY>
<Windows/>
</PreferedWindows>
<ShowCodeCoverage>1</ShowCodeCoverage>
<ShowInstrProfiling>1</ShowInstrProfiling>
</Disassembly>
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
<ShowCodeCoverage>1</ShowCodeCoverage><ShowInstrProfiling>1</ShowInstrProfiling></Disassembly>
<Breakpoints>
<PreferedWindows>
<Position>3</Position>
@ -66,7 +66,9 @@
</Register>
</Static>
<Windows>
<Wnd3>
<Wnd3>
<Tabs>
<Tab>
<Identity>TabID-31370-17793</Identity>
@ -81,196 +83,33 @@
<Session/>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab>
</Wnd3>
<Wnd4>
<SelectedTab>0</SelectedTab></Wnd3><Wnd4>
<Tabs>
<Tab>
<Identity>TabID-9350-17796</Identity>
<TabName>Workspace</TabName>
<Factory>Workspace</Factory>
<Session>
<NodeDict>
<ExpandedNode>RTOSDemo</ExpandedNode>
<ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode>
<ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode>
</NodeDict>
</Session>
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode><ExpandedNode>RTOSDemo/Renesas_cg_src</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab>
</Wnd4>
</Windows>
<SelectedTab>0</SelectedTab></Wnd4><Wnd5><Tabs><Tab><Identity>TabID-29908-24406</Identity><TabName>Register</TabName><Factory>Register</Factory><Session><REG1>0</REG1><REG2>0</REG2><Group>0</Group><States>0</States></Session></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd5></Windows>
<Editor>
<Pane>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\src\main.c</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>128</YPos2>
<SelStart2>6721</SelStart2>
<SelEnd2>6721</SelEnd2>
</Tab>
<ActiveTab>0</ActiveTab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\src\Full_Demo\IntQueueTimer.c</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>81</YPos2>
<SelStart2>4886</SelStart2>
<SelEnd2>4912</SelEnd2>
</Tab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\System\IAR\Interrupt_Entry_Stubs.asm</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>66</YPos2>
<SelStart2>4185</SelStart2>
<SelEnd2>4185</SelEnd2>
</Tab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CRx_No_GIC\port.c</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>245</YPos2>
<SelStart2>11320</SelStart2>
<SelEnd2>11320</SelEnd2>
</Tab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\src\Full_Demo\reg_test_IAR.asm</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>123</YPos2>
<SelStart2>5555</SelStart2>
<SelEnd2>5555</SelEnd2>
</Tab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\..\Common\Minimal\TimerDemo.c</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>242</YPos2>
<SelStart2>12612</SelStart2>
<SelEnd2>12612</SelEnd2>
</Tab>
<Tab>
<Factory>TextEditor</Factory>
<Filename>$WS_DIR$\..\..\Source\tasks.c</Filename>
<XPos>0</XPos>
<YPos>0</YPos>
<SelStart>0</SelStart>
<SelEnd>0</SelEnd>
<XPos2>0</XPos2>
<YPos2>202</YPos2>
<SelStart2>11920</SelStart2>
<SelEnd2>11930</SelEnd2>
</Tab>
</Pane>
<ActivePane>0</ActivePane>
<Sizes>
<Pane>
<X>1000000</X>
<Y>1000000</Y>
</Pane>
</Sizes>
<SplitMode>1</SplitMode>
</Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\cg_src\r_cg_scifa.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>200</YPos2><SelStart2>9333</SelStart2><SelEnd2>9333</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>118</YPos2><SelStart2>6976</SelStart2><SelEnd2>6976</SelEnd2></Tab><ActiveTab>1</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Blinky_Demo\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>178</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>4426</YPos2><SelStart2>147164</SelStart2><SelEnd2>147164</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\cg_src\r_cg_scifa_user.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>278</YPos2><SelStart2>11843</SelStart2><SelEnd2>11843</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\IntQueueTimer.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>135</YPos2><SelStart2>4854</SelStart2><SelEnd2>4854</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>241</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\FreeRTOS-Plus\Demo\Common\FreeRTOS_Plus_CLI_Demos\UARTCommandConsole.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>143</YPos2><SelStart2>7172</SelStart2><SelEnd2>7172</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top>
<Row0>
<Sizes>
<Toolbar-00D67C28>
<key>iaridepm.enu1</key>
</Toolbar-00D67C28>
<Toolbar-1B72B5F8>
<key>debuggergui.enu1</key>
</Toolbar-1B72B5F8>
</Sizes>
</Row0>
<Row1>
<Sizes>
<Toolbar-1B72B530>
<key>armjet.enu1</key>
</Toolbar-1B72B530>
</Sizes>
</Row1>
</Top>
<Left>
<Row0>
<Sizes>
<Wnd4>
<Rect>
<Top>-2</Top>
<Left>-2</Left>
<Bottom>718</Bottom>
<Right>268</Right>
<x>-2</x>
<y>-2</y>
<xscreen>200</xscreen>
<yscreen>200</yscreen>
<sizeHorzCX>119048</sizeHorzCX>
<sizeHorzCY>203252</sizeHorzCY>
<sizeVertCX>160714</sizeVertCX>
<sizeVertCY>731707</sizeVertCY>
</Rect>
</Wnd4>
</Sizes>
</Row0>
</Left>
<Right>
<Row0>
<Sizes/>
</Row0>
</Right>
<Bottom>
<Row0>
<Sizes>
<Wnd3>
<Rect>
<Top>-2</Top>
<Left>-2</Left>
<Bottom>198</Bottom>
<Right>1682</Right>
<x>-2</x>
<y>-2</y>
<xscreen>1684</xscreen>
<yscreen>200</yscreen>
<sizeHorzCX>1002381</sizeHorzCX>
<sizeHorzCY>203252</sizeHorzCY>
<sizeVertCX>119048</sizeVertCX>
<sizeVertCY>203252</sizeVertCY>
</Rect>
</Wnd3>
</Sizes>
</Row0>
</Bottom>
<Float>
<Sizes/>
</Float>
</Positions>
<Top><Row0><Sizes><Toolbar-011C9AA0><key>iaridepm.enu1</key></Toolbar-011C9AA0><Toolbar-1ECD4A78><key>debuggergui.enu1</key></Toolbar-1ECD4A78></Sizes></Row0><Row1><Sizes><Toolbar-1ECD49B0><key>armjet.enu1</key></Toolbar-1ECD49B0></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>718</Bottom><Right>268</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>160714</sizeVertCX><sizeVertCY>731707</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>718</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>731707</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View File

@ -48,7 +48,7 @@ PrevWtdReset=Reset and halt after bootloader
[ArmDriver]
EnableCache=1
[DebugChecksum]
Checksum=479945930
Checksum=1116957455
[Exceptions]
StopOnUncaught=_ 0
StopOnThrow=_ 0
@ -104,9 +104,10 @@ Category=_ 0
LoggingEnabled=_ 0
LogFile=_ ""
[Disassemble mode]
mode=0
mode=3
[Breakpoints2]
Count=0
Bp0=_ 1 "EMUL_CODE" "{$PROJ_DIR$\src\cg_src\r_cg_scifa_user.c}.237.2" 0 0 1 "" 0 "" 0
Count=1
[Aliases]
Count=0
SuppressDialog=0

View File

@ -12,7 +12,7 @@
<Column0>222</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
<Column0>293</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Debug-Log>
@ -26,16 +26,16 @@
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1216</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3></Build>
<TerminalIO/>
<Find-in-Files>
<ColumnWidth0>497</ColumnWidth0>
<ColumnWidth1>82</ColumnWidth1>
<ColumnWidth2>746</ColumnWidth2>
<ColumnWidth3>331</ColumnWidth3>
</Find-in-Files>
</Static>
<ColumnWidth0>497</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>746</ColumnWidth2><ColumnWidth3>331</ColumnWidth3></Find-in-Files>
<Select-Ambiguous-Definitions><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Select-Ambiguous-Definitions></Static>
<Windows>
<Wnd0>
<Wnd1>
<Tabs>
<Tab>
<Identity>TabID-31096-4084</Identity>
@ -43,11 +43,11 @@
<Factory>Workspace</Factory>
<Session>
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo/Common Demo Tasks</ExpandedNode></NodeDict></Session>
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Blinky Demo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source/portable</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source/portable/MemMang</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source/portable/MemMang/IAR</ExpandedNode><ExpandedNode>RTOSDemo/Full_Demo</ExpandedNode><ExpandedNode>RTOSDemo/Renesas_cg_src</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<SelectedTab>0</SelectedTab></Wnd1><Wnd3>
<Tabs>
<Tab>
<Identity>TabID-12820-6268</Identity>
@ -67,22 +67,22 @@
<Factory>Find-in-Files</Factory>
<Session/>
</Tab>
</Tabs>
<Tab><Identity>TabID-6803-3328</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab></Tabs>
<SelectedTab>1</SelectedTab></Wnd1></Windows>
<SelectedTab>1</SelectedTab></Wnd3></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>128</YPos2><SelStart2>6721</SelStart2><SelEnd2>6721</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\IntQueueTimer.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>81</YPos2><SelStart2>4886</SelStart2><SelEnd2>4912</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\System\IAR\Interrupt_Entry_Stubs.asm</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>66</YPos2><SelStart2>4185</SelStart2><SelEnd2>4185</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CRx_No_GIC\port.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>245</YPos2><SelStart2>11320</SelStart2><SelEnd2>11320</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\reg_test_IAR.asm</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>123</YPos2><SelStart2>5555</SelStart2><SelEnd2>5555</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\TimerDemo.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>242</YPos2><SelStart2>12612</SelStart2><SelEnd2>12612</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>202</YPos2><SelStart2>11920</SelStart2><SelEnd2>11930</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>67</YPos2><SelStart2>6976</SelStart2><SelEnd2>6976</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>69</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Blinky_Demo\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>69</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CRx_No_GIC\portASM.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>81</YPos2><SelStart2>4099</SelStart2><SelEnd2>4099</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\src\Full_Demo\reg_test_IAR.asm</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>101</YPos2><SelStart2>5250</SelStart2><SelEnd2>5250</SelEnd2></Tab><ActiveTab>4</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-025B83D8><key>iaridepm.enu1</key></Toolbar-025B83D8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>619</Bottom><Right>312</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>186905</sizeVertCX><sizeVertCY>631098</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>321</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>323</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>328252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00BB9AA0><key>iaridepm.enu1</key></Toolbar-00BB9AA0></Sizes></Row0></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>619</Bottom><Right>383</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>229167</sizeVertCX><sizeVertCY>631098</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>321</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>323</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>328252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -1,2 +1,2 @@
[MainWindow]
WindowPlacement=_ 519 0 1619 872 3
WindowPlacement=_ 367 9 1633 963 3

View File

@ -84,24 +84,14 @@
*
* The Queue Send Task:
* The queue send task is implemented by the prvQueueSendTask() function in
* this file. prvQueueSendTask() sits in a loop that causes it to repeatedly
* block for 200 milliseconds, before sending the value 100 to the queue that
* was created within main_blinky(). Once the value is sent, the task loops
* back around to block for another 200 milliseconds...and so on.
* this file. It sends the value 100 to the queue every 200 milliseconds.
*
* The Queue Receive Task:
* The queue receive task is implemented by the prvQueueReceiveTask() function
* in this file. prvQueueReceiveTask() sits in a loop where it repeatedly
* blocks on attempts to read data from the queue that was created within
* main_blinky(). When data is received, the task checks the value of the
* data, and if the value equals the expected 100, toggles an LED. The 'block
* time' parameter passed to the queue receive function specifies that the
* task should be held in the Blocked state indefinitely to wait for data to
* be available on the queue. The queue receive task will only leave the
* Blocked state when the queue send task writes to the queue. As the queue
* send task writes to the queue every 200 milliseconds, the queue receive
* task leaves the Blocked state every 200 milliseconds, and therefore toggles
* the LED every 200 milliseconds.
* in this file. It blocks on the queue to wait for data to arrive from the
* queue send task - toggling the LED each time it receives the value 100. The
* queue send task writes to the queue every 200ms, so the LED should toggle
* every 200ms.
*/
/* Kernel includes. */
@ -119,7 +109,7 @@
/* The rate at which data is sent to the queue. The 200ms value is converted
to ticks using the portTICK_PERIOD_MS constant. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
#define mainQUEUE_SEND_FREQUENCY_MS ( pdMS_TO_TICKS( 200UL ) )
/* The number of items the queue can hold. This is 1 as the receive task
will remove items as they are added, meaning the send task should always find
@ -225,7 +215,7 @@ const unsigned long ulExpectedValue = 100UL;
is it the expected value? If it is, toggle the LED. */
if( ulReceivedValue == ulExpectedValue )
{
LED2 = !LED2;
LED0 = !LED0;
ulReceivedValue = 0U;
}
}

View File

@ -90,7 +90,7 @@
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 1
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 38 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 10 )
#define configUSE_TRACE_FACILITY 1
@ -134,6 +134,12 @@ readable ASCII form. See the notes in the implementation of vTaskList() within
FreeRTOS/Source/tasks.c for limitations. */
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
/* The buffer into which output generated by FreeRTOS+CLI is placed. This must
be at least big enough to contain the output of the task-stats command, as the
example implementation does not include buffer overlow checking. */
#define configCOMMAND_INT_MAX_OUTPUT_SIZE 3500
#define configINCLUDE_QUERY_HEAP_COMMAND 1
/* Cortex-R specific setting: FPU has 16 (rather than 32) d registers. */
#define configFPU_D32 0

View File

@ -81,7 +81,7 @@
*
******************************************************************************
*
* main_full() creates all the demo application tasks and software timers, then
* main_full() creates a set of demo application tasks and software timers, then
* starts the scheduler. The web documentation provides more details of the
* standard demo application tasks, which provide no particular functionality,
* but do provide a good example of how to use the FreeRTOS API.
@ -89,6 +89,12 @@
* In addition to the standard demo tasks, the following tasks and tests are
* defined and/or created within this file:
*
* "FreeRTOS+CLI command console" - The command console uses SCI1 for its
* input and output. The baud rate is set to 19200. Type "help" to see a list
* of registered commands. The FreeRTOS+CLI license is different to the
* FreeRTOS license, see http://www.FreeRTOS.org/cli for license and usage
* details.
*
* "Reg test" tasks - These fill both the core and floating point registers with
* known values, then check that each register maintains its expected value for
* the lifetime of the task. Each task uses a different set of values. The reg
@ -97,15 +103,14 @@
* error in the context switching mechanism.
*
* "Check" task - The check task period is initially set to three seconds. The
* task checks that all the standard demo tasks, and the register check tasks,
* are not only still executing, but are executing without reporting any errors.
* If the check task discovers that a task has either stalled, or reported an
* error, then it changes its own execution period from the initial three
* seconds, to just 200ms. The check task also toggles an LED each time it is
* called. This provides a visual indication of the system status: If the LED
* toggles every three seconds, then no issues have been discovered. If the LED
* toggles every 200ms, then an issue has been discovered with at least one
* task.
* task checks that all the standard demo tasks are not only still executing,
* but are executing without reporting any errors. If the check task discovers
* that a task has either stalled, or reported an error, then it changes its own
* execution period from the initial three seconds, to just 200ms. The check
* task also toggles an LED on each iteration of its loop. This provides a
* visual indication of the system status: If the LED toggles every three
* seconds, then no issues have been discovered. If the LED toggles every
* 200ms, then an issue has been discovered with at least one task.
*/
/* Standard includes. */
@ -147,25 +152,21 @@
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
#define mainCOM_TEST_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
/* The priority used by the UART command console task. */
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
/* A block time of zero simply means "don't block". */
#define mainDONT_BLOCK ( 0UL )
/* The period after which the check timer will expire, in ms, provided no errors
have been reported by any of the standard demo tasks. ms are converted to the
equivalent in ticks using the portTICK_PERIOD_MS constant. */
#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS )
#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
/* The period at which the check timer will expire, in ms, if an error has been
reported in one of the standard demo tasks. ms are converted to the equivalent
in ticks using the portTICK_PERIOD_MS constant. */
#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS )
#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
/* Parameters that are passed into the register check tasks solely for the
purpose of ensuring parameters are passed into tasks correctly. */
@ -212,6 +213,17 @@ extern void vRegTest2Implementation( void );
*/
static void prvPseudoRandomiser( void *pvParameters );
/*
* Register commands that can be used with FreeRTOS+CLI. The commands are
* defined in CLI-Commands.c and File-Related-CLI-Command.c respectively.
*/
extern void vRegisterSampleCLICommands( void );
/*
* The task that manages the FreeRTOS+CLI input and output.
*/
extern void vUARTCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );
/*-----------------------------------------------------------*/
/* The following two variables are used to communicate the status of the
@ -220,9 +232,6 @@ then the register check tasks have not discovered any errors. If a variable
stops incrementing, then an error has been found. */
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
/* String for display in the web server. It is set to an error message if the
check task detects an error. */
const char *pcStatusMessage = "All tasks running without error";
/*-----------------------------------------------------------*/
void main_full( void )
@ -252,6 +261,13 @@ void main_full( void )
/* Create the task that just adds a little random behaviour. */
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL );
/* Start the tasks that implements the command console on the UART, as
described above. */
vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );
/* Register the standard CLI commands. */
vRegisterSampleCLICommands();
/* Create the task that performs the 'check' functionality, as described at
the top of this file. */
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
@ -395,7 +411,7 @@ unsigned long ulErrorFound = pdFALSE;
/* Toggle the check LED to give an indication of the system status. If
the LED toggles every mainNO_ERROR_CHECK_TASK_PERIOD milliseconds then
everything is ok. A faster toggle indicates an error. */
LED2 = !LED2;
LED0 = !LED0;
if( ulErrorFound != pdFALSE )
{
@ -404,7 +420,6 @@ unsigned long ulErrorFound = pdFALSE;
gone wrong (it might just be that the loop back connector required
by the comtest tasks has not been fitted). */
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
pcStatusMessage = "Error found in at least one task.";
}
}
}
@ -458,7 +473,7 @@ static void prvRegTestTaskEntry2( void *pvParameters )
static void prvPseudoRandomiser( void *pvParameters )
{
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = ( 35 / portTICK_PERIOD_MS );
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = pdMS_TO_TICKS( 35 );
volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
/* This task does nothing other than ensure there is a little bit of

View File

@ -119,7 +119,7 @@ vRegTest1Implementation:
vmov d14, r4, r5
vmov d15, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg1_loop:
/* Yield to increase test coverage */
@ -312,7 +312,7 @@ vRegTest2Implementation:
vmov d14, r4, r5
vmov d15, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg2_loop:
/* Check all the VFP registers still contain the values set above.

View File

@ -118,7 +118,7 @@ vRegTest1Implementation:
vmov d14, r4, r5
vmov d15, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg1_loop:
/* Yield to increase test coverage */
@ -310,7 +310,7 @@ vRegTest2Implementation:
vmov d14, r4, r5
vmov d15, r6, r7
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
reg2_loop:
/* Check all the VFP registers still contain the values set above.

View File

@ -58,6 +58,9 @@ volatile uint32_t g_time_us_count;
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
#ifdef __ICCARM__
__arm __irq
#endif
void r_cmt_cmi4_interrupt(void)
{
/* Clear the interrupt source CMI4 */
@ -79,6 +82,9 @@ void r_cmt_cmi4_interrupt(void)
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
#ifdef __ICCARM__
__arm __irq
#endif
void r_cmt_cmi5_interrupt(void)
{
/* Clear the interrupt source CMI5 */

View File

@ -58,6 +58,24 @@ Global functions
/* RSPI1 SPII1 */
__irq __arm void r_rspi1_idle_interrupt(void);
/* SCIFA TXIF2 */
__irq __arm void r_scifa2_txif2_interrupt_entry(void);
/* SCIFA DRIF2 */
__irq __arm void r_scifa2_drif2_interrupt_entry(void);
/* SCIFA RXIF2 */
__irq __arm void r_scifa2_rxif2_interrupt_entry(void);
/* SCIFA BRIF2 */
__irq __arm void r_scifa2_brif2_interrupt_entry(void);
/* CMT CMI4 */
__irq __arm void r_cmt_cmi4_interrupt(void);
/* CMT CMI5 */
__irq __arm void r_cmt_cmi5_interrupt(void);
#endif /* __ICCARM__ */
#ifdef __GNUC__
@ -74,6 +92,24 @@ Global functions
/* RSPI1 SPII1 */
void r_rspi1_idle_interrupt(void) __attribute__((interrupt ("IRQ")));
/* SCIFA TXIF2 */
void r_scifa2_txif2_interrupt_entry(void) __attribute__((interrupt ("IRQ")));
/* SCIFA DRIF2 */
void r_scifa2_drif2_interrupt_entry(void) __attribute__((interrupt ("IRQ")));
/* SCIFA RXIF2 */
void r_scifa2_rxif2_interrupt_entry(void) __attribute__((interrupt ("IRQ")));
/* SCIFA BRIF2 */
void r_scifa2_brif2_interrupt_entry(void) __attribute__((interrupt ("IRQ")));
/* CMT CMI4 */
void r_cmt_cmi4_interrupt(void) __attribute__((interrupt ("IRQ")));
/* CMT CMI5 */
void r_cmt_cmi5_interrupt(void) __attribute__((interrupt ("IRQ")));
#endif /* __GNUC__ */
#endif

View File

@ -0,0 +1,272 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_scifa.c
* Version : Code Generator for RZ/T1 V1.00.00.09 [02 Mar 2015]
* Device(s) : R7S910018CBG
* Tool-Chain : GCCARM
* Description : This file implements device driver for SCIF module.
* Creation Date: 19/04/2015
***********************************************************************************************************************/
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_scifa.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
const uint8_t * gp_scifa2_tx_address; /* SCIFA2 transmit buffer address */
uint16_t g_scifa2_tx_count; /* SCIFA2 transmit data number */
uint8_t * gp_scifa2_rx_address; /* SCIFA2 receive buffer address */
uint16_t g_scifa2_rx_count; /* SCIFA2 receive data number */
uint16_t g_scifa2_rx_length; /* SCIFA2 receive data length */
/* Start user code for global. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: R_SCIFA2_Create
* Description : This function initializes SCIFA2.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_SCIFA2_Create(void)
{
volatile uint16_t dummy;
uint16_t w_count;
/* Cancel SCIFA2 module stop state */
MSTP(SCIFA2) = 0U;
/* Disable TXIF2 interrupt */
VIC.IEC3.LONG = 0x00008000UL;
/* Disable RXIF2 interrupt */
VIC.IEC3.LONG = 0x00004000UL;
/* Disable BRIF2 interrupt */
VIC.IEC3.LONG = 0x00002000UL;
/* Disable DRIF2 interrupt */
VIC.IEC3.LONG = 0x00010000UL;
/* Clear transmit/receive enable bits */
SCIFA2.SCR.BIT.TE = 0U;
SCIFA2.SCR.BIT.RE = 0U;
/* Reset transmit/receive FIFO data register operation */
SCIFA2.FCR.BIT.TFRST = 1U;
SCIFA2.FCR.BIT.RFRST = 1U;
/* Read and clear status flags */
dummy = SCIFA2.FSR.WORD;
/* Remove compiler warnings. */
( void ) dummy;
SCIFA2.FSR.WORD = 0x00U;
dummy = (uint16_t) SCIFA2.LSR.BIT.ORER;
/* Remove compiler warnings. */
( void ) dummy;
SCIFA2.LSR.BIT.ORER = 0U;
/* Set clock enable bits */
SCIFA2.SCR.WORD = _SCIF_INTERNAL_SCK_UNUSED;
/* Set transmission/reception format */
SCIFA2.SMR.WORD = _SCIF_CLOCK_SERICLK_4 | _SCIF_STOP_1 | _SCIF_PARITY_DISABLE | _SCIF_DATA_LENGTH_8 |
_SCIF_ASYNCHRONOUS_MODE;
SCIFA2.SEMR.BYTE = _SCIF_16_BASE_CLOCK | _SCIF_NOISE_FILTER_ENABLE | _SCIF_DATA_TRANSFER_LSB_FIRST |
_SCIF_BAUDRATE_SINGLE;
/* Clear modulation duty register select */
SCIFA2.SEMR.BIT.MDDRS = 0U;
/* Set bit rate */
SCIFA2.BRR_MDDR.BRR = 0x3CU;
/* Wait for at least 1-bit interval */
for (w_count = 0U; w_count < _SCIF_1BIT_INTERVAL_2; w_count++)
{
nop();
}
/* Set FIFO trigger conditions */
SCIFA2.FTCR.WORD = _SCIF_TX_FIFO_TRIGGER_NUM_0 | _SCIF_TX_TRIGGER_TFTC_VALID | _SCIF_RX_FIFO_TRIGGER_NUM_1 |
_SCIF_RX_TRIGGER_RFTC_VALID;
SCIFA2.FCR.WORD = _SCIF_LOOPBACK_DISABLE | _SCIF_MODEM_CONTROL_DISABLE;
/* Disable transmit/receive FIFO data register reset operation */
SCIFA2.FCR.BIT.TFRST = 0U;
SCIFA2.FCR.BIT.RFRST = 0U;
/* Set TXIF2 interrupt priority */
VIC.PRL111.LONG = _SCIF_PRIORITY_LEVEL2;
/* Set TXIF2 interrupt address */
VIC.VAD111.LONG = (uint32_t)r_scifa2_txif2_interrupt_entry;
/* Set RXIF2 interrupt priority */
VIC.PRL110.LONG = _SCIF_PRIORITY_LEVEL3;
/* Set RXIF2 interrupt address */
VIC.VAD110.LONG = (uint32_t)r_scifa2_rxif2_interrupt_entry;
/* Set BRIF2 interrupt priority */
VIC.PRL109.LONG = _SCIF_PRIORITY_LEVEL5;
/* Set BRIF2 interrupt address */
VIC.VAD109.LONG = (uint32_t)r_scifa2_brif2_interrupt_entry;
/* Set DRIF2 interrupt priority */
VIC.PRL112.LONG = _SCIF_PRIORITY_LEVEL4;
/* Set DRIF2 interrupt address */
VIC.VAD112.LONG = (uint32_t)r_scifa2_drif2_interrupt_entry;
}
/***********************************************************************************************************************
* Function Name: R_SCIFA2_Start
* Description : This function starts SCIFA2.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_SCIFA2_Start(void)
{
/* Enable TXIF2 interrupt */
VIC.IEN3.LONG |= 0x00008000UL;
/* Enable RXIF2 interrupt */
VIC.IEN3.LONG |= 0x00004000UL;
/* Enable BRIF2 interrupt */
VIC.IEN3.LONG |= 0x00002000UL;
/* Enable DRIF2 interrupt */
VIC.IEN3.LONG |= 0x00010000UL;
}
/***********************************************************************************************************************
* Function Name: R_SCIFA2_Stop
* Description : This function stops SCIFA2.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void R_SCIFA2_Stop(void)
{
/* Disable serial transmit */
SCIFA2.SCR.BIT.TE = 0U;
/* Disable serial receive */
SCIFA2.SCR.BIT.RE = 0U;
/* Disable TXI interrupt */
SCIFA2.SCR.BIT.TIE = 0U;
/* Disable RXI and ERI interrupt */
SCIFA2.SCR.BIT.RIE = 0U;
/* Disable TXIF2 interrupt */
VIC.IEC3.LONG = 0x00008000UL;
/* Disable RXIF2 interrupt */
VIC.IEC3.LONG = 0x00004000UL;
/* Disable BRIF2 interrupt */
VIC.IEC3.LONG = 0x00002000UL;
/* Disable DRIF2 interrupt */
VIC.IEC3.LONG = 0x00010000UL;
}
/***********************************************************************************************************************
* Function Name: R_SCIFA2_Serial_Receive
* Description : This function receives SCIFA2 data.
* Arguments : rx_buf -
* receive buffer pointer (Not used when receive data handled by DMAC)
* rx_num -
* buffer size (Not used when receive data handled by DMAC)
* Return Value : status -
* MD_OK or MD_ARGERROR
***********************************************************************************************************************/
MD_STATUS R_SCIFA2_Serial_Receive(uint8_t * rx_buf, uint16_t rx_num)
{
MD_STATUS status = MD_OK;
if (rx_num < 1U)
{
status = MD_ARGERROR;
}
else
{
g_scifa2_rx_count = 0U;
g_scifa2_rx_length = rx_num;
gp_scifa2_rx_address = rx_buf;
SCIFA2.FTCR.BIT.RFTC = _SCIF_RX_TRIG_NUM_2;
SCIFA2.SCR.BIT.RE = 1U;
SCIFA2.SCR.BIT.RIE = 1U;
SCIFA2.SCR.BIT.REIE = 1U;
}
return (status);
}
/***********************************************************************************************************************
* Function Name: R_SCIFA2_Serial_Send
* Description : This function transmits SCIFA2 data.
* Arguments : tx_buf -
* transfer buffer pointer (Not used when transmit data handled by DMAC)
* tx_num -
* buffer size (Not used when transmit data handled by DMAC)
* Return Value : status -
* MD_OK or MD_ARGERROR
***********************************************************************************************************************/
MD_STATUS R_SCIFA2_Serial_Send(const uint8_t * tx_buf, uint16_t tx_num)
{
MD_STATUS status = MD_OK;
if (tx_num < 1U)
{
status = MD_ARGERROR;
}
else
{
gp_scifa2_tx_address = tx_buf;
g_scifa2_tx_count = tx_num;
SCIFA2.SCR.BIT.TE = 1U;
SCIFA2.SCR.BIT.TIE = 1U;
}
return (status);
}
/* Start user code for adding. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

View File

@ -0,0 +1,275 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_scifa.h
* Version : Code Generator for RZ/T1 V1.00.00.09 [02 Mar 2015]
* Device(s) : R7S910018CBG
* Tool-Chain : GCCARM
* Description : This file implements device driver for SCIF module.
* Creation Date: 19/04/2015
***********************************************************************************************************************/
#ifndef SCIF_H
#define SCIF_H
/***********************************************************************************************************************
Macro definitions (Register bit)
***********************************************************************************************************************/
/*
Serial mode register (SMR)
*/
/* Clock select (CKS[1:0]) */
#define _SCIF_CLOCK_SERICLK (0x0000U) /* SERICLK */
#define _SCIF_CLOCK_SERICLK_4 (0x0001U) /* SERICLK/4 */
#define _SCIF_CLOCK_SERICLK_16 (0x0002U) /* SERICLK/16 */
#define _SCIF_CLOCK_SERICLK_64 (0x0003U) /* SERICLK/64 */
/* Stop bit length (STOP) */
#define _SCIF_STOP_1 (0x0000U) /* 1 stop bit */
#define _SCIF_STOP_2 (0x0008U) /* 2 stop bits */
/* Parity mode (PM) */
#define _SCIF_PARITY_EVEN (0x0000U) /* Parity even */
#define _SCIF_PARITY_ODD (0x0010U) /* Parity odd */
/* Parity enable (PE) */
#define _SCIF_PARITY_DISABLE (0x0000U) /* Parity disable */
#define _SCIF_PARITY_ENABLE (0x0020U) /* Parity enable */
/* Character length (CHR) */
#define _SCIF_DATA_LENGTH_8 (0x0000U) /* Data length 8 bits */
#define _SCIF_DATA_LENGTH_7 (0x0040U) /* Data length 7 bits */
/* Communications mode (CM) */
#define _SCIF_ASYNCHRONOUS_MODE (0x0000U) /* Asynchronous mode */
#define _SCIF_CLOCK_SYNCHRONOUS_MODE (0x0080U) /* Clock synchronous mode */
/*
Serial control register (SCR)
*/
/* Clock enable (CKE) */
#define _SCIF_INTERNAL_SCK_UNUSED (0x0000U) /* Internal clock selected, SCK pin unused */
#define _SCIF_INTERNAL_SCK_OUTPUT (0x0001U) /* Internal clock selected, SCK pin as clock output */
/* Clock enable (CKE) for clock synchronous mode */
#define _SCIF_INTERNAL_SCK_OUTPUT_SYNC (0x0000U) /* Internal clock, SCK pin is used for clock output */
#define _SCIF_EXTERNAL_SCK_INPUT_SYNC (0x0002U) /* External clock, SCK pin is used for clock input */
/* Transmit end interrupt enable (TEIE) */
#define _SCIF_TEI_INTERRUPT_DISABLE (0x0000U) /* TEI interrupt request disable */
#define _SCIF_TEI_INTERRUPT_ENABLE (0x0004U) /* TEI interrupt request enable */
/* Receive error interrupt enable (REIE) */
#define _SCIF_ERI_BRI_INTERRUPT_DISABLE (0x0000U) /* Disable receive-error interrupt and break interrupt */
#define _SCIF_ERI_BRI_INTERRUPT_ENABLE (0x0008U) /* Enable receive-error interrupt and break interrupt */
/* Receive enable (RE) */
#define _SCIF_RECEIVE_DISABLE (0x0000U) /* Disable receive mode */
#define _SCIF_RECEIVE_ENABLE (0x0010U) /* Enable receive mode */
/* Transmit enable (TE) */
#define _SCIF_TRANSMIT_DISABLE (0x0000U) /* Disable transmit mode */
#define _SCIF_TRANSMIT_ENABLE (0x0020U) /* Enable transmit mode */
/* Receive interrupt enable (RIE) */
#define _SCIF_RXI_ERI_DISABLE (0x0000U) /* Disable RXI and ERI interrupt requests */
#define _SCIF_RXI_ERI_ENABLE (0x0040U) /* Enable RXI and ERI interrupt requests */
/* Transmit interrupt enable (TIE) */
#define _SCIF_TXI_DISABLE (0x0000U) /* Disable TXI interrupt requests */
#define _SCIF_TXI_ENABLE (0x0080U) /* Enable TXI interrupt requests */
/*
FIFO control register (FCR)
*/
/* Loop-Back test (LOOP) */
#define _SCIF_LOOPBACK_DISABLE (0x0000U) /* Loop back test is disabled */
#define _SCIF_LOOPBACK_ENABLE (0x0001U) /* Loop back test is enabled */
/* Receive FIFO Data Register Reset (RFRST) */
#define _SCIF_RX_FIFO_RESET_DISABLE (0x0000U) /* FRDR reset operation is disabled */
#define _SCIF_RX_FIFO_RESET_ENABLE (0x0002U) /* FRDR reset operation is enabled */
/* Transmit FIFO Data Register Reset (TFRST) */
#define _SCIF_TX_FIFO_RESET_DISABLE (0x0000U) /* FTDR reset operation is disabled */
#define _SCIF_TX_FIFO_RESET_ENABLE (0x0004U) /* FTDR reset operation is enabled */
/* Modem control enable (MCE) */
#define _SCIF_MODEM_CONTROL_DISABLE (0x0000U) /* Model signal is disabled */
#define _SCIF_MODEM_CONTROL_ENABLE (0x0008U) /* Model signal is enabled */
/* Transmit FIFO Data Trigger Number (TTRG[1:0]) */
#define _SCIF_TX_TRIGGER_NUMBER_8 (0x0000U) /* 8 (or 8 when TDFE flag is 1) */
#define _SCIF_TX_TRIGGER_NUMBER_4 (0x0010U) /* 4 (or 12 when TDFE flag is 1) */
#define _SCIF_TX_TRIGGER_NUMBER_2 (0x0020U) /* 2 (or 14 when TDFE flag is 1) */
#define _SCIF_TX_TRIGGER_NUMBER_0 (0x0030U) /* 0 (or 16 when TDFE flag is 1) */
/* Receive FIFO Data Trigger Number (RTRG[1:0]) */
#define _SCIF_RX_TRIGGER_NUMBER_1 (0x0000U) /* 1 */
#define _SCIF_RX_TRIGGER_NUMBER_4 (0x0040U) /* 4 (for asynchronous mode) */
#define _SCIF_RX_TRIGGER_NUMBER_2 (0x0040U) /* 2 (for clock synchronous mode */
#define _SCIF_RX_TRIGGER_NUMBER_8 (0x0080U) /* 8 */
#define _SCIF_RX_TRIGGER_NUMBER_14 (0x00C0U) /* 14 */
/* RTS# Output Active Trigger Number Select (RSTRG[2:0]) */
#define _SCIF_RTS_TRIGGER_NUMBER_15 (0x0000U) /* 15 */
#define _SCIF_RTS_TRIGGER_NUMBER_1 (0x0100U) /* 1 */
#define _SCIF_RTS_TRIGGER_NUMBER_4 (0x0200U) /* 4 */
#define _SCIF_RTS_TRIGGER_NUMBER_6 (0x0300U) /* 6 */
#define _SCIF_RTS_TRIGGER_NUMBER_8 (0x0400U) /* 8 */
#define _SCIF_RTS_TRIGGER_NUMBER_10 (0x0500U) /* 10 */
#define _SCIF_RTS_TRIGGER_NUMBER_12 (0x0600U) /* 12 */
#define _SCIF_RTS_TRIGGER_NUMBER_14 (0x0700U) /* 14 */
/*
Serial port register (SPTR)
*/
/* Serial Port Break Data (SPB2DT) */
#define _SCIF_SERIAL_BREAK_DATA_LOW (0x0000U) /* Input/output data is at low */
#define _SCIF_SERIAL_BREAK_DATA_HIGH (0x0001U) /* Input/output data is at high */
/* Serial Port Break input/output (SPB2IO) */
#define _SCIF_SERIAL_BREAK_TXD_NO_OUTPUT (0x0000U) /* SPB2DT bit value is not output to TXD pin */
#define _SCIF_SERIAL_BREAK_TXD_OUTPUT (0x0002U) /* SPB2DT bit value is output to TXD pin */
/* SCK Port Data (SCKDT) */
#define _SCIF_SCK_DATA_LOW (0x0000U) /* Input/output data is at low */
#define _SCIF_SCK_DATA_HIGH (0x0004U) /* Input/output data is at high */
/* SCK Port input/output (SCKIO) */
#define _SCIF_SCK_PORT_NO_OUTPUT (0x0000U) /* SCKDT bit value is not output to SCK pin */
#define _SCIF_SCK_PORT_OUTPUT (0x0008U) /* SCKDT bit value is output to SCK pin */
/* CTS# Port Data Select (CTS2DT) */
#define _SCIF_CTS_DATA_0 (0x0000U) /* Set b4 to 0. Controls CTS# pin with MCE, CTS2IO bit */
#define _SCIF_CTS_DATA_1 (0x0010U) /* Set b4 to 1. Controls CTS# pin with MCE, CTS2IO bit */
/* CTS# Port Output Specify (CTS2IO) */
#define _SCIF_CTS_OUTPUT_0 (0x0000U) /* Set b5 to 0. Controls CTS# pin with MCE, CTS2IO bit */
#define _SCIF_CTS_OUTPUT_1 (0x0020U) /* Set b5 to 1. Controls CTS# pin with MCE, CTS2IO bit */
/* RTS# Port Data Select (RTS2DT) */
#define _SCIF_RTS_DATA_0 (0x0000U) /* Set b6 to 0. Controls RTS# pin with MCE, RTS2IO bit */
#define _SCIF_RTS_DATA_1 (0x0040U) /* Set b6 to 1. Controls RTS# pin with MCE, RTS2IO bit */
/* RTS# Port Output Specify (RTS2IO) */
#define _SCIF_RTS_OUTPUT_0 (0x0000U) /* Set b7 to 0. Controls RTS# pin with MCE, RTS2IO bit */
#define _SCIF_RTS_OUTPUT_1 (0x0080U) /* Set b7 to 1. Controls RTS# pin with MCE, RTS2IO bit */
/*
FIFO Trigger Control Register (FTCR)
*/
/* Transmit FIFO Data Trigger Number (TFTC[4:0]) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_0 (0x0000U) /* 0 (no transmit data trigger) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_1 (0x0001U) /* 1 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_2 (0x0002U) /* 2 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_3 (0x0003U) /* 3 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_4 (0x0004U) /* 4 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_5 (0x0005U) /* 5 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_6 (0x0006U) /* 6 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_7 (0x0007U) /* 7 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_8 (0x0008U) /* 8 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_9 (0x0009U) /* 9 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_10 (0x000AU) /* 10 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_11 (0x000BU) /* 11 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_12 (0x000CU) /* 12 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_13 (0x000DU) /* 13 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_14 (0x000EU) /* 14 (transmit data triggers) */
#define _SCIF_TX_FIFO_TRIGGER_NUM_15 (0x000FU) /* 15 (transmit data triggers) */
/* Transmit Trigger Select (TTRGS) */
#define _SCIF_TX_TRIGGER_TTRG_VALID (0x0000U) /* TTRG[1:0] bits in FCR are valid */
#define _SCIF_TX_TRIGGER_TFTC_VALID (0x0080U) /* TFTC[4:0] bits in FTCR are valid */
/* Receive FIFO Data Trigger Number (RFTC[4:0]) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_1 (0x0100U) /* 1 (no receive data trigger) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_2 (0x0200U) /* 2 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_3 (0x0300U) /* 3 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_4 (0x0400U) /* 4 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_5 (0x0500U) /* 5 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_6 (0x0600U) /* 6 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_7 (0x0700U) /* 7 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_8 (0x0800U) /* 8 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_9 (0x0900U) /* 9 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_10 (0x0A00U) /* 10 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_11 (0x0B00U) /* 11 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_12 (0x0C00U) /* 12 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_13 (0x0D00U) /* 13 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_14 (0x0E00U) /* 14 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_15 (0x0F00U) /* 15 (receive data triggers) */
#define _SCIF_RX_FIFO_TRIGGER_NUM_16 (0x1000U) /* 16 (receive data triggers) */
/* Transmit Trigger Select (RTRGS) */
#define _SCIF_RX_TRIGGER_RTRG_VALID (0x0000U) /* RTRG[1:0] bits in FCR are valid */
#define _SCIF_RX_TRIGGER_RFTC_VALID (0x8000U) /* RFTC[4:0] bits in FTCR are valid */
/*
Serial extended mode register (SEMR)
*/
/* Asynchronous base clock select (ABCS0) */
#define _SCIF_16_BASE_CLOCK (0x00U) /* Selects 16 base clock cycles for 1 bit period */
#define _SCIF_8_BASE_CLOCK (0x01U) /* Selects 8 base clock cycles for 1 bit period */
/* Noise Cancellation Enable (NFEN) */
#define _SCIF_NOISE_FILTER_DISABLE (0x00U) /* Noise cancellation for the RxD pin input is disabled */
#define _SCIF_NOISE_FILTER_ENABLE (0x04U) /* Noise cancellation for the RxD pin input is enabled */
/* Data Transfer Direction Select (DIR) */
#define _SCIF_DATA_TRANSFER_LSB_FIRST (0x00U) /* Transmits the data in FTDR by the LSB-first method */
#define _SCIF_DATA_TRANSFER_MSB_FIRST (0x08U) /* Transmits the data in FTDR by the MSB-first method */
/* Modulation Duty Register Select (MDDRS) */
#define _SCIF_BRR_USED (0x00U) /* BRR register can be accessed */
#define _SCIF_MDDR_USED (0x10U) /* MDDR register can be accessed. */
/* Bit Rate Modulation Enable (BRME) */
#define _SCIF_BIT_RATE_MODULATION_DISABLE (0x00U) /* Bit rate modulation function is disabled */
#define _SCIF_BIT_RATE_MODULATION_ENABLE (0x20U) /* Bit rate modulation function is enabled */
/* Baud Rate Generator Double-Speed Mode Select (BGDM) */
#define _SCIF_BAUDRATE_SINGLE (0x00U) /* Baud rate generator outputs normal frequency */
#define _SCIF_BAUDRATE_DOUBLE (0x80U) /* Baud rate generator doubles output frequency */
/*
Interrupt Source Priority Register n (PRLn)
*/
/* Interrupt Priority Level Select (PRL[3:0]) */
#define _SCIF_PRIORITY_LEVEL0 (0x00000000UL) /* Level 0 (highest) */
#define _SCIF_PRIORITY_LEVEL1 (0x00000001UL) /* Level 1 */
#define _SCIF_PRIORITY_LEVEL2 (0x00000002UL) /* Level 2 */
#define _SCIF_PRIORITY_LEVEL3 (0x00000003UL) /* Level 3 */
#define _SCIF_PRIORITY_LEVEL4 (0x00000004UL) /* Level 4 */
#define _SCIF_PRIORITY_LEVEL5 (0x00000005UL) /* Level 5 */
#define _SCIF_PRIORITY_LEVEL6 (0x00000006UL) /* Level 6 */
#define _SCIF_PRIORITY_LEVEL7 (0x00000007UL) /* Level 7 */
#define _SCIF_PRIORITY_LEVEL8 (0x00000008UL) /* Level 8 */
#define _SCIF_PRIORITY_LEVEL9 (0x00000009UL) /* Level 9 */
#define _SCIF_PRIORITY_LEVEL10 (0x0000000AUL) /* Level 10 */
#define _SCIF_PRIORITY_LEVEL11 (0x0000000BUL) /* Level 11 */
#define _SCIF_PRIORITY_LEVEL12 (0x0000000CUL) /* Level 12 */
#define _SCIF_PRIORITY_LEVEL13 (0x0000000DUL) /* Level 13 */
#define _SCIF_PRIORITY_LEVEL14 (0x0000000EUL) /* Level 14 */
#define _SCIF_PRIORITY_LEVEL15 (0x0000000FUL) /* Level 15 */
/* FIFO buffer maximum size */
#define _SCIF_FIFO_MAX_SIZE (0x10U) /* Size of 16-stage FIFO buffer */
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#define _SCIF_1BIT_INTERVAL_2 (0x0619U) /* Wait time for 1-bit interval */
#define _SCIF_RX_TRIG_NUM_2 (0x01U) /* Receive FIFO data trigger number */
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
typedef enum
{
OVERRUN_ERROR,
BREAK_DETECT,
RECEIVE_ERROR
} scif_error_type_t;
/***********************************************************************************************************************
Global functions
***********************************************************************************************************************/
void R_SCIFA2_Create(void);
void R_SCIFA2_Start(void);
void R_SCIFA2_Stop(void);
MD_STATUS R_SCIFA2_Serial_Send(const uint8_t * tx_buf, uint16_t tx_num);
MD_STATUS R_SCIFA2_Serial_Receive(uint8_t * rx_buf, uint16_t rx_num);
void r_scifa2_callback_transmitend(void);
void r_scifa2_callback_receiveend(void);
void r_scifa2_callback_error(scif_error_type_t error_type);
/* Start user code for function. Do not edit comment generated here */
/* Declared volatile to prevent it being optimised out in Release build mode */
extern volatile uint8_t g_uart_in;
/* End user code. Do not edit comment generated here */
#endif

View File

@ -0,0 +1,497 @@
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : r_cg_scifa_user.c
* Version : Code Generator for RZ/T1 V1.00.00.09 [02 Mar 2015]
* Device(s) : R7S910018CBG
* Tool-Chain : GCCARM
* Description : This file implements device driver for SCIF module.
* Creation Date: 19/04/2015
***********************************************************************************************************************/
/***********************************************************************************************************************
Pragma directive
***********************************************************************************************************************/
/* Start user code for pragma. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
Includes
***********************************************************************************************************************/
#include "r_cg_macrodriver.h"
#include "r_cg_scifa.h"
/* Start user code for include. Do not edit comment generated here */
#include "r_typedefs.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "serial.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
/***********************************************************************************************************************
Global variables and functions
***********************************************************************************************************************/
extern const uint8_t * gp_scifa2_tx_address; /* SCIFA2 send buffer address */
extern uint16_t g_scifa2_tx_count; /* SCIFA2 send data number */
extern uint8_t * gp_scifa2_rx_address; /* SCIFA2 receive buffer address */
extern uint16_t g_scifa2_rx_count; /* SCIFA2 receive data number */
extern uint16_t g_scifa2_rx_length; /* SCIFA2 receive data length */
/* Start user code for global. Do not edit comment generated here */
/* Characters received from the UART are stored in this queue, ready to be
received by the application. ***NOTE*** Using a queue in this way is very
convenient, but also very inefficient. It can be used here because characters
will only arrive slowly. In a higher bandwidth system a circular RAM buffer or
DMA should be used in place of this queue. */
static QueueHandle_t xRxQueue = NULL;
/* When a task calls vSerialPutString() its handle is stored in xSendingTask,
before being placed into the Blocked state (so does not use any CPU time) to
wait for the transmission to end. The task handle is then used from the UART
transmit end interrupt to remove the task from the Blocked state. */
static TaskHandle_t xSendingTask = NULL;
/*
* Entry point for the handlers. These set the pxISRFunction variable to point
* to the C handler for each timer, then branch to the FreeRTOS IRQ handler.
*/
#ifdef __GNUC__
void r_scifa2_txif2_interrupt_entry( void ) __attribute__((naked));
void r_scifa2_rxif2_interrupt_entry( void ) __attribute__((naked));
void r_scifa2_drif2_interrupt_entry( void ) __attribute__((naked));
void r_scifa2_brif2_interrupt_entry( void ) __attribute__((naked));
#endif /* __GNUC__ */
#ifdef __ICCARM__
/* IAR requires the entry point to be in an assembly file. The functions
are implemented in $PROJ_DIR$/System/IAR/Interrupt_Entry_Stubs.asm. */
extern void r_scifa2_txif2_interrupt_entry( void );
extern void r_scifa2_rxif2_interrupt_entry( void );
extern void r_scifa2_drif2_interrupt_entry( void );
extern void r_scifa2_brif2_interrupt_entry( void );
#endif /* __ICCARM__ */
/* End user code. Do not edit comment generated here */
/***********************************************************************************************************************
* Function Name: r_scifa2_txif2_interrupt
* Description : This function is TXIF2 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_txif2_interrupt(void)
{
uint16_t count = 0;
/* Get the amount of untransmitted data stored in the FRDR register */
uint16_t dummy_fdr = SCIFA2.FDR.BIT.T;
/* Write data to the transmit FIFO data register */
while ((g_scifa2_tx_count > 0U) && (count < _SCIF_FIFO_MAX_SIZE - dummy_fdr))
{
SCIFA2.FTDR = *gp_scifa2_tx_address;
gp_scifa2_tx_address++;
g_scifa2_tx_count--;
count++;
}
if (SCIFA2.FSR.BIT.TDFE == 1U)
{
SCIFA2.FSR.BIT.TDFE = 0U;
}
if (g_scifa2_tx_count <= 0U)
{
SCIFA2.SCR.BIT.TIE = 0U;
SCIFA2.SCR.BIT.TEIE = 1U;
}
/* Wait the interrupt signal is disabled */
while (0U != (VIC.IRQS3.LONG & 0x00008000UL))
{
VIC.IEC3.LONG = 0x00008000UL;
}
VIC.IEN3.LONG |= 0x00008000UL;
/* Dummy write */
VIC.HVA0.LONG = 0x00000000UL;
}
/***********************************************************************************************************************
* Function Name: r_scifa2_rxif2_interrupt
* Description : This function is RXIF2 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_rxif2_interrupt(void)
{
uint16_t count = 0;
/* Get the amount of receive data stored in FRDR register */
uint16_t dummy_fdr = SCIFA2.FDR.BIT.R;
/* Read data from the receive FIFO data register */
while ((g_scifa2_rx_length > g_scifa2_rx_count) && (count < dummy_fdr))
{
*gp_scifa2_rx_address = SCIFA2.FRDR;
gp_scifa2_rx_address++;
g_scifa2_rx_count++;
count++;
}
/* If remaining data is less than the receive trigger number, receive interrupt will not occur.
In this case, set trigger number to 1 to force receive interrupt for each one byte of data in FRDR */
if ((g_scifa2_rx_length - g_scifa2_rx_count < _SCIF_RX_TRIG_NUM_2) && (SCIFA2.FTCR.BIT.RFTC != 1U))
{
SCIFA2.FTCR.BIT.RFTC = 1U;
}
/* Clear receive FIFO data full flag */
if (SCIFA2.FSR.BIT.RDF == 1U)
{
SCIFA2.FSR.BIT.RDF = 0U;
}
if (g_scifa2_rx_length <= g_scifa2_rx_count)
{
/* All data received */
SCIFA2.SCR.BIT.RE = 0U;
r_scifa2_callback_receiveend();
}
/* Wait the interrupt signal is disabled */
while (0U != (VIC.IRQS3.LONG & 0x00004000UL))
{
VIC.IEC3.LONG = 0x00004000UL;
}
VIC.IEN3.LONG |= 0x00004000UL;
/* Dummy write */
VIC.HVA0.LONG = 0x00000000UL;
}
/***********************************************************************************************************************
* Function Name: r_scifa2_drif2_interrupt
* Description : This function is TEIF 2 or DRIF2 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_drif2_interrupt(void)
{
if (1U == SCIFA2.FSR.BIT.TEND)
{
SCIFA2.SPTR.BIT.SPB2DT = 0U;
SCIFA2.SPTR.BIT.SPB2IO = 1U;
SCIFA2.SCR.BIT.TE = 0U;
SCIFA2.SCR.BIT.TEIE = 0U;
}
r_scifa2_callback_transmitend();
/* Clear data ready detect flag */
if (1U == SCIFA2.FSR.BIT.DR)
{
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
SCIFA2.FSR.BIT.DR = 0U;
}
/* Wait the interrupt signal is disabled */
while (0U != (VIC.IRQS3.LONG & 0x00010000UL))
{
VIC.IEC3.LONG = 0x00010000UL;
}
VIC.IEN3.LONG |= 0x00010000UL;
/* Dummy write */
VIC.HVA0.LONG = 0x00000000UL;
}
/***********************************************************************************************************************
* Function Name: r_scifa2_brif2_interrupt
* Description : This function is BRIF2 or ERIF2 interrupt service routine.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_brif2_interrupt(void)
{
if (1U == SCIFA2.FSR.BIT.BRK)
{
r_scifa2_callback_error(BREAK_DETECT);
/* Clear break detect flag */
SCIFA2.FSR.BIT.BRK = 0U;
}
if (1U == SCIFA2.FSR.BIT.ER)
{
r_scifa2_callback_error(RECEIVE_ERROR);
/* Clear receive error flag */
SCIFA2.FSR.BIT.ER = 0U;
}
if (1U == SCIFA2.LSR.BIT.ORER)
{
r_scifa2_callback_error(OVERRUN_ERROR);
/* Clear overrun error flag */
SCIFA2.LSR.BIT.ORER = 0U;
}
/* Wait the interrupt signal is disabled */
while (0U != (VIC.IRQS3.LONG & 0x00002000UL))
{
VIC.IEC3.LONG = 0x00002000UL;
}
VIC.IEN3.LONG |= 0x00002000UL;
/* Dummy write */
VIC.HVA0.LONG = 0x00000000UL;
}
/***********************************************************************************************************************
* Function Name: r_scifa2_callback_transmitend
* Description : This function is a callback function when SCIFA2 finishes transmission.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_callback_transmitend(void)
{
/* Start user code. Do not edit comment generated here */
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if( xSendingTask != NULL )
{
/* A task is waiting for the end of the Tx, unblock it now.
http://www.freertos.org/vTaskNotifyGiveFromISR.html */
vTaskNotifyGiveFromISR( xSendingTask, &xHigherPriorityTaskWoken );
xSendingTask = NULL;
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: r_scifa2_callback_receiveend
* Description : This function is a callback function when SCIFA2 finishes reception.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_callback_receiveend(void)
{
/* Start user code. Do not edit comment generated here */
uint8_t ucRxedChar = 0;
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
/* Read the received data */
ucRxedChar = SCIFA2.FRDR;
/* Characters received from the UART are stored in this queue, ready to be
received by the application. ***NOTE*** Using a queue in this way is very
convenient, but also very inefficient. It can be used here because
characters will only arrive slowly. In a higher bandwidth system a circular
RAM buffer or DMA should be used in place of this queue. */
xQueueSendFromISR( xRxQueue, ( void * ) &ucRxedChar, &xHigherPriorityTaskWoken );
/* Re-enable receptions */
SCIFA2.SCR.BIT.RE = 1U;
/* End user code. Do not edit comment generated here */
}
/***********************************************************************************************************************
* Function Name: r_scifa2_callback_error
* Description : This function is a callback function when SCIFA2 reception encounters error.
* Arguments : error_type -
* reception error type
* Return Value : None
***********************************************************************************************************************/
void r_scifa2_callback_error(scif_error_type_t error_type)
{
/* Start user code. Do not edit comment generated here */
/* Used to suppress the warning message generated for unused variables */
UNUSED_PARAM(error_type);
/* End user code. Do not edit comment generated here */
}
/* Start user code for adding. Do not edit comment generated here */
/* Function required in order to link UARTCommandConsole.c - which is used by
multiple different demo application. */
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
( void ) ulWantedBaud;
( void ) uxQueueLength;
/* Characters received from the UART are stored in this queue, ready to be
received by the application. ***NOTE*** Using a queue in this way is very
convenient, but also very inefficient. It can be used here because
characters will only arrive slowly. In a higher bandwidth system a circular
RAM buffer or DMA should be used in place of this queue. */
xRxQueue = xQueueCreate( uxQueueLength, sizeof( char ) );
configASSERT( xRxQueue );
/* Enable the receive. */
SCIFA2.FTCR.BIT.RFTC = _SCIF_RX_TRIG_NUM_2;
SCIFA2.SCR.BIT.RE = 1U;
SCIFA2.SCR.BIT.RIE = 1U;
SCIFA2.SCR.BIT.REIE = 1U;
/* Enable SCI1 operations */
R_SCIFA2_Start();
/* Only one UART is supported, so it doesn't matter what is returned
here. */
return 0;
}
/* Function required in order to link UARTCommandConsole.c - which is used by
multiple different demo application. */
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 5000 );
/* Only one port is supported. */
( void ) pxPort;
/* Don't send the string unless the previous string has been sent. */
if( xSendingTask == NULL )
{
/* Ensure the calling task's notification state is not already
pending. */
vTaskNotifyStateClear( NULL );
/* Store the handle of the transmitting task. This is used to unblock
the task when the transmission has completed. */
xSendingTask = xTaskGetCurrentTaskHandle();
/* Send the string using the auto-generated API. */
R_SCIFA2_Serial_Send( ( uint8_t * ) pcString, usStringLength );
/* Wait in the Blocked state (so not using any CPU time) until the
transmission has completed. */
ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
}
}
/* Function required in order to link UARTCommandConsole.c - which is used by
multiple different demo application. */
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )
{
/* Only one UART is supported. */
( void ) pxPort;
/* Return a received character, if any are available. Otherwise block to
wait for a character. */
return xQueueReceive( xRxQueue, pcRxedChar, xBlockTime );
}
/* Function required in order to link UARTCommandConsole.c - which is used by
multiple different demo application. */
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )
{
/* Just mapped to vSerialPutString() so the block time is not used. */
( void ) xBlockTime;
vSerialPutString( pxPort, &cOutChar, sizeof( cOutChar ) );
return pdPASS;
}
/* End user code. Do not edit comment generated here */
/*
* The RZ/T vectors directly to a peripheral specific interrupt handler, rather
* than using the Cortex-R IRQ vector. Therefore each interrupt handler
* installed by the application must follow the examples below, which save a
* pointer to a standard C function in the pxISRFunction variable, before
* branching to the FreeRTOS IRQ handler. The FreeRTOS IRQ handler then manages
* interrupt entry (including interrupt nesting), before calling the C function
* saved in the pxISRFunction variable. NOTE: The entry points are naked
* functions - do not add C code to these functions.
*/
#ifdef __GNUC__
/* The IAR equivalent is implemented in
$PROJ_DIR$/System/IAR/Interrupt_Entry_Stubs.asm */
void r_scifa2_txif2_interrupt_entry( void )
{
__asm volatile ( \
"PUSH {r0-r1} \t\n" \
"LDR r0, =pxISRFunction \t\n" \
"LDR r1, =r_scifa2_txif2_interrupt \t\n" \
"STR r1, [r0] \t\n" \
"POP {r0-r1} \t\n" \
"B FreeRTOS_IRQ_Handler "
);
}
#endif /* __GNUC__ */
/*-----------------------------------------------------------*/
#ifdef __GNUC__
/* The IAR equivalent is implemented in
$PROJ_DIR$/System/IAR/Interrupt_Entry_Stubs.asm */
void r_scifa2_rxif2_interrupt_entry( void )
{
__asm volatile ( \
"PUSH {r0-r1} \t\n" \
"LDR r0, =pxISRFunction \t\n" \
"LDR r1, =r_scifa2_rxif2_interrupt \t\n" \
"STR r1, [r0] \t\n" \
"POP {r0-r1} \t\n" \
"B FreeRTOS_IRQ_Handler "
);
}
#endif /* __GNUC__ */
/*-----------------------------------------------------------*/
#ifdef __GNUC__
/* The IAR equivalent is implemented in
$PROJ_DIR$/System/IAR/Interrupt_Entry_Stubs.asm */
void r_scifa2_drif2_interrupt_entry( void )
{
__asm volatile ( \
"PUSH {r0-r1} \t\n" \
"LDR r0, =pxISRFunction \t\n" \
"LDR r1, =r_scifa2_drif2_interrupt \t\n" \
"STR r1, [r0] \t\n" \
"POP {r0-r1} \t\n" \
"B FreeRTOS_IRQ_Handler "
);
}
#endif /* __GNUC__ */
/*-----------------------------------------------------------*/
#ifdef __GNUC__
/* The IAR equivalent is implemented in
$PROJ_DIR$/System/IAR/Interrupt_Entry_Stubs.asm */
void r_scifa2_brif2_interrupt_entry( void )
{
__asm volatile ( \
"PUSH {r0-r1} \t\n" \
"LDR r0, =pxISRFunction \t\n" \
"LDR r1, =r_scifa2_brif2_interrupt \t\n" \
"STR r1, [r0] \t\n" \
"POP {r0-r1} \t\n" \
"B FreeRTOS_IRQ_Handler "
);
}
#endif /* __GNUC__ */
/*-----------------------------------------------------------*/

View File

@ -2,15 +2,15 @@
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
@ -42,6 +42,7 @@ Includes
#include "r_cg_tpu.h"
#include "r_cg_rspi.h"
#include "r_cg_mpc.h"
#include "r_cg_scifa.h"
/* Start user code for include. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"
@ -66,7 +67,7 @@ void R_Systeminit(void)
DI();
/* Enable writing to registers related to operating modes, LPC, CGC and ATCM */
SYSTEM.PRCR.LONG = 0x0000A50BU;
SYSTEM.PRCR.LONG = 0x0000A50BU;
/* Enable writing to MPC pin function control registers */
MPC.PWPR.BIT.B0WI = 0U;
@ -81,10 +82,11 @@ void R_Systeminit(void)
R_TPU_Create();
R_RSPI1_Create();
R_MPC_Create();
R_SCIFA2_Create();
/* Disable writing to MPC pin function control registers */
MPC.PWPR.BIT.PFSWE = 0U;
MPC.PWPR.BIT.B0WI = 1U;
MPC.PWPR.BIT.PFSWE = 0U;
MPC.PWPR.BIT.B0WI = 1U;
/* Enable protection */
SYSTEM.PRCR.LONG = 0x0000A500U;

View File

@ -114,11 +114,6 @@ or 0 to run the more comprehensive test and demo application. */
*/
static void prvClearBSS( void );
/*
* Configure the hardware as necessary to run this demo.
*/
static void prvSetupHardware( void );
/*
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
@ -136,10 +131,6 @@ void vApplicationIdleHook( void );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
void vApplicationTickHook( void );
/* Prototype for the IRQ handler called by the generic Cortex-A5 RTOS port
layer. */
void vApplicationIRQHandler( void );
/* Library initialisation. */
extern void R_Systeminit( void );
@ -153,7 +144,7 @@ int main( void )
prvClearBSS();
/* Configure the hardware ready to run the demo. */
prvSetupHardware();
R_Systeminit();
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
of this file. */
@ -171,12 +162,6 @@ int main( void )
}
/*-----------------------------------------------------------*/
static void prvSetupHardware( void )
{
R_Systeminit();
}
/*-----------------------------------------------------------*/
void vApplicationMallocFailedHook( void )
{
/* Called if a call to pvPortMalloc() fails because there is insufficient

View File

@ -262,7 +262,7 @@ volatile unsigned portBASE_TYPE uxUnusedStack;
ulTicksToWait = mainERROR_PERIOD;
}
/* Toggle the LED each itteration. */
/* Toggle the LED each iteration. */
vParTestToggleLED( mainCHECK_LED );
/* For demo only - how much unused stack does this task have? */

View File

@ -280,7 +280,7 @@ TickType_t xLastExecutionTime;
ulTicksToWait = mainERROR_PERIOD;
}
/* Toggle the LED each itteration. */
/* Toggle the LED each iteration. */
vParTestToggleLED( mainCHECK_LED );
}
}

View File

@ -288,7 +288,7 @@ TickType_t xLastExecutionTime;
ulTicksToWait = mainERROR_PERIOD;
}
/* Toggle the LED each itteration. */
/* Toggle the LED each iteration. */
vParTestToggleLED( mainCHECK_LED );
}
}

View File

@ -3,7 +3,7 @@
<configuration id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.485661513" name="HardwareDebug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="-83633861543855079" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="-645709713" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="738196985922260309" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="-645709713" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -92,7 +92,7 @@ _vRegTest1Implementation:
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -177,7 +177,7 @@ _vRegTest2Implementation:
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -58,9 +58,10 @@
</option>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa.891020448" name="Instruction set architecture" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa.rxv1" valueType="enumerated"/>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns.887015730" name="Use floating point arithmetic instructions" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns.enable" valueType="enumerated"/>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.964108751" name="Optimize level" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.0" valueType="enumerated"/>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.964108751" name="Optimize level" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.max" valueType="enumerated"/>
<option defaultValue="true" id="com.renesas.cdt.renesas.Compiler.option.GenDebugInfo.159226508" name="Generate debug information" superClass="com.renesas.cdt.renesas.Compiler.option.GenDebugInfo" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.stuffD.189152785" name="Allocates initialized variables to 4-byte boundary alignment sections" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.stuffD" value="false" valueType="boolean"/>
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType.2131923502" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType.speed" valueType="enumerated"/>
<inputType id="%Base.Compiler.Shc.C.Input.Id.1411777144" name="C Input" superClass="%Base.Compiler.Shc.C.Input.Id"/>
<inputType id="%Base.Compiler.Shc.C.Input1.Id.1988726590" name="C++ Input" superClass="%Base.Compiler.Shc.C.Input1.Id"/>
</tool>

View File

@ -520,7 +520,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -607,7 +607,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -524,7 +524,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -611,7 +611,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -92,7 +92,7 @@ _vRegTest1Implementation:
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -177,7 +177,7 @@ _vRegTest2Implementation:
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -106,7 +106,7 @@ _vRegTest1Implementation:
MVTACLO R2, A0
MVTACHI R3, A1
MVTACLO R4, A1
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop1:
@ -223,7 +223,7 @@ _vRegTest2Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop2:

View File

@ -522,7 +522,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -609,7 +609,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -539,7 +539,7 @@ static void prvRegTest1Implementation( void )
"MOV #14, R14 \n" \
"MOV #15, R15 \n" \
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
"TestLoop1: \n" \
@ -628,7 +628,7 @@ static void prvRegTest2Implementation( void )
"MOV #140H, R14 \n" \
"MOV #150H, R15 \n" \
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
"TestLoop2: \n" \

View File

@ -95,7 +95,7 @@ _prvRegTest1Implementation:
MOV #14, R14
MOV #15, R15
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop1:
@ -180,7 +180,7 @@ _prvRegTest2Implementation:
MOV #140H, R14
MOV #150H, R15
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop2:

View File

@ -525,7 +525,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -612,7 +612,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -539,7 +539,7 @@ static void prvRegTest1Implementation( void )
"MOV #14, R14 \n" \
"MOV #15, R15 \n" \
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
"TestLoop1: \n" \
@ -628,7 +628,7 @@ static void prvRegTest2Implementation( void )
"MOV #140H, R14 \n" \
"MOV #150H, R15 \n" \
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
"TestLoop2: \n" \

View File

@ -95,7 +95,7 @@ _prvRegTest1Implementation:
MOV #14, R14
MOV #15, R15
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop1:
@ -180,7 +180,7 @@ _prvRegTest2Implementation:
MOV #140H, R14
MOV #150H, R15
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop2:

View File

@ -525,7 +525,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -612,7 +612,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -519,7 +519,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -606,7 +606,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -557,7 +557,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -644,7 +644,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -565,7 +565,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -652,7 +652,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2:

View File

@ -104,7 +104,7 @@ _vRegTest1Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop1:
@ -221,7 +221,7 @@ _vRegTest2Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop2:

View File

@ -104,7 +104,7 @@ _vRegTest1Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop1:
@ -221,7 +221,7 @@ _vRegTest2Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop2:

View File

@ -104,7 +104,7 @@ _vRegTest1Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop1:
@ -221,7 +221,7 @@ _vRegTest2Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
;/* Loop, checking each itteration that each register still contains the
;/* Loop, checking each iteration that each register still contains the
;expected value. */
TestLoop2:

View File

@ -106,7 +106,7 @@ _vRegTest1Implementation:
MVTACLO R2, A0
MVTACHI R3, A1
MVTACLO R4, A1
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop1:
@ -223,7 +223,7 @@ _vRegTest2Implementation:
MVTACHI R3, A1
MVTACLO R4, A1
/* Loop, checking each itteration that each register still contains the
/* Loop, checking each iteration that each register still contains the
expected value. */
TestLoop2:

View File

@ -524,7 +524,7 @@ static void prvRegTest1Implementation( void )
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; Loop, checking each iteration that each register still contains the
; expected value.
TestLoop1:
@ -611,7 +611,7 @@ static void prvRegTest2Implementation( void )
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; Loop, checking on each iteration that each register still contains the
; expected value.
TestLoop2: