mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-08 12:45:22 -05:00
Add Renesas RX72N Envision Kit RTOS Demo using Renesas RXv3 port layer (#167)
* Add Renesas RX72N Envision Kit RTOS Demo using Renesas RXv3 port layer * Refactor the workaround which makes CC-RX linker optimization working better To be robust for future updates of Renesas RX SmartConfigurator until the cause of the problem is fixed by Renesas. * Fix vApplicationMallocFailedHook()'s argument type generated by e2 studio. No changes are caused in the MOT and SREC files which are built. * Merge update of submodule (submodule's commit id) Changes are caused in the MOT and SREC files which are built for Renesas RX72N Envision Kit RTOS Demo. Theses RTOS Demo programs work after changes. * Fix: Add checking DPFPU register in RegTest inline asm functions in main_full.c * Fix and sync kernel pointer (submodule's commit id) to the same as 'upstream/master' * Revert "Fix and sync kernel pointer (submodule's commit id) to the same as 'upstream/master'" This reverts commit d684f749bc40fa34c6b87b943f3b866fbe33acd1. * Revert "Merge remote-tracking branch 'upstream/master' into rx700v3dpfpu" This reverts commit 3a44473b4ed76a5450eb45febc39a96454b6f5e0, reversing changes made to 0f4f024fe212617355224989cb37e96d4a28523b. * Merge remote-tracking branch 'upstream/master' into rx700v3dpfpu * Fix and sync kernel pointer (submodule's commit id) to the same as 'upstream/master' * Test: Fix unnecessary update of SiFive_HiFive1_RTOS_demo.url. * Fix? unnecessary update of SiFive_HiFive1_RTOS_demo.url. * Fix unnecessary update of SiFive_HiFive1_RTOS_demo.url.
This commit is contained in:
parent
5cc6512986
commit
dea347fb9a
428 changed files with 195806 additions and 0 deletions
152
FreeRTOS/Demo/RX700_RX72N_EnvisionKit_GCC_e2studio/.cproject
Normal file
152
FreeRTOS/Demo/RX700_RX72N_EnvisionKit_GCC_e2studio/.cproject
Normal file
|
|
@ -0,0 +1,152 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396" moduleId="org.eclipse.cdt.core.settings" name="HardwareDebug">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
|
||||||
|
<option id="toolchain.id" value="RENESAS_GCC_RX"/>
|
||||||
|
<option id="toolchain.version" value="8.3.0.202002"/>
|
||||||
|
<option id="toolchain.enable" value="true"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf *.lst *.lis *.lpp *.map" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396" name="HardwareDebug" parent="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug">
|
||||||
|
<folderInfo id="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396." name="/" resourcePath="">
|
||||||
|
<toolChain id="com.renesas.cdt.managedbuild.gcc.rx.toolchain.debug.512417966" name="GCC for Renesas RX" superClass="com.renesas.cdt.managedbuild.gcc.rx.toolchain.debug">
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.optimizationLevel.845303127" name="Optimization Level" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.optimizationLevel" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.optimization.optimizationLevel.speed" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.fdatasections.587546279" name="Data sections (-fdata-sections)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.fdatasections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.debugFormat.1470065207" name="Debug format" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.debugFormat" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.debug.debugFormat.Default" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.architecture.1552036578" name="Architecture" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.architecture" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.gcc.rx.architecture.v3" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.architecture.applicability.111520192" name="Architecture Applicability" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.architecture.applicability" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.cpuType.1694707801" name="CPU Type" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.cpuType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.gcc.core.option.cpu.cpuType.rx72n" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.deviceShortName.1804875978" name="DeviceName" superClass="com.renesas.cdt.managedbuild.gcc.core.option.deviceShortName" useByScannerDiscovery="false" value="R5F572NNHxFB" valueType="string"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.deviceCommand.1743609999" name="DeviceCommand" superClass="com.renesas.cdt.managedbuild.gcc.core.option.deviceCommand" useByScannerDiscovery="false" value="R5F572NN" valueType="string"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections.1847643954" name="Function sections (-ffunction-sections)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.1250737843" name="Warn if stack size exceeds the limit, in bytes (-Wstack-usage)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize" useByScannerDiscovery="false" value="100" valueType="string"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.allwarn.809828919" name="Enable all warnings (-Wall)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.allwarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.extrawarn.556241989" name="Enable extra warnings (-Wextra)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.extrawarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.conversion.788565876" name="Warn for implicit conversions (-Wconversion)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.conversion" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.uninitialized.433042010" name="Warn for uninitialized variables (-Wuninitialized)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.uninitialized" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.unused.94378731" name="Warn for various unused elements (-Wunused)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.unused" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.shadow.774244211" name="Warn for shadowed variables (-Wshadow)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.shadow" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.pointerarith.445557127" name="Warn if it depends on the “size of” a function(-Wpointer-arith)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.pointerarith" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.agreggatereturn.207353419" name="Warn if structures are returned (-Waggregate-return)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.agreggatereturn" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.missingdeclaration.97219514" name="Warn for undeclared global functions (-Wmissing-declarations)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.missingdeclaration" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.toerrors.1993051522" name="Generate errors instead of warnings (-Werror)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.toerrors" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.missingprototypes.1360760062" name="Warn if a global function has no prototype (-Wmissing-prototypes)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.missingprototypes" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.strictprototypes.600624521" name="Warn if a function has no argument type (-Wstrict-prototypes)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.strictprototypes" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.badfunctioncast.950620017" name="Warn if a cast is wrong (-Wbad-function-cast)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.badfunctioncast" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags.1730765873" name="Other Flags" superClass="com.renesas.cdt.managedbuild.gcc.core.option.warnings.otherFlags" useByScannerDiscovery="false" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value="-Wundef"/>
|
||||||
|
<listOptionValue builtIn="false" value="-Wno-unused-function -Wno-unused-label -Wno-unused-variable -Wno-main"/>
|
||||||
|
</option>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.disableFPUInstructions.330060499" name="Disable generation of RX hardware FPU instructions" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.disableFPUInstructions" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.flto.2037414293" name="Link-time optimizer (-flto)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.flto" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.optimization.mrelax.1703211957" name="Enable linker relaxation (-mrelax)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.optimization.mrelax" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.64bitdouble.1143920287" name="Make the double data type be 64 bits in size" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.64bitdouble" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.cpu.doubleFPU.1248721932" name="Double FPU instruction" superClass="com.renesas.cdt.managedbuild.gcc.core.option.cpu.doubleFPU" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.addtools.printsize.1758670966" name="Create Print Size" superClass="com.renesas.cdt.managedbuild.gcc.core.option.addtools.printsize" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.rz.option.mtfu.523411517" name="MTFU" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.mtfu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.gcc.rz.mtfu.none" valueType="enumerated"/>
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.renesas.cdt.managedbuild.gcc.core.targetPlatform.447033150" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
|
||||||
|
<builder arguments="-r" buildPath="${workspace_loc:/${ProjName}}/HardwareDebug" command="make" id="com.renesas.cdt.managedbuild.gcc.core.builder.348807577" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen.1999510944" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.libgen.libstd.applicability.1820050119" superClass="com.renesas.cdt.managedbuild.gcc.core.option.libgen.libstd.applicability" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.rx.option.libraryType.1420001111" name="Library type" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.libraryType" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.librarygenerator.settings.libraryType.preBuilt" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1111447120" name="Select Library" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.librarygenerator.settings.selectLibrary.newLib" valueType="enumerated"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.compiler.2065772045" name="Compiler" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.compiler">
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.compiler.includes.includeFileDir.1541317597" name="Include file directories" superClass="com.renesas.cdt.managedbuild.gcc.core.option.compiler.includes.includeFileDir" useByScannerDiscovery="false" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${TCINSTALL}/rx-elf/optlibinc""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Demo/Full_Demo/FreeRTOS-Plus-CLI}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks/include}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Demo/Full_Demo}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS_Demo}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_workaround}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_workaround/r_bsp_patch}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS/Source/include}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/FreeRTOS/Source/portable/GCC/RX700v3_DPFPU}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/frtos_startup}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/frtos_config}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/frtos_skeleton}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_config}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_byteq}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_byteq/src}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_gpio_rx}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_gpio_rx/src}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sci_rx}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sci_rx/src}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_dtc_rx}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_dtc_rx/src}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||||
|
</option>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.compiler.source.std.2019477617" name="Language standard" superClass="com.renesas.cdt.managedbuild.gcc.core.option.compiler.source.std" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.compiler.common.gnu99" valueType="enumerated"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.compiler.includes.macroDefines.1113626646" name="Macro Defines" superClass="com.renesas.cdt.managedbuild.gcc.core.option.compiler.includes.macroDefines" useByScannerDiscovery="false"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.compiler.source.userDefinedCompilerOptions.430530314" name="User defined compiler options" superClass="com.renesas.cdt.managedbuild.gcc.core.option.compiler.source.userDefinedCompilerOptions" useByScannerDiscovery="false" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value="-fstack-usage -fdump-rtl-pro_and_epilogue"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="com.renesas.cdt.managedbuild.gcc.core.inputType.compiler.c.335247410" superClass="com.renesas.cdt.managedbuild.gcc.core.inputType.compiler.c"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.assembler.1182690221" name="Assembler" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.assembler">
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.assembler.source.usepreprocessor.769694783" name="Use preprocessor" superClass="com.renesas.cdt.managedbuild.gcc.core.option.assembler.source.usepreprocessor" useByScannerDiscovery="false"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.renesas.cdt.managedbuild.gcc.core.option.assembler.source.userDefinedOptions.159158576" name="User defined options" superClass="com.renesas.cdt.managedbuild.gcc.core.option.assembler.source.userDefinedOptions" useByScannerDiscovery="false" valueType="stringList"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.renesas.cdt.managedbuild.gcc.core.option.assembler.includes.includeFileDirectories.1301711064" name="Include file directories" superClass="com.renesas.cdt.managedbuild.gcc.core.option.assembler.includes.includeFileDirectories" useByScannerDiscovery="false" valueType="includePath"/>
|
||||||
|
<inputType id="com.renesas.cdt.managedbuild.gcc.core.inputType.assembler.985505582" superClass="com.renesas.cdt.managedbuild.gcc.core.inputType.assembler"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.linker.174948488" name="Linker" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.linker">
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.linker.source.linkerScript.687565960" name="Linker script" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.source.linkerScript" useByScannerDiscovery="false" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/linker_script.ld}""/>
|
||||||
|
</option>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.renesas.cdt.managedbuild.gcc.rx.option.linker.archives.archiveSearchDirectories.148989277" name="Standard archive search directories" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.linker.archives.archiveSearchDirectories" useByScannerDiscovery="false" valueType="stringList"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.gcc.core.option.linker.archives.archiveLibraryFiles.1921976852" name="Standard archive (library) files" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.archives.archiveLibraryFiles" useByScannerDiscovery="false" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value="m"/>
|
||||||
|
<listOptionValue builtIn="false" value="c"/>
|
||||||
|
<listOptionValue builtIn="false" value="gcc"/>
|
||||||
|
</option>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.linker.source.linkOrderList.1594631832" name="Linkage Order List" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.source.linkOrderList" useByScannerDiscovery="false"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.linker.newlibnano.110587920" name="Use newlib-nano (--specs=nano.specs)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.newlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.renesas.cdt.managedbuild.gcc.rx.option.linker.userDefinedArchives.248919770" name="User defined archives" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.linker.userDefinedArchives" useByScannerDiscovery="false" valueType="stringList"/>
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.linker.misc.inputsections.967483530" name="Enable garbage collection of unused input sections(-gc-sections)" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.misc.inputsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.renesas.cdt.managedbuild.gcc.core.option.linker.other.userDefinedOptions.970535055" name="User defined options" superClass="com.renesas.cdt.managedbuild.gcc.core.option.linker.other.userDefinedOptions" useByScannerDiscovery="false" valueType="stringList"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.objcopy.1535137026" name="Objcopy" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.objcopy"/>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.archiver.1263598834" name="Archiver" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.archiver"/>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.cpp.compiler.297687971" name="Compiler CPP" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.cpp.compiler"/>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.cpp.linker.1687043618" name="Linker CPP" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.cpp.linker"/>
|
||||||
|
<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.printsize.1006072056" name="Print Size" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.printsize">
|
||||||
|
<option id="com.renesas.cdt.managedbuild.gcc.core.option.printsize.format.813391619" name="Size Format" superClass="com.renesas.cdt.managedbuild.gcc.core.option.printsize.format" useByScannerDiscovery="false"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
<sourceEntries>
|
||||||
|
<entry excluding="smc_gen/r_dtc_rx/src/r_dtc_rx.c|smc_gen/r_dtc_rx/src/targets/rx72n/r_dtc_rx_target.c|smc_gen/r_pincfg/Pin.h|smc_gen/r_pincfg/Pin.c|FreeRTOS/Source/portable/MemMang/heap_5.c|FreeRTOS/Source/portable/MemMang/heap_3.c|FreeRTOS/Source/portable/MemMang/heap_2.c|FreeRTOS/Source/portable/MemMang/heap_1.c" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||||
|
</sourceEntries>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="RTOSDemo.com.renesas.cdt.managedbuild.gcc.rx.projectType.Id.457688497" name="実行可能" projectType="com.renesas.cdt.managedbuild.gcc.rx.projectType.Id"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="refreshScope"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396;com.renesas.cdt.managedbuild.gcc.rx.configuration.debug.887759396.;com.renesas.cdt.managedbuild.gcc.rx.tool.compiler.2065772045;com.renesas.cdt.managedbuild.gcc.core.inputType.compiler.c.335247410">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
||||||
242
FreeRTOS/Demo/RX700_RX72N_EnvisionKit_GCC_e2studio/.project
Normal file
242
FreeRTOS/Demo/RX700_RX72N_EnvisionKit_GCC_e2studio/.project
Normal file
|
|
@ -0,0 +1,242 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>RTOSDemo</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>src/FreeRTOS</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>src/FreeRTOS/Source</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/FreeRTOS-Plus-CLI</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>src/FreeRTOS_Demo/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/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>src/FreeRTOS_Demo/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/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks/include</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/include</locationURI>
|
||||||
|
</link>
|
||||||
|
</linkedResources>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>0</id>
|
||||||
|
<name>src/FreeRTOS/Source</name>
|
||||||
|
<type>6</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-croutine.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>0</id>
|
||||||
|
<name>src/FreeRTOS/Source/portable</name>
|
||||||
|
<type>9</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-MemMang</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>0</id>
|
||||||
|
<name>src/FreeRTOS/Source/portable</name>
|
||||||
|
<type>9</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-GCC</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470090</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-BlockQ.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470090</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-blocktim.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470100</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-countsem.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470100</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-death.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470110</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-dynamic.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470110</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-EventGroupsDemo.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470120</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-flop.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470120</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-GenQTest.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470130</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-IntSemTest.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470130</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-QueueOverwrite.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470140</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-recmutex.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470140</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-semtest.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470150</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-TaskNotify.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470150</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-TimerDemo.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>1442773470160</id>
|
||||||
|
<name>src/FreeRTOS_Demo/Full_Demo/Standard_Demo_Tasks</name>
|
||||||
|
<type>5</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-IntQueue.c</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<id>0</id>
|
||||||
|
<name>src/FreeRTOS/Source/portable/GCC</name>
|
||||||
|
<type>9</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-RX700v3_DPFPU</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
<variableList>
|
||||||
|
<variable>
|
||||||
|
<name>FREERTOS_ROOT</name>
|
||||||
|
<value>$%7BPARENT-3-PROJECT_LOC%7D</value>
|
||||||
|
</variable>
|
||||||
|
</variableList>
|
||||||
|
</projectDescription>
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<#--
|
||||||
|
Copyright(C) 2015 Renesas Electronics Corporation
|
||||||
|
RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
|
||||||
|
This program must be used solely for the purpose for which it was furnished
|
||||||
|
by Renesas Electronics Corporation. No part of this program may be reproduced
|
||||||
|
or disclosed to others, in any form, without the prior written permission of
|
||||||
|
Renesas Electronics Corporation.
|
||||||
|
-->
|
||||||
|
<#-- = DECLARE FUNCTION INFORMATION HERE =================== -->
|
||||||
|
<#--
|
||||||
|
(Step 1) Explanation: These variables are necessary information for the function header.
|
||||||
|
Please fill up or leave blank, but do not delete
|
||||||
|
-->
|
||||||
|
<#assign Function_Base_Name = "R_SCI_PinSet">
|
||||||
|
<#assign Function_Description = "This function initializes pins for r_sci_rx module">
|
||||||
|
<#assign Function_Arg = "none">
|
||||||
|
<#assign Function_Ret = "none">
|
||||||
|
<#assign Version = 1.00>
|
||||||
|
|
||||||
|
<#-- = DECLARE FUNCTION CONTENT HERE ======================= -->
|
||||||
|
<#--
|
||||||
|
(Step 2) Explanation: Function content.
|
||||||
|
- Macro [initialsection] :
|
||||||
|
Any text that goes into this section will be printed out 1 time per function
|
||||||
|
input [postfix] :Use this variable to add the channel number to the function base name.
|
||||||
|
-->
|
||||||
|
<#macro initialsection postfix>
|
||||||
|
<#assign Function_Name = "${Function_Base_Name}${postfix}">
|
||||||
|
<#include "lib/functionheader.ftl">
|
||||||
|
void ${Function_Name}()
|
||||||
|
{
|
||||||
|
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_MPC);
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
(Step 3) Explanation: Function content.
|
||||||
|
- Macro [peripheralpincode] : Any text that goes into this section will be printed out 1 time per peripheral
|
||||||
|
- input [pin] : Available info includes:
|
||||||
|
pin.pinName :The name of pin, eg “SSLA0”
|
||||||
|
pin.assignedPinName :The pin assigned to, eg “P32”
|
||||||
|
pin.pinMPC :The port number of assigned pin, eg “P32” has portNume = “3”
|
||||||
|
pin.portNum :The bit number of the assigned pin, eg “P32” has pinBitNum = “2”
|
||||||
|
pin.pinBitNum :The value of MPC
|
||||||
|
-->
|
||||||
|
<#macro peripheralpincode pin>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
(Step 4) Explanation: Function content.
|
||||||
|
- Macro [channelpincode] : Any text that goes into this section will be printed out 1 time per channel
|
||||||
|
- input [pin] : Same as above
|
||||||
|
-->
|
||||||
|
<#macro channelpincode pin>
|
||||||
|
|
||||||
|
/* Set ${pin.pinName} pin */
|
||||||
|
MPC.${pin.assignedPinName}PFS.BYTE = 0x${pin.pinMPC}U;
|
||||||
|
PORT${pin.portNum}.PMR.BIT.B${pin.pinBitNum} = 1U;
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro channelpincodeextra pin postfix>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
(Step 5) Explanation: Function content.
|
||||||
|
- Macro [endsection] : Any text that goes into this section will be printed out 1 time last
|
||||||
|
-->
|
||||||
|
<#macro endsection>
|
||||||
|
|
||||||
|
R_BSP_RegisterProtectEnable(BSP_REG_PROTECT_MPC);
|
||||||
|
}
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
(Step 6) Explanation: Header file content
|
||||||
|
- Macro [headerfilesection] : Any text that goes into this section will be printed out 1 time in the header file
|
||||||
|
- input [postfix] :Use this variable to add the channel number to the function base name.
|
||||||
|
-->
|
||||||
|
<#macro headerfilesection postfix>
|
||||||
|
void ${Function_Base_Name}${postfix}();
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro headerfilesectionExtra postfix>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#-- = END OF FILE ========================================= -->
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
indexer/indexAllFiles=false
|
||||||
|
indexer/indexAllHeaderVersions=true
|
||||||
|
indexer/indexAllVersionsSpecificHeaders=
|
||||||
|
indexer/indexOnOpen=false
|
||||||
|
indexer/indexUnusedHeadersWithDefaultLang=false
|
||||||
|
indexer/indexerId=org.eclipse.cdt.core.fastIndexer
|
||||||
|
indexer/skipFilesLargerThanMB=8
|
||||||
|
indexer/skipImplicitReferences=false
|
||||||
|
indexer/skipIncludedFilesLargerThanMB=16
|
||||||
|
indexer/skipMacroReferences=false
|
||||||
|
indexer/skipReferences=false
|
||||||
|
indexer/skipTypeReferences=false
|
||||||
|
indexer/useHeuristicIncludeResolution=false
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<frtos_skeleton>
|
||||||
|
<generateSettings/>
|
||||||
|
</frtos_skeleton>
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="com.renesas.cdt.launch.dsf.gdbremote.launchConfigurationType">
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.additionalServerArgs" value=""/>
|
||||||
|
<intAttribute key="com.renesas.cdt.core.admPortNumber" value="61236"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.initCommands" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.jtagDevice" value="E2 Lite (RX)"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rx.e2"/>
|
||||||
|
<listAttribute key="com.renesas.cdt.core.listGDBExe">
|
||||||
|
<listEntry value="rx-elf-gdb -rx-force-isa=v3 -rx-force-double-fpu"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="com.renesas.cdt.core.listGDBLaunchName">
|
||||||
|
<listEntry value="main"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="com.renesas.cdt.core.listGDBPort">
|
||||||
|
<listEntry value="61234"/>
|
||||||
|
</listAttribute>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.core.loadImage" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.optionInitCommands" value="monitor set_internal_mem_overwrite 0-645 "/>
|
||||||
|
<intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.runCommands" value=""/>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.core.secondGDBSupport" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E2LITE -t R5F572NN -uClockSrcHoco= 1 -uPTimerClock= 240000000 -uAllowClockSourceInternal= 1 -uUseFine= 1 -uFineBaudRate= 1.50 -w 0 -z 0 -uRegisterSetting= 0 -uModePin= 0 -uChangeStartupBank= 0 -uStartupBank= 0 -uDebugMode= 0 -uExecuteProgram= 0 -uIdCode= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -uresetOnReload= 1 -n 0 -uWorkRamAddress= 1000 -uProgReWriteIRom= 0 -uProgReWriteDFlash= 0 -uhookWorkRamAddr= 0x7fb40 -uhookWorkRamSize= 0x4c0"/>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.core.setResume" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.core.setStopAt" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.core.startServer" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.stopAt" value="main"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R5F572NN"/>
|
||||||
|
<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="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <selectedRegisterList ioFilePath="C:\DevTools\Renesas\e2_studio_4\internal\IoFiles\RX\RX71M.sfrx"/> "/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${support_area_loc}"/>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>
|
||||||
|
<listAttribute key="com.renesas.cdt.launch.dsf.downloadImages">
|
||||||
|
<listEntry value="|true|true|true||true|No core"/>
|
||||||
|
</listAttribute>
|
||||||
|
<booleanAttribute key="com.renesas.cdt.launch.dsf.downloadImagesUpgradedV30" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/>
|
||||||
|
<stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${renesas.support.targetLoc:rx-debug}\e2-server-gdb"/>
|
||||||
|
<listAttribute key="com.renesas.cdt.launch.ui.address.mruList.memoryMonitorExpression">
|
||||||
|
<listEntry value="0xcd68"/>
|
||||||
|
</listAttribute>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.change.startup_bank" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.clock.source.internal" value="true"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.e1.clock_source" value="0"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.connection.mode" value="0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.e1_pwr" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.enable.hot.plug" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.enable_external_flash" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.execute.program" value="false"/>
|
||||||
|
<listAttribute key="com.renesas.hardwaredebug.e1.ext_flash_definitions"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.ext_flash_registers" value="2.1,0,"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.external_memory" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.fine.baud.rate" value="2.00"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.flash_overwrite_blocks" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_Stop_func" value="0x0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_Stop" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_start" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_start_func" value="0x0"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Addr" value="4096"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Size" value="560"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.hw_break" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.inputclock" value="27.0000"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.clock.freq" value="16.5"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.or.fine" value="0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.le" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.mode" value="0"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.mode_pin" value="0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_dflash" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_irom" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.serial_number" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.startup_bank" value="0"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.e1.supply.voltage" value="3.3V"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.e1.timer_clock" value="120000000"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.e1.work_ram_start" value="4096"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.e20.le" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e1.E1DebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2.E2LiteDebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.allow.change.startup_bank" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.allow.clock.source.internal" value="true"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.clock_source" value="1"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.connection.mode" value="0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.e2lite_pwr" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.enable.hot.plug" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.execute.program" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.external_memory" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.fine.baud.rate" value="1.50"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.flash_overwrite_blocks" value="0-645"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_Stop_func" value="0x0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_enable_Stop" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_enable_start" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_start_func" value="0x0"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_work_ram_Addr" value="523072"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_work_ram_Size" value="1216"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.inputclock" value="16.0000"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.jtag.clock.freq" value="6.00"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.jtag.or.fine" value="1"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.le" value="true"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.mode" value="0"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.mode_pin" value="0"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.prog_rewrite_dflash" value="false"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.prog_rewrite_irom" value="false"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.serial_number" value=""/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.startup_bank" value="0"/>
|
||||||
|
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.supply.voltage" value="3.3"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.timer_clock" value="240000000"/>
|
||||||
|
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.work_ram_start" value="4096"/>
|
||||||
|
<booleanAttribute key="com.renesas.hardwaredebug.timemeasurement" value="true"/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RX700_RX72N_EnvisionKit_GCC_e2studio\HardwareDebug\RTOSDemo.elf"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||||
|
<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="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="Processing_Before_Start_Kernel"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="C:\Renesas\GitHubDesktop\work\FreeRTOS\FreeRTOS\Demo\RX700_RX72N_EnvisionKit_GCC_e2studio\HardwareDebug\RTOSDemo.elf"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="rx-elf-gdb -rx-force-isa=v3 -rx-force-double-fpu"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="Processing_Before_Start_Kernel"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="HardwareDebug/RTOSDemo.elf"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTOSDemo"/>
|
||||||
|
<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=""/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/RTOSDemo"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="4"/>
|
||||||
|
</listAttribute>
|
||||||
|
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"> <gdbmemoryBlockExpression address="52584" core_thread_id="1_i1" label="0xcd68"/> </memoryBlockExpressionList> "/>
|
||||||
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
|
<stringAttribute key="saved_expressions<seperator>Unknown" value="0xcd68,0x108c"/>
|
||||||
|
</launchConfiguration>
|
||||||
|
|
@ -0,0 +1,867 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<smc>
|
||||||
|
<general version="2.0.0.0">
|
||||||
|
<configuration active="true" id="com.renesas.smc.toolchain.gccrx.configuration.release">
|
||||||
|
<property id="com.renesas.smc.service.project.buildArtefactType" values="com.renesas.smc.service.project.buildArtefactType.exe"/>
|
||||||
|
<toolchain id="com.renesas.smc.toolchain.gccrx.toolchain.gccrx">
|
||||||
|
<option id="com.renesas.smc.toolchain.option.buildArtefactType" key="com.renesas.smc.toolchain.option.buildArtefactType.exe"/>
|
||||||
|
<option id="com.renesas.smc.toolchain.option.rtos" key="com.renesas.smc.toolchain.option.rtos.freertos">
|
||||||
|
<item id="com.renesas.smc.toolchain.option.rtos.freertos" value="FreeRTOS_RX_v10.0.03"/>
|
||||||
|
</option>
|
||||||
|
</toolchain>
|
||||||
|
</configuration>
|
||||||
|
<platform id="R5F572NNHxFB"/>
|
||||||
|
<option id="board" value="Custom User Board"/>
|
||||||
|
</general>
|
||||||
|
<tool id="Clock">
|
||||||
|
<Item current="true" id="vccSetting.isSelected"/>
|
||||||
|
<Item current="" id="vccSetting.InputValue"/>
|
||||||
|
<Item current="vcc2_7-3_6" id="vccSetting.OutputValue"/>
|
||||||
|
<Item current="3.3" id="vccSetting.vccTxt"/>
|
||||||
|
<Item current="false" id="mainclock.selectBox"/>
|
||||||
|
<Item current="" id="mainclock.InputValue"/>
|
||||||
|
<Item current="" id="mainclock.OutputValue"/>
|
||||||
|
<Item current="16" error="false" id="mainclock.frequencyTxt"/>
|
||||||
|
<Item current="srcR" id="mainclock.sourceBox"/>
|
||||||
|
<Item current="9980" id="mainclock.cycleValueTxt"/>
|
||||||
|
<Item current="false" id="subclock.selectBox"/>
|
||||||
|
<Item current="" id="subclock.InputValue"/>
|
||||||
|
<Item current="" id="subclock.OutputValue"/>
|
||||||
|
<Item current="32.768" error="false" id="subclock.frequencyTxt"/>
|
||||||
|
<Item current="standardCL" id="subclock.generalBox"/>
|
||||||
|
<Item current="2000" id="subclock.cycleValueTxt"/>
|
||||||
|
<Item current="true" id="hococlock.selectBox"/>
|
||||||
|
<Item current="" id="hococlock.InputValue"/>
|
||||||
|
<Item current="20 MHz" id="hococlock.OutputValue"/>
|
||||||
|
<Item current="frq20" id="hococlock.frequencyListBox"/>
|
||||||
|
<Item current="false" id="lococlock.selectBox"/>
|
||||||
|
<Item current="" id="lococlock.InputValue"/>
|
||||||
|
<Item current="" id="lococlock.OutputValue"/>
|
||||||
|
<Item current="240" error="false" id="lococlock.frequencyTxt"/>
|
||||||
|
<Item current="false" id="iwdtclock.selectBox"/>
|
||||||
|
<Item current="" id="iwdtclock.InputValue"/>
|
||||||
|
<Item current="" id="iwdtclock.OutputValue"/>
|
||||||
|
<Item current="120" error="false" id="iwdtclock.frequencyTxt"/>
|
||||||
|
<Item current="true" id="pllSourceSelect.isSelected"/>
|
||||||
|
<Item current="" id="pllSourceSelect.InputValue"/>
|
||||||
|
<Item current="20 MHz" id="pllSourceSelect.OutputValue"/>
|
||||||
|
<Item current="swthococlock" id="pllSourceSelect.radiobutton"/>
|
||||||
|
<Item current="1" id="pllSourceSelect.CurrentValue"/>
|
||||||
|
<Item current="true" id="pllSourceSelect.buttonDisable.0"/>
|
||||||
|
<Item current="false" id="pllSourceSelect.buttonDisable.1"/>
|
||||||
|
<Item current="true" id="pll.isSelected"/>
|
||||||
|
<Item current="20 MHz" id="pll.InputValue"/>
|
||||||
|
<Item current="240.0 MHz" id="pll.OutputValue"/>
|
||||||
|
<Item current="mul12-1" error="false" id="pll.multiplyBox"/>
|
||||||
|
<Item current="div1-1" error="false" id="pll.dividerBox"/>
|
||||||
|
<Item current="20.0 MHz" error="false" id="pll.MiddleValue"/>
|
||||||
|
<Item current="true" id="ppll.isSelected"/>
|
||||||
|
<Item current="20 MHz" id="ppll.InputValue"/>
|
||||||
|
<Item current="200.0 MHz" id="ppll.OutputValue"/>
|
||||||
|
<Item current="mul10-1" error="false" id="ppll.multiplyBox"/>
|
||||||
|
<Item current="div1-1" error="false" id="ppll.dividerBox"/>
|
||||||
|
<Item current="20.0 MHz" error="false" id="ppll.MiddleValue"/>
|
||||||
|
<Item current="true" id="sckselector.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="sckselector.InputValue"/>
|
||||||
|
<Item current="240.0 MHz" id="sckselector.OutputValue"/>
|
||||||
|
<Item current="swtpll" id="sckselector.radiobutton"/>
|
||||||
|
<Item current="0" id="sckselector.CurrentValue"/>
|
||||||
|
<Item current="false" id="sckselector.buttonDisable.0"/>
|
||||||
|
<Item current="true" id="sckselector.buttonDisable.1"/>
|
||||||
|
<Item current="true" id="sckselector.buttonDisable.2"/>
|
||||||
|
<Item current="false" id="sckselector.buttonDisable.3"/>
|
||||||
|
<Item current="true" id="sckselector.buttonDisable.4"/>
|
||||||
|
<Item current="true" id="ckoselector.isSelected"/>
|
||||||
|
<Item current="" id="ckoselector.InputValue"/>
|
||||||
|
<Item current="20 MHz" id="ckoselector.OutputValue"/>
|
||||||
|
<Item current="swthococlock" id="ckoselector.radiobutton"/>
|
||||||
|
<Item current="4" id="ckoselector.CurrentValue"/>
|
||||||
|
<Item current="false" id="ckoselector.buttonDisable.0"/>
|
||||||
|
<Item current="false" id="ckoselector.buttonDisable.1"/>
|
||||||
|
<Item current="true" id="ckoselector.buttonDisable.2"/>
|
||||||
|
<Item current="true" id="ckoselector.buttonDisable.3"/>
|
||||||
|
<Item current="false" id="ckoselector.buttonDisable.4"/>
|
||||||
|
<Item current="true" id="ckoselector.buttonDisable.5"/>
|
||||||
|
<Item current="true" id="bckdivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="bckdivider.InputValue"/>
|
||||||
|
<Item current="80.0 MHz" id="bckdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="bckdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-3" error="false" id="bckdivider.comboBox"/>
|
||||||
|
<Item current="240.0 MHz" error="false" id="bckdivider.PreOutput"/>
|
||||||
|
<Item current="iclkdivider" error="false" id="bckdivider.PreOutputController"/>
|
||||||
|
<Item current="false" id="bckselector.selectBox"/>
|
||||||
|
<Item current="80.0 MHz" id="bckselector.InputValue"/>
|
||||||
|
<Item current="" id="bckselector.OutputValue"/>
|
||||||
|
<Item current="comboBox1-2" error="false" id="bckselector.comboBox"/>
|
||||||
|
<Item current="true" id="fclkdivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="fclkdivider.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="fclkdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="fclkdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-4" error="false" id="fclkdivider.comboBox"/>
|
||||||
|
<Item current="true" id="pclkcdivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="pclkcdivider.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkcdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="pclkcdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-4" error="false" id="pclkcdivider.comboBox"/>
|
||||||
|
<Item current="60.0 MHz" error="false" id="pclkcdivider.PreOutput"/>
|
||||||
|
<Item current="pclkbdivider" error="false" id="pclkcdivider.PreOutputController"/>
|
||||||
|
<Item current="true" id="pclkddivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="pclkddivider.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkddivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="pclkddivider.Condition"/>
|
||||||
|
<Item current="comboBox1-4" error="false" id="pclkddivider.comboBox"/>
|
||||||
|
<Item current="60.0 MHz" error="false" id="pclkddivider.PreOutput"/>
|
||||||
|
<Item current="pclkbdivider" error="false" id="pclkddivider.PreOutputController"/>
|
||||||
|
<Item current="true" id="pclkbdivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="pclkbdivider.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkbdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="pclkbdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-4" error="false" id="pclkbdivider.comboBox"/>
|
||||||
|
<Item current="120.0 MHz" error="false" id="pclkbdivider.PreOutput"/>
|
||||||
|
<Item current="pclkadivider" error="false" id="pclkbdivider.PreOutputController"/>
|
||||||
|
<Item current="true" id="pclkadivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="pclkadivider.InputValue"/>
|
||||||
|
<Item current="120.0 MHz" id="pclkadivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="pclkadivider.Condition"/>
|
||||||
|
<Item current="comboBox1-2" error="false" id="pclkadivider.comboBox"/>
|
||||||
|
<Item current="false" id="uckdivider.selectBox"/>
|
||||||
|
<Item current="240.0 MHz" id="uckdivider.InputValue"/>
|
||||||
|
<Item current="" id="uckdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="uckdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-5" error="false" id="uckdivider.comboBox"/>
|
||||||
|
<Item current="true" id="iclkdivider.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="iclkdivider.InputValue"/>
|
||||||
|
<Item current="240.0 MHz" id="iclkdivider.OutputValue"/>
|
||||||
|
<Item current="sckselector.radiobutton.swtpll" id="iclkdivider.Condition"/>
|
||||||
|
<Item current="comboBox1-1" error="false" id="iclkdivider.comboBox"/>
|
||||||
|
<Item current="true" id="pplldivider.isSelected"/>
|
||||||
|
<Item current="200.0 MHz" id="pplldivider.InputValue"/>
|
||||||
|
<Item current="100.0 MHz" id="pplldivider.OutputValue"/>
|
||||||
|
<Item current="comboBox1-2" error="false" id="pplldivider.comboBox"/>
|
||||||
|
<Item current="true" id="ckodivider.isSelected"/>
|
||||||
|
<Item current="20 MHz" id="ckodivider.InputValue"/>
|
||||||
|
<Item current="20.0 MHz" id="ckodivider.OutputValue"/>
|
||||||
|
<Item current="ckoselector.radiobutton.swthococlock" id="ckodivider.Condition"/>
|
||||||
|
<Item current="comboBox1-1" error="false" id="ckodivider.comboBox"/>
|
||||||
|
<Item current="20 MHz" error="false" id="ckodivider.PreOutput"/>
|
||||||
|
<Item current="ckoselector" error="false" id="ckodivider.PreOutputController"/>
|
||||||
|
<Item current="false" id="uclkSourceSelect.isSelected"/>
|
||||||
|
<Item current="" id="uclkSourceSelect.InputValue"/>
|
||||||
|
<Item current="" id="uclkSourceSelect.OutputValue"/>
|
||||||
|
<Item current="swtuckdivider" id="uclkSourceSelect.radiobutton"/>
|
||||||
|
<Item current="0" id="uclkSourceSelect.CurrentValue"/>
|
||||||
|
<Item current="true" id="uclkSourceSelect.buttonDisable.0"/>
|
||||||
|
<Item current="false" id="uclkSourceSelect.buttonDisable.1"/>
|
||||||
|
<Item current="true" id="outckSourceSelect.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="outckSourceSelect.InputValue"/>
|
||||||
|
<Item current="200.0 MHz" id="outckSourceSelect.OutputValue"/>
|
||||||
|
<Item current="swtppll" id="outckSourceSelect.radiobutton"/>
|
||||||
|
<Item current="1" id="outckSourceSelect.CurrentValue"/>
|
||||||
|
<Item current="false" id="outckSourceSelect.buttonDisable.0"/>
|
||||||
|
<Item current="false" id="outckSourceSelect.buttonDisable.1"/>
|
||||||
|
<Item current="true" id="fclk.isSelected"/>
|
||||||
|
<Item current="60.0 MHz" id="fclk.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="fclk.OutputValue"/>
|
||||||
|
<Item current="60.0" id="fclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="fclk.unitTxt"/>
|
||||||
|
<Item current="60.0" id="fclk.CurrentValue"/>
|
||||||
|
<Item current="false" id="fclk.Disabled"/>
|
||||||
|
<Item current="true" id="iclk.isSelected"/>
|
||||||
|
<Item current="240.0 MHz" id="iclk.InputValue"/>
|
||||||
|
<Item current="240.0 MHz" id="iclk.OutputValue"/>
|
||||||
|
<Item current="240.0" id="iclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="iclk.unitTxt"/>
|
||||||
|
<Item current="240.0" id="iclk.CurrentValue"/>
|
||||||
|
<Item current="false" id="iclk.Disabled"/>
|
||||||
|
<Item current="true" id="pclka.isSelected"/>
|
||||||
|
<Item current="120.0 MHz" id="pclka.InputValue"/>
|
||||||
|
<Item current="120.0 MHz" id="pclka.OutputValue"/>
|
||||||
|
<Item current="120.0" id="pclka.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="pclka.unitTxt"/>
|
||||||
|
<Item current="120.0" id="pclka.CurrentValue"/>
|
||||||
|
<Item current="false" id="pclka.Disabled"/>
|
||||||
|
<Item current="true" id="pclkb.isSelected"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkb.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkb.OutputValue"/>
|
||||||
|
<Item current="60.0" id="pclkb.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="pclkb.unitTxt"/>
|
||||||
|
<Item current="60.0" id="pclkb.CurrentValue"/>
|
||||||
|
<Item current="false" id="pclkb.Disabled"/>
|
||||||
|
<Item current="true" id="pclkc.isSelected"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkc.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkc.OutputValue"/>
|
||||||
|
<Item current="60.0" id="pclkc.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="pclkc.unitTxt"/>
|
||||||
|
<Item current="60.0" id="pclkc.CurrentValue"/>
|
||||||
|
<Item current="false" id="pclkc.Disabled"/>
|
||||||
|
<Item current="true" id="pclkd.isSelected"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkd.InputValue"/>
|
||||||
|
<Item current="60.0 MHz" id="pclkd.OutputValue"/>
|
||||||
|
<Item current="60.0" id="pclkd.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="pclkd.unitTxt"/>
|
||||||
|
<Item current="60.0" id="pclkd.CurrentValue"/>
|
||||||
|
<Item current="false" id="pclkd.Disabled"/>
|
||||||
|
<Item current="false" id="bckpin.isSelected"/>
|
||||||
|
<Item current="" id="bckpin.InputValue"/>
|
||||||
|
<Item current="0" id="bckpin.OutputValue"/>
|
||||||
|
<Item current="-" id="bckpin.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="bckpin.unitTxt"/>
|
||||||
|
<Item current="true" id="bckpin.Disabled"/>
|
||||||
|
<Item current="true" id="bck.isSelected"/>
|
||||||
|
<Item current="80.0 MHz" id="bck.InputValue"/>
|
||||||
|
<Item current="80.0 MHz" id="bck.OutputValue"/>
|
||||||
|
<Item current="80.0" id="bck.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="bck.unitTxt"/>
|
||||||
|
<Item current="80.0" id="bck.CurrentValue"/>
|
||||||
|
<Item current="false" id="bck.Disabled"/>
|
||||||
|
<Item current="false" id="sdclk.selectBox"/>
|
||||||
|
<Item current="80.0 MHz" id="sdclk.InputValue"/>
|
||||||
|
<Item current="0" id="sdclk.OutputValue"/>
|
||||||
|
<Item current="-" id="sdclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="sdclk.unitTxt"/>
|
||||||
|
<Item current="80.0" id="sdclk.CurrentValue"/>
|
||||||
|
<Item current="true" id="sdclk.Disabled"/>
|
||||||
|
<Item current="false" id="sdclk.SelectBoxDisabled"/>
|
||||||
|
<Item current="false" id="uclk.isSelected"/>
|
||||||
|
<Item current="" id="uclk.InputValue"/>
|
||||||
|
<Item current="0" id="uclk.OutputValue"/>
|
||||||
|
<Item current="-" id="uclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="uclk.unitTxt"/>
|
||||||
|
<Item current="48.0" id="uclk.CurrentValue"/>
|
||||||
|
<Item current="true" id="uclk.Disabled"/>
|
||||||
|
<Item current="true" id="outckdivider.isSelected"/>
|
||||||
|
<Item current="200.0 MHz" id="outckdivider.InputValue"/>
|
||||||
|
<Item current="25.0 MHz" id="outckdivider.OutputValue"/>
|
||||||
|
<Item current="comboBox1-8" error="false" id="outckdivider.comboBox"/>
|
||||||
|
<Item current="true" id="clkout25m.isSelected"/>
|
||||||
|
<Item current="25.0 MHz" id="clkout25m.InputValue"/>
|
||||||
|
<Item current="25.0 MHz" id="clkout25m.OutputValue"/>
|
||||||
|
<Item current="25.0" id="clkout25m.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="clkout25m.unitTxt"/>
|
||||||
|
<Item current="25.0" id="clkout25m.CurrentValue"/>
|
||||||
|
<Item current="false" id="clkout25m.Disabled"/>
|
||||||
|
<Item current="false" id="clkout.selectBox"/>
|
||||||
|
<Item current="20.0 MHz" id="clkout.InputValue"/>
|
||||||
|
<Item current="0" id="clkout.OutputValue"/>
|
||||||
|
<Item current="-" id="clkout.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="clkout.unitTxt"/>
|
||||||
|
<Item current="20.0" id="clkout.CurrentValue"/>
|
||||||
|
<Item current="true" id="clkout.Disabled"/>
|
||||||
|
<Item current="false" id="clkout.SelectBoxDisabled"/>
|
||||||
|
<Item current="false" id="cacilsclk.isSelected"/>
|
||||||
|
<Item current="" id="cacilsclk.InputValue"/>
|
||||||
|
<Item current="0" id="cacilsclk.OutputValue"/>
|
||||||
|
<Item current="-" id="cacilsclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="cacilsclk.unitTxt"/>
|
||||||
|
<Item current="true" id="cacilsclk.Disabled"/>
|
||||||
|
<Item current="false" id="caclclk.isSelected"/>
|
||||||
|
<Item current="" id="caclclk.InputValue"/>
|
||||||
|
<Item current="0" id="caclclk.OutputValue"/>
|
||||||
|
<Item current="-" id="caclclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="caclclk.unitTxt"/>
|
||||||
|
<Item current="true" id="caclclk.Disabled"/>
|
||||||
|
<Item current="true" id="cachclk.isSelected"/>
|
||||||
|
<Item current="20 MHz" id="cachclk.InputValue"/>
|
||||||
|
<Item current="20 MHz" id="cachclk.OutputValue"/>
|
||||||
|
<Item current="20" id="cachclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="cachclk.unitTxt"/>
|
||||||
|
<Item current="false" id="cachclk.Disabled"/>
|
||||||
|
<Item current="false" id="cacsclk.isSelected"/>
|
||||||
|
<Item current="" id="cacsclk.InputValue"/>
|
||||||
|
<Item current="0" id="cacsclk.OutputValue"/>
|
||||||
|
<Item current="-" id="cacsclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="cacsclk.unitTxt"/>
|
||||||
|
<Item current="true" id="cacsclk.Disabled"/>
|
||||||
|
<Item current="false" id="rtcclk.selectBox"/>
|
||||||
|
<Item current="" id="rtcclk.InputValue"/>
|
||||||
|
<Item current="0" id="rtcclk.OutputValue"/>
|
||||||
|
<Item current="-" id="rtcclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="rtcclk.unitTxt"/>
|
||||||
|
<Item current="true" id="rtcclk.Disabled"/>
|
||||||
|
<Item current="true" id="rtcclk.SelectBoxDisabled"/>
|
||||||
|
<Item current="false" id="cacmclk.isSelected"/>
|
||||||
|
<Item current="" id="cacmclk.InputValue"/>
|
||||||
|
<Item current="0" id="cacmclk.OutputValue"/>
|
||||||
|
<Item current="-" id="cacmclk.frequencyTxt"/>
|
||||||
|
<Item current="MHz" id="cacmclk.unitTxt"/>
|
||||||
|
<Item current="16" id="cacmclk.CurrentValue"/>
|
||||||
|
<Item current="true" id="cacmclk.Disabled"/>
|
||||||
|
<Item current="20" id="cachclk.CurrentValue"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="Pins" version="1.0.1.0">
|
||||||
|
<pinItem allocation="" comments="" direction="None" id="XTAL" isUsedBySoftware="false" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="50" comments="" direction="None" id="CLKOUT25M" isUsedBySoftware="true" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="" comments="" direction="None" id="EXTAL" isUsedBySoftware="false" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="45" comments="" direction="None" id="RXD2" isUsedBySoftware="true" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="44" comments="" direction="None" id="TXD2" isUsedBySoftware="true" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="79" comments="" direction="None" id="RXD9" isUsedBySoftware="true" locked="false" status="0"/>
|
||||||
|
<pinItem allocation="78" comments="" direction="None" id="TXD9" isUsedBySoftware="true" locked="false" status="0"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="Interrupt">
|
||||||
|
<Item currentVect="16" id="BSC_BUSERR" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="17" groupchild="<br>1-DPFPUEX" id="IE0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="18" id="RAM_RAMERR" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="21" id="FCU_FIFERR" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="23" id="FCU_FRDYI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="26" id="ICU_SWINT2" priority="1" usedState="Used"/>
|
||||||
|
<Item currentVect="27" id="ICU_SWINT" priority="1" usedState="Not Use"/>
|
||||||
|
<Item currentVect="28" id="CMT0_CMI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="29" id="CMT1_CMI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="30" id="CMTW0_CMWI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="31" id="CMTW1_CMWI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="34" id="USB0_D0FIFO0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="35" id="USB0_D1FIFO0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="38" id="RSPI0_SPRI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="39" id="RSPI0_SPTI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="40" id="RSPI1_SPRI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="41" id="RSPI1_SPTI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="42" id="QSPI_SPRI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="43" id="QSPI_SPTI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="44" id="SDHI_SBFAI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="45" id="MMCIF_MBFAI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="46" id="SSIE0_SSITXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="47" id="SSIE0_SSIRXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="48" id="SSIE1_SSIRTI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="50" id="RIIC1_RXI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="51" id="RIIC1_TXI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="52" id="RIIC0_RXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="53" id="RIIC0_TXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="54" id="RIIC2_RXI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="55" id="RIIC2_TXI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="58" id="SCI0_RXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="59" id="SCI0_TXI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="60" id="SCI1_RXI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="61" id="SCI1_TXI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="62" id="SCI2_RXI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="63" id="SCI2_TXI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="64" id="ICU_IRQ0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="65" id="ICU_IRQ1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="66" id="ICU_IRQ2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="67" id="ICU_IRQ3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="68" id="ICU_IRQ4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="69" id="ICU_IRQ5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="70" id="ICU_IRQ6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="71" id="ICU_IRQ7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="72" id="ICU_IRQ8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="73" id="ICU_IRQ9" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="74" id="ICU_IRQ10" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="75" id="ICU_IRQ11" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="76" id="ICU_IRQ12" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="77" id="ICU_IRQ13" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="78" id="ICU_IRQ14" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="79" id="ICU_IRQ15" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="80" id="SCI3_RXI3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="81" id="SCI3_TXI3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="82" id="SCI4_RXI4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="83" id="SCI4_TXI4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="84" id="SCI5_RXI5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="85" id="SCI5_TXI5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="86" id="SCI6_RXI6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="87" id="SCI6_TXI6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="88" id="LVD1_LVD1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="89" id="LVD2_LVD2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="90" id="USB0_USBR0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="92" id="RTC_ALM" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="93" id="RTC_PRD" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="95" id="IWDT_IWUNI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="96" id="WDT_WUNI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="97" id="PDC_PCDFI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="98" id="SCI7_RXI7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="99" id="SCI7_TXI7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="100" id="SCI8_RXI8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="101" id="SCI8_TXI8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="102" id="SCI9_RXI9" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="103" id="SCI9_TXI9" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="104" id="SCI10_RXI10" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="105" id="SCI10_TXI10" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="106" groupchild="<br>1-ERS0<br>2-ERS1<br>3-ERS2" id="BE0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="107" groupchild="<br>1-POEGGAI<br>2-POEGGBI<br>3-POEGGCI<br>4-POEGGDI" id="BL2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="108" id="RSPI2_SPRI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="109" id="RSPI2_SPTI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="110" groupchild="<br>1-TEI0<br>2-ERI0<br>3-TEI1<br>4-ERI1<br>5-TEI2<br>6-ERI2<br>7-TEI3<br>8-ERI3<br>9-TEI4<br>10-ERI4<br>11-TEI5<br>12-ERI5<br>13-TEI6<br>14-ERI6<br>15-TEI12<br>16-ERI12<br>17-SCIX0<br>18-SCIX1<br>19-SCIX2<br>20-SCIX3<br>21-QSPSSLI<br>22-FERRI<br>23-MENDI<br>24-OVFI<br>25-DOPCI<br>26-PCFEI<br>27-PCERI" id="BL0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="111" groupchild="<br>1-CDETI<br>2-CACI<br>3-SDACI<br>4-CDETIO<br>5-ERRIO<br>6-ACCIO<br>7-OEI1<br>8-OEI2<br>9-OEI3<br>10-OEI4<br>11-TEI0<br>12-EEI0<br>13-TEI2<br>14-EEI2<br>15-SSIF0<br>16-SSIF1<br>17-S12CMPAI<br>18-S12CMPBI<br>19-S12CMPAI1<br>20-S12CMPBI1<br>21-TEI1<br>22-EEI1" id="BL1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="112" groupchild="<br>1-TEI8<br>2-ERI8<br>3-TEI9<br>4-ERI9<br>5-TEI10<br>6-ERI10<br>7-TEI11<br>8-ERI11<br>9-SPII0<br>10-SPEI0<br>11-SPII1<br>12-SPEI1<br>13-SPII2<br>14-SPEI2<br>15-TEI7<br>16-ERI7" id="AL0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="113" groupchild="<br>1-MINT<br>2-PINT<br>3-EINT0<br>4-EINT1<br>5-VPOS<br>6-GR1UF<br>7-GR2UF<br>8-DRW_IRQ" id="AL1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="114" id="SCI11_RXI11" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="115" id="SCI11_TXI11" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="116" id="SCI12_RXI12" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="117" id="SCI12_TXI12" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="120" id="DMAC_DMAC0I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="121" id="DMAC_DMAC1I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="122" id="DMAC_DMAC2I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="123" id="DMAC_DMAC3I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="124" id="DMAC_DMAC74I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="125" id="OST_OSTDI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="126" id="EXDMAC_EXDMAC0I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="127" id="EXDMAC_EXDMAC1I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="128" defaultVect="128" id="CMT2_CMI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="129" defaultVect="129" id="CMT3_CMI3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="130" defaultVect="130" id="TPU0_TGI0A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="131" defaultVect="131" id="TPU0_TGI0B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="132" defaultVect="132" id="TPU0_TGI0C" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="133" defaultVect="133" id="TPU0_TGI0D" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="134" defaultVect="134" id="TPU0_TCI0V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="135" defaultVect="135" id="TPU1_TGI1B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="136" defaultVect="136" id="TPU1_TCI1V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="137" defaultVect="137" id="TPU1_TCI1U" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="138" defaultVect="138" id="TPU2_TGI2A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="139" defaultVect="139" id="TPU2_TGI2B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="140" defaultVect="140" id="TPU2_TCI2V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="141" defaultVect="141" id="TPU2_TCI2U" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="142" defaultVect="142" id="TPU3_TGI3A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="143" defaultVect="143" id="TPU3_TGI3B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="144" defaultVect="144" id="TPU1_TGI1A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="145" defaultVect="145" id="TPU3_TGI3C" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="146" defaultVect="146" id="TMR0_CMIA0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="147" defaultVect="147" id="TMR0_CMIB0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="148" defaultVect="148" id="TMR0_OVI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="149" defaultVect="149" id="TMR1_CMIA1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="150" defaultVect="150" id="TMR1_CMIB1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="151" defaultVect="151" id="TMR1_OVI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="152" defaultVect="152" id="TMR2_CMIA2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="153" defaultVect="153" id="TMR2_CMIB2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="154" defaultVect="154" id="TMR2_OVI2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="155" defaultVect="155" id="TMR3_CMIA3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="156" defaultVect="156" id="TMR3_CMIB3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="157" defaultVect="157" id="TMR3_OVI3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="158" defaultVect="158" id="TPU3_TGI3D" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="159" defaultVect="159" id="TPU3_TCI3V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="160" defaultVect="160" id="TPU4_TGI4A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="161" defaultVect="161" id="TPU4_TGI4B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="162" defaultVect="162" id="TPU4_TCI4V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="163" defaultVect="163" id="TPU4_TCI4U" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="164" defaultVect="164" id="TPU5_TGI5A" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="165" defaultVect="165" id="TPU5_TGI5B" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="166" defaultVect="166" id="TPU5_TCI5V" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="167" defaultVect="167" id="TPU5_TCI5U" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="168" defaultVect="168" id="CMTW0_IC0I0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="169" defaultVect="169" id="CMTW0_IC1I0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="170" defaultVect="170" id="CMTW0_OC0I0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="171" defaultVect="171" id="CMTW0_OC1I0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="172" defaultVect="172" id="CMTW1_IC0I1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="173" defaultVect="173" id="CMTW1_IC1I1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="174" defaultVect="174" id="CMTW1_OC0I1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="175" defaultVect="175" id="CMTW1_OC1I1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="176" defaultVect="176" id="RTC_CUP" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="177" defaultVect="177" id="CAN0_RXF0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="178" defaultVect="178" id="CAN0_TXF0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="179" defaultVect="179" id="CAN0_RXM0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="180" defaultVect="180" id="CAN0_TXM0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="181" defaultVect="181" id="CAN1_RXF1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="182" defaultVect="182" id="CAN1_TXF1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="183" defaultVect="183" id="CAN1_RXM1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="184" defaultVect="184" id="CAN1_TXM1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="185" defaultVect="185" id="USB0_USBI0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="186" defaultVect="186" id="S12AD_S12ADI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="187" defaultVect="187" id="S12AD_S12GBADI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="188" defaultVect="188" id="S12AD_S12GCADI" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="189" defaultVect="189" id="S12AD1_S12ADI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="190" defaultVect="190" id="S12AD1_S12GBADI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="191" defaultVect="191" id="S12AD1_S12GCADI1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="192" defaultVect="192" id="ELC_ELSR18I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="193" defaultVect="193" id="ELC_ELSR19I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="194" defaultVect="194" id="TSIP_PROC_BUSY" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="195" defaultVect="195" id="TSIP_ROMOK" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="196" defaultVect="196" id="TSIP_LONG_PLG" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="197" defaultVect="197" id="TSIP_TEST_BUSY" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="198" defaultVect="198" id="TSIP_WRRDY0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="199" defaultVect="199" id="TSIP_WRRDY1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="200" defaultVect="200" id="TSIP_WRRDY4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="201" defaultVect="201" id="TSIP_RDRDY0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="202" defaultVect="202" id="TSIP_RDRDY1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="203" defaultVect="203" id="TSIP_INTEGRATE_WRRDY" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="204" defaultVect="204" id="TSIP_INTEGRATE_RDRDY" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="205" id="PERIB_INTB205" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="206" id="PERIB_INTB206" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="207" id="PERIB_INTB207" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="208" defaultVect="208" id="MTU1_TGIA1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="209" defaultVect="209" id="MTU0_TGIA0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="210" defaultVect="210" id="MTU0_TGIB0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="211" defaultVect="211" id="MTU0_TGIC0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="212" defaultVect="212" id="MTU0_TGID0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="213" defaultVect="213" id="MTU0_TCIV0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="214" defaultVect="214" id="MTU0_TGIE0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="215" defaultVect="215" id="MTU0_TGIF0" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="216" defaultVect="216" id="MTU1_TGIB1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="217" defaultVect="217" id="MTU1_TCIV1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="218" defaultVect="218" id="MTU1_TCIU1" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="219" defaultVect="219" id="MTU2_TGIA2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="220" defaultVect="220" id="MTU2_TGIB2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="221" defaultVect="221" id="MTU2_TCIV2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="222" defaultVect="222" id="MTU2_TCIU2" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="223" defaultVect="223" id="MTU3_TGIA3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="224" defaultVect="224" id="MTU3_TGIB3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="225" defaultVect="225" id="MTU3_TGIC3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="226" defaultVect="226" id="MTU3_TGID3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="227" defaultVect="227" id="MTU3_TCIV3" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="228" defaultVect="228" id="MTU4_TGIA4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="229" defaultVect="229" id="MTU4_TGIB4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="230" defaultVect="230" id="MTU4_TGIC4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="231" defaultVect="231" id="MTU4_TGID4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="232" defaultVect="232" id="MTU4_TCIV4" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="233" defaultVect="233" id="MTU5_TGIU5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="234" defaultVect="234" id="MTU5_TGIV5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="235" defaultVect="235" id="MTU5_TGIW5" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="236" defaultVect="236" id="MTU6_TGIA6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="237" defaultVect="237" id="MTU6_TGIB6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="238" defaultVect="238" id="MTU6_TGIC6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="239" defaultVect="239" id="MTU6_TGID6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="240" defaultVect="240" id="MTU6_TCIV6" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="241" defaultVect="241" id="MTU7_TGIA7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="242" defaultVect="242" id="MTU7_TGIB7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="243" defaultVect="243" id="MTU7_TGIC7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="244" defaultVect="244" id="MTU7_TGID7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="245" defaultVect="245" id="MTU7_TCIV7" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="246" defaultVect="246" id="MTU8_TGIA8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="247" defaultVect="247" id="MTU8_TGIB8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="248" defaultVect="248" id="MTU8_TGIC8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="249" defaultVect="249" id="MTU8_TGID8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="250" defaultVect="250" id="MTU8_TCIV8" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="251" defaultVect="251" id="EPTPC_IPLS" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="252" defaultVect="252" id="PMGI0_PMGI0I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="253" defaultVect="253" id="PMGI1_PMGI1I" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="254" id="PERIA_INTA254" priority="15" usedState="Not Use"/>
|
||||||
|
<Item currentVect="255" id="PERIA_INTA255" priority="15" usedState="Not Use"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="SWComponent" version="1.0.0.0">
|
||||||
|
<configuration id="cd9c5dcf-9eb1-4458-9c0f-b4dfe68d8930" inuse="true" name="FreeRTOS_Kernel">
|
||||||
|
<component description="This component is a part of RTOS Configurator feature that allow user to use the GUI to configure kernel setting of FreeRTOS." detailDescription="" display="FreeRTOS_Kernel" id="com.renesas.smc.tools.swcomponent.rtosconfigurator.freertos.kernel" version="1.0.100">
|
||||||
|
<gridItem id="configUSE_PREEMPTION" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_IDLE_HOOK" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_TICK_HOOK" selectedIndex="1"/>
|
||||||
|
<gridItem id="configCPU_CLOCK_HZ" selectedIndex="BSP_ICLK_HZ"/>
|
||||||
|
<gridItem id="configPERIPHERAL_CLOCK_HZ" selectedIndex="BSP_PCLKB_HZ"/>
|
||||||
|
<gridItem id="configTICK_RATE_HZ" selectedIndex="( TickType_t ) 1000"/>
|
||||||
|
<gridItem id="configMINIMAL_STACK_SIZE" selectedIndex="( unsigned short ) 170"/>
|
||||||
|
<gridItem id="configTOTAL_HEAP_SIZE_N" selectedIndex="60"/>
|
||||||
|
<gridItem id="configTOTAL_HEAP_SIZE" selectedIndex="( size_t ) ( configTOTAL_HEAP_SIZE_N * 1024 )"/>
|
||||||
|
<gridItem id="configMAX_TASK_NAME_LEN" selectedIndex="12"/>
|
||||||
|
<gridItem id="configUSE_TRACE_FACILITY" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_16_BIT_TICKS" selectedIndex="0"/>
|
||||||
|
<gridItem id="configIDLE_SHOULD_YIELD" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_CO_ROUTINES" selectedIndex="0"/>
|
||||||
|
<gridItem id="configUSE_MUTEXES" selectedIndex="1"/>
|
||||||
|
<gridItem id="configGENERATE_RUN_TIME_STATS" selectedIndex="0"/>
|
||||||
|
<gridItem id="configCHECK_FOR_STACK_OVERFLOW" selectedIndex="2"/>
|
||||||
|
<gridItem id="configUSE_RECURSIVE_MUTEXES" selectedIndex="1"/>
|
||||||
|
<gridItem id="configQUEUE_REGISTRY_SIZE" selectedIndex="0"/>
|
||||||
|
<gridItem id="configUSE_MALLOC_FAILED_HOOK" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_APPLICATION_TASK_TAG" selectedIndex="0"/>
|
||||||
|
<gridItem id="configUSE_QUEUE_SETS" selectedIndex="1"/>
|
||||||
|
<gridItem id="configUSE_COUNTING_SEMAPHORES" selectedIndex="1"/>
|
||||||
|
<gridItem id="configMAX_PRIORITIES" selectedIndex="7"/>
|
||||||
|
<gridItem id="configMAX_CO_ROUTINE_PRIORITIES" selectedIndex="2"/>
|
||||||
|
<gridItem id="configUSE_TIMERS" selectedIndex="1"/>
|
||||||
|
<gridItem id="configTIMER_TASK_PRIORITY" selectedIndex="6"/>
|
||||||
|
<gridItem id="configTIMER_QUEUE_LENGTH" selectedIndex="5"/>
|
||||||
|
<gridItem id="configTIMER_TASK_STACK_DEPTH" selectedIndex="configMINIMAL_STACK_SIZE"/>
|
||||||
|
<gridItem id="configKERNEL_INTERRUPT_PRIORITY" selectedIndex="1"/>
|
||||||
|
<gridItem id="configMAX_SYSCALL_INTERRUPT_PRIORITY" selectedIndex="4"/>
|
||||||
|
<gridItem id="configTICK_VECTOR" selectedIndex="0"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskPrioritySet" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_uxTaskPriorityGet" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskDelete" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskCleanUpResources" selectedIndex="0"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskSuspend" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskDelayUntil" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_vTaskDelay" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_uxTaskGetStackHighWaterMark" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_xTaskGetSchedulerState" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_eTaskGetState" selectedIndex="1"/>
|
||||||
|
<gridItem id="INCLUDE_xTimerPendFunctionCall" selectedIndex="1"/>
|
||||||
|
<gridItem id="bktPRIMARY_PRIORITY" selectedIndex="( configMAX_PRIORITIES - 3 )"/>
|
||||||
|
<gridItem id="bktSECONDARY_PRIORITY" selectedIndex="( configMAX_PRIORITIES - 4 )"/>
|
||||||
|
<gridItem id="intqHIGHER_PRIORITY" selectedIndex="( configMAX_PRIORITIES - 3 )"/>
|
||||||
|
<gridItem id="configMAC_ADDR0" selectedIndex="0x01"/>
|
||||||
|
<gridItem id="configMAC_ADDR1" selectedIndex="0x12"/>
|
||||||
|
<gridItem id="configMAC_ADDR2" selectedIndex="0x13"/>
|
||||||
|
<gridItem id="configMAC_ADDR3" selectedIndex="0x10"/>
|
||||||
|
<gridItem id="configMAC_ADDR4" selectedIndex="0x15"/>
|
||||||
|
<gridItem id="configMAC_ADDR5" selectedIndex="0x11"/>
|
||||||
|
<gridItem id="configIP_ADDR0" selectedIndex="192"/>
|
||||||
|
<gridItem id="configIP_ADDR1" selectedIndex="168"/>
|
||||||
|
<gridItem id="configIP_ADDR2" selectedIndex="0"/>
|
||||||
|
<gridItem id="configIP_ADDR3" selectedIndex="200"/>
|
||||||
|
<gridItem id="configNET_MASK0" selectedIndex="8"/>
|
||||||
|
<gridItem id="configNET_MASK1" selectedIndex="8"/>
|
||||||
|
<gridItem id="configNET_MASK2" selectedIndex="8"/>
|
||||||
|
<gridItem id="configNET_MASK3" selectedIndex="0"/>
|
||||||
|
<gridItem id="configUSE_TASK_NOTIFICATIONS" selectedIndex="1"/>
|
||||||
|
<gridItem id="configRECORD_STACK_HIGH_ADDRESS" selectedIndex="0"/>
|
||||||
|
<gridItem id="configNUM_THREAD_LOCAL_STORAGE_POINTERS" selectedIndex="0"/>
|
||||||
|
<gridItem id="configSUPPORT_DYNAMIC_ALLOCATION" selectedIndex="1"/>
|
||||||
|
<gridItem id="configSUPPORT_STATIC_ALLOCATION" selectedIndex="0"/>
|
||||||
|
</component>
|
||||||
|
<source description="Code generator for Real-time OS" display="RTOS Configurator" id="com.renesas.smc.tools.swcomponent.rtosconfigurator.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration id="69122a3f-6cfe-4250-bf8a-c770b6604efd" inuse="true" name="FreeRTOS_Object">
|
||||||
|
<allocatable id="OBJECT" name="OBJECT">
|
||||||
|
<allocatable id="TASK" name="TASK">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="QUEUE" name="QUEUE">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="SEMAPHORE" name="SEMAPHORE">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="SWTIMER" name="SWTIMER">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="EVENTGROUP" name="EVENTGROUP">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="STREAMBUFFER" name="STREAMBUFFER">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
<allocatable id="MESSAGEBUFFER" name="MESSAGEBUFFER">
|
||||||
|
<option defaultValue="0" id="LinkNum" value=""/>
|
||||||
|
</allocatable>
|
||||||
|
</allocatable>
|
||||||
|
<component description="This component is a part of RTOS Configurator feature that allow user to use the GUI to create and configure new object of FreeRTOS." detailDescription="" display="FreeRTOS_Object" id="com.renesas.smc.tools.swcomponent.rtosconfigurator.freertos.object" version="1.0.100"/>
|
||||||
|
<source description="Code generator for Real-time OS" display="RTOS Configurator" id="com.renesas.smc.tools.swcomponent.rtosconfigurator.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration inuse="true" name="r_bsp">
|
||||||
|
<component description="Dependencies : None The r_bsp package provides a foundation for code to be built on top of. It provides startup code, iodefines, and MCU information for different boards. There are 2 folders that make up the r_bsp package. The 'mcu' folder contains files that are common to a MCU group. These files provide functionality such as easy register access, CPU functions, and a file named 'mcu_info.h' for each MCU group. The 'mcu_info.h' file has information about the MCU on the board and is configured based on the information given in r_bsp_config.h. The information in 'mcu_info.h' is used to help configure Renesas middleware that uses the r_bsp package. The 'board' folder has a folder with startup code for each supported board. Which MCU and board is chosen is decided by the settings in 'platform.h'. The user can choose which board they are using by uncommenting the include path that applies to their board. For example, if you are using the RSK+RX64M then you would uncomment the #include "./board/generic_rx64m/r_bsp.h" include path. Users are encouraged to add their own boards to the 'board' directory. BSPs are configured by using the r_bsp_config.h file. Each board will have a reference configuration file named r_bsp_config_reference.h. The user should copy this file to their project, rename it to r_bsp_config.h, and use the options inside the file to configure the BSP for their project." detailDescription="Board Support Packages." display="r_bsp" id="r_bsp5.52" version="5.52">
|
||||||
|
<gridItem id="BSP_CFG_STARTUP_DISABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_STACK_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USTACK_BYTES" selectedIndex="0x0"/>
|
||||||
|
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x400"/>
|
||||||
|
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0x0"/>
|
||||||
|
<gridItem id="BSP_CFG_IO_LIB_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_CHARGET_ENABLED" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_CHARGET_FUNCTION" selectedIndex="my_sw_charget_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_CHARPUT_FUNCTION" selectedIndex="my_sw_charput_function"/>
|
||||||
|
<gridItem id="BSP_CFG_RUN_IN_USER_MODE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_ID_CODE_LONG_1" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_ID_CODE_LONG_2" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_ID_CODE_LONG_3" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_ID_CODE_LONG_4" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_ROM_CACHE_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_TRUSTED_MODE_FUNCTION" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_FAW_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_ROMCODE_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||||
|
<gridItem id="BSP_CFG_CODE_FLASH_BANK_MODE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_CODE_FLASH_START_BANK" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_ENABLED" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_TYPE" selectedIndex="bsp_lock_t"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION" selectedIndex="my_hw_locking_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION" selectedIndex="my_hw_unlocking_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION" selectedIndex="my_sw_locking_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION" selectedIndex="my_sw_unlocking_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_WARM_START_PRE_C_FUNCTION" selectedIndex="my_sw_warmstart_prec_function"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_USER_WARM_START_POST_C_FUNCTION" selectedIndex="my_sw_warmstart_postc_function"/>
|
||||||
|
<gridItem id="BSP_CFG_PARAM_CHECKING_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_EBMAPCR_1ST_PRIORITY" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_EBMAPCR_2ND_PRIORITY" selectedIndex="3"/>
|
||||||
|
<gridItem id="BSP_CFG_EBMAPCR_3RD_PRIORITY" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_EBMAPCR_4TH_PRIORITY" selectedIndex="2"/>
|
||||||
|
<gridItem id="BSP_CFG_EBMAPCR_5TH_PRIORITY" selectedIndex="4"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_ADDR" selectedIndex="0xFFE00000"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_SIZE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_IF_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_OA_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_DM_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_ADDR" selectedIndex="0xFFE00000"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_SIZE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_IF_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_OA_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_DM_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_FIT_IPL_MAX" selectedIndex="15"/>
|
||||||
|
<gridItem id="BSP_CFG_CLKOUT_OUTPUT" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_SWINT_UNIT1_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
|
||||||
|
<gridItem id="BSP_CFG_SWINT_TASK_BUFFER_NUMBER" selectedIndex="8"/>
|
||||||
|
<gridItem id="BSP_CFG_SWINT_IPR_INITIAL_VALUE" selectedIndex="1"/>
|
||||||
|
</component>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration inuse="true" name="r_byteq">
|
||||||
|
<component description="Dependency : r_bsp version(s) 3.10 This module allocates a queue control block in an Open() call to handle indexing for buffers provided by the user application. Additional functions are provided to put and get data from the buffer queue, inspect the number of bytes available or in use, and to flush the queue. There is no limit to the number of queues supported, and queue control blocks can be allocated statically at build time or dynamically at run time." detailDescription="Byte-based circular buffer library." display="r_byteq" id="r_byteq1.80" version="1.80">
|
||||||
|
<gridItem id="BYTEQ_CFG_PARAM_CHECKING_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS" selectedIndex="0"/>
|
||||||
|
<gridItem id="BYTEQ_CFG_MAX_CTRL_BLKS" selectedIndex="32"/>
|
||||||
|
</component>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration inuse="true" name="r_gpio_rx">
|
||||||
|
<component description="Dependency : r_bsp version(s) 5.52 This code implements a General Purpose Input/Output driver. Common features such as reading, writing, and setting the direction of ports and pins is supported. Enabling features such as open-drain outputs and internal pull-ups are also supported." detailDescription="General Purpose Input/Output Driver" display="r_gpio_rx" id="r_gpio_rx3.50" version="3.50">
|
||||||
|
<gridItem id="GPIO_CFG_PARAM_CHECKING_ENABLE" selectedIndex="0"/>
|
||||||
|
</component>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration inuse="true" name="r_sci_rx">
|
||||||
|
<component description="Dependency : r_bsp version(s) 5.52 Dependency : r_byteq version(s) 1.40, 1.50, 1.60, 1.70, 1.71, 1.80 This module allows any number of SCI channels on the MCU to run in full duplex Asynchronous mode, single master Simple SPI mode, or master Synchronous mode simultaneously. The driver is interrupt driven and non-blocking. Transmit and receive buffer queues are used in Asynchronous mode and their sizes may be configured independently for each channel. Resources for unused channels or modes may be removed via settings in the driver's config.h file." detailDescription="Multi-Channel Multi-Mode SCI Driver." display="r_sci_rx" id="r_sci_rx3.50" version="3.50">
|
||||||
|
<gridItem id="SCK0" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD0/SMISO0" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD0/SMOSI0" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS0#/RTS0#/SS0#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI0" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK1" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD1/SMISO1" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD1/SMOSI1" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS1#/RTS1#/SS1#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI1" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK2" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD2/SMISO2" selectedIndex="1"/>
|
||||||
|
<gridItem id="TXD2/SMOSI2" selectedIndex="1"/>
|
||||||
|
<gridItem id="CTS2#/RTS2#/SS2#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI2" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCK3" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD3/SMISO3" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD3/SMOSI3" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS3#/RTS3#/SS3#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI3" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK4" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD4/SMISO4" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD4/SMOSI4" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS4#/RTS4#/SS4#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI4" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK5" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD5/SMISO5" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD5/SMOSI5" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS5#/RTS5#/SS5#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI5" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK6" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD6/SMISO6" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD6/SMOSI6" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS6#/RTS6#/SS6#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI6" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK7" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD7/SMISO7" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD7/SMOSI7" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS7#/RTS7#/SS7#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI7" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK8" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD8/SMISO8/SSCL8" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD8/SMOSI8/SSDA8" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS8#/RTS8#/SS8#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI8" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK9" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD9/SMISO9/SSCL9" selectedIndex="1"/>
|
||||||
|
<gridItem id="TXD9/SMOSI9/SSDA9" selectedIndex="1"/>
|
||||||
|
<gridItem id="CTS9#/RTS9#/SS9#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI9" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCK10" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD10/SMISO10/SSCL10" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD10/SMOSI10/SSDA10" selectedIndex="0"/>
|
||||||
|
<gridItem id="SS10#" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS10#" selectedIndex="0"/>
|
||||||
|
<gridItem id="RTS10#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI10" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK11" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD11/SMISO11" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD11/SMOSI11" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS11#/RTS11#/SS11#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI11" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK11" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD11/SMISO11/SSCL11" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD11/SMOSI11/SSDA11" selectedIndex="0"/>
|
||||||
|
<gridItem id="SS11#" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS11#" selectedIndex="0"/>
|
||||||
|
<gridItem id="RTS11#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI11" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCK12" selectedIndex="0"/>
|
||||||
|
<gridItem id="RXD12/SMISO12" selectedIndex="0"/>
|
||||||
|
<gridItem id="TXD12/SMOSI12" selectedIndex="0"/>
|
||||||
|
<gridItem id="CTS12#/RTS12#/SS12#" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI12" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_PARAM_CHECKING_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_ASYNC_INCLUDED" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCI_CFG_SYNC_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_SSPI_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_DUMMY_TX_BYTE" selectedIndex="0xFF"/>
|
||||||
|
<gridItem id="SCI_CFG_CH0_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH1_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH2_INCLUDED" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCI_CFG_CH3_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH4_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH5_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH6_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_INCLUDED" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH12_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH0_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH1_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH2_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH3_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH4_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH5_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH6_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH12_TX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH0_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH1_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH2_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH3_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH4_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH5_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH6_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_CH12_RX_BUFSIZ" selectedIndex="80"/>
|
||||||
|
<gridItem id="SCI_CFG_TEI_INCLUDED" selectedIndex="1"/>
|
||||||
|
<gridItem id="SCI_CFG_ERI_TEI_PRIORITY" selectedIndex="3"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_FIFO_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_FIFO_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_FIFO_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_FIFO_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_FIFO_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_TX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_TX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_TX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_TX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_TX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_RX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_RX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_RX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_RX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_RX_FIFO_THRESH" selectedIndex="8"/>
|
||||||
|
<gridItem id="SCI_CFG_CH0_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH1_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH2_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH3_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH4_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH5_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH6_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH7_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH8_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH9_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH10_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
<gridItem id="SCI_CFG_CH11_DATA_MATCH_INCLUDED" selectedIndex="0"/>
|
||||||
|
</component>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration inuse="true" name="r_dtc_rx">
|
||||||
|
<component description="Dependency : r_bsp version(s) 5.52 This driver gives the user an easy API to control the MCU's DTC. DTC module transfers the data corresponding to an interrupt when it signals to DTC. Each module can register its transfer settings with DTC driver such as: interrupt number, destination and source address, data counter, transfer mode (3 modes: normal, repeat, block), enable or disable chain transfer." detailDescription="DTC driver" display="r_dtc_rx" id="r_dtc_rx3.50" version="3.50">
|
||||||
|
<gridItem id="DTC_CFG_PARAM_CHECKING_ENABLE" selectedIndex="0"/>
|
||||||
|
<gridItem id="DTC_CFG_DISABLE_ALL_ACT_SOURCE" selectedIndex="1"/>
|
||||||
|
<gridItem id="DTC_CFG_SHORT_ADDRESS_MODE" selectedIndex="0"/>
|
||||||
|
<gridItem id="DTC_CFG_TRANSFER_DATA_READ_SKIP_EN" selectedIndex="1"/>
|
||||||
|
<gridItem id="DTC_CFG_USE_DMAC_FIT_MODULE" selectedIndex="1"/>
|
||||||
|
<gridItem id="DTC_CFG_USE_SEQUENCE_TRANSFER" selectedIndex="1"/>
|
||||||
|
</component>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||||
|
</configuration>
|
||||||
|
</tool>
|
||||||
|
</smc>
|
||||||
|
|
@ -0,0 +1,182 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* NOTE 1: This project provides two demo applications. A simple blinky style
|
||||||
|
* project, and a more comprehensive test and demo application. The
|
||||||
|
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
|
||||||
|
* between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
|
||||||
|
* in main.c. This file implements the simply blinky style version.
|
||||||
|
*
|
||||||
|
* NOTE 2: This file only contains the source code that is specific to the
|
||||||
|
* basic demo. Generic functions, such FreeRTOS hook functions, and functions
|
||||||
|
* required to configure the hardware are defined in main.c.
|
||||||
|
******************************************************************************
|
||||||
|
*
|
||||||
|
* main_blinky() creates one queue, and two tasks. It then starts the
|
||||||
|
* scheduler.
|
||||||
|
*
|
||||||
|
* The Queue Send Task:
|
||||||
|
* The queue send task is implemented by the prvQueueSendTask() function in
|
||||||
|
* 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. 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. */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
|
||||||
|
/* Renesas includes. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* Eval board specific definitions. */
|
||||||
|
#include "demo_specific_io.h"
|
||||||
|
|
||||||
|
/* Priorities at which the tasks are created. */
|
||||||
|
#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
|
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
|
||||||
|
/* 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 ( 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
|
||||||
|
the queue empty. */
|
||||||
|
#define mainQUEUE_LENGTH ( 1 )
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by main when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1 in
|
||||||
|
* main.c.
|
||||||
|
*/
|
||||||
|
void main_blinky( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The tasks as described in the comments at the top of this file.
|
||||||
|
*/
|
||||||
|
static void prvQueueReceiveTask( void *pvParameters );
|
||||||
|
static void prvQueueSendTask( void *pvParameters );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* The queue used by both tasks. */
|
||||||
|
static QueueHandle_t xQueue = NULL;
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void main_blinky( void )
|
||||||
|
{
|
||||||
|
/* Create the queue. */
|
||||||
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
|
if( xQueue != NULL )
|
||||||
|
{
|
||||||
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
|
file. */
|
||||||
|
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
||||||
|
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||||
|
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||||
|
NULL, /* The parameter passed to the task - not used in this case. */
|
||||||
|
mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */
|
||||||
|
NULL ); /* The task handle is not required, so NULL is passed. */
|
||||||
|
|
||||||
|
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
|
/* Start the tasks and timer running. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If all is well, the scheduler will now be running, and the following
|
||||||
|
line will never be reached. If the following line does execute, then
|
||||||
|
there was insufficient FreeRTOS heap memory available for the Idle and/or
|
||||||
|
timer tasks to be created. See the memory management section on the
|
||||||
|
FreeRTOS web site for more details on the FreeRTOS heap
|
||||||
|
http://www.freertos.org/a00111.html. */
|
||||||
|
for( ;; );
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvQueueSendTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
TickType_t xNextWakeTime;
|
||||||
|
const unsigned long ulValueToSend = 100UL;
|
||||||
|
|
||||||
|
/* Remove compiler warning about unused parameter. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
/* Initialise xNextWakeTime - this only needs to be done once. */
|
||||||
|
xNextWakeTime = xTaskGetTickCount();
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Place this task in the blocked state until it is time to run again. */
|
||||||
|
vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );
|
||||||
|
|
||||||
|
/* Send to the queue - causing the queue receive task to unblock and
|
||||||
|
toggle the LED. 0 is used as the block time so the sending operation
|
||||||
|
will not block - it shouldn't need to block as the queue should always
|
||||||
|
be empty at this point in the code. */
|
||||||
|
xQueueSend( xQueue, &ulValueToSend, 0U );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvQueueReceiveTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
unsigned long ulReceivedValue;
|
||||||
|
const unsigned long ulExpectedValue = 100UL;
|
||||||
|
|
||||||
|
/* Remove compiler warning about unused parameter. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Wait until something arrives in the queue - this task will block
|
||||||
|
indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
|
||||||
|
FreeRTOSConfig.h. */
|
||||||
|
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
|
||||||
|
|
||||||
|
/* To get here something must have been received from the queue, but
|
||||||
|
is it the expected value? If it is, toggle the LED. */
|
||||||
|
if( ulReceivedValue == ulExpectedValue )
|
||||||
|
{
|
||||||
|
LED0 = !LED0;
|
||||||
|
ulReceivedValue = 0U;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file contains the non-portable and therefore RX specific parts of the
|
||||||
|
* IntQueue standard demo task - namely the configuration of the timers that
|
||||||
|
* generate the interrupts and the interrupt entry points.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Scheduler includes. */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
/* Demo includes. */
|
||||||
|
#include "IntQueueTimer.h"
|
||||||
|
#include "IntQueue.h"
|
||||||
|
|
||||||
|
/* Renesas includes. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#define tmrTIMER_0_1_FREQUENCY ( 2000UL )
|
||||||
|
#define tmrTIMER_2_3_FREQUENCY ( 2000UL )
|
||||||
|
|
||||||
|
void vInitialiseTimerForIntQueueTest( void )
|
||||||
|
{
|
||||||
|
/* Ensure interrupts do not start until full configuration is complete. */
|
||||||
|
portENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
/* Give write access. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xa502;
|
||||||
|
|
||||||
|
/* Cascade two 8bit timer channels to generate the interrupts.
|
||||||
|
8bit timer unit 1 (TMR0 and TMR1) and 8bit timer unit 2 (TMR2 and TMR3 are
|
||||||
|
utilised for this test. */
|
||||||
|
|
||||||
|
/* Enable the timers. */
|
||||||
|
SYSTEM.MSTPCRA.BIT.MSTPA5 = 0;
|
||||||
|
SYSTEM.MSTPCRA.BIT.MSTPA4 = 0;
|
||||||
|
|
||||||
|
/* Enable compare match A interrupt request. */
|
||||||
|
TMR0.TCR.BIT.CMIEA = 1;
|
||||||
|
TMR2.TCR.BIT.CMIEA = 1;
|
||||||
|
|
||||||
|
/* Clear the timer on compare match A. */
|
||||||
|
TMR0.TCR.BIT.CCLR = 1;
|
||||||
|
TMR2.TCR.BIT.CCLR = 1;
|
||||||
|
|
||||||
|
/* Set the compare match value. */
|
||||||
|
TMR01.TCORA = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / tmrTIMER_0_1_FREQUENCY ) -1 ) / 8 );
|
||||||
|
TMR23.TCORA = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / tmrTIMER_2_3_FREQUENCY ) -1 ) / 8 );
|
||||||
|
|
||||||
|
/* 16 bit operation ( count from timer 1,2 ). */
|
||||||
|
TMR0.TCCR.BIT.CSS = 3;
|
||||||
|
TMR2.TCCR.BIT.CSS = 3;
|
||||||
|
|
||||||
|
/* Use PCLK as the input. */
|
||||||
|
TMR1.TCCR.BIT.CSS = 1;
|
||||||
|
TMR3.TCCR.BIT.CSS = 1;
|
||||||
|
|
||||||
|
/* Divide PCLK by 8. */
|
||||||
|
TMR1.TCCR.BIT.CKS = 2;
|
||||||
|
TMR3.TCCR.BIT.CKS = 2;
|
||||||
|
|
||||||
|
/* Enable TMR 0, 2 interrupts. */
|
||||||
|
TMR0.TCR.BIT.CMIEA = 1;
|
||||||
|
TMR2.TCR.BIT.CMIEA = 1;
|
||||||
|
|
||||||
|
/* Set priority and enable interrupt. */
|
||||||
|
ICU.SLIBXR128.BYTE = 3; /* Three is TMR0 compare match A. */
|
||||||
|
IPR( PERIB, INTB128 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;
|
||||||
|
IEN( PERIB, INTB128 ) = 1;
|
||||||
|
|
||||||
|
/* Ensure that the flag is set to 0, otherwise the interrupt will not be
|
||||||
|
accepted. */
|
||||||
|
IR( PERIB, INTB128 ) = 0;
|
||||||
|
|
||||||
|
/* Do the same for TMR2, but to vector 129. */
|
||||||
|
ICU.SLIBXR129.BYTE = 9; /* Nine is TMR2 compare match A. */
|
||||||
|
IPR( PERIB, INTB129 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY - 2;
|
||||||
|
IEN( PERIB, INTB129 ) = 1;
|
||||||
|
IR( PERIB, INTB129 ) = 0;
|
||||||
|
}
|
||||||
|
portEXIT_CRITICAL();
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT( prvIntQTimer_0_1_ISR, VECT( PERIB, INTB128) )
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void prvIntQTimer_0_1_ISR( void )
|
||||||
|
{
|
||||||
|
/* Enable interrupts to allow interrupt nesting. */
|
||||||
|
setpsw_i();
|
||||||
|
|
||||||
|
portYIELD_FROM_ISR( xFirstTimerHandler() );
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT( prvIntQTimer_2_3_ISR, VECT( PERIB, INTB129) )
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void prvIntQTimer_2_3_ISR( void )
|
||||||
|
{
|
||||||
|
/* Enable interrupts to allow interrupt nesting. */
|
||||||
|
setpsw_i();
|
||||||
|
|
||||||
|
portYIELD_FROM_ISR( xSecondTimerHandler() );
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INT_QUEUE_TIMER_H
|
||||||
|
#define INT_QUEUE_TIMER_H
|
||||||
|
|
||||||
|
void vInitialiseTimerForIntQueueTest( void );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,847 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* NOTE 1: This project provides two demo applications. A simple blinky
|
||||||
|
* style project, and a more comprehensive test and demo application. The
|
||||||
|
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to
|
||||||
|
* select between the two. See the notes on using
|
||||||
|
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY in main.c. This file implements the
|
||||||
|
* comprehensive version.
|
||||||
|
*
|
||||||
|
* NOTE 2: This file only contains the source code that is specific to the
|
||||||
|
* full demo. Generic functions, such FreeRTOS hook functions, and functions
|
||||||
|
* required to configure the hardware, are defined in main.c.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* test tasks execute with a very low priority, so get preempted very
|
||||||
|
* frequently. A register containing an unexpected value is indicative of an
|
||||||
|
* 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 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. */
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/* Kernel includes. */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "timers.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
|
||||||
|
/* Standard demo application includes. */
|
||||||
|
#include "flop.h"
|
||||||
|
#include "semtest.h"
|
||||||
|
#include "dynamic.h"
|
||||||
|
#include "BlockQ.h"
|
||||||
|
#include "blocktim.h"
|
||||||
|
#include "countsem.h"
|
||||||
|
#include "GenQTest.h"
|
||||||
|
#include "recmutex.h"
|
||||||
|
#include "death.h"
|
||||||
|
#include "partest.h"
|
||||||
|
#include "comtest2.h"
|
||||||
|
#include "serial.h"
|
||||||
|
#include "TimerDemo.h"
|
||||||
|
#include "QueueOverwrite.h"
|
||||||
|
#include "IntQueue.h"
|
||||||
|
#include "EventGroupsDemo.h"
|
||||||
|
#include "TaskNotify.h"
|
||||||
|
#include "IntSemTest.h"
|
||||||
|
|
||||||
|
/* Renesas includes. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* Eval board specific definitions. */
|
||||||
|
#include "demo_specific_io.h"
|
||||||
|
|
||||||
|
/* Priorities for the demo application tasks. */
|
||||||
|
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )
|
||||||
|
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
|
||||||
|
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
|
||||||
|
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
|
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
|
||||||
|
#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 )
|
||||||
|
|
||||||
|
/* The period of the check task, 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 pdMS_TO_TICKS( 3000UL )
|
||||||
|
|
||||||
|
/* The period of the check task, 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 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. */
|
||||||
|
#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12121212UL )
|
||||||
|
#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x12345678UL )
|
||||||
|
|
||||||
|
/* The base period used by the timer test tasks. */
|
||||||
|
#define mainTIMER_TEST_PERIOD ( 50 )
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Entry point for the comprehensive demo (as opposed to the simple blinky
|
||||||
|
* demo).
|
||||||
|
*/
|
||||||
|
void main_full( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The full demo includes some functionality called from the tick hook.
|
||||||
|
*/
|
||||||
|
void vFullDemoTickHook( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The check task, as described at the top of this file.
|
||||||
|
*/
|
||||||
|
static void prvCheckTask( void *pvParameters );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Register check tasks, and the tasks used to write over and check the contents
|
||||||
|
* of the registers, as described at the top of this file. The nature of these
|
||||||
|
* files necessitates that they are written in assembly, but the entry points
|
||||||
|
* are kept in the C file for the convenience of checking the task parameter.
|
||||||
|
*/
|
||||||
|
static void prvRegTest1Task( void *pvParameters );
|
||||||
|
static void prvRegTest2Task( void *pvParameters );
|
||||||
|
static void prvRegTest1Implementation( void );
|
||||||
|
static void prvRegTest2Implementation( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A high priority task that does nothing other than execute at a pseudo random
|
||||||
|
* time to ensure the other test tasks don't just execute in a repeating
|
||||||
|
* pattern.
|
||||||
|
*/
|
||||||
|
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
|
||||||
|
register check tasks to the check task. If the variables keep incrementing,
|
||||||
|
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;
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void main_full( void )
|
||||||
|
{
|
||||||
|
/* Start all the other standard demo/test tasks. They have no particular
|
||||||
|
functionality, but do demonstrate how to use the FreeRTOS API and test the
|
||||||
|
kernel port. */
|
||||||
|
vStartInterruptQueueTasks();
|
||||||
|
vStartDynamicPriorityTasks();
|
||||||
|
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||||
|
vCreateBlockTimeTasks();
|
||||||
|
vStartCountingSemaphoreTasks();
|
||||||
|
vStartGenericQueueTasks( tskIDLE_PRIORITY );
|
||||||
|
vStartRecursiveMutexTasks();
|
||||||
|
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||||
|
vStartMathTasks( mainFLOP_TASK_PRIORITY );
|
||||||
|
vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
|
||||||
|
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||||
|
vStartEventGroupTasks();
|
||||||
|
vStartTaskNotifyTask();
|
||||||
|
vStartInterruptSemaphoreTasks();
|
||||||
|
|
||||||
|
/* Create the register check tasks, as described at the top of this file */
|
||||||
|
xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||||
|
xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||||
|
|
||||||
|
/* Create the task that just adds a little random behaviour. */
|
||||||
|
xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 2, 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 );
|
||||||
|
|
||||||
|
/* The set of tasks created by the following function call have to be
|
||||||
|
created last as they keep account of the number of tasks they expect to see
|
||||||
|
running. */
|
||||||
|
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
|
||||||
|
|
||||||
|
/* Start the scheduler. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* If all is well, the scheduler will now be running, and the following
|
||||||
|
line will never be reached. If the following line does execute, then
|
||||||
|
there was insufficient FreeRTOS heap memory available for the Idle and/or
|
||||||
|
timer tasks to be created. See the memory management section on the
|
||||||
|
FreeRTOS web site for more details on the FreeRTOS heap
|
||||||
|
http://www.freertos.org/a00111.html. */
|
||||||
|
for( ;; );
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvCheckTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;
|
||||||
|
TickType_t xLastExecutionTime;
|
||||||
|
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
|
||||||
|
unsigned long ulErrorFound = pdFALSE;
|
||||||
|
|
||||||
|
/* Just to stop compiler warnings. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
|
||||||
|
works correctly. */
|
||||||
|
xLastExecutionTime = xTaskGetTickCount();
|
||||||
|
|
||||||
|
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||||
|
operating without error. The onboard LED is toggled on each iteration.
|
||||||
|
If an error is detected then the delay period is decreased from
|
||||||
|
mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD. This has the
|
||||||
|
effect of increasing the rate at which the onboard LED toggles, and in so
|
||||||
|
doing gives visual feedback of the system status. */
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Delay until it is time to execute again. */
|
||||||
|
vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
|
||||||
|
|
||||||
|
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||||
|
that they are all still running, and that none have detected an error. */
|
||||||
|
if( xAreIntQueueTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 0UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 1UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 2UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 3UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 4UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( xAreGenericQueueTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 5UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 6UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xIsCreateTaskStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 7UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 8UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 9UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 10UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xIsQueueOverwriteTaskStillRunning() != pdPASS )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 11UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreEventGroupTasksStillRunning() != pdPASS )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 12UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreTaskNotificationTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 13UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 14UL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check that the register test 1 task is still running. */
|
||||||
|
if( ulLastRegTest1Value == ulRegTest1LoopCounter )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 15UL;
|
||||||
|
}
|
||||||
|
ulLastRegTest1Value = ulRegTest1LoopCounter;
|
||||||
|
|
||||||
|
/* Check that the register test 2 task is still running. */
|
||||||
|
if( ulLastRegTest2Value == ulRegTest2LoopCounter )
|
||||||
|
{
|
||||||
|
ulErrorFound |= 1UL << 16UL;
|
||||||
|
}
|
||||||
|
ulLastRegTest2Value = ulRegTest2LoopCounter;
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
LED0 = !LED0;
|
||||||
|
|
||||||
|
if( ulErrorFound != pdFALSE )
|
||||||
|
{
|
||||||
|
/* An error has been detected in one of the tasks - flash the LED
|
||||||
|
at a higher frequency to give visible feedback that something has
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvPseudoRandomiser( void *pvParameters )
|
||||||
|
{
|
||||||
|
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
|
||||||
|
disruption in the scheduling pattern of the other tasks. Normally this is
|
||||||
|
done by generating interrupts at pseudo random times. */
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;
|
||||||
|
ulValue = ( ulNextRand >> 16UL ) & 0xffUL;
|
||||||
|
|
||||||
|
if( ulValue < ulMinDelay )
|
||||||
|
{
|
||||||
|
ulValue = ulMinDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
vTaskDelay( ulValue );
|
||||||
|
|
||||||
|
while( ulValue > 0 )
|
||||||
|
{
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
nop();
|
||||||
|
|
||||||
|
ulValue--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vFullDemoTickHook( void )
|
||||||
|
{
|
||||||
|
/* The full demo includes a software timer demo/test that requires
|
||||||
|
prodding periodically from the tick interrupt. */
|
||||||
|
vTimerPeriodicISRTests();
|
||||||
|
|
||||||
|
/* Call the periodic queue overwrite from ISR demo. */
|
||||||
|
vQueueOverwritePeriodicISRDemo();
|
||||||
|
|
||||||
|
/* Call the periodic event group from ISR demo. */
|
||||||
|
vPeriodicEventGroupsProcessing();
|
||||||
|
|
||||||
|
/* Use task notifications from an interrupt. */
|
||||||
|
xNotifyTaskFromISR();
|
||||||
|
|
||||||
|
/* Use mutexes from interrupts. */
|
||||||
|
vInterruptSemaphorePeriodicTest();
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* This function is explained in the comments at the top of this file. */
|
||||||
|
static void prvRegTest1Task( void *pvParameters )
|
||||||
|
{
|
||||||
|
if( pvParameters != mainREG_TEST_1_PARAMETER )
|
||||||
|
{
|
||||||
|
/* The parameter did not contain the expected value. */
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Stop the tick interrupt so its obvious something has gone wrong. */
|
||||||
|
taskDISABLE_INTERRUPTS();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
|
||||||
|
/* Tell the kernel that this task require a DPFPU context before any DPFPU
|
||||||
|
instructions are executed. */
|
||||||
|
portTASK_USES_DPFPU();
|
||||||
|
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* This is an inline asm function that never returns. */
|
||||||
|
prvRegTest1Implementation();
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* This function is explained in the comments at the top of this file. */
|
||||||
|
static void prvRegTest2Task( void *pvParameters )
|
||||||
|
{
|
||||||
|
if( pvParameters != mainREG_TEST_2_PARAMETER )
|
||||||
|
{
|
||||||
|
/* The parameter did not contain the expected value. */
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Stop the tick interrupt so its obvious something has gone wrong. */
|
||||||
|
taskDISABLE_INTERRUPTS();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
|
||||||
|
/* Tell the kernel that this task require a DPFPU context before any DPFPU
|
||||||
|
instructions are executed. */
|
||||||
|
portTASK_USES_DPFPU();
|
||||||
|
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* This is an inline asm function that never returns. */
|
||||||
|
prvRegTest2Implementation();
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* This function is explained in the comments at the top of this file. */
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM( prvRegTest1Implementation )
|
||||||
|
void prvRegTest1Implementation( void )
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
|
||||||
|
/* Put a known value in each register. */
|
||||||
|
R_BSP_ASM( MOV.L #1, R1 )
|
||||||
|
R_BSP_ASM( MOV.L #2, R2 )
|
||||||
|
R_BSP_ASM( MOV.L #3, R3 )
|
||||||
|
R_BSP_ASM( MOV.L #4, R4 )
|
||||||
|
R_BSP_ASM( MOV.L #5, R5 )
|
||||||
|
R_BSP_ASM( MOV.L #6, R6 )
|
||||||
|
R_BSP_ASM( MOV.L #7, R7 )
|
||||||
|
R_BSP_ASM( MOV.L #8, R8 )
|
||||||
|
R_BSP_ASM( MOV.L #9, R9 )
|
||||||
|
R_BSP_ASM( MOV.L #10, R10 )
|
||||||
|
R_BSP_ASM( MOV.L #11, R11 )
|
||||||
|
R_BSP_ASM( MOV.L #12, R12 )
|
||||||
|
R_BSP_ASM( MOV.L #13, R13 )
|
||||||
|
R_BSP_ASM( MOV.L #14, R14 )
|
||||||
|
R_BSP_ASM( MOV.L #15, R15 )
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
/* Put a known value in each DPFPU register. (DR0 is the same value as DR15.) */
|
||||||
|
R_BSP_ASM( ITOD R1, DR1 )
|
||||||
|
R_BSP_ASM( ITOD R2, DR2 )
|
||||||
|
R_BSP_ASM( ITOD R3, DR3 )
|
||||||
|
R_BSP_ASM( ITOD R4, DR4 )
|
||||||
|
R_BSP_ASM( ITOD R5, DR5 )
|
||||||
|
R_BSP_ASM( ITOD R6, DR6 )
|
||||||
|
R_BSP_ASM( ITOD R7, DR7 )
|
||||||
|
R_BSP_ASM( ITOD R8, DR8 )
|
||||||
|
R_BSP_ASM( ITOD R9, DR9 )
|
||||||
|
R_BSP_ASM( ITOD R10, DR10 )
|
||||||
|
R_BSP_ASM( ITOD R11, DR11 )
|
||||||
|
R_BSP_ASM( ITOD R12, DR12 )
|
||||||
|
R_BSP_ASM( ITOD R13, DR13 )
|
||||||
|
R_BSP_ASM( ITOD R14, DR14 )
|
||||||
|
R_BSP_ASM( ITOD R15, DR15 )
|
||||||
|
R_BSP_ASM( ITOD R15, DR0 )
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* Loop, checking each iteration that each register still contains the
|
||||||
|
expected value. */
|
||||||
|
R_BSP_ASM_LAB(1:) /* TestLoop1: */
|
||||||
|
|
||||||
|
/* Push the registers that are going to get clobbered. */
|
||||||
|
R_BSP_ASM( PUSHM R14-R15 )
|
||||||
|
|
||||||
|
/* Increment the loop counter to show this task is still getting CPU time. */
|
||||||
|
R_BSP_ASM( MOV.L #_ulRegTest1LoopCounter, R14 )
|
||||||
|
R_BSP_ASM( MOV.L [ R14 ], R15 )
|
||||||
|
R_BSP_ASM( ADD #1, R15 )
|
||||||
|
R_BSP_ASM( MOV.L R15, [ R14 ] )
|
||||||
|
|
||||||
|
/* Yield to extend the text coverage. Set the bit in the ITU SWINTR register. */
|
||||||
|
R_BSP_ASM( MOV.L #1, R14 )
|
||||||
|
R_BSP_ASM( MOV.L #0872E0H, R15 )
|
||||||
|
R_BSP_ASM( MOV.B R14, [R15] )
|
||||||
|
R_BSP_ASM( NOP )
|
||||||
|
R_BSP_ASM( NOP )
|
||||||
|
|
||||||
|
/* Restore the clobbered registers. */
|
||||||
|
R_BSP_ASM( POPM R14-R15 )
|
||||||
|
|
||||||
|
/* Now compare each register to ensure it still contains the value that was
|
||||||
|
set before this loop was entered. */
|
||||||
|
R_BSP_ASM( CMP #1, R1 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #2, R2 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #3, R3 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #4, R4 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #5, R5 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #6, R6 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #7, R7 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #8, R8 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #9, R9 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #10, R10 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #11, R11 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #12, R12 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #13, R13 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #14, R14 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( CMP #15, R15 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
/* Now compare each DPFPU register to ensure it still contains the value that was
|
||||||
|
set before this loop was entered. (DR0 is the same value as DR15.) */
|
||||||
|
R_BSP_ASM( DCMPEQ DR0, DR15 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R1, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR1, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R2, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR2, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R3, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR3, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R4, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR4, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R5, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR5, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R6, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR6, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R7, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR7, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R8, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR8, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R9, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR9, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R10, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR10, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R11, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR11, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R12, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR12, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R13, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR13, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R14, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR14, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R15, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR15, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(11) ) /* BNE RegTest1Error */
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* All comparisons passed, start a new itteratio of this loop. */
|
||||||
|
R_BSP_ASM( BRA.W R_BSP_ASM_LAB_PREV(1) ) /* BRA TestLoop1 */
|
||||||
|
|
||||||
|
R_BSP_ASM_LAB(11:) /* RegTest1Error: */
|
||||||
|
/* A compare failed, just loop here so the loop counter stops incrementing
|
||||||
|
causing the check task to indicate the error. */
|
||||||
|
R_BSP_ASM( BRA.B R_BSP_ASM_LAB_PREV(11) ) /* BRA RegTest1Error */
|
||||||
|
|
||||||
|
R_BSP_ASM_END
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* This function is explained in the comments at the top of this file. */
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM( prvRegTest2Implementation )
|
||||||
|
void prvRegTest2Implementation( void )
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
|
||||||
|
/* Put a known value in each register. */
|
||||||
|
R_BSP_ASM( MOV.L #10, R1 )
|
||||||
|
R_BSP_ASM( MOV.L #20, R2 )
|
||||||
|
R_BSP_ASM( MOV.L #30, R3 )
|
||||||
|
R_BSP_ASM( MOV.L #40, R4 )
|
||||||
|
R_BSP_ASM( MOV.L #50, R5 )
|
||||||
|
R_BSP_ASM( MOV.L #60, R6 )
|
||||||
|
R_BSP_ASM( MOV.L #70, R7 )
|
||||||
|
R_BSP_ASM( MOV.L #80, R8 )
|
||||||
|
R_BSP_ASM( MOV.L #90, R9 )
|
||||||
|
R_BSP_ASM( MOV.L #100, R10 )
|
||||||
|
R_BSP_ASM( MOV.L #110, R11 )
|
||||||
|
R_BSP_ASM( MOV.L #120, R12 )
|
||||||
|
R_BSP_ASM( MOV.L #130, R13 )
|
||||||
|
R_BSP_ASM( MOV.L #140, R14 )
|
||||||
|
R_BSP_ASM( MOV.L #150, R15 )
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
/* Put a known value in each DPFPU register. (DR0 is the same value as DR15.) */
|
||||||
|
R_BSP_ASM( ITOD R1, DR1 )
|
||||||
|
R_BSP_ASM( ITOD R2, DR2 )
|
||||||
|
R_BSP_ASM( ITOD R3, DR3 )
|
||||||
|
R_BSP_ASM( ITOD R4, DR4 )
|
||||||
|
R_BSP_ASM( ITOD R5, DR5 )
|
||||||
|
R_BSP_ASM( ITOD R6, DR6 )
|
||||||
|
R_BSP_ASM( ITOD R7, DR7 )
|
||||||
|
R_BSP_ASM( ITOD R8, DR8 )
|
||||||
|
R_BSP_ASM( ITOD R9, DR9 )
|
||||||
|
R_BSP_ASM( ITOD R10, DR10 )
|
||||||
|
R_BSP_ASM( ITOD R11, DR11 )
|
||||||
|
R_BSP_ASM( ITOD R12, DR12 )
|
||||||
|
R_BSP_ASM( ITOD R13, DR13 )
|
||||||
|
R_BSP_ASM( ITOD R14, DR14 )
|
||||||
|
R_BSP_ASM( ITOD R15, DR15 )
|
||||||
|
R_BSP_ASM( ITOD R15, DR0 )
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* Loop, checking on each iteration that each register still contains the
|
||||||
|
expected value. */
|
||||||
|
R_BSP_ASM_LAB(2:) /* TestLoop2: */
|
||||||
|
|
||||||
|
/* Push the registers that are going to get clobbered. */
|
||||||
|
R_BSP_ASM( PUSHM R14-R15 )
|
||||||
|
|
||||||
|
/* Increment the loop counter to show this task is still getting CPU time. */
|
||||||
|
R_BSP_ASM( MOV.L #_ulRegTest2LoopCounter, R14 )
|
||||||
|
R_BSP_ASM( MOV.L [ R14 ], R15 )
|
||||||
|
R_BSP_ASM( ADD #1, R15 )
|
||||||
|
R_BSP_ASM( MOV.L R15, [ R14 ] )
|
||||||
|
|
||||||
|
/* Restore the clobbered registers. */
|
||||||
|
R_BSP_ASM( POPM R14-R15 )
|
||||||
|
|
||||||
|
/* Now compare each register to ensure it still contains the value that was
|
||||||
|
set before this loop was entered. */
|
||||||
|
R_BSP_ASM( CMP #10, R1 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #20, R2 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #30, R3 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #40, R4 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #50, R5 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #60, R6 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #70, R7 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #80, R8 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #90, R9 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #100, R10 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #110, R11 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #120, R12 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #130, R13 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #140, R14 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
R_BSP_ASM( CMP #150, R15 )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest2Error */
|
||||||
|
|
||||||
|
#if defined(__DPFPU)
|
||||||
|
/* Now compare each DPFPU register to ensure it still contains the value that was
|
||||||
|
set before this loop was entered. (DR0 is the same value as DR15.) */
|
||||||
|
R_BSP_ASM( DCMPEQ DR0, DR15 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R1, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR1, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R2, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR2, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R3, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR3, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R4, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR4, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R5, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR5, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R6, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR6, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R7, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR7, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R8, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR8, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R9, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR9, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R10, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR10, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R11, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR11, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R12, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR12, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R13, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR13, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R14, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR14, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
R_BSP_ASM( ITOD R15, DR0 )
|
||||||
|
R_BSP_ASM( DCMPEQ DR15, DR0 )
|
||||||
|
R_BSP_ASM( MVFDR )
|
||||||
|
R_BSP_ASM( BNE.W R_BSP_ASM_LAB_NEXT(22) ) /* BNE RegTest1Error */
|
||||||
|
#endif /* defined(__DPFPU) */
|
||||||
|
|
||||||
|
/* All comparisons passed, start a new itteratio of this loop. */
|
||||||
|
R_BSP_ASM( BRA.W R_BSP_ASM_LAB_PREV(2) ) /* BRA TestLoop2 */
|
||||||
|
|
||||||
|
R_BSP_ASM_LAB(22:) /* RegTest2Error: */
|
||||||
|
/* A compare failed, just loop here so the loop counter stops incrementing
|
||||||
|
- causing the check task to indicate the error. */
|
||||||
|
R_BSP_ASM( BRA.B R_BSP_ASM_LAB_PREV(22) ) /* BRA RegTest2Error */
|
||||||
|
|
||||||
|
R_BSP_ASM_END
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Kernel includes. */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
|
||||||
|
/* Demo program includes. */
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
|
/* Renesas includes. */
|
||||||
|
#include "platform.h"
|
||||||
|
#include "r_dtc_rx_if.h"
|
||||||
|
#include "r_sci_rx_if.h"
|
||||||
|
#include "r_byteq_if.h"
|
||||||
|
|
||||||
|
/* Eval board specific definitions. */
|
||||||
|
#include "demo_specific_io.h"
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
|
||||||
|
/* Callback function which is called from Renesas API's interrupt service routine. */
|
||||||
|
void vSerialSciCallback( void *pvArgs )
|
||||||
|
{
|
||||||
|
sci_cb_args_t *pxArgs = (sci_cb_args_t *)pvArgs;
|
||||||
|
|
||||||
|
/* Renesas API has a built-in queue but we will ignore it. If the queue is not
|
||||||
|
full, a received character is passed with SCI_EVT_RX_CHAR event. If the queue
|
||||||
|
is full, a received character is passed with SCI_EVT_RXBUF_OVFL event. */
|
||||||
|
if( SCI_EVT_RX_CHAR == pxArgs->event || SCI_EVT_RXBUF_OVFL == pxArgs->event )
|
||||||
|
{
|
||||||
|
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
configASSERT( xRxQueue );
|
||||||
|
|
||||||
|
/* 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, &pxArgs->byte, &xHigherPriorityTaskWoken );
|
||||||
|
|
||||||
|
/* See http://www.freertos.org/xQueueOverwriteFromISR.html for information
|
||||||
|
on the semantics of this ISR. */
|
||||||
|
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
|
||||||
|
}
|
||||||
|
/* Renesas API notifies the completion of transmission by SCI_EVT_TEI event. */
|
||||||
|
else if( SCI_EVT_TEI == pxArgs->event )
|
||||||
|
{
|
||||||
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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 );
|
||||||
|
|
||||||
|
/* Set interrupt priority. (Other UART settings had been initialized in the
|
||||||
|
src/smc_gen/general/r_cg_hardware_setup.c.) */
|
||||||
|
uint8_t ucInterruptPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY - 1;
|
||||||
|
R_SCI_Control( xSerialSciHandle, SCI_CMD_SET_RXI_PRIORITY, ( void * ) &ucInterruptPriority );
|
||||||
|
R_SCI_Control( xSerialSciHandle, SCI_CMD_SET_TXI_PRIORITY, ( void * ) &ucInterruptPriority );
|
||||||
|
|
||||||
|
/* 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 ) && ( usStringLength > 0 ) )
|
||||||
|
{
|
||||||
|
/* Ensure the calling task's notification state is not already
|
||||||
|
pending. */
|
||||||
|
xTaskNotifyStateClear( 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 Renesas API with a workaround. */
|
||||||
|
if( usStringLength > 1 )
|
||||||
|
{
|
||||||
|
/* Set up Data Transfer Control. */
|
||||||
|
dtc_cmd_arg_t xSerialTxDtcArg;
|
||||||
|
dtc_transfer_data_cfg_t xSerialTxDtcConfig;
|
||||||
|
|
||||||
|
xSerialTxDtcArg.act_src = U_DTC_UART_CLI_TX_ACT;
|
||||||
|
xSerialTxDtcConfig.transfer_mode = DTC_TRANSFER_MODE_NORMAL;
|
||||||
|
xSerialTxDtcConfig.data_size = DTC_DATA_SIZE_BYTE;
|
||||||
|
xSerialTxDtcConfig.src_addr_mode = DTC_SRC_ADDR_INCR;
|
||||||
|
xSerialTxDtcConfig.dest_addr_mode = DTC_DES_ADDR_FIXED;
|
||||||
|
xSerialTxDtcConfig.response_interrupt = DTC_INTERRUPT_AFTER_ALL_COMPLETE;
|
||||||
|
xSerialTxDtcConfig.repeat_block_side = DTC_REPEAT_BLOCK_SOURCE;
|
||||||
|
xSerialTxDtcConfig.chain_transfer_enable = DTC_CHAIN_TRANSFER_DISABLE;
|
||||||
|
xSerialTxDtcConfig.chain_transfer_mode = (dtc_chain_transfer_mode_t)0;
|
||||||
|
xSerialTxDtcConfig.source_addr = ( uint32_t ) pcString;
|
||||||
|
xSerialTxDtcConfig.dest_addr = ( uint32_t ) &U_DTC_UART_CLI_TX_DR;
|
||||||
|
xSerialTxDtcConfig.transfer_count = ( uint32_t ) usStringLength - 1;
|
||||||
|
xSerialTxDtcArg.chain_transfer_nr = 0;
|
||||||
|
xSerialTxDtcArg.p_transfer_data = &xSerialTxDtcInfo;
|
||||||
|
xSerialTxDtcArg.p_data_cfg = &xSerialTxDtcConfig;
|
||||||
|
|
||||||
|
R_DTC_Create( xSerialTxDtcArg.act_src, &xSerialTxDtcInfo, &xSerialTxDtcConfig, 0 );
|
||||||
|
R_DTC_Control( DTC_CMD_ACT_SRC_ENABLE, NULL, &xSerialTxDtcArg );
|
||||||
|
R_SCI_Send( xSerialSciHandle, ( uint8_t * ) (pcString + usStringLength - 1), 1 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
R_SCI_Send( xSerialSciHandle, ( uint8_t * ) pcString, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait in the Blocked state (so not using any CPU time) until the
|
||||||
|
transmission has completed. */
|
||||||
|
ulTaskNotifyTake( pdTRUE, xMaxBlockTime );
|
||||||
|
|
||||||
|
/* A breakpoint can be set here for debugging. */
|
||||||
|
nop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef DEMO_MAIN_H
|
||||||
|
#define DEMO_MAIN_H
|
||||||
|
|
||||||
|
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
|
||||||
|
or 0 to run the more comprehensive test and demo application. */
|
||||||
|
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
|
||||||
|
|
||||||
|
/* demo_main() is placed in the src/frtos_startup/freertos_start.c and it calls
|
||||||
|
main_blinky() or main_full() according to the mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
|
||||||
|
setting. */
|
||||||
|
extern void demo_main( void );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LED_IO_H
|
||||||
|
#define LED_IO_H
|
||||||
|
|
||||||
|
#define EnvisionRX72N
|
||||||
|
|
||||||
|
/* Board support settings. */
|
||||||
|
|
||||||
|
#ifdef EnvisionRX72N
|
||||||
|
|
||||||
|
/* R5F572NDHDFB 144pin LQFP */
|
||||||
|
|
||||||
|
/* General Values */
|
||||||
|
#define LED_ON (0)
|
||||||
|
#define LED_OFF (1)
|
||||||
|
#define SW_PUSH (0)
|
||||||
|
#define SW_RELEASE (1)
|
||||||
|
|
||||||
|
/* Switches (and its notation in the User's Manual) */
|
||||||
|
#define SW1/*(SW2)*/ (PORT0.PIDR.BIT.B7)
|
||||||
|
#define U_GPIO_PIN_SW1/*(SW2)*/ (GPIO_PORT_0_PIN_7)
|
||||||
|
|
||||||
|
/* LED port settings (and its notation in the User's Manual) */
|
||||||
|
#define LED0/*(LED2)*/ (PORT4.PODR.BIT.B0)
|
||||||
|
#define U_GPIO_PIN_LED0/*(LED2)*/ (GPIO_PORT_4_PIN_0)
|
||||||
|
|
||||||
|
/* FreeRTOS CLI Command Console */
|
||||||
|
#define U_SCI_UART_CLI_PINSET() R_SCI_PinSet_SCI2()
|
||||||
|
#define U_SCI_UART_CLI_SCI_CH (SCI_CH2)
|
||||||
|
#define U_DTC_UART_CLI_TX_ACT ((dtc_activation_source_t)VECT(SCI2,TXI2))
|
||||||
|
#define U_DTC_UART_CLI_TX_DR (SCI2.TDR)
|
||||||
|
|
||||||
|
#endif /* EnvisionRX72N */
|
||||||
|
|
||||||
|
#ifndef LED0
|
||||||
|
#error The hardware platform is not defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Board Support Data Structures. */
|
||||||
|
|
||||||
|
#include "r_sci_rx_if.h"
|
||||||
|
#include "r_dtc_rx_if.h"
|
||||||
|
|
||||||
|
extern sci_hdl_t xSerialSciHandle;
|
||||||
|
extern dtc_transfer_data_t xSerialTxDtcInfo;
|
||||||
|
|
||||||
|
/* Board Support Callback Functions. */
|
||||||
|
|
||||||
|
extern void vSerialSciCallback( void *pvArgs );
|
||||||
|
|
||||||
|
#endif /* LED_IO_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.0
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FREERTOS_CONFIG_H
|
||||||
|
#define FREERTOS_CONFIG_H
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------
|
||||||
|
* Application specific definitions.
|
||||||
|
*
|
||||||
|
* These definitions should be adjusted for your particular hardware and
|
||||||
|
* application requirements.
|
||||||
|
*
|
||||||
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
|
*
|
||||||
|
* See http://www.freertos.org/a00110.html
|
||||||
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define configUSE_PREEMPTION 1
|
||||||
|
#define configUSE_IDLE_HOOK 1
|
||||||
|
#define configUSE_TICK_HOOK 1
|
||||||
|
#define configCPU_CLOCK_HZ (BSP_ICLK_HZ)
|
||||||
|
#define configPERIPHERAL_CLOCK_HZ (BSP_PCLKB_HZ)
|
||||||
|
#define configTICK_RATE_HZ (( TickType_t ) 1000)
|
||||||
|
#define configMINIMAL_STACK_SIZE (( unsigned short ) 170)
|
||||||
|
#define configTOTAL_HEAP_SIZE_N (60)
|
||||||
|
#define configTOTAL_HEAP_SIZE (( size_t ) ( configTOTAL_HEAP_SIZE_N * 1024 ))
|
||||||
|
#define configMAX_TASK_NAME_LEN (12)
|
||||||
|
#define configUSE_TRACE_FACILITY 1
|
||||||
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
#define configUSE_CO_ROUTINES 0
|
||||||
|
#define configUSE_MUTEXES 1
|
||||||
|
#define configGENERATE_RUN_TIME_STATS 0
|
||||||
|
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||||
|
#define configUSE_RECURSIVE_MUTEXES 1
|
||||||
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
|
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||||
|
#define configUSE_APPLICATION_TASK_TAG 0
|
||||||
|
#define configUSE_QUEUE_SETS 1
|
||||||
|
#define configUSE_COUNTING_SEMAPHORES 1
|
||||||
|
#define configMAX_PRIORITIES (7)
|
||||||
|
#define configMAX_CO_ROUTINE_PRIORITIES (2)
|
||||||
|
#define configUSE_TASK_NOTIFICATIONS 1
|
||||||
|
#define configRECORD_STACK_HIGH_ADDRESS 0
|
||||||
|
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
|
||||||
|
|
||||||
|
/* Dynamic allocation and static allocation. */
|
||||||
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||||
|
#define configSUPPORT_STATIC_ALLOCATION 0
|
||||||
|
|
||||||
|
/* Run time stats gathering definitions. */
|
||||||
|
unsigned long ulGetRunTimeCounterValue( void );
|
||||||
|
void vConfigureTimerForRunTimeStats( void );
|
||||||
|
#define configGENERATE_RUN_TIME_STATS 0
|
||||||
|
//#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
|
||||||
|
//#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()
|
||||||
|
|
||||||
|
/* This demo makes use of one or more example stats formatting functions. These
|
||||||
|
format the raw data provided by the uxTaskGetSystemState() function in to human
|
||||||
|
readable ASCII form. See the notes in the implementation of vTaskList() within
|
||||||
|
FreeRTOS/Source/tasks.c for limitations. */
|
||||||
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||||
|
|
||||||
|
/* Software timer definitions. */
|
||||||
|
#define configUSE_TIMERS 1
|
||||||
|
#define configTIMER_TASK_PRIORITY (6)
|
||||||
|
#define configTIMER_QUEUE_LENGTH 5
|
||||||
|
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE)
|
||||||
|
|
||||||
|
/* If configUSE_TASK_DPFPU_SUPPORT is set to 1 (or undefined) then each task will
|
||||||
|
be created without a DPFPU context, and a task must call vTaskUsesDPFPU() before
|
||||||
|
making use of any DPFPU registers. If configUSE_TASK_DPFPU_SUPPORT is set to 2 then
|
||||||
|
tasks are created with a DPFPU context by default, and calling vTaskUsesDPFPU() has
|
||||||
|
no effect. If configUSE_TASK_DPFPU_SUPPORT is set to 0 then tasks never take care
|
||||||
|
of any DPFPU context (even if DPFPU registers are used). */
|
||||||
|
#define configUSE_TASK_DPFPU_SUPPORT 1
|
||||||
|
|
||||||
|
/* The interrupt priority used by the kernel itself for the tick interrupt and
|
||||||
|
the pended interrupt. This would normally be the lowest priority. */
|
||||||
|
#define configKERNEL_INTERRUPT_PRIORITY 1
|
||||||
|
|
||||||
|
/* The maximum interrupt priority from which FreeRTOS API calls can be made.
|
||||||
|
Interrupts that use a priority above this will not be effected by anything the
|
||||||
|
kernel is doing. */
|
||||||
|
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
|
||||||
|
|
||||||
|
/* The peripheral used to generate the tick interrupt is configured as part of
|
||||||
|
the application code. This constant should be set to the vector number of the
|
||||||
|
peripheral chosen. As supplied this is CMT0. */
|
||||||
|
#define configTICK_VECTOR _CMT0_CMI0
|
||||||
|
|
||||||
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
|
to exclude the API function. */
|
||||||
|
|
||||||
|
#define INCLUDE_vTaskPrioritySet 1
|
||||||
|
#define INCLUDE_uxTaskPriorityGet 1
|
||||||
|
#define INCLUDE_vTaskDelete 1
|
||||||
|
#define INCLUDE_vTaskCleanUpResources 0
|
||||||
|
#define INCLUDE_vTaskSuspend 1
|
||||||
|
#define INCLUDE_vTaskDelayUntil 1
|
||||||
|
#define INCLUDE_vTaskDelay 1
|
||||||
|
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||||
|
#define INCLUDE_xTaskGetSchedulerState 1
|
||||||
|
#define INCLUDE_eTaskGetState 1
|
||||||
|
#define INCLUDE_xTimerPendFunctionCall 1
|
||||||
|
|
||||||
|
void vAssertCalled( void );
|
||||||
|
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled()
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/* Override some of the priorities set in the common demo tasks. This is
|
||||||
|
required to ensure flase positive timing errors are not reported. */
|
||||||
|
#define bktPRIMARY_PRIORITY (( configMAX_PRIORITIES - 3 ))
|
||||||
|
#define bktSECONDARY_PRIORITY (( configMAX_PRIORITIES - 4 ))
|
||||||
|
#define intqHIGHER_PRIORITY (( configMAX_PRIORITIES - 3 ))
|
||||||
|
|
||||||
|
/* When the FIT configurator or the Smart Configurator is used, platform.h has to be used. */
|
||||||
|
#define configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H 1
|
||||||
|
|
||||||
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef TASK_FUNCTION_H_
|
||||||
|
#define TASK_FUNCTION_H_
|
||||||
|
|
||||||
|
#endif /* TASK_FUNCTION_H_ */
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : freertos_object_init.c
|
||||||
|
* Version : 1.0
|
||||||
|
* Description :
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 07.12.2018 1.00 First Release
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Includes <System Includes> , "Project Includes"
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "freertos_start.h"
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Macro definitions
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Typedef definitions
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Private global variables and functions
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
void Kernel_Object_init (void);
|
||||||
|
void Object_init_manual (void);
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: Kernel_Object_init
|
||||||
|
* Description : This function initializes FreeRTOS objects.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
void Kernel_Object_init (void)
|
||||||
|
{
|
||||||
|
/************** task creation ****************************/
|
||||||
|
|
||||||
|
/************** semaphore creation ***********************/
|
||||||
|
|
||||||
|
/************** queue creation ***************************/
|
||||||
|
|
||||||
|
/************** software time creation **************************/
|
||||||
|
|
||||||
|
/************** event groups creation ********************/
|
||||||
|
|
||||||
|
/************** stream buffer creation *************************/
|
||||||
|
|
||||||
|
/************** message buffer creation *********************/
|
||||||
|
|
||||||
|
} /* End of function Kernel_Object_init()*/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name : Object_init_manual
|
||||||
|
* Description : This function re-initializes FreeRTOS objects and should be called at runtime.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return value : None.
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
void Object_init_manual (void)
|
||||||
|
{
|
||||||
|
/************** task creation ****************************/
|
||||||
|
} /* End of function Object_init_manual()*/
|
||||||
|
|
@ -0,0 +1,483 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2018 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
*******************************************************************************/
|
||||||
|
/*******************************************************************************
|
||||||
|
* File Name : freertos_start.c
|
||||||
|
* Version : 1.0
|
||||||
|
* Description : Contains FreeRTOS user-defined functions.
|
||||||
|
******************************************************************************/
|
||||||
|
/*****************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 30.06.2016 1.00 First Release
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
******************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
#include "freertos_start.h"
|
||||||
|
#include "demo_main.h"
|
||||||
|
#include "demo_specific_io.h"
|
||||||
|
|
||||||
|
#if (BSP_CFG_RTOS_USED == 1)
|
||||||
|
|
||||||
|
#if (RTOS_USB_SUPPORT == 1)
|
||||||
|
#include "r_usb_basic_if.h"
|
||||||
|
#include "r_usb_cstd_rtos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/************* semaphore initialization *****************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* FreeRTOS's system timer. */
|
||||||
|
void vApplicationSetupTimerInterrupt(void);
|
||||||
|
|
||||||
|
/* Hook functions used by FreeRTOS. */
|
||||||
|
void vAssertCalled(void);
|
||||||
|
void vApplicationIdleHook(void);
|
||||||
|
void vApplicationTickHook(void);
|
||||||
|
void vApplicationMallocFailedHook(void);
|
||||||
|
void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName);
|
||||||
|
|
||||||
|
/* FreeRTOS's processing before start the kernel. */
|
||||||
|
void Processing_Before_Start_Kernel(void);
|
||||||
|
|
||||||
|
/* Main task. */
|
||||||
|
extern void main_task(void *pvParameters);
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vApplicationSetupTimerInterrupt
|
||||||
|
* Description : Initialize system timer for FreeRTOS with tick interrupt 1ms.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vApplicationSetupTimerInterrupt(void)
|
||||||
|
{
|
||||||
|
/* CMT channel 0 is configured as RTOS's system timer. */
|
||||||
|
#if (BSP_CFG_RTOS_SYSTEM_TIMER == 0)
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Enable compare match timer 0. */
|
||||||
|
MSTP( CMT0 ) = 0;
|
||||||
|
|
||||||
|
/* Stop counter. */
|
||||||
|
CMT.CMSTR0.BIT.STR0 = 0;
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
|
||||||
|
/* Enable interrupt on compare match.
|
||||||
|
* Divide the PCLK by 8. */
|
||||||
|
CMT0.CMCR.WORD = 0x00C0; // CKS=00b,CMIE=1; PCLK/8,Compare match interrupt (CMIn) enabled @60MHz
|
||||||
|
|
||||||
|
/* Set the compare match value. */
|
||||||
|
CMT0.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ )) / 8 - 1);
|
||||||
|
|
||||||
|
/* Clear counter. */
|
||||||
|
CMT0.CMCNT = 0;
|
||||||
|
|
||||||
|
/* Clear any previously pending interrupts. */
|
||||||
|
IR(CMT0, CMI0) = 0;
|
||||||
|
|
||||||
|
/* Enable the interrupt. */
|
||||||
|
IEN(CMT0, CMI0) = 1;
|
||||||
|
|
||||||
|
/* Set its priority to the application defined kernel priority. */
|
||||||
|
IPR(CMT0, CMI0) = configKERNEL_INTERRUPT_PRIORITY;
|
||||||
|
|
||||||
|
/* Start the timer 0. */
|
||||||
|
CMT.CMSTR0.BIT.STR0 = 1;
|
||||||
|
#endif /* (BSP_CFG_RTOS_SYSTEM_TIMER == 0) */
|
||||||
|
|
||||||
|
/* CMT channel 1 is configured as RTOS's system timer. */
|
||||||
|
#if (BSP_CFG_RTOS_SYSTEM_TIMER == 1)
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Enable compare match timer 1. */
|
||||||
|
MSTP( CMT1 ) = 0;
|
||||||
|
|
||||||
|
/* Stop counter. */
|
||||||
|
CMT.CMSTR0.BIT.STR1 = 0;
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
|
||||||
|
/* Enable interrupt on compare match.
|
||||||
|
* Divide the PCLK by 8. */
|
||||||
|
CMT1.CMCR.WORD = 0x00C0; // CKS=00b,CMIE=1; PCLK/8,Compare match interrupt (CMIn) enabled @60MHz
|
||||||
|
|
||||||
|
/* Set the compare match value. */
|
||||||
|
CMT1.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ )) / 8 - 1);
|
||||||
|
|
||||||
|
/* Clear counter. */
|
||||||
|
CMT1.CMCNT = 0;
|
||||||
|
|
||||||
|
/* Clear any previously pending interrupts. */
|
||||||
|
IR(CMT1, CMI1) = 0;
|
||||||
|
|
||||||
|
/* Enable the interrupt. */
|
||||||
|
IEN(CMT1, CMI1) = 1;
|
||||||
|
|
||||||
|
/* Set its priority to the application defined kernel priority. */
|
||||||
|
IPR(CMT1, CMI1) = configKERNEL_INTERRUPT_PRIORITY;
|
||||||
|
|
||||||
|
/* Start the timer 1. */
|
||||||
|
CMT.CMSTR0.BIT.STR1 = 1;
|
||||||
|
#endif /* (BSP_CFG_RTOS_SYSTEM_TIMER == 1) */
|
||||||
|
|
||||||
|
/* CMT channel 2 is configured as RTOS's system timer. */
|
||||||
|
#if (BSP_CFG_RTOS_SYSTEM_TIMER == 2)
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Enable compare match timer 2. */
|
||||||
|
MSTP( CMT2 ) = 0;
|
||||||
|
|
||||||
|
/* Stop counter. */
|
||||||
|
CMT.CMSTR1.BIT.STR2 = 0;
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
|
||||||
|
/* Enable interrupt on compare match.
|
||||||
|
* Divide the PCLK by 8. */
|
||||||
|
CMT2.CMCR.WORD = 0x00C0; // CKS=00b,CMIE=1; PCLK/8,Compare match interrupt (CMIn) enabled @60MHz
|
||||||
|
|
||||||
|
/* Set the compare match value. */
|
||||||
|
CMT2.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ )) / 8 - 1);
|
||||||
|
|
||||||
|
/* Clear counter. */
|
||||||
|
CMT2.CMCNT = 0;
|
||||||
|
|
||||||
|
/* Clear any previously pending interrupts. */
|
||||||
|
IR(CMT2, CMI2) = 0;
|
||||||
|
|
||||||
|
/* Enable the interrupt. */
|
||||||
|
IEN(CMT2, CMI2) = 1;
|
||||||
|
|
||||||
|
/* Set its priority to the application defined kernel priority. */
|
||||||
|
IPR(CMT2, CMI2) = configKERNEL_INTERRUPT_PRIORITY;
|
||||||
|
|
||||||
|
/* Start the timer 2. */
|
||||||
|
CMT.CMSTR1.BIT.STR2 = 1;
|
||||||
|
#endif /* (BSP_CFG_RTOS_SYSTEM_TIMER == 2) */
|
||||||
|
|
||||||
|
/* CMT channel 3 is configured as RTOS's system timer. */
|
||||||
|
#if (BSP_CFG_RTOS_SYSTEM_TIMER == 3)
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Enable compare match timer 3. */
|
||||||
|
MSTP( CMT3 ) = 0;
|
||||||
|
|
||||||
|
/* Stop counter. */
|
||||||
|
CMT.CMSTR1.BIT.STR3 = 0;
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
|
||||||
|
/* Enable interrupt on compare match.
|
||||||
|
* Divide the PCLK by 8. */
|
||||||
|
CMT3.CMCR.WORD = 0x00C0; // CKS=00b,CMIE=1; PCLK/8,Compare match interrupt (CMIn) enabled @60MHz
|
||||||
|
|
||||||
|
/* Set the compare match value. */
|
||||||
|
CMT3.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ )) / 8 - 1);
|
||||||
|
|
||||||
|
/* Clear counter. */
|
||||||
|
CMT3.CMCNT = 0;
|
||||||
|
|
||||||
|
/* Clear any previously pending interrupts. */
|
||||||
|
IR(CMT3, CMI3) = 0;
|
||||||
|
|
||||||
|
/* Enable the interrupt. */
|
||||||
|
IEN(CMT3, CMI3) = 1;
|
||||||
|
|
||||||
|
/* Set its priority to the application defined kernel priority. */
|
||||||
|
IPR(CMT3, CMI3) = configKERNEL_INTERRUPT_PRIORITY;
|
||||||
|
|
||||||
|
/* Start the timer 3. */
|
||||||
|
CMT.CMSTR1.BIT.STR3 = 1;
|
||||||
|
#endif /* (BSP_CFG_RTOS_SYSTEM_TIMER == 3) */
|
||||||
|
|
||||||
|
} /* End of function vApplicationSetupTimerInterrupt() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vAssertCalled
|
||||||
|
* Description : This function is used to validate the input parameters.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vAssertCalled(void)
|
||||||
|
{
|
||||||
|
volatile unsigned long ul = 0;
|
||||||
|
|
||||||
|
taskENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
/* Use the debugger to set ul to a non-zero value in order to step out
|
||||||
|
of this function to determine why it was called. */
|
||||||
|
while( 0 == ul )
|
||||||
|
{
|
||||||
|
portNOP();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
|
} /* End of function vAssertCalled() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vApplicationIdleHook
|
||||||
|
* Description : This function will be called on each cycle of the idle task.
|
||||||
|
* NOTE: vApplicationIdleHook() MUST NOT CALL A FUNCTION
|
||||||
|
* THAT MIGHT BLOCK UNDER ANY CIRCUMSTANCES.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vApplicationIdleHook(void)
|
||||||
|
{
|
||||||
|
volatile size_t xFreeHeapSpace;
|
||||||
|
|
||||||
|
/* This is just a trivial example of an idle hook. It is called on each
|
||||||
|
cycle of the idle task. It must *NOT* attempt to block. In this case the
|
||||||
|
idle task just queries the amount of FreeRTOS heap that remains. See the
|
||||||
|
memory management section on the http://www.FreeRTOS.org web site for memory
|
||||||
|
management options. If there is a lot of heap memory free then the
|
||||||
|
configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up
|
||||||
|
RAM. */
|
||||||
|
xFreeHeapSpace = xPortGetFreeHeapSize();
|
||||||
|
|
||||||
|
/* Remove compiler warning about xFreeHeapSpace being set but never used. */
|
||||||
|
( void ) xFreeHeapSpace;
|
||||||
|
|
||||||
|
} /* End of function vApplicationIdleHook() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vApplicationTickHook
|
||||||
|
* Description : This function will be called every tick interrupt.
|
||||||
|
* NOTE: vApplicationTickHook() EXECUTES FROM WITHIN AN ISR,
|
||||||
|
* SO MUST BE VERY SHORT AND NOT USE MUCH STACK.
|
||||||
|
* IN ADDITION, NOT CALL ANY APIs WITHOUT "FromISR" OR
|
||||||
|
* "FROM_ISR" AT THE END.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vApplicationTickHook(void)
|
||||||
|
{
|
||||||
|
/* The tick hook is not used by the blinky demo, but is by the full demo. */
|
||||||
|
#if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0
|
||||||
|
{
|
||||||
|
extern void vFullDemoTickHook( void );
|
||||||
|
|
||||||
|
vFullDemoTickHook();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} /* End of function vApplicationTickHook() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vApplicationMallocFailedHook
|
||||||
|
* Description : This function is to capture the failure while
|
||||||
|
* memory allocation.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vApplicationMallocFailedHook(void)
|
||||||
|
{
|
||||||
|
/* Called if a call to pvPortMalloc() fails because there is insufficient
|
||||||
|
free memory available in the FreeRTOS heap. pvPortMalloc() is called
|
||||||
|
internally by FreeRTOS API functions that create tasks, queues, software
|
||||||
|
timers, and semaphores. The size of the FreeRTOS heap is set by the
|
||||||
|
configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
|
||||||
|
|
||||||
|
/* Force an assert. */
|
||||||
|
configASSERT( ( volatile void * ) NULL );
|
||||||
|
|
||||||
|
taskDISABLE_INTERRUPTS();
|
||||||
|
for( ; ; )
|
||||||
|
{
|
||||||
|
/* Loop here */
|
||||||
|
};
|
||||||
|
|
||||||
|
} /* End of function vApplicationMallocFailedHook() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name: vApplicationStackOverflowHook
|
||||||
|
* Description : Hook function is to capture the failure when the stack size
|
||||||
|
* is insufficient for processing.
|
||||||
|
* Arguments : pxTask -
|
||||||
|
* Task handler
|
||||||
|
* pcTaskName -
|
||||||
|
* Pointer of where to store the task's name
|
||||||
|
* Return Value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName)
|
||||||
|
{
|
||||||
|
( void ) pcTaskName;
|
||||||
|
( void ) pxTask;
|
||||||
|
|
||||||
|
/* Run time stack overflow checking is performed if
|
||||||
|
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
|
||||||
|
function is called if a stack overflow is detected. */
|
||||||
|
|
||||||
|
/* Force an assert. */
|
||||||
|
configASSERT( ( volatile void * ) NULL );
|
||||||
|
|
||||||
|
taskDISABLE_INTERRUPTS();
|
||||||
|
for( ; ; )
|
||||||
|
{
|
||||||
|
/* Loop here */
|
||||||
|
};
|
||||||
|
|
||||||
|
} /* End of function vApplicationStackOverflowHook() */
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Function Name : Processing_Before_Start_Kernel
|
||||||
|
* Description : Create a main task, FreeRTOS's objects (e.g. mailbox, task,
|
||||||
|
* semaphore, mutex...) if required.
|
||||||
|
* Arguments : None.
|
||||||
|
* Return value : None.
|
||||||
|
******************************************************************************/
|
||||||
|
void Processing_Before_Start_Kernel(void)
|
||||||
|
{
|
||||||
|
#if 0 /* Generated Renesas Code */
|
||||||
|
|
||||||
|
BaseType_t ret;
|
||||||
|
|
||||||
|
/************** semaphore creation ***********************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/************** mutex creation ***************************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** queues creation **************************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** event groups creation ********************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** mailbox creation *************************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** memory pool creation *********************/
|
||||||
|
|
||||||
|
/** USB RTOS Configuration **/
|
||||||
|
#if (RTOS_USB_SUPPORT == 1)
|
||||||
|
usb_rtos_err_t err = usb_rtos_configuration();
|
||||||
|
if (UsbRtos_Success != err)
|
||||||
|
{
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
/** Failure of UsbRtos Configuration **/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Kernel_Object_init();
|
||||||
|
|
||||||
|
/************** task creation ****************************/
|
||||||
|
/* Main task. */
|
||||||
|
ret = xTaskCreate(main_task, "MAIN_TASK", 512, NULL, 3, NULL);
|
||||||
|
if (pdPASS != ret)
|
||||||
|
{
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
/* Failed! Task can not be created. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* Run FreeRTOS Demo */
|
||||||
|
|
||||||
|
demo_main();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} /* End of function Processing_Before_Start_Kernel() */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
#if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
|
||||||
|
extern void main_blinky( void );
|
||||||
|
#else
|
||||||
|
extern void main_full( void );
|
||||||
|
#endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */
|
||||||
|
|
||||||
|
void demo_main( void )
|
||||||
|
{
|
||||||
|
/* Configure the hardware ready to run the demo. */
|
||||||
|
prvSetupHardware();
|
||||||
|
|
||||||
|
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
|
||||||
|
of this file. */
|
||||||
|
#if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
|
||||||
|
{
|
||||||
|
main_blinky();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
main_full();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Should never get reached. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvSetupHardware( void )
|
||||||
|
{
|
||||||
|
/* Turn on LED0 at start. (The system initialization had been done in the
|
||||||
|
src/smc_gen/general/r_cg_hardware_setup.c.) */
|
||||||
|
LED0 = LED_ON;
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#endif /* (BSP_CFG_RTOS_USED == 1) */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2018 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
*******************************************************************************/
|
||||||
|
/*******************************************************************************
|
||||||
|
* File Name : freertos_start.h
|
||||||
|
* Version : 1.0
|
||||||
|
* Description : FreeRTOS's user-defined functions header file.
|
||||||
|
******************************************************************************/
|
||||||
|
/*****************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 30.06.2016 1.00 First Release
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef FREERTOS_START_H_
|
||||||
|
#define FREERTOS_START_H_
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
******************************************************************************/
|
||||||
|
/* USB FIT module support macro */
|
||||||
|
#define RTOS_USB_SUPPORT 0
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
******************************************************************************/
|
||||||
|
/************* semaphore handler *****************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/************* mutex handler *********************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** queues handler *******************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** event groups handler *************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** mailbox handler ******************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** memory pool handler **************/
|
||||||
|
|
||||||
|
|
||||||
|
/************** task handler *********************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
******************************************************************************/
|
||||||
|
extern void Processing_Before_Start_Kernel(void);
|
||||||
|
extern void Kernel_Object_init(void);
|
||||||
|
|
||||||
|
#endif /* FREERTOS_START_H_ */
|
||||||
|
|
@ -0,0 +1,176 @@
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
RAM : ORIGIN = 0x4, LENGTH = 0x7fffc
|
||||||
|
RAM2 : ORIGIN = 0x00800000, LENGTH = 524288
|
||||||
|
ROM : ORIGIN = 0xFFC00000, LENGTH = 4194304
|
||||||
|
OFS : ORIGIN = 0xFE7F5D00, LENGTH = 128
|
||||||
|
}
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.exvectors 0xFFFFFF80: AT(0xFFFFFF80)
|
||||||
|
{
|
||||||
|
_exvectors_start = .;
|
||||||
|
KEEP(*(.exvectors))
|
||||||
|
_exvectors_end = .;
|
||||||
|
} >ROM
|
||||||
|
.fvectors 0xFFFFFFFC: AT(0xFFFFFFFC)
|
||||||
|
{
|
||||||
|
KEEP(*(.fvectors))
|
||||||
|
} > ROM
|
||||||
|
.text 0xFFC00000: AT(0xFFC00000)
|
||||||
|
{
|
||||||
|
*(.text)
|
||||||
|
KEEP(*(.text.*ISR))
|
||||||
|
KEEP(*(.text.*_isr))
|
||||||
|
KEEP(*(.text.*_interrupt))
|
||||||
|
*(.text.*)
|
||||||
|
*(P)
|
||||||
|
etext = .;
|
||||||
|
} > ROM
|
||||||
|
.rvectors ALIGN(4):
|
||||||
|
{
|
||||||
|
_rvectors_start = .;
|
||||||
|
INCLUDE ../src/smc_gen/r_bsp/mcu/all/linker_script_rvectors.inc
|
||||||
|
_rvectors_end = .;
|
||||||
|
} > ROM
|
||||||
|
.init :
|
||||||
|
{
|
||||||
|
KEEP(*(.init))
|
||||||
|
__preinit_array_start = .;
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
__preinit_array_end = .;
|
||||||
|
__init_array_start = (. + 3) & ~ 3;
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
__init_array_end = .;
|
||||||
|
__fini_array_start = .;
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
__fini_array_end = .;
|
||||||
|
} > ROM
|
||||||
|
.fini :
|
||||||
|
{
|
||||||
|
KEEP(*(.fini))
|
||||||
|
} > ROM
|
||||||
|
.got :
|
||||||
|
{
|
||||||
|
*(.got)
|
||||||
|
*(.got.plt)
|
||||||
|
} > ROM
|
||||||
|
.rodata :
|
||||||
|
{
|
||||||
|
*(.rodata)
|
||||||
|
*(.rodata.*)
|
||||||
|
*(C_1)
|
||||||
|
*(C_2)
|
||||||
|
*(C)
|
||||||
|
_erodata = .;
|
||||||
|
} > ROM
|
||||||
|
.eh_frame_hdr :
|
||||||
|
{
|
||||||
|
*(.eh_frame_hdr)
|
||||||
|
} > ROM
|
||||||
|
.eh_frame :
|
||||||
|
{
|
||||||
|
*(.eh_frame)
|
||||||
|
} > ROM
|
||||||
|
.jcr :
|
||||||
|
{
|
||||||
|
*(.jcr)
|
||||||
|
} > ROM
|
||||||
|
.tors :
|
||||||
|
{
|
||||||
|
__CTOR_LIST__ = .;
|
||||||
|
. = ALIGN(2);
|
||||||
|
___ctors = .;
|
||||||
|
*(.ctors)
|
||||||
|
___ctors_end = .;
|
||||||
|
__CTOR_END__ = .;
|
||||||
|
__DTOR_LIST__ = .;
|
||||||
|
___dtors = .;
|
||||||
|
*(.dtors)
|
||||||
|
___dtors_end = .;
|
||||||
|
__DTOR_END__ = .;
|
||||||
|
. = ALIGN(2);
|
||||||
|
_mdata = .;
|
||||||
|
} > ROM
|
||||||
|
.data : AT(_mdata)
|
||||||
|
{
|
||||||
|
_data = .;
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
*(D)
|
||||||
|
*(D_1)
|
||||||
|
*(D_2)
|
||||||
|
_edata = .;
|
||||||
|
} > RAM
|
||||||
|
.gcc_exc :
|
||||||
|
{
|
||||||
|
*(.gcc_exc)
|
||||||
|
} > RAM
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
_bss = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.**)
|
||||||
|
*(COMMON)
|
||||||
|
*(B)
|
||||||
|
*(B_1)
|
||||||
|
*(B_2)
|
||||||
|
_ebss = .;
|
||||||
|
_end = .;
|
||||||
|
} > RAM
|
||||||
|
.ofs1 0xFE7F5D00: AT(0xFE7F5D00)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs1))
|
||||||
|
} > OFS
|
||||||
|
.ofs2 0xFE7F5D10: AT(0xFE7F5D10)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs2))
|
||||||
|
} > OFS
|
||||||
|
.ofs3 0xFE7F5D20: AT(0xFE7F5D20)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs3))
|
||||||
|
} > OFS
|
||||||
|
.ofs4 0xFE7F5D40: AT(0xFE7F5D40)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs4))
|
||||||
|
} > OFS
|
||||||
|
.ofs5 0xFE7F5D48: AT(0xFE7F5D48)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs5))
|
||||||
|
} > OFS
|
||||||
|
.ofs6 0xFE7F5D50: AT(0xFE7F5D50)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs6))
|
||||||
|
} > OFS
|
||||||
|
.ofs7 0xFE7F5D64: AT(0xFE7F5D64)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs7))
|
||||||
|
} > OFS
|
||||||
|
.ofs8 0xFE7F5D70: AT(0xFE7F5D70)
|
||||||
|
{
|
||||||
|
KEEP(*(.ofs8))
|
||||||
|
} > OFS
|
||||||
|
.r_bsp_NULL :
|
||||||
|
{
|
||||||
|
. += 0x100;
|
||||||
|
"_r_bsp_NULL_end" = .;
|
||||||
|
} >RAM
|
||||||
|
.r_bsp_istack BLOCK(0x4) (NOLOAD) :
|
||||||
|
{
|
||||||
|
KEEP(*(.r_bsp_istack))
|
||||||
|
} >RAM
|
||||||
|
.istack :
|
||||||
|
{
|
||||||
|
"_istack" = .;
|
||||||
|
} >RAM
|
||||||
|
.r_bsp_ustack BLOCK(0x4) (NOLOAD) :
|
||||||
|
{
|
||||||
|
KEEP(*(.r_bsp_ustack))
|
||||||
|
} >RAM
|
||||||
|
.ustack :
|
||||||
|
{
|
||||||
|
"_ustack" = .;
|
||||||
|
} >RAM
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_cg_hardware_setup.c
|
||||||
|
* Version : 1.0.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : Initialization file for code generation configurations.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
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_smc_cgc.h"
|
||||||
|
#include "r_smc_interrupt.h"
|
||||||
|
/* Start user code for include. Do not edit comment generated here */
|
||||||
|
#include "r_gpio_rx_if.h"
|
||||||
|
#include "r_sci_rx_pinset.h"
|
||||||
|
#include "r_sci_rx_if.h"
|
||||||
|
#include "r_dtc_rx_if.h"
|
||||||
|
#include "demo_specific_io.h"
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#include "r_cg_userdefine.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for global. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/* Board Support Data Structures. */
|
||||||
|
sci_hdl_t xSerialSciHandle;
|
||||||
|
dtc_transfer_data_t xSerialTxDtcInfo;
|
||||||
|
|
||||||
|
/* Workaround to execute FIT Board Support Settings */
|
||||||
|
void R_CG_Config_Create(void);
|
||||||
|
void R_FIT_Board_Support_Settings(void);
|
||||||
|
void R_Systeminit(void)
|
||||||
|
{
|
||||||
|
R_CG_Config_Create();
|
||||||
|
R_FIT_Board_Support_Settings();
|
||||||
|
}
|
||||||
|
#define R_Systeminit R_CG_Config_Create
|
||||||
|
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: r_undefined_exception
|
||||||
|
* Description : This function is undefined interrupt service routine
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
void r_undefined_exception(void)
|
||||||
|
{
|
||||||
|
/* Start user code for r_undefined_exception. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_Systeminit
|
||||||
|
* Description : This function initializes every configuration
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
void R_Systeminit(void)
|
||||||
|
{
|
||||||
|
/* Enable writing to registers related to operating modes, LPC, CGC and software reset */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA50BU;
|
||||||
|
|
||||||
|
/* Enable writing to MPC pin function control registers */
|
||||||
|
MPC.PWPR.BIT.B0WI = 0U;
|
||||||
|
MPC.PWPR.BIT.PFSWE = 1U;
|
||||||
|
|
||||||
|
/* Write 0 to the target bits in the POECR2 registers */
|
||||||
|
POE3.POECR2.WORD = 0x0000U;
|
||||||
|
|
||||||
|
/* Initialize clocks settings */
|
||||||
|
R_CGC_Create();
|
||||||
|
|
||||||
|
/* Register undefined interrupt */
|
||||||
|
R_BSP_InterruptWrite(BSP_INT_SRC_UNDEFINED_INTERRUPT,(bsp_int_cb_t)r_undefined_exception);
|
||||||
|
|
||||||
|
/* Disable writing to MPC pin function control registers */
|
||||||
|
MPC.PWPR.BIT.PFSWE = 0U;
|
||||||
|
MPC.PWPR.BIT.B0WI = 1U;
|
||||||
|
|
||||||
|
/* Enable protection */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500U;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start user code for adding. Do not edit comment generated here */
|
||||||
|
|
||||||
|
void R_FIT_Board_Support_Settings(void)
|
||||||
|
{
|
||||||
|
/* Do not call any functions which enables generating any interrupt requests. */
|
||||||
|
|
||||||
|
/* GPIO for LED */
|
||||||
|
R_GPIO_PinWrite(U_GPIO_PIN_LED0, (gpio_level_t)LED_OFF); // for the initial level after input --> output
|
||||||
|
R_GPIO_PinDirectionSet(U_GPIO_PIN_LED0, GPIO_DIRECTION_OUTPUT);
|
||||||
|
|
||||||
|
/* GPIO for SW */
|
||||||
|
R_GPIO_PinDirectionSet(U_GPIO_PIN_SW1, GPIO_DIRECTION_INPUT );
|
||||||
|
|
||||||
|
/* FreeRTOS CLI Command Console */
|
||||||
|
U_SCI_UART_CLI_PINSET();
|
||||||
|
sci_cfg_t xSerialSciConfig;
|
||||||
|
xSerialSciConfig.async.baud_rate = 115200;
|
||||||
|
xSerialSciConfig.async.clk_src = SCI_CLK_INT;
|
||||||
|
xSerialSciConfig.async.data_size = SCI_DATA_8BIT;
|
||||||
|
xSerialSciConfig.async.parity_en = SCI_PARITY_OFF;
|
||||||
|
xSerialSciConfig.async.parity_type = SCI_EVEN_PARITY;
|
||||||
|
xSerialSciConfig.async.stop_bits = SCI_STOPBITS_1;
|
||||||
|
xSerialSciConfig.async.int_priority = 1; /* lowest at first. */
|
||||||
|
R_SCI_Open(U_SCI_UART_CLI_SCI_CH, SCI_MODE_ASYNC, &xSerialSciConfig, vSerialSciCallback, &xSerialSciHandle);
|
||||||
|
R_DTC_Open();
|
||||||
|
R_DTC_Control(DTC_CMD_DTC_START, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_cg_interrupt_handlers.h
|
||||||
|
* Version : 1.0.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : This file declares interrupt handlers.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef INTERRUPT_HANDLERS_H
|
||||||
|
#define INTERRUPT_HANDLERS_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for function. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_cg_macrodriver.h
|
||||||
|
* Version : 1.0.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : Macro header file for code generation.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef MACRODRIVER_H
|
||||||
|
#define MACRODRIVER_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
#include "r_smc_interrupt.h"
|
||||||
|
#include "r_cg_interrupt_handlers.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef __TYPEDEF__
|
||||||
|
|
||||||
|
/* Status list definition */
|
||||||
|
#define MD_STATUSBASE (0x00U)
|
||||||
|
#define MD_OK (MD_STATUSBASE + 0x00U) /* register setting OK */
|
||||||
|
#define MD_SPT (MD_STATUSBASE + 0x01U) /* IIC stop */
|
||||||
|
#define MD_NACK (MD_STATUSBASE + 0x02U) /* IIC no ACK */
|
||||||
|
#define MD_BUSY1 (MD_STATUSBASE + 0x03U) /* busy 1 */
|
||||||
|
#define MD_BUSY2 (MD_STATUSBASE + 0x04U) /* busy 2 */
|
||||||
|
|
||||||
|
/* Error list definition */
|
||||||
|
#define MD_ERRORBASE (0x80U)
|
||||||
|
#define MD_ERROR (MD_ERRORBASE + 0x00U) /* error */
|
||||||
|
#define MD_ARGERROR (MD_ERRORBASE + 0x01U) /* error argument input error */
|
||||||
|
#define MD_ERROR1 (MD_ERRORBASE + 0x02U) /* error 1 */
|
||||||
|
#define MD_ERROR2 (MD_ERRORBASE + 0x03U) /* error 2 */
|
||||||
|
#define MD_ERROR3 (MD_ERRORBASE + 0x04U) /* error 3 */
|
||||||
|
#define MD_ERROR4 (MD_ERRORBASE + 0x05U) /* error 4 */
|
||||||
|
#define MD_ERROR5 (MD_ERRORBASE + 0x06U) /* error 5 */
|
||||||
|
#define nop() R_BSP_NOP()
|
||||||
|
#define wait() R_BSP_WAIT()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef __TYPEDEF__
|
||||||
|
typedef unsigned short MD_STATUS;
|
||||||
|
#define __TYPEDEF__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_Systeminit(void);
|
||||||
|
/* Start user code for function. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_cg_userdefine.h
|
||||||
|
* Version : 1.0.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : User header file for code generation.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef CG_USER_DEF_H
|
||||||
|
#define CG_USER_DEF_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for include. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for register. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for macro define. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for type define. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for function. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_cgc.c
|
||||||
|
* Version : 1.6.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : This file implements CGC setting.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
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_smc_cgc.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
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for global. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_CGC_Create
|
||||||
|
* Description : This function initializes the clock generator
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
void R_CGC_Create(void)
|
||||||
|
{
|
||||||
|
/* Set CLKOUT25M pin */
|
||||||
|
MPC.P56PFS.BYTE = 0x2AU;
|
||||||
|
PORT5.DSCR2.BYTE |= 0x40U;
|
||||||
|
PORT5.PMR.BYTE |= 0x40U;
|
||||||
|
|
||||||
|
R_CGC_Create_UserInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start user code for adding. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
@ -0,0 +1,174 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_cgc.h
|
||||||
|
* Version : 1.6.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : CGC setting header file.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef SMC_CGC_H
|
||||||
|
#define SMC_CGC_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/*
|
||||||
|
PLL Control Register (PLLCR)
|
||||||
|
*/
|
||||||
|
/* PLL Input Frequency Division Ratio Select (PLIDIV[1:0]) */
|
||||||
|
#define _0000_CGC_PLL_FREQ_DIV_1 (0x0000U) /* x1 */
|
||||||
|
#define _0001_CGC_PLL_FREQ_DIV_2 (0x0001U) /* x1/2 */
|
||||||
|
#define _0002_CGC_PLL_FREQ_DIV_3 (0x0002U) /* x1/3 */
|
||||||
|
/* PLL Clock Source Select (PLLSRCSEL) */
|
||||||
|
#define _0000_CGC_PLL_SOURCE_MAIN (0x0000U) /* Main clock oscillator */
|
||||||
|
#define _0010_CGC_PLL_SOURCE_HOCO (0x0010U) /* HOCO */
|
||||||
|
/* Frequency Multiplication Factor Select (STC[5:0]) */
|
||||||
|
#define _1300_CGC_PLL_FREQ_MUL_10_0 (0x1300U) /* x10.0 */
|
||||||
|
#define _1400_CGC_PLL_FREQ_MUL_10_5 (0x1400U) /* x10.5 */
|
||||||
|
#define _1500_CGC_PLL_FREQ_MUL_11_0 (0x1500U) /* x11.0 */
|
||||||
|
#define _1600_CGC_PLL_FREQ_MUL_11_5 (0x1600U) /* x11.5 */
|
||||||
|
#define _1700_CGC_PLL_FREQ_MUL_12_0 (0x1700U) /* x12.0 */
|
||||||
|
#define _1800_CGC_PLL_FREQ_MUL_12_5 (0x1800U) /* x12.5 */
|
||||||
|
#define _1900_CGC_PLL_FREQ_MUL_13_0 (0x1900U) /* x13.0 */
|
||||||
|
#define _1A00_CGC_PLL_FREQ_MUL_13_5 (0x1A00U) /* x13.5 */
|
||||||
|
#define _1B00_CGC_PLL_FREQ_MUL_14_0 (0x1B00U) /* x14.0 */
|
||||||
|
#define _1C00_CGC_PLL_FREQ_MUL_14_5 (0x1C00U) /* x14.5 */
|
||||||
|
#define _1D00_CGC_PLL_FREQ_MUL_15_0 (0x1D00U) /* x15.0 */
|
||||||
|
#define _1E00_CGC_PLL_FREQ_MUL_15_5 (0x1E00U) /* x15.5 */
|
||||||
|
#define _1F00_CGC_PLL_FREQ_MUL_16_0 (0x1F00U) /* x16.0 */
|
||||||
|
#define _2000_CGC_PLL_FREQ_MUL_16_5 (0x2000U) /* x16.5 */
|
||||||
|
#define _2100_CGC_PLL_FREQ_MUL_17_0 (0x2100U) /* x17.0 */
|
||||||
|
#define _2200_CGC_PLL_FREQ_MUL_17_5 (0x2200U) /* x17.5 */
|
||||||
|
#define _2300_CGC_PLL_FREQ_MUL_18_0 (0x2300U) /* x18.0 */
|
||||||
|
#define _2400_CGC_PLL_FREQ_MUL_18_5 (0x2400U) /* x18.5 */
|
||||||
|
#define _2500_CGC_PLL_FREQ_MUL_19_0 (0x2500U) /* x19.0 */
|
||||||
|
#define _2600_CGC_PLL_FREQ_MUL_19_5 (0x2600U) /* x19.5 */
|
||||||
|
#define _2700_CGC_PLL_FREQ_MUL_20_0 (0x2700U) /* x20.0 */
|
||||||
|
#define _2800_CGC_PLL_FREQ_MUL_20_5 (0x2800U) /* x20.5 */
|
||||||
|
#define _2900_CGC_PLL_FREQ_MUL_21_0 (0x2900U) /* x21.0 */
|
||||||
|
#define _2A00_CGC_PLL_FREQ_MUL_21_5 (0x2A00U) /* x21.5 */
|
||||||
|
#define _2B00_CGC_PLL_FREQ_MUL_22_0 (0x2B00U) /* x22.0 */
|
||||||
|
#define _2C00_CGC_PLL_FREQ_MUL_22_5 (0x2C00U) /* x22.5 */
|
||||||
|
#define _2D00_CGC_PLL_FREQ_MUL_23_0 (0x2D00U) /* x23.0 */
|
||||||
|
#define _2E00_CGC_PLL_FREQ_MUL_23_5 (0x2E00U) /* x23.5 */
|
||||||
|
#define _2F00_CGC_PLL_FREQ_MUL_24_0 (0x2F00U) /* x24.0 */
|
||||||
|
#define _3000_CGC_PLL_FREQ_MUL_24_5 (0x3000U) /* x24.5 */
|
||||||
|
#define _3100_CGC_PLL_FREQ_MUL_25_0 (0x3100U) /* x25.0 */
|
||||||
|
#define _3200_CGC_PLL_FREQ_MUL_25_5 (0x3200U) /* x25.5 */
|
||||||
|
#define _3300_CGC_PLL_FREQ_MUL_26_0 (0x3300U) /* x26.0 */
|
||||||
|
#define _3400_CGC_PLL_FREQ_MUL_26_5 (0x3400U) /* x26.5 */
|
||||||
|
#define _3500_CGC_PLL_FREQ_MUL_27_0 (0x3500U) /* x27.0 */
|
||||||
|
#define _3600_CGC_PLL_FREQ_MUL_27_5 (0x3600U) /* x27.5 */
|
||||||
|
#define _3700_CGC_PLL_FREQ_MUL_28_0 (0x3700U) /* x28.0 */
|
||||||
|
#define _3800_CGC_PLL_FREQ_MUL_28_5 (0x3800U) /* x28.5 */
|
||||||
|
#define _3900_CGC_PLL_FREQ_MUL_29_0 (0x3900U) /* x29.0 */
|
||||||
|
#define _3A00_CGC_PLL_FREQ_MUL_29_5 (0x3A00U) /* x29.5 */
|
||||||
|
#define _3B00_CGC_PLL_FREQ_MUL_30_0 (0x3B00U) /* x30.0 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
High-Speed On-Chip Oscillator Control Register 2 (HOCOCR2)
|
||||||
|
*/
|
||||||
|
/* HOCO Frequency Setting (HCFRQ[1:0]) */
|
||||||
|
#define _00_CGC_HOCO_CLK_16 (0x00U) /* 16 MHz */
|
||||||
|
#define _01_CGC_HOCO_CLK_18 (0x01U) /* 18 MHz */
|
||||||
|
#define _02_CGC_HOCO_CLK_20 (0x02U) /* 20 MHz */
|
||||||
|
|
||||||
|
/*
|
||||||
|
Main Clock Oscillator Forced Oscillation Control Register (MOFCR)
|
||||||
|
*/
|
||||||
|
/* Main Clock Oscillator Forced Oscillation (MOFXIN) */
|
||||||
|
#define _00_CGC_MAINOSC_NOT_CONTROLLED (0x00U) /* Oscillator is not controlled by this bit */
|
||||||
|
#define _01_CGC_MAINOSC_FORCE_OSCILLATED (0x01U) /* The main clock oscillator is forcedly oscillated */
|
||||||
|
/* Main Oscillator Drive Capability 2 Switching (MODRV2[1:0]) */
|
||||||
|
#define _00_CGC_MAINOSC_UNDER24M (0x00U) /* 20.1 to 24 MHz */
|
||||||
|
#define _10_CGC_MAINOSC_UNDER20M (0x10U) /* 16.1 to 20 MHz */
|
||||||
|
#define _20_CGC_MAINOSC_UNDER16M (0x20U) /* 8.1 to 16 MHz */
|
||||||
|
#define _30_CGC_MAINOSC_EQUATE8M (0x30U) /* 8 MHz */
|
||||||
|
/* Main Clock Oscillator Switch (MOSEL) */
|
||||||
|
#define _00_CGC_MAINOSC_RESONATOR (0x00U) /* Resonator */
|
||||||
|
#define _40_CGC_MAINOSC_EXTERNAL (0x40U) /* External oscillator input */
|
||||||
|
|
||||||
|
/*
|
||||||
|
PPLL Control Register (PPLLCR)
|
||||||
|
*/
|
||||||
|
/* PPLL Input Pulse Frequency Division Ratio Select (PPLIDIV[1:0]) */
|
||||||
|
#define _0000_CGC_PPLL_FREQ_DIV_1 (0x0000U) /* x1 */
|
||||||
|
#define _0001_CGC_PPLL_FREQ_DIV_2 (0x0001U) /* x1/2 */
|
||||||
|
#define _0002_CGC_PPLL_FREQ_DIV_3 (0x0002U) /* x1/3 */
|
||||||
|
/* PPLL Frequency Multiplier Setting (PPLSTC[5:0]) */
|
||||||
|
#define _1300_CGC_PPLL_FREQ_MUL_10_0 (0x1300U) /* x10.0 */
|
||||||
|
#define _1400_CGC_PPLL_FREQ_MUL_10_5 (0x1400U) /* x10.5 */
|
||||||
|
#define _1500_CGC_PPLL_FREQ_MUL_11_0 (0x1500U) /* x11.0 */
|
||||||
|
#define _1600_CGC_PPLL_FREQ_MUL_11_5 (0x1600U) /* x11.5 */
|
||||||
|
#define _1700_CGC_PPLL_FREQ_MUL_12_0 (0x1700U) /* x12.0 */
|
||||||
|
#define _1800_CGC_PPLL_FREQ_MUL_12_5 (0x1800U) /* x12.5 */
|
||||||
|
#define _1900_CGC_PPLL_FREQ_MUL_13_0 (0x1900U) /* x13.0 */
|
||||||
|
#define _1A00_CGC_PPLL_FREQ_MUL_13_5 (0x1A00U) /* x13.5 */
|
||||||
|
#define _1B00_CGC_PPLL_FREQ_MUL_14_0 (0x1B00U) /* x14.0 */
|
||||||
|
#define _1C00_CGC_PPLL_FREQ_MUL_14_5 (0x1C00U) /* x14.5 */
|
||||||
|
#define _1D00_CGC_PPLL_FREQ_MUL_15_0 (0x1D00U) /* x15.0 */
|
||||||
|
#define _1E00_CGC_PPLL_FREQ_MUL_15_5 (0x1E00U) /* x15.5 */
|
||||||
|
#define _1F00_CGC_PPLL_FREQ_MUL_16_0 (0x1F00U) /* x16.0 */
|
||||||
|
#define _2000_CGC_PPLL_FREQ_MUL_16_5 (0x2000U) /* x16.5 */
|
||||||
|
#define _2100_CGC_PPLL_FREQ_MUL_17_0 (0x2100U) /* x17.0 */
|
||||||
|
#define _2200_CGC_PPLL_FREQ_MUL_17_5 (0x2200U) /* x17.5 */
|
||||||
|
#define _2300_CGC_PPLL_FREQ_MUL_18_0 (0x2300U) /* x18.0 */
|
||||||
|
#define _2400_CGC_PPLL_FREQ_MUL_18_5 (0x2400U) /* x18.5 */
|
||||||
|
#define _2500_CGC_PPLL_FREQ_MUL_19_0 (0x2500U) /* x19.0 */
|
||||||
|
#define _2600_CGC_PPLL_FREQ_MUL_19_5 (0x2600U) /* x19.5 */
|
||||||
|
#define _2700_CGC_PPLL_FREQ_MUL_20_0 (0x2700U) /* x20.0 */
|
||||||
|
#define _2800_CGC_PPLL_FREQ_MUL_20_5 (0x2800U) /* x20.5 */
|
||||||
|
#define _2900_CGC_PPLL_FREQ_MUL_21_0 (0x2900U) /* x21.0 */
|
||||||
|
#define _2A00_CGC_PPLL_FREQ_MUL_21_5 (0x2A00U) /* x21.5 */
|
||||||
|
#define _2B00_CGC_PPLL_FREQ_MUL_22_0 (0x2B00U) /* x22.0 */
|
||||||
|
#define _2C00_CGC_PPLL_FREQ_MUL_22_5 (0x2C00U) /* x22.5 */
|
||||||
|
#define _2D00_CGC_PPLL_FREQ_MUL_23_0 (0x2D00U) /* x23.0 */
|
||||||
|
#define _2E00_CGC_PPLL_FREQ_MUL_23_5 (0x2E00U) /* x23.5 */
|
||||||
|
#define _2F00_CGC_PPLL_FREQ_MUL_24_0 (0x2F00U) /* x24.0 */
|
||||||
|
#define _3000_CGC_PPLL_FREQ_MUL_24_5 (0x3000U) /* x24.5 */
|
||||||
|
#define _3100_CGC_PPLL_FREQ_MUL_25_0 (0x3100U) /* x25.0 */
|
||||||
|
#define _3200_CGC_PPLL_FREQ_MUL_25_5 (0x3200U) /* x25.5 */
|
||||||
|
#define _3300_CGC_PPLL_FREQ_MUL_26_0 (0x3300U) /* x26.0 */
|
||||||
|
#define _3400_CGC_PPLL_FREQ_MUL_26_5 (0x3400U) /* x26.5 */
|
||||||
|
#define _3500_CGC_PPLL_FREQ_MUL_27_0 (0x3500U) /* x27.0 */
|
||||||
|
#define _3600_CGC_PPLL_FREQ_MUL_27_5 (0x3600U) /* x27.5 */
|
||||||
|
#define _3700_CGC_PPLL_FREQ_MUL_28_0 (0x3700U) /* x28.0 */
|
||||||
|
#define _3800_CGC_PPLL_FREQ_MUL_28_5 (0x3800U) /* x28.5 */
|
||||||
|
#define _3900_CGC_PPLL_FREQ_MUL_29_0 (0x3900U) /* x29.0 */
|
||||||
|
#define _3A00_CGC_PPLL_FREQ_MUL_29_5 (0x3A00U) /* x29.5 */
|
||||||
|
#define _3B00_CGC_PPLL_FREQ_MUL_30_0 (0x3B00U) /* x30.0 */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_CGC_Create(void);
|
||||||
|
void R_CGC_Create_UserInit(void);
|
||||||
|
/* Start user code for function. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_cgc_user.c
|
||||||
|
* Version : 1.6.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : This file implements CGC setting.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
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"
|
||||||
|
/* 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
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for global. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_CGC_Create_UserInit
|
||||||
|
* Description : This function adds user code after initializing CGC
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
void R_CGC_Create_UserInit(void)
|
||||||
|
{
|
||||||
|
/* Start user code for user init. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start user code for adding. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_entry.h
|
||||||
|
* Version : 1.0.101
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : SMC platform header file.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef SMC_ENTRY_H
|
||||||
|
#define SMC_ENTRY_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "r_cg_macrodriver.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for function. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_interrupt.c
|
||||||
|
* Version : 1.1.0
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : This file implements interrupt setting.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
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_smc_interrupt.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
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Start user code for global. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_Interrupt_Create
|
||||||
|
* Description : This function Used to set the fast interrupt or group interrupt
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
void R_Interrupt_Create(void)
|
||||||
|
{
|
||||||
|
/* No fast interrupt and group settings have been configured in the Interrupts tab. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start user code for adding. Do not edit comment generated here */
|
||||||
|
/* End user code. Do not edit comment generated here */
|
||||||
|
|
@ -0,0 +1,293 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_smc_interrupt.h
|
||||||
|
* Version : 1.1.0
|
||||||
|
* Device(s) : R5F572NNHxFB
|
||||||
|
* Description : This file implements interrupt setting.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef SMC_INTERRUPT_H
|
||||||
|
#define SMC_INTERRUPT_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions (Register bit)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Priority level of interrupt source.
|
||||||
|
* These macro definitions are used to set the IPR register directly
|
||||||
|
*/
|
||||||
|
#define _00_ICU_PRIORITY_LEVEL0 (0x00U) /* Level 0 (disabled) */
|
||||||
|
#define _01_ICU_PRIORITY_LEVEL1 (0x01U) /* Level 1 */
|
||||||
|
#define _02_ICU_PRIORITY_LEVEL2 (0x02U) /* Level 2 */
|
||||||
|
#define _03_ICU_PRIORITY_LEVEL3 (0x03U) /* Level 3 */
|
||||||
|
#define _04_ICU_PRIORITY_LEVEL4 (0x04U) /* Level 4 */
|
||||||
|
#define _05_ICU_PRIORITY_LEVEL5 (0x05U) /* Level 5 */
|
||||||
|
#define _06_ICU_PRIORITY_LEVEL6 (0x06U) /* Level 6 */
|
||||||
|
#define _07_ICU_PRIORITY_LEVEL7 (0x07U) /* Level 7 */
|
||||||
|
#define _08_ICU_PRIORITY_LEVEL8 (0x08U) /* Level 8 */
|
||||||
|
#define _09_ICU_PRIORITY_LEVEL9 (0x09U) /* Level 9 */
|
||||||
|
#define _0A_ICU_PRIORITY_LEVEL10 (0x0AU) /* Level 10 */
|
||||||
|
#define _0B_ICU_PRIORITY_LEVEL11 (0x0BU) /* Level 11 */
|
||||||
|
#define _0C_ICU_PRIORITY_LEVEL12 (0x0CU) /* Level 12 */
|
||||||
|
#define _0D_ICU_PRIORITY_LEVEL13 (0x0DU) /* Level 13 */
|
||||||
|
#define _0E_ICU_PRIORITY_LEVEL14 (0x0EU) /* Level 14 */
|
||||||
|
#define _0F_ICU_PRIORITY_LEVEL15 (0x0FU) /* Level 15 */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* The macro definitions below list the full set of priority levels as selected in the Interrupts tab
|
||||||
|
* Please do not modify this file manually
|
||||||
|
*/
|
||||||
|
#define ICU_BSC_BUSERR_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPIE0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RAM_RAMERR_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_FCU_FIFERR_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_FCU_FRDYI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_SWINT2_PRIORITY (_01_ICU_PRIORITY_LEVEL1)
|
||||||
|
#define ICU_ICU_SWINT_PRIORITY (_01_ICU_PRIORITY_LEVEL1)
|
||||||
|
#define ICU_CMT0_CMI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMT1_CMI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW0_CMWI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW1_CMWI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_USB0_D0FIFO0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_USB0_D1FIFO0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI0_SPRI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI0_SPTI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI1_SPRI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI1_SPTI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_QSPI_SPRI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_QSPI_SPTI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SDHI_SBFAI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MMCIF_MBFAI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SSIE0_SSITXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SSIE0_SSIRXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SSIE1_SSIRTI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC1_RXI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC1_TXI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC0_RXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC0_TXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC2_RXI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RIIC2_TXI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI0_RXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI0_TXI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI1_RXI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI1_TXI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI2_RXI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI2_TXI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ9_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ10_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ11_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ12_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ13_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ14_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_IRQ15_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI3_RXI3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI3_TXI3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI4_RXI4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI4_TXI4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI5_RXI5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI5_TXI5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI6_RXI6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI6_TXI6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_LVD1_LVD1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_LVD2_LVD2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_USB0_USBR0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RTC_ALM_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RTC_PRD_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_IWDT_IWUNI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_WDT_WUNI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PDC_PCDFI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI7_RXI7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI7_TXI7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI8_RXI8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI8_TXI8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI9_RXI9_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI9_TXI9_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI10_RXI10_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI10_TXI10_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPBE0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPBL2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI2_SPRI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RSPI2_SPTI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPBL0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPBL1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPAL0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ICU_GROUPAL1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI11_RXI11_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI11_TXI11_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI12_RXI12_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_SCI12_TXI12_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_DMAC_DMAC0I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_DMAC_DMAC1I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_DMAC_DMAC2I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_DMAC_DMAC3I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_DMAC_DMAC74I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_OST_OSTDI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_EXDMAC_EXDMAC0I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_EXDMAC_EXDMAC1I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMT2_CMI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMT3_CMI3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU0_TGI0A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU0_TGI0B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU0_TGI0C_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU0_TGI0D_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU0_TCI0V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU1_TGI1B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU1_TCI1V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU1_TCI1U_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU2_TGI2A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU2_TGI2B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU2_TCI2V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU2_TCI2U_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU3_TGI3A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU3_TGI3B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU1_TGI1A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU3_TGI3C_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR0_CMIA0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR0_CMIB0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR0_OVI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR1_CMIA1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR1_CMIB1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR1_OVI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR2_CMIA2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR2_CMIB2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR2_OVI2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR3_CMIA3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR3_CMIB3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TMR3_OVI3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU3_TGI3D_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU3_TCI3V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU4_TGI4A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU4_TGI4B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU4_TCI4V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU4_TCI4U_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU5_TGI5A_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU5_TGI5B_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU5_TCI5V_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TPU5_TCI5U_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW0_IC0I0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW0_IC1I0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW0_OC0I0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW0_OC1I0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW1_IC0I1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW1_IC1I1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW1_OC0I1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CMTW1_OC1I1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_RTC_CUP_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN0_RXF0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN0_TXF0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN0_RXM0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN0_TXM0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN1_RXF1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN1_TXF1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN1_RXM1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_CAN1_TXM1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_USB0_USBI0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD_S12ADI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD_S12GBADI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD_S12GCADI_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD1_S12ADI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD1_S12GBADI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_S12AD1_S12GCADI1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ELC_ELSR18I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_ELC_ELSR19I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_PROC_BUSY_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_ROMOK_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_LONG_PLG_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_TEST_BUSY_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_WRRDY0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_WRRDY1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_WRRDY4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_RDRDY0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_RDRDY1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_INTEGRATE_WRRDY_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_TSIP_INTEGRATE_RDRDY_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PERIB_INTB205_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PERIB_INTB206_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PERIB_INTB207_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU1_TGIA1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGIA0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGIB0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGIC0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGID0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TCIV0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGIE0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU0_TGIF0_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU1_TGIB1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU1_TCIV1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU1_TCIU1_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU2_TGIA2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU2_TGIB2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU2_TCIV2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU2_TCIU2_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU3_TGIA3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU3_TGIB3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU3_TGIC3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU3_TGID3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU3_TCIV3_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU4_TGIA4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU4_TGIB4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU4_TGIC4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU4_TGID4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU4_TCIV4_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU5_TGIU5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU5_TGIV5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU5_TGIW5_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU6_TGIA6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU6_TGIB6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU6_TGIC6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU6_TGID6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU6_TCIV6_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU7_TGIA7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU7_TGIB7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU7_TGIC7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU7_TGID7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU7_TCIV7_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU8_TGIA8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU8_TGIB8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU8_TGIC8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU8_TGID8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_MTU8_TCIV8_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_EPTPC_IPLS_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PMGI0_PMGI0I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PMGI1_PMGI1I_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PERIA_INTA254_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
#define ICU_PERIA_INTA255_PRIORITY (_0F_ICU_PRIORITY_LEVEL15)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Global functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_Interrupt_Create(void);
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,414 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : hwsetup.c
|
||||||
|
* Device(s) : RX
|
||||||
|
* H/W Platform : GENERIC_RX72N
|
||||||
|
* Description : Defines the initialization routines used each time the MCU is restarted.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* I/O Register and board definitions */
|
||||||
|
#include "platform.h"
|
||||||
|
#if BSP_CFG_CONFIGURATOR_SELECT == 1
|
||||||
|
#include "r_cg_macrodriver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_UNPACK
|
||||||
|
typedef struct bsp_bsc {
|
||||||
|
union {
|
||||||
|
uint32_t u_long;
|
||||||
|
R_BSP_ATTRIB_STRUCT_BIT_ORDER_LEFT_13(
|
||||||
|
uint32_t prerr:1,
|
||||||
|
uint32_t :1,
|
||||||
|
uint32_t rpstop:1,
|
||||||
|
uint32_t :10,
|
||||||
|
uint32_t pr5sel:3,
|
||||||
|
uint32_t :1,
|
||||||
|
uint32_t pr4sel:3,
|
||||||
|
uint32_t :1,
|
||||||
|
uint32_t pr3sel:3,
|
||||||
|
uint32_t :1,
|
||||||
|
uint32_t pr2sel:3,
|
||||||
|
uint32_t :1,
|
||||||
|
uint32_t pr1sel:3
|
||||||
|
) bit;
|
||||||
|
} ebmapcr;
|
||||||
|
} st_bsp_bsc_t;
|
||||||
|
R_BSP_PRAGMA_PACKOPTION
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
/* ROM cache configuration function declaration */
|
||||||
|
#if BSP_CFG_ROM_CACHE_ENABLE == 1
|
||||||
|
static void rom_cache_function_set(void);
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1
|
||||||
|
static void rom_cache_noncacheable_area0_set(void);
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1 */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1
|
||||||
|
static void rom_cache_noncacheable_area1_set(void);
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1 */
|
||||||
|
#endif /* BSP_CFG_ROM_CACHE_ENABLE == 1 */
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
/* MCU I/O port configuration function declaration */
|
||||||
|
static void output_ports_configure(void);
|
||||||
|
|
||||||
|
/* Interrupt configuration function declaration */
|
||||||
|
static void interrupts_configure(void);
|
||||||
|
|
||||||
|
/* MCU peripheral module configuration function declaration */
|
||||||
|
static void peripheral_modules_enable(void);
|
||||||
|
|
||||||
|
/* ADC initial configuration function declaration */
|
||||||
|
static void bsp_adc_initial_configure(void);
|
||||||
|
|
||||||
|
/* BUS initial configuration function declaration */
|
||||||
|
static void bsp_bsc_initial_configure(void);
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: hardware_setup
|
||||||
|
* Description : Contains setup functions called at device restart
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void hardware_setup(void)
|
||||||
|
{
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
#if BSP_CFG_ROM_CACHE_ENABLE == 1
|
||||||
|
/* Initialize ROM cache function */
|
||||||
|
rom_cache_function_set();
|
||||||
|
#endif /* BSP_CFG_ROM_CACHE_ENABLE == 1 */
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
output_ports_configure();
|
||||||
|
interrupts_configure();
|
||||||
|
peripheral_modules_enable();
|
||||||
|
bsp_non_existent_port_init();
|
||||||
|
bsp_adc_initial_configure();
|
||||||
|
bsp_bsc_initial_configure();
|
||||||
|
} /* End of function hardware_setup() */
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
#if BSP_CFG_ROM_CACHE_ENABLE == 1
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: rom_cache_function_set
|
||||||
|
* Description : Configures the rom cache function.
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void rom_cache_function_set (void)
|
||||||
|
{
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1
|
||||||
|
rom_cache_noncacheable_area0_set();
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1 */
|
||||||
|
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1
|
||||||
|
rom_cache_noncacheable_area1_set();
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1 */
|
||||||
|
|
||||||
|
/* Invalidates the contents of the ROM cache. */
|
||||||
|
FLASH.ROMCIV.WORD = 0x0001;
|
||||||
|
|
||||||
|
/* Enables the ROM cache. */
|
||||||
|
FLASH.ROMCE.WORD = 0x0001;
|
||||||
|
} /* End of function rom_cache_function_set() */
|
||||||
|
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: rom_cache_noncacheable_area0_set
|
||||||
|
* Description : Configures non-cacheable area 0 of the ROM cache function.
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void rom_cache_noncacheable_area0_set (void)
|
||||||
|
{
|
||||||
|
/* Used to specify the value written to the NCRC0 register. */
|
||||||
|
uint32_t tmp_ncrc = 0;
|
||||||
|
|
||||||
|
/* Disables the ROM cache. */
|
||||||
|
FLASH.ROMCE.WORD = 0x0000;
|
||||||
|
|
||||||
|
/* Makes settings to the NCRG0 register. */
|
||||||
|
#if (BSP_CFG_NONCACHEABLE_AREA0_ADDR >= 0xFFC00000) \
|
||||||
|
&& ((BSP_CFG_NONCACHEABLE_AREA0_ADDR & 0x0000000F) == 0x00000000)
|
||||||
|
FLASH.NCRG0 = BSP_CFG_NONCACHEABLE_AREA0_ADDR;
|
||||||
|
#else
|
||||||
|
#error "Error! Invalid setting for BSP_CFG_NONCACHEABLE_AREA0_ADDR in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NCSZ bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x0
|
||||||
|
/* Do nothing since NCRC0 bits should be 0. */
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x1
|
||||||
|
tmp_ncrc |= 0x00000010;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x2
|
||||||
|
tmp_ncrc |= 0x00000030;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x3
|
||||||
|
tmp_ncrc |= 0x00000070;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x4
|
||||||
|
tmp_ncrc |= 0x000000F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x5
|
||||||
|
tmp_ncrc |= 0x000001F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x6
|
||||||
|
tmp_ncrc |= 0x000003F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x7
|
||||||
|
tmp_ncrc |= 0x000007F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x8
|
||||||
|
tmp_ncrc |= 0x00000FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x9
|
||||||
|
tmp_ncrc |= 0x00001FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xA
|
||||||
|
tmp_ncrc |= 0x00003FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xB
|
||||||
|
tmp_ncrc |= 0x00007FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xC
|
||||||
|
tmp_ncrc |= 0x0000FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xD
|
||||||
|
tmp_ncrc |= 0x0001FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xE
|
||||||
|
tmp_ncrc |= 0x0003FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0xF
|
||||||
|
tmp_ncrc |= 0x0007FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x10
|
||||||
|
tmp_ncrc |= 0x000FFFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA0_SIZE == 0x11
|
||||||
|
tmp_ncrc |= 0x001FFFF0;
|
||||||
|
#else
|
||||||
|
#error "Error! Invalid setting for BSP_CFG_NONCACHEABLE_AREA0_SIZE in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC1E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_IF_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000002;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC2E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_OA_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000004;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC3E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA0_DM_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000008;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Makes settings to the NCRC0 register. */
|
||||||
|
FLASH.NCRC0.LONG = tmp_ncrc;
|
||||||
|
} /* End of function rom_cache_noncacheable_area0_set() */
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA0_ENABLE == 1 */
|
||||||
|
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: rom_cache_noncacheable_area1_set
|
||||||
|
* Description : Configures non-cacheable area 1 of the ROM cache function.
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void rom_cache_noncacheable_area1_set (void)
|
||||||
|
{
|
||||||
|
/* Used to specify the value written to the NCRC1 register. */
|
||||||
|
uint32_t tmp_ncrc = 0;
|
||||||
|
|
||||||
|
/* Disables the ROM cache. */
|
||||||
|
FLASH.ROMCE.WORD = 0x0000;
|
||||||
|
|
||||||
|
/* Makes settings to the NCRG1 register. */
|
||||||
|
#if (BSP_CFG_NONCACHEABLE_AREA1_ADDR >= 0xFFC00000) \
|
||||||
|
&& ((BSP_CFG_NONCACHEABLE_AREA1_ADDR & 0x0000000F) == 0x00000000)
|
||||||
|
FLASH.NCRG1 = BSP_CFG_NONCACHEABLE_AREA1_ADDR;
|
||||||
|
#else
|
||||||
|
#error "Error! Invalid setting for BSP_CFG_NONCACHEABLE_AREA1_ADDR in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NCSZ bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x0
|
||||||
|
/* Do nothing since NCRC1 bits should be 0. */
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x1
|
||||||
|
tmp_ncrc |= 0x00000010;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x2
|
||||||
|
tmp_ncrc |= 0x00000030;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x3
|
||||||
|
tmp_ncrc |= 0x00000070;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x4
|
||||||
|
tmp_ncrc |= 0x000000F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x5
|
||||||
|
tmp_ncrc |= 0x000001F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x6
|
||||||
|
tmp_ncrc |= 0x000003F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x7
|
||||||
|
tmp_ncrc |= 0x000007F0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x8
|
||||||
|
tmp_ncrc |= 0x00000FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x9
|
||||||
|
tmp_ncrc |= 0x00001FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xA
|
||||||
|
tmp_ncrc |= 0x00003FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xB
|
||||||
|
tmp_ncrc |= 0x00007FF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xC
|
||||||
|
tmp_ncrc |= 0x0000FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xD
|
||||||
|
tmp_ncrc |= 0x0001FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xE
|
||||||
|
tmp_ncrc |= 0x0003FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0xF
|
||||||
|
tmp_ncrc |= 0x0007FFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x10
|
||||||
|
tmp_ncrc |= 0x000FFFF0;
|
||||||
|
#elif BSP_CFG_NONCACHEABLE_AREA1_SIZE == 0x11
|
||||||
|
tmp_ncrc |= 0x001FFFF0;
|
||||||
|
#else
|
||||||
|
#error "Error! Invalid setting for BSP_CFG_NONCACHEABLE_AREA1_SIZE in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC1E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_IF_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000002;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC2E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_OA_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000004;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Sets the value of the NC3E bits. */
|
||||||
|
#if BSP_CFG_NONCACHEABLE_AREA1_DM_ENABLE == 1
|
||||||
|
tmp_ncrc |= 0x00000008;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Makes settings to the NCRC1 register. */
|
||||||
|
FLASH.NCRC1.LONG = tmp_ncrc;
|
||||||
|
} /* End of function rom_cache_noncacheable_area1_set() */
|
||||||
|
#endif /* BSP_CFG_NONCACHEABLE_AREA1_ENABLE == 1 */
|
||||||
|
#endif /* BSP_CFG_ROM_CACHE_ENABLE == 1 */
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: output_ports_configure
|
||||||
|
* Description : Configures the port and pin direction settings, and sets the pin outputs to a safe level.
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void output_ports_configure(void)
|
||||||
|
{
|
||||||
|
/* Add code here to setup additional output ports */
|
||||||
|
R_BSP_NOP();
|
||||||
|
} /* End of function output_ports_configure() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: interrupts_configure
|
||||||
|
* Description : Configures interrupts used
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void interrupts_configure(void)
|
||||||
|
{
|
||||||
|
/* Add code here to setup additional interrupts */
|
||||||
|
R_BSP_NOP();
|
||||||
|
} /* End of function interrupts_configure() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: peripheral_modules_enable
|
||||||
|
* Description : Enables and configures peripheral devices on the MCU
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void peripheral_modules_enable(void)
|
||||||
|
{
|
||||||
|
/* Add code here to enable peripherals used by the application */
|
||||||
|
#if BSP_CFG_CONFIGURATOR_SELECT == 1
|
||||||
|
/* Smart Configurator initialization function */
|
||||||
|
R_Systeminit();
|
||||||
|
#endif
|
||||||
|
} /* End of function peripheral_modules_enable() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: bsp_adc_initial_configure
|
||||||
|
* Description : Configures the ADC initial settings
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
* Note : This function should be called when the PSW.I bit is 0 (interrupt disabled).
|
||||||
|
* This function should be called when the ADCSR.ADST bit is 0.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void bsp_adc_initial_configure(void)
|
||||||
|
{
|
||||||
|
uint32_t tmp_mstp;
|
||||||
|
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Store the value of the MSTPCR. */
|
||||||
|
tmp_mstp = MSTP(S12AD1);
|
||||||
|
|
||||||
|
/* Release from the module-stop state */
|
||||||
|
MSTP(S12AD1) = 0;
|
||||||
|
|
||||||
|
/* Writing to the A/D conversion time setting register is enabled. */
|
||||||
|
S12AD1.ADSAMPR.BYTE = 0x03;
|
||||||
|
|
||||||
|
/* Sets conversion time for middle-speed for S12AD unit 1. */
|
||||||
|
S12AD1.ADSAM.WORD = 0x0020;
|
||||||
|
|
||||||
|
/* Writing to the A/D conversion time setting register is disabled. */
|
||||||
|
S12AD1.ADSAMPR.BYTE = 0x02;
|
||||||
|
|
||||||
|
/* Restore the value of the MSTPCR. */
|
||||||
|
MSTP(S12AD1) = tmp_mstp;
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
} /* End of function bsp_adc_initial_configure() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: bsp_bsc_initial_configure
|
||||||
|
* Description : Configures the BUS initial settings
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
static void bsp_bsc_initial_configure(void)
|
||||||
|
{
|
||||||
|
st_bsp_bsc_t bsp_bsc;
|
||||||
|
|
||||||
|
/* Setting priority when bus right request contention occurs. */
|
||||||
|
bsp_bsc.ebmapcr.u_long = BSC.EBMAPCR.LONG;
|
||||||
|
bsp_bsc.ebmapcr.bit.pr1sel = BSP_CFG_EBMAPCR_1ST_PRIORITY;
|
||||||
|
bsp_bsc.ebmapcr.bit.pr2sel = BSP_CFG_EBMAPCR_2ND_PRIORITY;
|
||||||
|
bsp_bsc.ebmapcr.bit.pr3sel = BSP_CFG_EBMAPCR_3RD_PRIORITY;
|
||||||
|
bsp_bsc.ebmapcr.bit.pr4sel = BSP_CFG_EBMAPCR_4TH_PRIORITY;
|
||||||
|
bsp_bsc.ebmapcr.bit.pr5sel = BSP_CFG_EBMAPCR_5TH_PRIORITY;
|
||||||
|
|
||||||
|
/* Set to EBMAPCR register */
|
||||||
|
BSC.EBMAPCR.LONG = bsp_bsc.ebmapcr.u_long;
|
||||||
|
} /* End of function bsp_bsc_initial_configure() */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : hwsetup.h
|
||||||
|
* Description : Hardware setup header file.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef HWSETUP_H
|
||||||
|
#define HWSETUP_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void hardware_setup(void); //r_bsp internal function. DO NOT CALL.
|
||||||
|
|
||||||
|
/* End of multiple inclusion prevention macro */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp.h
|
||||||
|
* H/W Platform : GENERIC_RX72N
|
||||||
|
* Description : Has the header files that should be included for this platform.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Make sure that no other platforms have already been defined. Do not touch this! */
|
||||||
|
#ifdef PLATFORM_DEFINED
|
||||||
|
#error "Error - Multiple platforms defined in platform.h!"
|
||||||
|
#else
|
||||||
|
#define PLATFORM_DEFINED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
INCLUDE APPROPRIATE MCU AND BOARD FILES
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "mcu/all/r_bsp_common.h"
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
#include "mcu/all/r_rx_compiler.h"
|
||||||
|
|
||||||
|
#include "r_bsp_interrupt_config.h"
|
||||||
|
|
||||||
|
#include "mcu/all/lowlvl.h"
|
||||||
|
#include "mcu/all/lowsrc.h"
|
||||||
|
#include "mcu/all/r_bsp_mcu_startup.h"
|
||||||
|
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
#include "mcu/rx72n/register_access/ccrx/iodefine.h"
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#include "mcu/rx72n/register_access/gnuc/iodefine.h"
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
#include "mcu/rx72n/register_access/iccrx/iodefine.h"
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__), defined(__ICCRX__) */
|
||||||
|
#include "mcu/rx72n/r_bsp_cpu.h"
|
||||||
|
#include "mcu/rx72n/r_bsp_locking.h"
|
||||||
|
#include "mcu/rx72n/mcu_clocks.h"
|
||||||
|
#include "mcu/rx72n/mcu_info.h"
|
||||||
|
#include "mcu/rx72n/mcu_init.h"
|
||||||
|
#include "mcu/rx72n/mcu_interrupts.h"
|
||||||
|
#include "mcu/rx72n/mcu_locks.h"
|
||||||
|
#include "mcu/rx72n/mcu_mapped_interrupts_private.h"
|
||||||
|
#include "mcu/rx72n/mcu_mapped_interrupts.h"
|
||||||
|
#include "mcu/rx72n/vecttbl.h"
|
||||||
|
|
||||||
|
#include "board/generic_rx72n/hwsetup.h"
|
||||||
|
|
||||||
|
#include "mcu/all/r_bsp_interrupts.h"
|
||||||
|
#include "mcu/all/r_bsp_software_interrupt.h"
|
||||||
|
#include "mcu/all/r_rx_intrinsic_functions.h"
|
||||||
|
#include "mcu/all/r_rtos.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BSP_BOARD_GENERIC_RX72N
|
||||||
|
#define BSP_BOARD_GENERIC_RX72N
|
||||||
|
|
||||||
|
#endif /* BSP_BOARD_GENERIC_RX72N */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,766 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_config_reference.h
|
||||||
|
* Device(s) : RX72N
|
||||||
|
* Description : The file r_bsp_config.h is used to configure your BSP. r_bsp_config.h should be included
|
||||||
|
* somewhere in your package so that the r_bsp code has access to it. This file (r_bsp_config_reference.h)
|
||||||
|
* is just a reference file that the user can use to make their own r_bsp_config.h file.
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef R_BSP_CONFIG_REF_HEADER_FILE
|
||||||
|
#define R_BSP_CONFIG_REF_HEADER_FILE
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* NOTE:
|
||||||
|
The default settings are the same as when using RSKRX72N.
|
||||||
|
Change to the settings for the user board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Start up select
|
||||||
|
0 = Enable BSP startup program.
|
||||||
|
1 = Disable BSP startup program. (e.g. Using user startup program.)
|
||||||
|
NOTE: This setting is available only when using CCRX. */
|
||||||
|
#define BSP_CFG_STARTUP_DISABLE (0)
|
||||||
|
|
||||||
|
/* Enter the product part number for your MCU. This information will be used to obtain information about your MCU such
|
||||||
|
as package and memory size.
|
||||||
|
To help parse this information, the part number will be defined using multiple macros.
|
||||||
|
R 5 F 57 2N N D D BD
|
||||||
|
| | | | | | | | | Macro Name Description
|
||||||
|
| | | | | | | | |__BSP_CFG_MCU_PART_PACKAGE = Package type, number of pins, and pin pitch
|
||||||
|
| | | | | | | |____not used = Products with wide temperature range
|
||||||
|
| | | | | | |______BSP_CFG_MCU_PART_ENCRYPTION_INCLUDED = Encryption module included/not included
|
||||||
|
| | | | | |________BSP_CFG_MCU_PART_MEMORY_SIZE = ROM, RAM, and Data Flash Capacity
|
||||||
|
| | | | |___________BSP_CFG_MCU_PART_GROUP = Group name
|
||||||
|
| | | |______________BSP_CFG_MCU_PART_SERIES = Series name
|
||||||
|
| | |________________BSP_CFG_MCU_PART_MEMORY_TYPE = Type of memory (Flash, ROMless)
|
||||||
|
| |__________________not used = Renesas MCU
|
||||||
|
|____________________not used = Renesas semiconductor product.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Package type. Set the macro definition based on values below:
|
||||||
|
Character(s) = Value for macro = Package Type/Number of Pins/Pin Pitch
|
||||||
|
FC = 0x0 = LFQFP/176/0.50
|
||||||
|
BG = 0x1 = LFBGA/176/0.80
|
||||||
|
BD = 0x2 = LFBGA/224/0.80
|
||||||
|
FB = 0x3 = LFQFP/144/0.50
|
||||||
|
LK = 0x4 = TFLGA/145/0.50
|
||||||
|
FP = 0x5 = LFQFP/100/0.50
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_PACKAGE (0x2)
|
||||||
|
|
||||||
|
/* Whether Encryption is included or not.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
D = 0xD = Encryption module not included
|
||||||
|
H = 0x11 = Encryption module included
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_FUNCTION (0xD)
|
||||||
|
|
||||||
|
/* ROM, RAM, and Data Flash Capacity.
|
||||||
|
Character(s) = Value for macro = ROM Size/Ram Size/Data Flash Size
|
||||||
|
D = 0xD = 2MB/1MB/32KB
|
||||||
|
N = 0x17 = 4MB/1MB/32KB
|
||||||
|
NOTE: The RAM areas are not contiguous.It is separated by 512 KB each.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_MEMORY_SIZE (0x17)
|
||||||
|
|
||||||
|
/* Group name.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
2N = 0x0 = RX72N Group
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_GROUP (0x0)
|
||||||
|
|
||||||
|
/* Series name.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
57 = 0x0 = RX700 Series
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_SERIES (0x0)
|
||||||
|
|
||||||
|
/* Memory type.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
F = 0x0 = Flash memory version
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_MEMORY_TYPE (0x0)
|
||||||
|
|
||||||
|
/* Whether to use 1 stack or 2. RX MCUs have the ability to use 2 stacks: an interrupt stack and a user stack.
|
||||||
|
* When using 2 stacks the user stack will be used during normal user code. When an interrupt occurs the CPU
|
||||||
|
* will automatically shift to using the interrupt stack. Having 2 stacks can make it easier to figure out how
|
||||||
|
* much stack space to allocate since the user does not have to worry about always having enough room on the
|
||||||
|
* user stack for if-and-when an interrupt occurs. Some users will not want 2 stacks though because it is not
|
||||||
|
* needed in all applications and can lead to wasted RAM (i.e. space in between stacks that is not used).
|
||||||
|
* If only 1 stack is used then the interrupt stack is the one that will be used. If 1 stack is chosen then
|
||||||
|
* the user may want to remove the 'SU' section from the linker sections to remove any linker warnings.
|
||||||
|
*
|
||||||
|
* 0 = Use 1 stack. Disable user stack. User stack size set below will be ignored.
|
||||||
|
* 1 = Use 2 stacks. User stack and interrupt stack will both be used.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC.
|
||||||
|
* This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_STACK_ENABLE (1)
|
||||||
|
|
||||||
|
/* If only 1 stack is chosen using BSP_CFG_USER_STACK_ENABLE then no RAM will be allocated for the user stack. */
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
/* User Stack size in bytes.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC.
|
||||||
|
* This is invalid when using Renesas RTOS with CCRX. */
|
||||||
|
#define BSP_CFG_USTACK_BYTES (0x1000)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Interrupt Stack size in bytes.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC. */
|
||||||
|
#define BSP_CFG_ISTACK_BYTES (0x400)
|
||||||
|
|
||||||
|
/* Heap size in bytes.
|
||||||
|
To disable the heap you must follow these steps:
|
||||||
|
1) Set this macro (BSP_CFG_HEAP_BYTES) to 0.
|
||||||
|
2) Set the macro BSP_CFG_IO_LIB_ENABLE to 0.
|
||||||
|
3) Disable stdio from being built into the project library. This is done by going into the Renesas RX Toolchain
|
||||||
|
settings and choosing the Standard Library section. After that choose 'Contents' in e2 studio.
|
||||||
|
This will present a list of modules that can be included. Uncheck the box for stdio.h.
|
||||||
|
NOTE: This setting is available only when using CCRX and GNUC. */
|
||||||
|
#define BSP_CFG_HEAP_BYTES (0x400)
|
||||||
|
|
||||||
|
/* Initializes C input & output library functions.
|
||||||
|
0 = Disable I/O library initialization in resetprg.c. If you are not using stdio then use this value.
|
||||||
|
1 = Enable I/O library initialization in resetprg.c. This is default and needed if you are using stdio.
|
||||||
|
NOTE: This setting is available only when using CCRX. */
|
||||||
|
#define BSP_CFG_IO_LIB_ENABLE (1)
|
||||||
|
|
||||||
|
/* If desired the user may redirect the stdio charget() and/or charput() functions to their own respective functions
|
||||||
|
by enabling below and providing and replacing the my_sw_... function names with the names of their own functions. */
|
||||||
|
#define BSP_CFG_USER_CHARGET_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_CHARGET_FUNCTION my_sw_charget_function
|
||||||
|
|
||||||
|
#define BSP_CFG_USER_CHARPUT_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_CHARPUT_FUNCTION my_sw_charput_function
|
||||||
|
|
||||||
|
/* After reset MCU will operate in Supervisor mode. To switch to User mode, set this macro to '1'. For more information
|
||||||
|
on the differences between these 2 modes see the CPU >> Processor Mode section of your MCU's hardware manual.
|
||||||
|
0 = Stay in Supervisor mode.
|
||||||
|
1 = Switch to User mode.
|
||||||
|
NOTE: This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RUN_IN_USER_MODE (0)
|
||||||
|
|
||||||
|
/* Set your desired ID code. NOTE, leave at the default (all 0xFF's) if you do not wish to use an ID code. If you set
|
||||||
|
this value and program it into the MCU then you will need to remember the ID code because the debugger will ask for
|
||||||
|
it when trying to connect. Note that the E1/E20 will ignore the ID code when programming the MCU during debugging.
|
||||||
|
If you set this value and then forget it then you can clear the ID code by connecting up in serial boot mode using
|
||||||
|
FDT. The ID Code is 16 bytes long. The macro below define the ID Code in 4-byte sections. */
|
||||||
|
/* Lowest 4-byte section, address 0xFE7F5D50. From MSB to LSB: ID code 4, ID code 3, ID code 2, ID code 1/Control Code.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_1 (0xFFFFFFFF)
|
||||||
|
/* 2nd ID Code section, address 0xFE7F5D54. From MSB to LSB: ID code 8, ID code 7, ID code 6, ID code 5. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_2 (0xFFFFFFFF)
|
||||||
|
/* 3rd ID Code section, address 0xFE7F5D58. From MSB to LSB: ID code 12, ID code 11, ID code 10, ID code 9. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_3 (0xFFFFFFFF)
|
||||||
|
/* 4th ID Code section, address 0xFE7F5D5C. From MSB to LSB: ID code 16, ID code 15, ID code 14, ID code 13. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_4 (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Clock source select (CKSEL).
|
||||||
|
0 = Low Speed On-Chip Oscillator (LOCO)
|
||||||
|
1 = High Speed On-Chip Oscillator (HOCO)
|
||||||
|
2 = Main Clock Oscillator
|
||||||
|
3 = Sub-Clock Oscillator
|
||||||
|
4 = PLL Circuit (default)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLOCK_SOURCE (4)
|
||||||
|
|
||||||
|
/* Main clock Oscillator Switching (MOSEL).
|
||||||
|
0 = Resonator (default)
|
||||||
|
1 = External clock input
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MAIN_CLOCK_SOURCE (0)
|
||||||
|
|
||||||
|
/* USB Clock source select (UPLLSEL). Choose which clock source to input to the USB circuit.
|
||||||
|
0 = System Clock (PLL Circuit/No division) (This is not available.)
|
||||||
|
1 = USB PLL Circuit (This is not available.)
|
||||||
|
2 = PLL Circuit (UDIVCLK) (default)
|
||||||
|
3 = PPLL Circuit (PPLLDIVCLK)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USB_CLOCK_SOURCE (2)
|
||||||
|
|
||||||
|
/* Ethernet-PHY clock source (OUTCKSEL). Choose which clock source to input to the Ethernet PHY LSI.
|
||||||
|
Available clock sources:
|
||||||
|
0 = PLL circuit
|
||||||
|
1 = PPLL circuit (default)
|
||||||
|
2 = Ethernet-PHY not use
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PHY_CLOCK_SOURCE (1)
|
||||||
|
|
||||||
|
/* Configure clock source of clock output(CLKOUT) pin (CKOSEL).
|
||||||
|
Available clock sources:
|
||||||
|
0 = LOCO
|
||||||
|
1 = HOCO
|
||||||
|
2 = Main clock oscillator (default)
|
||||||
|
3 = Sub-clock oscillator
|
||||||
|
4 = PLL circuit
|
||||||
|
6 = PPLL circuit
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_SOURCE (2)
|
||||||
|
|
||||||
|
/* The sub-clock oscillation control for using the RTC.
|
||||||
|
When '1' is selected, the registers related to RTC are initialized and the sub-clock oscillator is operated.
|
||||||
|
0 = The RTC is not to be used.
|
||||||
|
1 = The RTC is to be used.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RTC_ENABLE (0)
|
||||||
|
|
||||||
|
/* Sub-Clock Oscillator Drive Capacity Control (RTCDV).
|
||||||
|
0 = Drive capacity for standard CL. (default)
|
||||||
|
1 = Drive capacity for low CL.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SOSC_DRV_CAP (0)
|
||||||
|
|
||||||
|
/* Clock configuration options.
|
||||||
|
The input clock frequency is specified and then the system clocks are set by specifying the multipliers used. The
|
||||||
|
multiplier settings are used to set the clock registers in resetprg.c. If a 24MHz clock is used and the
|
||||||
|
ICLK is 120MHz, PCLKA is 120MHz, PCLKB is 60MHz, PCLKC is 60MHz, PCLKD is 60MHz, FCLK is 60MHz, BCLK is 80MHz,
|
||||||
|
USB Clock is 48MHz, ESC Clock is 100MHz, Ether-Phy Clock is 25MHz then the settings would be:
|
||||||
|
|
||||||
|
BSP_CFG_XTAL_HZ = 24000000
|
||||||
|
BSP_CFG_PLL_DIV = 1 (no division)
|
||||||
|
BSP_CFG_PLL_MUL = 10.0 (24MHz x 10.0 = 240MHz)
|
||||||
|
BSP_CFG_PPLL_DIV = 3 (divide by 3)
|
||||||
|
BSP_CFG_PPLL_MUL = 25.0 (8MHz x 25.0 = 200MHz)
|
||||||
|
BSP_CFG_PPLCK_DIV = 2 (divide by 2)
|
||||||
|
BSP_CFG_ICK_DIV = 1 : System Clock (ICLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_ICK_DIV) = 240MHz
|
||||||
|
BSP_CFG_PCKA_DIV = 2 : Peripheral Clock A (PCLKA) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKA_DIV) = 120MHz
|
||||||
|
BSP_CFG_PCKB_DIV = 4 : Peripheral Clock B (PCLKB) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKB_DIV) = 60MHz
|
||||||
|
BSP_CFG_PCKC_DIV = 4 : Peripheral Clock C (PCLKC) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKC_DIV) = 60MHz
|
||||||
|
BSP_CFG_PCKD_DIV = 4 : Peripheral Clock D (PCLKD) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKD_DIV) = 60MHz
|
||||||
|
BSP_CFG_FCK_DIV = 4 : Flash IF Clock (FCLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_FCK_DIV) = 60MHz
|
||||||
|
BSP_CFG_BCK_DIV = 3 : External Bus Clock (BCK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_BCK_DIV) = 80MHz
|
||||||
|
BSP_CFG_UCK_DIV = 5 : USB Clock (UCLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_UCK_DIV) = 48MHz
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Input clock frequency in Hz (XTAL or EXTAL). */
|
||||||
|
#define BSP_CFG_XTAL_HZ (24000000)
|
||||||
|
|
||||||
|
/* The HOCO can operate at several different frequencies. Choose which one using the macro below.
|
||||||
|
Available frequency settings:
|
||||||
|
0 = 16MHz (default)
|
||||||
|
1 = 18MHz
|
||||||
|
2 = 20MHz
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_HOCO_FREQUENCY (0)
|
||||||
|
|
||||||
|
/* PLL clock source (PLLSRCSEL). Choose which clock source to input to the PLL circuit.
|
||||||
|
Available clock sources:
|
||||||
|
0 = Main clock (default)
|
||||||
|
1 = HOCO
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_SRC (0)
|
||||||
|
|
||||||
|
/* PLL Input Frequency Division Ratio Select (PLIDIV).
|
||||||
|
Available divisors = /1 (no division), /2, /3
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_DIV (1)
|
||||||
|
|
||||||
|
/* PLL Frequency Multiplication Factor Select (STC).
|
||||||
|
Available multipliers = x10.0 to x30.0 in 0.5 increments (e.g. 10.0, 10.5, 11.0, 11.5, ..., 29.0, 29.5, 30.0)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_MUL (10.0)
|
||||||
|
|
||||||
|
/* System Clock Divider (ICK).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ICK_DIV (1)
|
||||||
|
|
||||||
|
/* Peripheral Module Clock A Divider (PCKA).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKA_DIV (2)
|
||||||
|
|
||||||
|
/* Peripheral Module Clock B Divider (PCKB).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKB_DIV (4)
|
||||||
|
|
||||||
|
/* Peripheral Module Clock C Divider (PCKC).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKC_DIV (4)
|
||||||
|
|
||||||
|
/* Peripheral Module Clock D Divider (PCKD).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKD_DIV (4)
|
||||||
|
|
||||||
|
/* External Bus Clock Divider (BCLK).
|
||||||
|
Available divisors = /1 (no division), /2, /3, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_BCK_DIV (3)
|
||||||
|
|
||||||
|
/* Flash IF Clock Divider (FCK).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FCK_DIV (4)
|
||||||
|
|
||||||
|
/* USB Clock Divider Select.
|
||||||
|
Available divisors = /2, /3, /4, /5
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_UCK_DIV (5)
|
||||||
|
|
||||||
|
/* PPLL Input Frequency Division Ratio Select (PPLIDIV).
|
||||||
|
Available divisors = /1 (no division), /2, /3
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLL_DIV (3)
|
||||||
|
|
||||||
|
/* PPLL Frequency Multiplication Factor Select (PPLSTC).
|
||||||
|
Available multipliers = x10.0 to x30.0 in 0.5 increments (e.g. 10.0, 10.5, 11.0, 11.5, ..., 29.0, 29.5, 30.0)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLL_MUL (25.0)
|
||||||
|
|
||||||
|
/* PPLL Clock Divider Select.
|
||||||
|
Available divisors = /2, /3, /4, /5
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLCK_DIV (2)
|
||||||
|
|
||||||
|
/* Configure BCLK output pin (only effective when external bus enabled)
|
||||||
|
Values 0=no output, 1 = BCK frequency, 2= BCK/2 frequency
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_BCLK_OUTPUT (0)
|
||||||
|
|
||||||
|
/* Configure SDCLK output pin (only effective when external bus enabled)
|
||||||
|
Values 0=no output, 1 = BCK frequency
|
||||||
|
NOTE: The definition is invalid.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SDCLK_OUTPUT (0)
|
||||||
|
|
||||||
|
/* CLKOUT Output Frequency Division Ratio Select. (CKODIV)
|
||||||
|
Values
|
||||||
|
0 = x1/1 (default)
|
||||||
|
1 = x1/2
|
||||||
|
2 = x1/4
|
||||||
|
3 = x1/8
|
||||||
|
4 = x1/16
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_DIV (0)
|
||||||
|
|
||||||
|
/* Configure clock output(CLKOUT) pin (CKOSTP).
|
||||||
|
Values
|
||||||
|
0 = CLKOUT pin output stopped. (Fixed to the low level) (default)
|
||||||
|
1 = CLKOUT pin output enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_OUTPUT (0)
|
||||||
|
|
||||||
|
/* Main Clock Oscillator Wait Time (MOSCWTCR).
|
||||||
|
The value of MOSCWTCR register required for correspondence with the waiting time required to secure stable
|
||||||
|
oscillation by the main clock oscillator is obtained by using the maximum frequency for fLOCO in the formula below.
|
||||||
|
|
||||||
|
BSP_CFG_MOSC_WAIT_TIME > (tMAINOSC * (fLOCO_max) + 16)/32
|
||||||
|
(tMAINOSC: main clock oscillation stabilization time; fLOCO_max: maximum frequency for fLOCO)
|
||||||
|
|
||||||
|
If tMAINOSC is 9.98 ms and fLOCO_max is 264 kHz (the period is 1/3.78 us), the formula gives
|
||||||
|
BSP_CFG_MOSC_WAIT_TIME > (9.98 ms * (264 kHZ) + 16)/32 = 82.83, so set the BSP_CFG_MOSC_WAIT_TIME to 83(53h).
|
||||||
|
|
||||||
|
NOTE: The waiting time is not required when an external clock signal is input for the main clock oscillator.
|
||||||
|
Set the BSP_CFG_MOSC_WAIT_TIME to 00h.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MOSC_WAIT_TIME (0x53)
|
||||||
|
|
||||||
|
/* Sub-Clock Oscillator Wait Time (SOSCWTCR).
|
||||||
|
The value of SOSCWTCR register required for correspondence with the expected time to secure settling of oscillation
|
||||||
|
by the sub-clock oscillator is obtained by using the maximum frequency for fLOCO in the formula below.
|
||||||
|
|
||||||
|
BSP_CFG_SOSC_WAIT_TIME > (tSUBOSC * (fLOCO_max) + 16)/16384
|
||||||
|
(tSUBOSC: sub-clock oscillation stabilization time; fLOCO_max: maximum frequency for fLOCO)
|
||||||
|
|
||||||
|
If tSUBOSC is 2 s and fLOCO is 264 kHz (the period is 1/3.78 us), the formula gives
|
||||||
|
BSP_CFG_SOSC_WAIT_TIME > (2 s * (264 kHz) +16)/16384 = 32.22, so set the BSP_CFG_SOSC_WAIT_TIME bits to 33(21h).
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SOSC_WAIT_TIME (0x21)
|
||||||
|
|
||||||
|
/* ROM Cache Enable Register (ROMCE).
|
||||||
|
0 = ROM cache operation disabled.
|
||||||
|
1 = ROM cache operation enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ROM_CACHE_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure non-cacheable area 0 of the ROM cache function.
|
||||||
|
0 = Non-cacheable area 0 settings disabled.
|
||||||
|
1 = Non-cacheable area 0 settings enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_ENABLE (0)
|
||||||
|
|
||||||
|
/* Specifies the start address of non-cacheable area 0.
|
||||||
|
Selects the start address of non-cacheable area 0.
|
||||||
|
The upper 10 bits are fixed at 1. The lower 4 bits are fixed at 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_ADDR (0xFFE00000)
|
||||||
|
|
||||||
|
/* Configures the size of non-cacheable area 0.
|
||||||
|
Selects the size of non-cacheable area 0 in byte units from among the following:
|
||||||
|
0x0 = 16 bytes, 0xA = 16K bytes,
|
||||||
|
0x1 = 32 bytes, 0xB = 32K bytes,
|
||||||
|
0x2 = 64 bytes, 0xC = 64K bytes,
|
||||||
|
0x3 = 128 bytes, 0xD = 128K bytes,
|
||||||
|
0x4 = 256 bytes, 0xE = 256K bytes,
|
||||||
|
0x5 = 512 bytes, 0xF = 512K bytes,
|
||||||
|
0x6 = 1K bytes, 0x10= 1M bytes,
|
||||||
|
0x7 = 2K bytes, 0x11= 2M bytes,
|
||||||
|
0x8 = 4K bytes,
|
||||||
|
0x9 = 8K bytes
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_SIZE (0x0)
|
||||||
|
|
||||||
|
/* Specifies the IF non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of IF cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of IF cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_IF_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the OA non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of OA cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of OA cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_OA_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the DM non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of DM cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of DM cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_DM_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure non-cacheable area 1 of the ROM cache function.
|
||||||
|
0 = Non-cacheable area 1 settings disabled.
|
||||||
|
1 = Non-cacheable area 1 settings enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_ENABLE (0)
|
||||||
|
|
||||||
|
/* Specifies the start address of non-cacheable area 1.
|
||||||
|
Selects the start address of non-cacheable area 1.
|
||||||
|
The upper 10 bits are fixed at 1. The lower 4 bits are fixed at 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_ADDR (0xFFE00000)
|
||||||
|
|
||||||
|
/* Configures the size of non-cacheable area 1.
|
||||||
|
Selects the size of non-cacheable area 0 in byte units from among the following:
|
||||||
|
0x0 = 16 bytes, 0xA = 16K bytes,
|
||||||
|
0x1 = 32 bytes, 0xB = 32K bytes,
|
||||||
|
0x2 = 64 bytes, 0xC = 64K bytes,
|
||||||
|
0x3 = 128 bytes, 0xD = 128K bytes,
|
||||||
|
0x4 = 256 bytes, 0xE = 256K bytes,
|
||||||
|
0x5 = 512 bytes, 0xF = 512K bytes,
|
||||||
|
0x6 = 1K bytes, 0x10= 1M bytes,
|
||||||
|
0x7 = 2K bytes, 0x11= 2M bytes,
|
||||||
|
0x8 = 4K bytes,
|
||||||
|
0x9 = 8K bytes
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_SIZE (0x0)
|
||||||
|
|
||||||
|
/* Specifies the IF non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of IF cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of IF cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_IF_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the OA non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of OA cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of OA cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_OA_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the DM non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of DM cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of DM cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_DM_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure WDT and IWDT settings.
|
||||||
|
OFS0 - Option Function Select Register 0
|
||||||
|
b31:b29 Reserved When reading, these bits return the value written by the user. The write value should be 1.
|
||||||
|
b28 WDTRSTIRQS - WDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)
|
||||||
|
b27:b26 WDTRPSS - WDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)
|
||||||
|
b25:b24 WDTRPES - WDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)
|
||||||
|
b23:b20 WDTCKS - WDT Clock Frequency Division Ratio - (1=PCLKB/4, 4=PCLKB/64, 0xF=PCLKB/128, 6=PCLKB/256,
|
||||||
|
7=PCLKB/2048, 8=PCLKB/8192)
|
||||||
|
b19:b18 WDTTOPS - WDT Timeout Period Select (0=1024 cycles, 1=4096, 2=8192, 3=16384)
|
||||||
|
b17 WDTSTRT - WDT Start Mode Select - (0=auto-start after reset, 1=halt after reset)
|
||||||
|
b16:b15 Reserved (set to 1)
|
||||||
|
b14 IWDTSLCSTP - IWDT Sleep Mode Count Stop Control - (0=can't stop count, 1=stop w/some low power modes)
|
||||||
|
b13 Reserved (set to 1)
|
||||||
|
b12 IWDTRSTIRQS - IWDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)
|
||||||
|
b11:b10 IWDTRPSS - IWDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)
|
||||||
|
b9:b8 IWDTRPES - IWDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)
|
||||||
|
b7:b4 IWDTCKS - IWDT Clock Frequency Division Ratio - (0=none, 2=/16, 3 = /32, 4=/64, 0xF=/128, 5=/256)
|
||||||
|
b3:b2 IWDTTOPS - IWDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384)
|
||||||
|
b1 IWDTSTRT - IWDT Start Mode Select - (0=auto-start after reset, 1=halt after reset)
|
||||||
|
b0 Reserved (set to 1)
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_OFS0_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Configure whether voltage detection 0 circuit and HOCO are enabled after reset.
|
||||||
|
OFS1 - Option Function Select Register 1
|
||||||
|
b31:b9 Reserved (set to 1)
|
||||||
|
b8 HOCOEN - Enable/disable HOCO oscillation after a reset (0=enable, 1=disable)
|
||||||
|
b7:b3 Reserved When reading, these bits return the value written by the user. The write value should be 1.
|
||||||
|
b2 LVDAS - Voltage Detection 0 circuit start (1=monitoring disabled)
|
||||||
|
b1:b0 VDSEL - Voltage Detection 0 level select (1=2.94v, 2=2.87v, 3=2.80v)
|
||||||
|
NOTE: If HOCO oscillation is enabled by OFS1.HOCOEN, HOCO frequency is 16MHz.
|
||||||
|
BSP_CFG_HOCO_FREQUENCY should be default value.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_OFS1_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Trusted memory is facility to prevent the reading of blocks 8 and 9 and blocks 78 and 79 (in dual mode) in
|
||||||
|
the code flash memory by third party software. This feature is disabled by default.
|
||||||
|
TMEF - TM Enable Flag Register
|
||||||
|
b31 Reserved (set to 1)
|
||||||
|
b30:b28 TMEFDB - Dual-Bank TM Enable - 000: The TM function in the address range from FFDE 0000h to
|
||||||
|
FFDE FFFFh is enabled in dual mode.
|
||||||
|
- 111: The TM function in the address range from FFDE 0000h to
|
||||||
|
FFDE FFFFh is disabled in dual mode.
|
||||||
|
b27 Reserved (set to 1)
|
||||||
|
b26:b24 TMEFF - TM Enable - 000: TM function is enabled.
|
||||||
|
- 111: TM function is disabled.
|
||||||
|
b23:b0 Reserved (set to 1)
|
||||||
|
NOTE: If the dual bank function has not been incorporated in a device,
|
||||||
|
TMEFDB bits [b30:b26] are reserved area.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_TRUSTED_MODE_FUNCTION (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Configure FAW register is used to set the write protection flag and boot area select flag
|
||||||
|
for setting the flash access window startaddress and flash access window end address.
|
||||||
|
FAW - Flash Access Window Setting Register
|
||||||
|
b31 BTFLG - Boot Area Select Flag - 0: FFFF C000h to FFFF DFFFh are used as the boot area
|
||||||
|
- 1: FFFF E000h to FFFF FFFFh are used as the boot area
|
||||||
|
b30:b28 Reserved - When reading, these bits return the value written by the user.The write value should be 1.
|
||||||
|
b27:b16 FAWE - Flash Access Window End Address - Flash access window end address
|
||||||
|
b15 FSPR - Access Window Protection Flag - 0: With protection (P/E disabled)
|
||||||
|
- 1: Without protection (P/E enabled)
|
||||||
|
b14:b12 Reserved - When reading, these bits return the value written by the user.The write value should be 1.
|
||||||
|
b11:b0 FAWS - Flash Access Window Start Address - Flash access window start address
|
||||||
|
NOTE: Once 0 is written to this bit, the bit can never be restored to 1.
|
||||||
|
Therefore, the access window and the BTFLG bit never be set again or the TM function
|
||||||
|
never be disabled once it has been enabled.
|
||||||
|
Exercise extra caution when handling the FSPR bit.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FAW_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* The ROM code protection register is a function to prohibit reading from or programming to the flash memory
|
||||||
|
when the flash programmer is used during off-board programming.
|
||||||
|
ROMCODE - ROM Code Protection Register
|
||||||
|
b31:b0 ROM Code - 0000 0000h: ROM code protection enabled (ROM code protection 1).
|
||||||
|
0000 0001h: ROM code protection enabled (ROM code protection 2).
|
||||||
|
Other than above: ROM code protection disabled.
|
||||||
|
Note: The ROMCODE register should be set in 32-bit units.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ROMCODE_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Select the bank mode of dual-bank function of the code flash memory.
|
||||||
|
0 = Dual mode.
|
||||||
|
1 = Linear mode. (default)
|
||||||
|
NOTE: If the dual bank function has been incorporated in a device, select the bank mode in this macro.
|
||||||
|
Default setting of the bank mode is linear mode.
|
||||||
|
If the dual bank function has not been incorporated in a device, this macro should be 1.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CODE_FLASH_BANK_MODE (1)
|
||||||
|
|
||||||
|
/* Select the startup bank of the program when dual bank function is in dual mode.
|
||||||
|
0 = The address range of bank 1 from FFC00000h to FFDFFFFFh and bank 0 from FFE00000h to FFFFFFFFh. (default)
|
||||||
|
1 = The address range of bank 1 from FFE00000h to FFFFFFFFh and bank 0 from FFC00000h to FFDFFFFFh.
|
||||||
|
NOTE: If the dual bank function has been incorporated in a device, select the start bank in this macro.
|
||||||
|
Default setting of the start bank is bank0.
|
||||||
|
If the dual bank function has not been incorporated in a device, this macro should be 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CODE_FLASH_START_BANK (0)
|
||||||
|
|
||||||
|
/* This macro lets other modules no if a RTOS is being used.
|
||||||
|
0 = RTOS is not used.
|
||||||
|
1 = FreeRTOS is used.
|
||||||
|
2 = embOS is used.(This is not available.)
|
||||||
|
3 = MicroC_OS is used.(This is not available.)
|
||||||
|
4 = Renesas ITRON OS (RI600V4 or RI600PX) is used.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RTOS_USED (0)
|
||||||
|
|
||||||
|
/* This macro is used to select which Renesas ITRON OS.
|
||||||
|
0 = RI600V4 is used.
|
||||||
|
1 = RI600PX is used.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RENESAS_RTOS_USED (0)
|
||||||
|
|
||||||
|
/* This macro is used to select which CMT channel used for system timer of RTOS.
|
||||||
|
* The setting of this macro is only valid if the macro BSP_CFG_RTOS_USED is set to a value other than 0. */
|
||||||
|
#if BSP_CFG_RTOS_USED != 0
|
||||||
|
/* Setting value.
|
||||||
|
* 0 = CMT channel 0 used for system timer of RTOS (recommended to be used for RTOS).
|
||||||
|
* 1 = CMT channel 1 used for system timer of RTOS.
|
||||||
|
* 2 = CMT channel 2 used for system timer of RTOS.
|
||||||
|
* 3 = CMT channel 3 used for system timer of RTOS.
|
||||||
|
* Others = Invalid.
|
||||||
|
* NOTE: This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RTOS_SYSTEM_TIMER (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* By default modules will use global locks found in mcu_locks.c. If the user is using a RTOS and would rather use its
|
||||||
|
locking mechanisms then they can change this macro.
|
||||||
|
NOTE: If '1' is chosen for this macro then the user must also change the next macro 'BSP_CFG_USER_LOCKING_TYPE'.
|
||||||
|
0 = Use default locking (non-RTOS)
|
||||||
|
1 = Use user defined locking mechanism.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_ENABLED (0)
|
||||||
|
|
||||||
|
/* If the user decides to use their own locking mechanism with FIT modules then they will need to redefine the typedef
|
||||||
|
that is used for the locks. If the user is using a RTOS then they would likely redefine the typedef to be
|
||||||
|
a semaphore/mutex type of their RTOS. Use the macro below to set the type that will be used for the locks.
|
||||||
|
NOTE: If BSP_CFG_USER_LOCKING_ENABLED == 0 then this typedef is ignored.
|
||||||
|
NOTE: Do not surround the type with parentheses '(' ')'.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_TYPE bsp_lock_t
|
||||||
|
|
||||||
|
/* If the user decides to use their own locking mechanism with FIT modules then they will need to define the functions
|
||||||
|
that will handle the locking and unlocking. These functions should be defined below.
|
||||||
|
If BSP_CFG_USER_LOCKING_ENABLED is != 0:
|
||||||
|
R_BSP_HardwareLock(mcu_lock_t hw_index) will call BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION(mcu_lock_t hw_index)
|
||||||
|
R_BSP_HardwareUnlock(mcu_lock_t hw_index) will call BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION(mcu_lock_t hw_index)
|
||||||
|
NOTE:With these functions the index into the array holding the global hardware locks is passed as the parameter.
|
||||||
|
R_BSP_SoftwareLock(BSP_CFG_USER_LOCKING_TYPE * plock) will call
|
||||||
|
BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * plock)
|
||||||
|
R_BSP_SoftwareUnlock(BSP_CFG_USER_LOCKING_TYPE * plock) will call
|
||||||
|
BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * plock)
|
||||||
|
NOTE:With these functions the actual address of the lock to use is passed as the parameter.
|
||||||
|
NOTE: These functions must return a boolean. If lock was obtained or released successfully then return true. Else,
|
||||||
|
return false.
|
||||||
|
NOTE: If BSP_CFG_USER_LOCKING_ENABLED == 0 then this typedef is ignored.
|
||||||
|
NOTE: Do not surround the type with parentheses '(' ')'.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION my_hw_locking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION my_hw_unlocking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION my_sw_locking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION my_sw_unlocking_function
|
||||||
|
|
||||||
|
/* If the user would like to determine if a warm start reset has occurred, then they may enable one or more of the
|
||||||
|
following callback definitions AND provide a call back function name for the respective callback
|
||||||
|
function (to be defined by the user). Setting BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED = 1 will result
|
||||||
|
in a callback to the user defined my_sw_warmstart_prec_function just prior to the initialization of the C
|
||||||
|
runtime environment by resetprg.
|
||||||
|
Setting BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED = 1 will result in a callback to the user defined
|
||||||
|
my_sw_warmstart_postc_function just after the initialization of the C runtime environment by resetprg.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_WARM_START_PRE_C_FUNCTION my_sw_warmstart_prec_function
|
||||||
|
|
||||||
|
#define BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_WARM_START_POST_C_FUNCTION my_sw_warmstart_postc_function
|
||||||
|
|
||||||
|
/* By default FIT modules will check input parameters to be valid. This is helpful during development but some users
|
||||||
|
will want to disable this for production code. The reason for this would be to save execution time and code space.
|
||||||
|
This macro is a global setting for enabling or disabling parameter checking. Each FIT module will also have its
|
||||||
|
own local macro for this same purpose. By default the local macros will take the global value from here though
|
||||||
|
they can be overridden. Therefore, the local setting has priority over this global setting. Disabling parameter
|
||||||
|
checking should only used when inputs are known to be good and the increase in speed or decrease in code space is
|
||||||
|
needed.
|
||||||
|
0 = Global setting for parameter checking is disabled.
|
||||||
|
1 = Global setting for parameter checking is enabled (Default).
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PARAM_CHECKING_ENABLE (1)
|
||||||
|
|
||||||
|
/* The extended bus master has five transfer sources: EDMAC, GLCDC-GRA1 (GLCDC graphics 1 data read), GLCDCGRA2 (GLCDC
|
||||||
|
graphics 2 data read), DRW2D-TX (DRW2D texture data read), and DRW2D-FB (DRW2D frame buffer data read write and
|
||||||
|
display list data read).
|
||||||
|
The default priority order in bsp is below
|
||||||
|
GLCDC-GRA1 > GLCDC-GRA2 > DRW2D-TX > DRW2D-FB > EDMAC.
|
||||||
|
Priority can be changed with this macro.
|
||||||
|
|
||||||
|
Extended Bus Master Priority setting
|
||||||
|
0 = GLCDC graphics 1 data read
|
||||||
|
1 = DRW2D texture data read
|
||||||
|
2 = DRW2D frame buffer data read write and display list data read
|
||||||
|
3 = GLCDC graphics 2 data read
|
||||||
|
4 = EDMAC
|
||||||
|
|
||||||
|
Note : Settings other than above are prohibited.
|
||||||
|
Duplicate priority settings can not be made.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_EBMAPCR_1ST_PRIORITY (0) /* Extended Bus Master 1st Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_2ND_PRIORITY (3) /* Extended Bus Master 2nd Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_3RD_PRIORITY (1) /* Extended Bus Master 3rd Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_4TH_PRIORITY (2) /* Extended Bus Master 4th Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_5TH_PRIORITY (4) /* Extended Bus Master 5th Priority Selection */
|
||||||
|
|
||||||
|
/* This macro is used to define the voltage that is supplied to the MCU (Vcc). This macro is defined in millivolts. This
|
||||||
|
macro does not actually change anything on the MCU. Some FIT modules need this information so it is defined here. */
|
||||||
|
#define BSP_CFG_MCU_VCC_MV (3300)
|
||||||
|
|
||||||
|
/* Allow initialization of auto-generated peripheral initialization code by Smart Configurator tool.
|
||||||
|
When not using the Smart Configurator, set the value of BSP_CFG_CONFIGURATOR_SELECT to 0.
|
||||||
|
0 = Disabled (default)
|
||||||
|
1 = Smart Configurator initialization code used
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CONFIGURATOR_SELECT (0)
|
||||||
|
|
||||||
|
/* For some BSP functions, it is necessary to ensure that, while these functions are executing, interrupts from other
|
||||||
|
FIT modules do not occur. By controlling the IPL, these functions disable interrupts that are at or below the
|
||||||
|
specified interrupt priority level.
|
||||||
|
This macro sets the IPL. Range is 0x0 - 0xF.
|
||||||
|
Please set this macro more than IPR for other FIT module interrupts.
|
||||||
|
The default value is 0xF (maximum value).
|
||||||
|
Don't change if there is no special processing with higher priority than all fit modules.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FIT_IPL_MAX (0xF)
|
||||||
|
|
||||||
|
/* Software Interrupt (SWINT).
|
||||||
|
0 = Software interrupt is not used.
|
||||||
|
1 = Software interrupt is used.
|
||||||
|
NOTE: When this macro is set to 1, the software interrupt is initialized in bsp startup routine.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_UNIT1_ENABLE (1)
|
||||||
|
#define BSP_CFG_SWINT_UNIT2_ENABLE (1)
|
||||||
|
|
||||||
|
/* Software Interrupt Task Buffer Number.
|
||||||
|
For software interrupt, this value is number of buffering user tasks.
|
||||||
|
So user can increase this value if user system would have many software interrupt tasks
|
||||||
|
and user system has enough buffer. This value requires 9 byte per task.
|
||||||
|
NOTE: This setting is common to all units. It can not be set individually.
|
||||||
|
The maximum value is 254.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_TASK_BUFFER_NUMBER (8)
|
||||||
|
|
||||||
|
/* Initial value of the software interrupt priority.
|
||||||
|
For software interrupt, this value is interrupt priority. Range is 0x0 - 0xF.
|
||||||
|
NOTE: This setting is common to all units. It can not be set individually.
|
||||||
|
Please be careful that this setting is the initial value of the interrupt priority register(IPR).
|
||||||
|
It is possible to dynamically change the IPR.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_IPR_INITIAL_VALUE (0x1)
|
||||||
|
|
||||||
|
#endif /* R_BSP_CONFIG_REF_HEADER_FILE */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,222 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_interrupt_config.h
|
||||||
|
* Description : This module maps Interrupt A & B interrupts. More information on how this is done is given below.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE
|
||||||
|
#define R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* If you wish to use one of the interrupt below then set the appropriate configuration macro to the vector number you
|
||||||
|
* wish to use for that interrupt. For example, if you want to use the RTC carry interrupt (CUP) at vector 176 then you
|
||||||
|
* would do the following:
|
||||||
|
*
|
||||||
|
* #define BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP 176
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Interrupt B Sources.
|
||||||
|
* -Valid vector numbers are 128-207.
|
||||||
|
* -There are more vector slots for B sources than actual B sources. By default none of the CAN2 interrupts are
|
||||||
|
* mapped.
|
||||||
|
* -If using the 'TPU1, TGI1A' interrupt it must be vector 144 or 145. It is set to 144 by default.
|
||||||
|
* -If a peripheral interrupt is going to be used to wake up the MCU from All-Module Clock Stop Mode then it must be
|
||||||
|
* in a vector between 146 to 157. Peripheral interrupts that can do this are TMR interrupts and the 'USB0, USBI0'
|
||||||
|
* interrupt. By default the TMR interrupts are chosen since there are 12 of them and there are 12 slots.
|
||||||
|
*/
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMT2_CMI2 128
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMT3_CMI3 129
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIA0 146
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIB0 147
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_OVI0 148
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIA1 149
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIB1 150
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_OVI1 151
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIA2 152
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIB2 153
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_OVI2 154
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIA3 155
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIB3 156
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_OVI3 157
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0A 130
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0B 131
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0C 132
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0D 133
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TCI0V 134
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1A 144
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1B 135
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1V 136
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1U 137
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2A 138
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2B 139
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2V 140
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2U 141
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3A 142
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3B 143
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3C 145
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3D 158
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TCI3V 159
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4A 160
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4B 161
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4V 162
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4U 163
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5A 164
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5B 165
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5V 166
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5U 167
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC0I0 168
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC1I0 169
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC0I0 170
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC1I0 171
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC0I1 172
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC1I1 173
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC0I1 174
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC1I1 175
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP 176
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXF0 177
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXF0 178
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXM0 179
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXM0 180
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXF1 181
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXF1 182
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXM1 183
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXM1 184
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXM2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXM2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_USB0_USBI0 185
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12ADI0 186
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GBADI0 187
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GCADI0 188
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12ADI1 189
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GBADI1 190
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GCADI1 191
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR18I 192
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR19I 193
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_PROC_BUSY 194
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_ROMOK 195
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_LONG_PLG 196
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_TEST_BUSY 197
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY0 198
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY1 199
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY4 200
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY0 201
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY1 202
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_WRRDY 203
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_RDRDY 204
|
||||||
|
|
||||||
|
/* Interrupt A Sources.
|
||||||
|
* -Valid vector numbers are 208-255.
|
||||||
|
* -There are more A sources than A vector slots. By default none of the GPTW interrupts and the ESC interrupts are
|
||||||
|
* mapped.
|
||||||
|
* -If using the 'MTU1, TGI1A' interrupt it must be vector 208 or 209. It is set to 208 by default.
|
||||||
|
*/
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIA0 209
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIB0 210
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIC0 211
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGID0 212
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TCIV0 213
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIE0 214
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIF0 215
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIA1 208
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIB1 216
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIV1 217
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIU1 218
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIA2 219
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIB2 220
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIV2 221
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIU2 222
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIA3 223
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIB3 224
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIC3 225
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGID3 226
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TCIV3 227
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIA4 228
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIB4 229
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIC4 230
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGID4 231
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TCIV4 232
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIU5 233
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIV5 234
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIW5 235
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIA6 236
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIB6 237
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIC6 238
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGID6 239
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TCIV6 240
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIA7 241
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIB7 242
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIC7 243
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGID7 244
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TCIV7 245
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIA8 246
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIB8 247
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIC8 248
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGID8 249
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TCIV8 250
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIA0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIB0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIC0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCID0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GDTE0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIE0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIF0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIV0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIU0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIA1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIB1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIC1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCID1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GDTE1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIE1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIF1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIV1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIU1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIA2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIB2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIC2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCID2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GDTE2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIE2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIV2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIU2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIA3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIB3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIC3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCID3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GDTE3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIE3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIF3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIV3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIU3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_EPTPC_IPLS 251
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_PMGI0_PMGI0I 252
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_PMGI1_PMGI1I 253
|
||||||
|
|
||||||
|
#endif /* R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp.h
|
||||||
|
* Description : Has the header files that should be included for this platform.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 13.01.2012 1.00 First Release
|
||||||
|
* : 27.06.2012 1.10 Updated with new information to reflect udpated r_bsp structure.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef BSP_BOARD_USER
|
||||||
|
#define BSP_BOARD_USER
|
||||||
|
|
||||||
|
/* Make sure that no other platforms have already been defined. Do not touch this! */
|
||||||
|
#ifdef PLATFORM_DEFINED
|
||||||
|
#error "Error - Multiple platforms defined in platform.h!"
|
||||||
|
#else
|
||||||
|
#define PLATFORM_DEFINED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
INCLUDE APPROPRIATE MCU AND BOARD FILES
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* This is a user defined board. Start off by:
|
||||||
|
1)Copy and rename one of the 'board' folders that most closely matches your system (same MCU Series and Group).
|
||||||
|
2)Substitute in your MCU Group for the *MCU Group* option in the #include below for mcu_info.h.
|
||||||
|
3)Copy the other #includes from the r_bsp.h in the 'board' folder that you copied earlier.
|
||||||
|
4)Configure the BSP for your board by modifying the r_bsp_config_reference.h.
|
||||||
|
5)Copy r_bsp_config_reference.h to your project directory and rename it r_bsp_config.h.
|
||||||
|
You can also add your own include files here as well. */
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
#include "mcu/*MCU Group*/mcu_info.h"
|
||||||
|
|
||||||
|
#endif /* BSP_BOARD_USER */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : dbsct.c
|
||||||
|
* Description : Defines the structure of the ROM and RAM areas.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* Added definition for section of D_8, B_8, and C_8.
|
||||||
|
* : 08.10.2019 3.01 Added section for Renesas RTOS (RI600V4 or RI600PX).
|
||||||
|
* : 14.02.2020 3.02 Corrected pragma declaration of unpack.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Preprocessor directive */
|
||||||
|
#pragma unpack
|
||||||
|
|
||||||
|
/* MCU ROM and RAM structure definition */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint8_t *rom_s; /* Start address of the initialized data section in ROM */
|
||||||
|
uint8_t *rom_e; /* End address of the initialized data section in ROM */
|
||||||
|
uint8_t *ram_s; /* Start address of the initialized data section in RAM */
|
||||||
|
} st_dtbl_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint8_t *b_s; /* Start address of non-initialized data section */
|
||||||
|
uint8_t *b_e; /* End address of non-initialized data section */
|
||||||
|
} st_btbl_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Section start */
|
||||||
|
#pragma section C C$DSEC
|
||||||
|
|
||||||
|
extern st_dtbl_t const _DTBL[] = {
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
{ __sectop("D_8"), __secend("D_8"), __sectop("R_8") },
|
||||||
|
#endif
|
||||||
|
{ __sectop("D"), __secend("D"), __sectop("R") },
|
||||||
|
{ __sectop("D_2"), __secend("D_2"), __sectop("R_2") },
|
||||||
|
{ __sectop("D_1"), __secend("D_1"), __sectop("R_1") }
|
||||||
|
#if (BSP_CFG_RTOS_USED == 4) && (BSP_CFG_RENESAS_RTOS_USED == RENESAS_RI600PX)
|
||||||
|
,{ __sectop("DRI_ROM"), __secend("DRI_ROM"), __sectop("RRI_RAM") }
|
||||||
|
#endif /* Renesas RI600PX */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Section start */
|
||||||
|
#pragma section C C$BSEC
|
||||||
|
|
||||||
|
extern st_btbl_t const _BTBL[] = {
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
{ __sectop("B_8"), __secend("B_8") },
|
||||||
|
#endif
|
||||||
|
{ __sectop("B"), __secend("B") },
|
||||||
|
{ __sectop("B_2"), __secend("B_2") },
|
||||||
|
{ __sectop("B_1"), __secend("B_1") }
|
||||||
|
#if (BSP_CFG_RTOS_USED == 4) && (BSP_CFG_RENESAS_RTOS_USED == RENESAS_RI600V4)
|
||||||
|
,{ __sectop("BRI_RAM"), __secend("BRI_RAM") }
|
||||||
|
#endif /* Renesas RI600V4 */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Section start */
|
||||||
|
#pragma section
|
||||||
|
|
||||||
|
#if (BSP_CFG_RTOS_USED == 4) && (BSP_CFG_RENESAS_RTOS_USED == RENESAS_RI600PX)
|
||||||
|
#pragma section C CS
|
||||||
|
#endif /* Renesas RI600PX */
|
||||||
|
|
||||||
|
/* CTBL prevents excessive output of L1100 messages when linking.
|
||||||
|
Even if CTBL is deleted, the operation of the program does not change. */
|
||||||
|
uint8_t * const _CTBL[] = {
|
||||||
|
__sectop("C_1"), __sectop("C_2"), __sectop("C"),
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
__sectop("C_8"),
|
||||||
|
#endif
|
||||||
|
__sectop("W_1"), __sectop("W_2"), __sectop("W")
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Preprocessor directive */
|
||||||
|
#pragma packoption
|
||||||
|
|
||||||
|
/* This is to ensure compatibility with new L section in version 1.1 and up of the RXC compiler. Do not remove! */
|
||||||
|
#pragma section C L
|
||||||
|
const uint32_t deadSpace = 0xDEADDEAD;
|
||||||
|
#pragma section
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,283 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : linker_script_rvectors.inc
|
||||||
|
* Description : This module is used to set the interrupt table.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
LONG(DEFINED($tableentry$0$.rvectors) ? $tableentry$0$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$1$.rvectors) ? $tableentry$1$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$2$.rvectors) ? $tableentry$2$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$3$.rvectors) ? $tableentry$3$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$4$.rvectors) ? $tableentry$4$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$5$.rvectors) ? $tableentry$5$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$6$.rvectors) ? $tableentry$6$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$7$.rvectors) ? $tableentry$7$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$8$.rvectors) ? $tableentry$8$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$9$.rvectors) ? $tableentry$9$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$10$.rvectors) ? $tableentry$10$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$11$.rvectors) ? $tableentry$11$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$12$.rvectors) ? $tableentry$12$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$13$.rvectors) ? $tableentry$13$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$14$.rvectors) ? $tableentry$14$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$15$.rvectors) ? $tableentry$15$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$16$.rvectors) ? $tableentry$16$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$17$.rvectors) ? $tableentry$17$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$18$.rvectors) ? $tableentry$18$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$19$.rvectors) ? $tableentry$19$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$20$.rvectors) ? $tableentry$20$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$21$.rvectors) ? $tableentry$21$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$22$.rvectors) ? $tableentry$22$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$23$.rvectors) ? $tableentry$23$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$24$.rvectors) ? $tableentry$24$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$25$.rvectors) ? $tableentry$25$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$26$.rvectors) ? $tableentry$26$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$27$.rvectors) ? $tableentry$27$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$28$.rvectors) ? $tableentry$28$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$29$.rvectors) ? $tableentry$29$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$30$.rvectors) ? $tableentry$30$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$31$.rvectors) ? $tableentry$31$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$32$.rvectors) ? $tableentry$32$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$33$.rvectors) ? $tableentry$33$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$34$.rvectors) ? $tableentry$34$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$35$.rvectors) ? $tableentry$35$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$36$.rvectors) ? $tableentry$36$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$37$.rvectors) ? $tableentry$37$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$38$.rvectors) ? $tableentry$38$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$39$.rvectors) ? $tableentry$39$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$40$.rvectors) ? $tableentry$40$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$41$.rvectors) ? $tableentry$41$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$42$.rvectors) ? $tableentry$42$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$43$.rvectors) ? $tableentry$43$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$44$.rvectors) ? $tableentry$44$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$45$.rvectors) ? $tableentry$45$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$46$.rvectors) ? $tableentry$46$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$47$.rvectors) ? $tableentry$47$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$48$.rvectors) ? $tableentry$48$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$49$.rvectors) ? $tableentry$49$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$50$.rvectors) ? $tableentry$50$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$51$.rvectors) ? $tableentry$51$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$52$.rvectors) ? $tableentry$52$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$53$.rvectors) ? $tableentry$53$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$54$.rvectors) ? $tableentry$54$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$55$.rvectors) ? $tableentry$55$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$56$.rvectors) ? $tableentry$56$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$57$.rvectors) ? $tableentry$57$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$58$.rvectors) ? $tableentry$58$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$59$.rvectors) ? $tableentry$59$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$60$.rvectors) ? $tableentry$60$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$61$.rvectors) ? $tableentry$61$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$62$.rvectors) ? $tableentry$62$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$63$.rvectors) ? $tableentry$63$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$64$.rvectors) ? $tableentry$64$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$65$.rvectors) ? $tableentry$65$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$66$.rvectors) ? $tableentry$66$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$67$.rvectors) ? $tableentry$67$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$68$.rvectors) ? $tableentry$68$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$69$.rvectors) ? $tableentry$69$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$70$.rvectors) ? $tableentry$70$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$71$.rvectors) ? $tableentry$71$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$72$.rvectors) ? $tableentry$72$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$73$.rvectors) ? $tableentry$73$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$74$.rvectors) ? $tableentry$74$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$75$.rvectors) ? $tableentry$75$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$76$.rvectors) ? $tableentry$76$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$77$.rvectors) ? $tableentry$77$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$78$.rvectors) ? $tableentry$78$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$79$.rvectors) ? $tableentry$79$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$80$.rvectors) ? $tableentry$80$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$81$.rvectors) ? $tableentry$81$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$82$.rvectors) ? $tableentry$82$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$83$.rvectors) ? $tableentry$83$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$84$.rvectors) ? $tableentry$84$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$85$.rvectors) ? $tableentry$85$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$86$.rvectors) ? $tableentry$86$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$87$.rvectors) ? $tableentry$87$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$88$.rvectors) ? $tableentry$88$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$89$.rvectors) ? $tableentry$89$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$90$.rvectors) ? $tableentry$90$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$91$.rvectors) ? $tableentry$91$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$92$.rvectors) ? $tableentry$92$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$93$.rvectors) ? $tableentry$93$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$94$.rvectors) ? $tableentry$94$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$95$.rvectors) ? $tableentry$95$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$96$.rvectors) ? $tableentry$96$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$97$.rvectors) ? $tableentry$97$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$98$.rvectors) ? $tableentry$98$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$99$.rvectors) ? $tableentry$99$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$100$.rvectors) ? $tableentry$100$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$101$.rvectors) ? $tableentry$101$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$102$.rvectors) ? $tableentry$102$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$103$.rvectors) ? $tableentry$103$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$104$.rvectors) ? $tableentry$104$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$105$.rvectors) ? $tableentry$105$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$106$.rvectors) ? $tableentry$106$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$107$.rvectors) ? $tableentry$107$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$108$.rvectors) ? $tableentry$108$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$109$.rvectors) ? $tableentry$109$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$110$.rvectors) ? $tableentry$110$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$111$.rvectors) ? $tableentry$111$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$112$.rvectors) ? $tableentry$112$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$113$.rvectors) ? $tableentry$113$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$114$.rvectors) ? $tableentry$114$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$115$.rvectors) ? $tableentry$115$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$116$.rvectors) ? $tableentry$116$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$117$.rvectors) ? $tableentry$117$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$118$.rvectors) ? $tableentry$118$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$119$.rvectors) ? $tableentry$119$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$120$.rvectors) ? $tableentry$120$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$121$.rvectors) ? $tableentry$121$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$122$.rvectors) ? $tableentry$122$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$123$.rvectors) ? $tableentry$123$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$124$.rvectors) ? $tableentry$124$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$125$.rvectors) ? $tableentry$125$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$126$.rvectors) ? $tableentry$126$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$127$.rvectors) ? $tableentry$127$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$128$.rvectors) ? $tableentry$128$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$129$.rvectors) ? $tableentry$129$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$130$.rvectors) ? $tableentry$130$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$131$.rvectors) ? $tableentry$131$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$132$.rvectors) ? $tableentry$132$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$133$.rvectors) ? $tableentry$133$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$134$.rvectors) ? $tableentry$134$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$135$.rvectors) ? $tableentry$135$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$136$.rvectors) ? $tableentry$136$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$137$.rvectors) ? $tableentry$137$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$138$.rvectors) ? $tableentry$138$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$139$.rvectors) ? $tableentry$139$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$140$.rvectors) ? $tableentry$140$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$141$.rvectors) ? $tableentry$141$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$142$.rvectors) ? $tableentry$142$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$143$.rvectors) ? $tableentry$143$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$144$.rvectors) ? $tableentry$144$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$145$.rvectors) ? $tableentry$145$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$146$.rvectors) ? $tableentry$146$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$147$.rvectors) ? $tableentry$147$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$148$.rvectors) ? $tableentry$148$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$149$.rvectors) ? $tableentry$149$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$150$.rvectors) ? $tableentry$150$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$151$.rvectors) ? $tableentry$151$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$152$.rvectors) ? $tableentry$152$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$153$.rvectors) ? $tableentry$153$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$154$.rvectors) ? $tableentry$154$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$155$.rvectors) ? $tableentry$155$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$156$.rvectors) ? $tableentry$156$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$157$.rvectors) ? $tableentry$157$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$158$.rvectors) ? $tableentry$158$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$159$.rvectors) ? $tableentry$159$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$160$.rvectors) ? $tableentry$160$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$161$.rvectors) ? $tableentry$161$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$162$.rvectors) ? $tableentry$162$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$163$.rvectors) ? $tableentry$163$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$164$.rvectors) ? $tableentry$164$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$165$.rvectors) ? $tableentry$165$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$166$.rvectors) ? $tableentry$166$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$167$.rvectors) ? $tableentry$167$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$168$.rvectors) ? $tableentry$168$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$169$.rvectors) ? $tableentry$169$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$170$.rvectors) ? $tableentry$170$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$171$.rvectors) ? $tableentry$171$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$172$.rvectors) ? $tableentry$172$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$173$.rvectors) ? $tableentry$173$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$174$.rvectors) ? $tableentry$174$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$175$.rvectors) ? $tableentry$175$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$176$.rvectors) ? $tableentry$176$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$177$.rvectors) ? $tableentry$177$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$178$.rvectors) ? $tableentry$178$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$179$.rvectors) ? $tableentry$179$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$180$.rvectors) ? $tableentry$180$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$181$.rvectors) ? $tableentry$181$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$182$.rvectors) ? $tableentry$182$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$183$.rvectors) ? $tableentry$183$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$184$.rvectors) ? $tableentry$184$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$185$.rvectors) ? $tableentry$185$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$186$.rvectors) ? $tableentry$186$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$187$.rvectors) ? $tableentry$187$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$188$.rvectors) ? $tableentry$188$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$189$.rvectors) ? $tableentry$189$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$190$.rvectors) ? $tableentry$190$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$191$.rvectors) ? $tableentry$191$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$192$.rvectors) ? $tableentry$192$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$193$.rvectors) ? $tableentry$193$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$194$.rvectors) ? $tableentry$194$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$195$.rvectors) ? $tableentry$195$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$196$.rvectors) ? $tableentry$196$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$197$.rvectors) ? $tableentry$197$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$198$.rvectors) ? $tableentry$198$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$199$.rvectors) ? $tableentry$199$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$200$.rvectors) ? $tableentry$200$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$201$.rvectors) ? $tableentry$201$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$202$.rvectors) ? $tableentry$202$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$203$.rvectors) ? $tableentry$203$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$204$.rvectors) ? $tableentry$204$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$205$.rvectors) ? $tableentry$205$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$206$.rvectors) ? $tableentry$206$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$207$.rvectors) ? $tableentry$207$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$208$.rvectors) ? $tableentry$208$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$209$.rvectors) ? $tableentry$209$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$210$.rvectors) ? $tableentry$210$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$211$.rvectors) ? $tableentry$211$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$212$.rvectors) ? $tableentry$212$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$213$.rvectors) ? $tableentry$213$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$214$.rvectors) ? $tableentry$214$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$215$.rvectors) ? $tableentry$215$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$216$.rvectors) ? $tableentry$216$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$217$.rvectors) ? $tableentry$217$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$218$.rvectors) ? $tableentry$218$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$219$.rvectors) ? $tableentry$219$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$220$.rvectors) ? $tableentry$220$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$221$.rvectors) ? $tableentry$221$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$222$.rvectors) ? $tableentry$222$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$223$.rvectors) ? $tableentry$223$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$224$.rvectors) ? $tableentry$224$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$225$.rvectors) ? $tableentry$225$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$226$.rvectors) ? $tableentry$226$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$227$.rvectors) ? $tableentry$227$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$228$.rvectors) ? $tableentry$228$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$229$.rvectors) ? $tableentry$229$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$230$.rvectors) ? $tableentry$230$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$231$.rvectors) ? $tableentry$231$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$232$.rvectors) ? $tableentry$232$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$233$.rvectors) ? $tableentry$233$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$234$.rvectors) ? $tableentry$234$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$235$.rvectors) ? $tableentry$235$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$236$.rvectors) ? $tableentry$236$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$237$.rvectors) ? $tableentry$237$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$238$.rvectors) ? $tableentry$238$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$239$.rvectors) ? $tableentry$239$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$240$.rvectors) ? $tableentry$240$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$241$.rvectors) ? $tableentry$241$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$242$.rvectors) ? $tableentry$242$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$243$.rvectors) ? $tableentry$243$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$244$.rvectors) ? $tableentry$244$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$245$.rvectors) ? $tableentry$245$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$246$.rvectors) ? $tableentry$246$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$247$.rvectors) ? $tableentry$247$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$248$.rvectors) ? $tableentry$248$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$249$.rvectors) ? $tableentry$249$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$250$.rvectors) ? $tableentry$250$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$251$.rvectors) ? $tableentry$251$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$252$.rvectors) ? $tableentry$252$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$253$.rvectors) ? $tableentry$253$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$254$.rvectors) ? $tableentry$254$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
LONG(DEFINED($tableentry$255$.rvectors) ? $tableentry$255$.rvectors : DEFINED($tableentry$default$.rvectors) ? $tableentry$default$.rvectors : 0xFFFFFFFF);
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : lowlvl.c
|
||||||
|
* Description : Functions to support stream I/O to the E1 virtual Console
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#define BSP_PRV_E1_DBG_PORT (*(volatile st_dbg_t R_BSP_EVENACCESS_SFR *)0x84080)
|
||||||
|
#define BSP_PRV_TXFL0EN (0x00000100) /* debug tx flow control bit */
|
||||||
|
#define BSP_PRV_RXFL0EN (0x00001000) /* debug RX flow control bit */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t tx_data; /* Debug Virtual Console TX data */
|
||||||
|
char wk1[12]; /* spacer */
|
||||||
|
uint32_t rx_data; /* Debug Virtual Console RX data */
|
||||||
|
char wk2[44]; /* spacer */
|
||||||
|
uint32_t dbgstat; /* Debug Virtual Console Status */
|
||||||
|
} st_dbg_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if BSP_CFG_USER_CHARPUT_ENABLED != 0
|
||||||
|
/* If user has indicated they want to provide their own charput function then this is the prototype. */
|
||||||
|
void BSP_CFG_USER_CHARPUT_FUNCTION(char output_char);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_USER_CHARGET_ENABLED != 0
|
||||||
|
/* If user has indicated they want to provide their own charget function then this is the prototype. */
|
||||||
|
char BSP_CFG_USER_CHARGET_FUNCTION(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: charput
|
||||||
|
* Description : Outputs a character on a serial port
|
||||||
|
* Arguments : character to output
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void charput (char output_char)
|
||||||
|
{
|
||||||
|
/* If user has provided their own charput() function, then call it. */
|
||||||
|
#if BSP_CFG_USER_CHARPUT_ENABLED == 1
|
||||||
|
BSP_CFG_USER_CHARPUT_FUNCTION(output_char);
|
||||||
|
#else
|
||||||
|
/* Wait for transmit buffer to be empty */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(0 != (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_TXFL0EN))
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
R_BSP_NOP();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Write the character out */
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_E1_DBG_PORT.tx_data = (int32_t)output_char;
|
||||||
|
#endif
|
||||||
|
} /* End of function charput() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: charget
|
||||||
|
* Description : Gets a character on a serial port
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : received character
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
char charget (void)
|
||||||
|
{
|
||||||
|
/* If user has provided their own charget() function, then call it. */
|
||||||
|
#if BSP_CFG_USER_CHARGET_ENABLED == 1
|
||||||
|
return BSP_CFG_USER_CHARGET_FUNCTION();
|
||||||
|
#else
|
||||||
|
/* Wait for rx buffer buffer to be ready */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(0 == (BSP_PRV_E1_DBG_PORT.dbgstat & BSP_PRV_RXFL0EN))
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
R_BSP_NOP();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read data, send back up */
|
||||||
|
/* Casting is valid because it matches the type to the retern value. */
|
||||||
|
return (char)BSP_PRV_E1_DBG_PORT.rx_data;
|
||||||
|
#endif
|
||||||
|
} /* End of function charget() */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : lowlvl.h
|
||||||
|
* Description : Functions to support stream I/O
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef LOWLVL_H
|
||||||
|
#define LOWLVL_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Output one character to standard output (the E1 Virtual Console or a serial port via user own charput function) */
|
||||||
|
void charput (char output_char);
|
||||||
|
|
||||||
|
/* Input one character from standard input (the E1 Virtual Console or a serial port via user own charget function) */
|
||||||
|
char charget (void);
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,571 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : lowsrc.c
|
||||||
|
* Description : Functions to support stream I/O
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
#include "r_bsp_common.h"
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
#include "lowlvl.h"
|
||||||
|
#include "lowsrc.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
/* Do not include this file if stdio is disabled in r_bsp_config. */
|
||||||
|
#if BSP_CFG_IO_LIB_ENABLE == 1
|
||||||
|
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/*Number of I/O Stream*/
|
||||||
|
#define BSP_PRV_IOSTREAM (20)
|
||||||
|
|
||||||
|
/* file number */
|
||||||
|
#define BSP_PRV_STDIN (0) /* Standard input (console) */
|
||||||
|
#define BSP_PRV_STDOUT (1) /* Standard output (console) */
|
||||||
|
#define BSP_PRV_STDERR (2) /* Standard error output (console) */
|
||||||
|
|
||||||
|
#define BSP_PRV_FLMIN (0) /* Minimum file number */
|
||||||
|
#define BSP_PRV_MOPENR (0x1)
|
||||||
|
#define BSP_PRV_MOPENW (0x2)
|
||||||
|
#define BSP_PRV_MOPENA (0x4)
|
||||||
|
#define BSP_PRV_MTRUNC (0x8)
|
||||||
|
#define BSP_PRV_MCREAT (0x10)
|
||||||
|
#define BSP_PRV_MBIN (0x20)
|
||||||
|
#define BSP_PRV_MEXCL (0x40)
|
||||||
|
#define BSP_PRV_MALBUF (0x40)
|
||||||
|
#define BSP_PRV_MALFIL (0x80)
|
||||||
|
#define BSP_PRV_MEOF (0x100)
|
||||||
|
#define BSP_PRV_MERR (0x200)
|
||||||
|
#define BSP_PRV_MLBF (0x400)
|
||||||
|
#define BSP_PRV_MNBF (0x800)
|
||||||
|
#define BSP_PRV_MREAD (0x1000)
|
||||||
|
#define BSP_PRV_MWRITE (0x2000)
|
||||||
|
#define BSP_PRV_MBYTE (0x4000)
|
||||||
|
#define BSP_PRV_MWIDE (0x8000)
|
||||||
|
/* File Flags */
|
||||||
|
#define BSP_PRV_O_RDONLY (0x0001) /* Read only */
|
||||||
|
#define BSP_PRV_O_WRONLY (0x0002) /* Write only */
|
||||||
|
#define BSP_PRV_O_RDWR (0x0004) /* Both read and Write */
|
||||||
|
#define BSP_PRV_O_CREAT (0x0008) /* A file is created if it is not existed */
|
||||||
|
#define BSP_PRV_O_TRUNC (0x0010) /* The file size is changed to 0 if it is existed. */
|
||||||
|
#define BSP_PRV_O_APPEND (0x0020) /* The position is set for next reading/writing
|
||||||
|
0: Top of the file 1: End of file */
|
||||||
|
|
||||||
|
/* Special character code */
|
||||||
|
#define BSP_PRV_CR (0x0d) /* Carriage return */
|
||||||
|
#define BSP_PRV_LF (0x0a) /* Line feed */
|
||||||
|
|
||||||
|
#define BSP_PRV_FPATH_STDIN "C:\\stdin"
|
||||||
|
#define BSP_PRV_FPATH_STDOUT "C:\\stdout"
|
||||||
|
#define BSP_PRV_FPATH_STDERR "C:\\stderr"
|
||||||
|
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
// For Reentrant Library (generated lbgrx with -reent option)
|
||||||
|
#define BSP_PRV_MALLOC_SEM (1) /* Semaphore No. for malloc */
|
||||||
|
#define BSP_PRV_STRTOK_SEM (2) /* Semaphore No. for strtok */
|
||||||
|
#define BSP_PRV_FILE_TBL_SEM (3) /* Semaphore No. for fopen */
|
||||||
|
#define BSP_PRV_MBRLEN_SEM (4) /* Semaphore No. for mbrlen */
|
||||||
|
#define BSP_PRV_FPSWREG_SEM (5) /* Semaphore No. for FPSW register */
|
||||||
|
#define BSP_PRV_FILES_SEM (6) /* Semaphore No. for _Files */
|
||||||
|
#define BSP_PRV_SEMSIZE (26) /* BSP_PRV_FILES_SEM + _nfiles (assumed _nfiles=20) */
|
||||||
|
|
||||||
|
#define BSP_PRV_TRUE (1)
|
||||||
|
#define BSP_PRV_FALSE (0)
|
||||||
|
#define BSP_PRV_OK (1)
|
||||||
|
#define BSP_PRV_NG (0)
|
||||||
|
#endif /* _REENTRANT */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
extern const long _nfiles; /* The number of files for input/output files */
|
||||||
|
char flmod[BSP_PRV_IOSTREAM]; /* The location for the mode of opened file. */
|
||||||
|
|
||||||
|
unsigned char sml_buf[BSP_PRV_IOSTREAM];
|
||||||
|
|
||||||
|
FILE *_Files[BSP_PRV_IOSTREAM]; /* structure for FILE */
|
||||||
|
char *env_list[] = { /* Array for environment variables(**environ) */
|
||||||
|
"ENV1=temp01",
|
||||||
|
"ENV2=temp02",
|
||||||
|
"ENV9=end",
|
||||||
|
'\0' /* Terminal for environment variables */
|
||||||
|
};
|
||||||
|
|
||||||
|
char **environ = env_list;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
static long sem_errno;
|
||||||
|
static int force_fail_signal_sem = BSP_PRV_FALSE;
|
||||||
|
static int semaphore[BSP_PRV_SEMSIZE];
|
||||||
|
#endif /* _REENTRANT */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: init_iolib
|
||||||
|
* Description : Initialize C library Functions, if necessary. Define USES_SIMIO on Assembler Option.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void init_iolib(void)
|
||||||
|
{
|
||||||
|
/* A file for standard input/output is opened or created. Each FILE
|
||||||
|
* structure members are initialized by the library. Each _Buf member
|
||||||
|
* in it is re-set the end of buffer pointer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Initializations of File Stream Table */
|
||||||
|
_Files[0] = stdin;
|
||||||
|
_Files[1] = stdout;
|
||||||
|
_Files[2] = stderr;
|
||||||
|
|
||||||
|
/* Standard Input File */
|
||||||
|
if( freopen( BSP_PRV_FPATH_STDIN, "r", stdin ) == NULL )
|
||||||
|
{
|
||||||
|
stdin->_Mode = 0xffff; /* Not allow the access if it fails to open */
|
||||||
|
}
|
||||||
|
stdin->_Mode = BSP_PRV_MOPENR; /* Read only attribute */
|
||||||
|
stdin->_Mode |= BSP_PRV_MNBF; /* Non-buffering for data */
|
||||||
|
stdin->_Bend = stdin->_Buf + 1; /* Re-set pointer to the end of buffer */
|
||||||
|
|
||||||
|
/* Standard Output File */
|
||||||
|
if( freopen( BSP_PRV_FPATH_STDOUT, "w", stdout ) == NULL )
|
||||||
|
{
|
||||||
|
stdout->_Mode = 0xffff; /* Not allow the access if it fails to open */
|
||||||
|
}
|
||||||
|
stdout->_Mode |= BSP_PRV_MNBF; /* Non-buffering for data */
|
||||||
|
stdout->_Bend = stdout->_Buf + 1; /* Re-set pointer to the end of buffer */
|
||||||
|
|
||||||
|
/* Standard Error File */
|
||||||
|
if( freopen( BSP_PRV_FPATH_STDERR, "w", stderr ) == NULL )
|
||||||
|
{
|
||||||
|
stderr->_Mode = 0xffff; /* Not allow the access if it fails to open */
|
||||||
|
}
|
||||||
|
stderr->_Mode |= BSP_PRV_MNBF; /* Non-buffering for data */
|
||||||
|
stderr->_Bend = stderr->_Buf + 1;/* Re-set pointer to the end of buffer */
|
||||||
|
} /* End of function init_iolib() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: close_all
|
||||||
|
* Description : Colses the file
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void close_all(void)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for( i=0; i < _nfiles; i++ )
|
||||||
|
{
|
||||||
|
/* Checks if the file is opened or not */
|
||||||
|
if( _Files[i]->_Mode & (BSP_PRV_MOPENR | BSP_PRV_MOPENW | BSP_PRV_MOPENA ) )
|
||||||
|
{
|
||||||
|
fclose( _Files[i] ); /* Closes the file */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} /* End of function close_all() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: open
|
||||||
|
* Description : file open
|
||||||
|
* Arguments : name - File name
|
||||||
|
* mode - Open mode
|
||||||
|
* flg - Open flag
|
||||||
|
* Return Value : File number (Pass)
|
||||||
|
* -1 (Failure)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long open(const char *name, long mode, long flg)
|
||||||
|
{
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(flg);
|
||||||
|
|
||||||
|
if( 0 == strcmp( name, BSP_PRV_FPATH_STDIN ) ) /* Standard Input file? */
|
||||||
|
{
|
||||||
|
if( 0 == ( mode & BSP_PRV_O_RDONLY ) )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
flmod[BSP_PRV_STDIN] = mode;
|
||||||
|
return BSP_PRV_STDIN;
|
||||||
|
}
|
||||||
|
else if( 0 == strcmp( name, BSP_PRV_FPATH_STDOUT ) ) /* Standard Output file? */
|
||||||
|
{
|
||||||
|
if( 0 == ( mode & BSP_PRV_O_WRONLY ) )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
flmod[BSP_PRV_STDOUT] = mode;
|
||||||
|
return BSP_PRV_STDOUT;
|
||||||
|
}
|
||||||
|
else if( 0 == strcmp(name, BSP_PRV_FPATH_STDERR ) ) /* Standard Error file? */
|
||||||
|
{
|
||||||
|
if( 0 == ( mode & BSP_PRV_O_WRONLY ) )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
flmod[BSP_PRV_STDERR] = mode;
|
||||||
|
return BSP_PRV_STDERR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1; /*Others */
|
||||||
|
}
|
||||||
|
} /* End of function open() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: close
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* Return Value : 1
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long close(long fileno)
|
||||||
|
{
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
} /* End of function close() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: write
|
||||||
|
* Description : Data write
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to write
|
||||||
|
* Return Value : Number of write characters (Pass)
|
||||||
|
* -1 (Failure)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long write(long fileno, const unsigned char *buf, long count)
|
||||||
|
{
|
||||||
|
long i; /* A variable for counter */
|
||||||
|
unsigned char c; /* An output character */
|
||||||
|
|
||||||
|
/* Checking the mode of file , output each character
|
||||||
|
* Checking the attribute for Write-Only, Read-Only or Read-Write
|
||||||
|
*/
|
||||||
|
if((flmod[fileno]&BSP_PRV_O_WRONLY) || (flmod[fileno]&BSP_PRV_O_RDWR))
|
||||||
|
{
|
||||||
|
if( BSP_PRV_STDIN == fileno )
|
||||||
|
{
|
||||||
|
return -1; /* Standard Input */
|
||||||
|
}
|
||||||
|
else if( (BSP_PRV_STDOUT == fileno) || (BSP_PRV_STDERR == fileno) ) /* Standard Error/output */
|
||||||
|
{
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for( i = count; i > 0; --i )
|
||||||
|
{
|
||||||
|
c = *buf++;
|
||||||
|
charput(c);
|
||||||
|
}
|
||||||
|
return count; /*Return the number of written characters */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1; /* Incorrect file number */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1; /* An error */
|
||||||
|
}
|
||||||
|
} /* End of function write() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: read
|
||||||
|
* Description : Data read
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to read
|
||||||
|
* Return Value : Number of read characters (Pass)
|
||||||
|
* -1 (Failure)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long read(long fileno, unsigned char *buf, long count)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
|
||||||
|
/* Checking the file mode with the file number, each character is input and stored the buffer */
|
||||||
|
|
||||||
|
if((flmod[fileno]&BSP_PRV_MOPENR) || (flmod[fileno]&BSP_PRV_O_RDWR))
|
||||||
|
{
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for(i = count; i > 0; i--)
|
||||||
|
{
|
||||||
|
*buf = charget();
|
||||||
|
if(BSP_PRV_CR == (*buf))
|
||||||
|
{
|
||||||
|
*buf = BSP_PRV_LF; /* Replace the new line character */
|
||||||
|
}
|
||||||
|
buf++;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} /* End of function read() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: lseek
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* offset - Offset indicating reading / writing position
|
||||||
|
* base - Offset starting point
|
||||||
|
* Return Value : -1L
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long lseek(long fileno, long offset, long base)
|
||||||
|
{
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(offset);
|
||||||
|
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(base);
|
||||||
|
|
||||||
|
return -1L;
|
||||||
|
} /* End of function lseek() */
|
||||||
|
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: errno_addr
|
||||||
|
* Description : Acquisition of errno address
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : errno address
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long *errno_addr(void)
|
||||||
|
{
|
||||||
|
/* Return the errno address of the current task */
|
||||||
|
return (&sem_errno);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: wait_sem
|
||||||
|
* Description : Defines the specified numbers of semaphores
|
||||||
|
* Arguments : semnum - Semaphore ID
|
||||||
|
* Return Value : BSP_PRV_OK(=1) (Normal)
|
||||||
|
* BSP_PRV_NG(=0) (Error)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long wait_sem(long semnum) /* Semaphore ID */
|
||||||
|
{
|
||||||
|
if((0 < semnum) && (semnum < BSP_PRV_SEMSIZE)) {
|
||||||
|
if(semaphore[semnum] == BSP_PRV_FALSE) {
|
||||||
|
semaphore[semnum] = BSP_PRV_TRUE;
|
||||||
|
return(BSP_PRV_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(BSP_PRV_NG);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: signal_sem
|
||||||
|
* Description : Releases the specified numbers of semaphores
|
||||||
|
* Arguments : semnum - Semaphore ID
|
||||||
|
* Return Value : BSP_PRV_OK(=1) (Normal)
|
||||||
|
* BSP_PRV_NG(=0) (Error)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
long signal_sem(long semnum) /* Semaphore ID */
|
||||||
|
{
|
||||||
|
if(!force_fail_signal_sem) {
|
||||||
|
if((0 <= semnum) && (semnum < BSP_PRV_SEMSIZE)) {
|
||||||
|
if( semaphore[semnum] == BSP_PRV_TRUE ) {
|
||||||
|
semaphore[semnum] = BSP_PRV_FALSE;
|
||||||
|
return(BSP_PRV_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(BSP_PRV_NG);
|
||||||
|
}
|
||||||
|
#endif /* _REENTRANT */
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_IO_LIB_ENABLE */
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: write
|
||||||
|
* Description : Data write (for GNURX+NEWLIB)
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to write
|
||||||
|
* Return Value : Number of write characters (Pass)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int write(int fileno, char *buf, int count)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char c;
|
||||||
|
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for(i = count; i > 0; --i)
|
||||||
|
{
|
||||||
|
c = *buf++;
|
||||||
|
charput(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: read
|
||||||
|
* Description : Data read (for GNURX+NEWLIB)
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to read
|
||||||
|
* Return Value : 1 (Pass)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int read(int fileno, char *buf, int count)
|
||||||
|
{
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
INTERNAL_NOT_USED(count);
|
||||||
|
|
||||||
|
*buf = charget();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: _write
|
||||||
|
* Description : Data write (for GNURX+OPTLIB)
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to write
|
||||||
|
* Return Value : Number of write characters (Pass)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int _write(int fileno, char *buf, int count)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char c;
|
||||||
|
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for(i = count; i > 0; --i)
|
||||||
|
{
|
||||||
|
c = *buf++;
|
||||||
|
charput(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: read
|
||||||
|
* Description : Data read (for GNURX+OPTLIB)
|
||||||
|
* Arguments : fileno - File number
|
||||||
|
* buf - The address of destination buffer
|
||||||
|
* count - The number of chacter to read
|
||||||
|
* Return Value : 1 (Pass)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int _read(int fileno, char *buf, int count)
|
||||||
|
{
|
||||||
|
/* This code is only used to remove compiler info messages about these parameters not being used. */
|
||||||
|
INTERNAL_NOT_USED(fileno);
|
||||||
|
INTERNAL_NOT_USED(count);
|
||||||
|
|
||||||
|
*buf = charget();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: close
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void close (void)
|
||||||
|
{
|
||||||
|
/* This is dummy function.
|
||||||
|
This function is used to suppress the warning messages of GNU compiler.
|
||||||
|
Plese edit the function as required. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: fstat
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void fstat (void)
|
||||||
|
{
|
||||||
|
/* This is dummy function.
|
||||||
|
This function is used to suppress the warning messages of GNU compiler.
|
||||||
|
Plese edit the function as required. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: isatty
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void isatty (void)
|
||||||
|
{
|
||||||
|
/* This is dummy function.
|
||||||
|
This function is used to suppress the warning messages of GNU compiler.
|
||||||
|
Plese edit the function as required. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: lseek
|
||||||
|
* Description : dummy
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void lseek (void)
|
||||||
|
{
|
||||||
|
/* This is dummy function.
|
||||||
|
This function is used to suppress the warning messages of GNU compiler.
|
||||||
|
Plese edit the function as required. */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : lowsrc.h
|
||||||
|
* Description : Functions to support stream I/O
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 2.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef LOWSRC_H
|
||||||
|
#define LOWSRC_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
void init_iolib(void);
|
||||||
|
void close_all(void);
|
||||||
|
long open(const char *name, long mode, long flg);
|
||||||
|
long close(long fileno);
|
||||||
|
long write(long fileno, const unsigned char *buf, long count);
|
||||||
|
long read(long fileno, unsigned char *buf, long count);
|
||||||
|
long lseek(long fileno, long offset, long base);
|
||||||
|
#ifdef _REENTRANT
|
||||||
|
long *errno_addr(void)
|
||||||
|
long wait_sem(long semnum)
|
||||||
|
long signal_sem(long semnum)
|
||||||
|
#endif
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
int write(int fileno, char *buf, int count);
|
||||||
|
int read(int fileno, char *buf, int count);
|
||||||
|
int _write(int fileno, char *buf, int count);
|
||||||
|
int _read(int fileno, char *buf, int count);
|
||||||
|
void close(void);
|
||||||
|
void fstat(void);
|
||||||
|
void isatty(void);
|
||||||
|
void lseek(void);
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_locks.c
|
||||||
|
* Description : This source file has 1 lock per MCU resource.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 2.00 Merged processing of all devices.
|
||||||
|
* Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Used for getting MCU information to accurately reflect available MCU resources. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Below are locks for controlling access to MCU resources. */
|
||||||
|
BSP_CFG_USER_LOCKING_TYPE g_bsp_Locks[BSP_NUM_LOCKS];
|
||||||
|
|
||||||
|
|
@ -0,0 +1,225 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_common.c
|
||||||
|
* Description : Implements functions that apply to all r_bsp boards and MCUs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 06.05.2013 1.00 First Release
|
||||||
|
* : 26.03.2014 1.10 Added R_BSP_SoftwareDelay() function
|
||||||
|
* : 03.09.2014 1.20 Corrected R_BSP_SoftwareDelay() timing when using an RX64M
|
||||||
|
* : 30.09.2015 1.30 Added RX23T
|
||||||
|
* : 01.02.2016 1.40 Added RX24T
|
||||||
|
* Changed the value of the following macro definition.
|
||||||
|
* - OVERHEAD_CYCLES
|
||||||
|
* - OVERHEAD_CYCLES_64
|
||||||
|
* : 29.02.2016 1.50 Added RX230
|
||||||
|
* : 01.10.2016 1.60 Added RX65N
|
||||||
|
* : 22.08.2016 1.70 Added RX24U
|
||||||
|
* : 15.05.2017 1.80 Changed method of selecting the number of CPU cycles required to execute
|
||||||
|
* the delayWait() loop.
|
||||||
|
* : 27.07.2018 1.90 Changed the value of the following macro definition, because added RX66T.
|
||||||
|
* - CPU_CYCLES_PER_LOOP
|
||||||
|
* : 28.02.2019 2.00 Deleted the following definition.
|
||||||
|
* (The following definition moved to the common file (mcu_info.h).)
|
||||||
|
* - CPU_CYCLES_PER_LOOP
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* Renamed following macro definitions.
|
||||||
|
* - BSP_PRV_OVERHEAD_CYCLES
|
||||||
|
* - BSP_PRV_OVERHEAD_CYCLES_64
|
||||||
|
* - BSP_PRV_CKSEL_LOCO
|
||||||
|
* Renamed following function.
|
||||||
|
* - delay_wait
|
||||||
|
* : 26.07.2019 2.01 Modified comment of API function to Doxygen style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Get information about current board and MCU. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#define BSP_PRV_OVERHEAD_CYCLES (2) /* R_BSP_SoftwareDelay() overhead per call */
|
||||||
|
#define BSP_PRV_OVERHEAD_CYCLES_64 (2) /* R_BSP_SoftwareDelay() overhead per call using 64-bit ints */
|
||||||
|
|
||||||
|
#define BSP_PRV_CKSEL_LOCO (0x0) /* SCKCR3 register setting for LOCO */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetVersion
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Returns the current version of the r_bsp.
|
||||||
|
* @return Version of the r_bsp.
|
||||||
|
* @details This function will return the version of the currently installed r_bsp. The version number is encoded
|
||||||
|
* where the top 2 bytes are the major version number and the bottom 2 bytes are the minor version number. For
|
||||||
|
* example, Version 4.25 would be returned as 0x00040019.
|
||||||
|
*/
|
||||||
|
uint32_t R_BSP_GetVersion (void)
|
||||||
|
{
|
||||||
|
/* These version macros are defined in platform.h. */
|
||||||
|
return ((((uint32_t)R_BSP_VERSION_MAJOR) << 16) | (uint32_t)R_BSP_VERSION_MINOR);
|
||||||
|
} /* End of function R_BSP_GetVersion() */
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: delay_wait
|
||||||
|
* Description : This asm loop executes a known number (5) of CPU cycles. If a value of '4' is passed
|
||||||
|
* in as an argument, then this function would consume 20 CPU cycles before returning.
|
||||||
|
* Arguments : loop_cnt - A single 32-bit value is provided as the number of loops to execute.
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(delay_wait)
|
||||||
|
void delay_wait (unsigned long loop_cnt)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(loop_cnt)
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( BRA.B R_BSP_ASM_LAB_NEXT(0) )
|
||||||
|
R_BSP_ASM( NOP )
|
||||||
|
R_BSP_ASM_LAB(0: )
|
||||||
|
R_BSP_ASM( NOP )
|
||||||
|
R_BSP_ASM( SUB #01H, R1 )
|
||||||
|
R_BSP_ASM( BNE.B R_BSP_ASM_LAB_PREV(0) )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function delay_wait() */
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetIClkFreqHz
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Returns the system clock frequency.
|
||||||
|
* @return System clock frequency specified by the r_bsp.
|
||||||
|
* @details This function returns the system clock frequency. For example, when the system clock is set to 120 MHz in
|
||||||
|
* r_bsp_config_h and the r_bsp has completed to specify the clock setting, then even if the user changed the system
|
||||||
|
* clock frequency to 60 MHz, the return value is '60000000'.
|
||||||
|
*/
|
||||||
|
uint32_t R_BSP_GetIClkFreqHz(void)
|
||||||
|
{
|
||||||
|
return get_iclk_freq_hz(); // Get the MCU specific ICLK frequency
|
||||||
|
} /* End of function R_BSP_GetIClkFreqHz() */
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SoftwareDelay
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Delay the specified duration in units and return.
|
||||||
|
* @param[in] delay The number of 'units' to delay.
|
||||||
|
* @param[in] units The 'base' for the units specified.
|
||||||
|
* @retval true True if delay executed.
|
||||||
|
* @retval false False if delay/units combination resulted in overflow/underflow.
|
||||||
|
* @details This is function that may be called for all MCU targets to implement a specific wait time.
|
||||||
|
* The actual delay time is plus the overhead at a specified duration. The overhead changes under the influence of
|
||||||
|
* the compiler, operating frequency and ROM cache. When the operating frequency is low, or the specified duration in
|
||||||
|
* units of microsecond level, please note that the error becomes large.
|
||||||
|
*/
|
||||||
|
bool R_BSP_SoftwareDelay(uint32_t delay, bsp_delay_units_t units)
|
||||||
|
{
|
||||||
|
volatile uint32_t iclk_rate;
|
||||||
|
volatile uint32_t delay_cycles;
|
||||||
|
volatile uint32_t loop_cnt;
|
||||||
|
volatile uint64_t delay_cycles_64;
|
||||||
|
volatile uint64_t loop_cnt_64;
|
||||||
|
|
||||||
|
#ifdef BSP_CFG_PARAM_CHECKING_ENABLE
|
||||||
|
if ((BSP_DELAY_MICROSECS != units) && (BSP_DELAY_MILLISECS != units) && (BSP_DELAY_SECS != units))
|
||||||
|
{
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
iclk_rate = R_BSP_GetIClkFreqHz(); /* Get the current ICLK frequency */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In order to handle all possible combinations of delay/ICLK it is necessary to use 64-bit
|
||||||
|
* integers (not all MCUs have floating point support). However, there is no native hw support
|
||||||
|
* for 64 bit integers so it requires many more clock cycles. This is not an issue if the
|
||||||
|
* requested delay is long enough and the ICLK is fast, but for delays in the low microseconds
|
||||||
|
* and/or a slow ICLK we use 32 bit integers to reduce the overhead cycles of this function
|
||||||
|
* by approximately a third and stand the best chance of achieving the requested delay.
|
||||||
|
*/
|
||||||
|
if ( (BSP_DELAY_MICROSECS == units) &&
|
||||||
|
(delay <= (0xFFFFFFFFUL / iclk_rate)) ) /* Ensure (iclk_rate * delay) will not exceed 32 bits */
|
||||||
|
{
|
||||||
|
delay_cycles = ((iclk_rate * delay) / units);
|
||||||
|
|
||||||
|
if (delay_cycles > BSP_PRV_OVERHEAD_CYCLES)
|
||||||
|
{
|
||||||
|
delay_cycles -= BSP_PRV_OVERHEAD_CYCLES;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delay_cycles = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
loop_cnt = delay_cycles / CPU_CYCLES_PER_LOOP;
|
||||||
|
|
||||||
|
if (0 == loop_cnt)
|
||||||
|
{
|
||||||
|
/* The requested delay is too large/small for the current ICLK. Return false which
|
||||||
|
* also results in the minimum possible delay. */
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
delay_cycles_64 = (((uint64_t)iclk_rate * (uint64_t)delay) / units);
|
||||||
|
|
||||||
|
if (delay_cycles_64 > BSP_PRV_OVERHEAD_CYCLES_64)
|
||||||
|
{
|
||||||
|
delay_cycles_64 -= BSP_PRV_OVERHEAD_CYCLES_64;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delay_cycles = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
loop_cnt_64 = delay_cycles_64 / CPU_CYCLES_PER_LOOP;
|
||||||
|
|
||||||
|
if ((loop_cnt_64 > 0xFFFFFFFFUL) || (0 == loop_cnt_64))
|
||||||
|
{
|
||||||
|
/* The requested delay is too large/small for the current ICLK. Return false which
|
||||||
|
* also results in the minimum possible delay. */
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
loop_cnt = (uint32_t)loop_cnt_64;
|
||||||
|
}
|
||||||
|
|
||||||
|
delay_wait(loop_cnt);
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
} /* End of function R_BSP_SoftwareDelay() */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_common.h
|
||||||
|
* Description : Implements functions that apply to all r_bsp boards and MCUs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 06.05.2013 1.00 First Release
|
||||||
|
* : 25.06.2013 1.10 Now contains standard includes (stdint.h, stdbool.h, etc) as well as include for
|
||||||
|
* r_typedefs.h when needed.
|
||||||
|
* : 02.07.2013 1.11 Added #include for machine.h.
|
||||||
|
* : 10.02.2014 1.12 Changed minor version to '40'.
|
||||||
|
* : 24.03.2014 1.12 Changed minor version to '60'.
|
||||||
|
* : 14.04.2014 1.12 Added typedef for fit_callback_t.
|
||||||
|
* : 30.09.2015 1.13 Changed Major/Minor version to 3.00
|
||||||
|
* : 30.09.2015 1.14 Changed Minor version to 3.01
|
||||||
|
* : 01.12.2015 1.15 Changed Minor version to 3.10
|
||||||
|
* : 01.02.2016 1.16 Changed Minor version to 3.20
|
||||||
|
* : 29.02.2016 1.17 Changed Minor version to 3.30
|
||||||
|
* : 13.04.2016 1.18 Changed Minor version to 3.31
|
||||||
|
* : 01.10.2016 1.19 Changed Minor version to 3.40
|
||||||
|
* : 04.11.2016 1.20 Changed Minor version to 3.50
|
||||||
|
* : 15.05.2017 1.21 Changed Minor version to 3.60
|
||||||
|
* : 01.11.2017 1.22 Changed Minor version to 3.70
|
||||||
|
* : 01.12.2017 1.23 Changed Minor version to 3.71
|
||||||
|
* : 01.07.2018 1.24 Changed Minor version to 3.80
|
||||||
|
* : 27.07.2018 1.25 Changed Minor version to 3.90.
|
||||||
|
* : 31.08.2018 1.26 Changed Minor version to 3.91.
|
||||||
|
* : 31.10.2018 1.27 Changed Major/Minor version to 4.00.
|
||||||
|
* : 11.01.2019 1.28 Changed Minor version to 4.01.
|
||||||
|
* : 28.02.2019 1.29 Changed Major version to 5.00.
|
||||||
|
* Added the following macro definition.
|
||||||
|
* - INTERNAL_NOT_USED(p)
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* : 29.03.2019 1.30 Changed Minor version to 5.10.
|
||||||
|
* : 08.04.2019 1.31 Changed Minor version to 5.20.
|
||||||
|
* : 23.07.2019 1.32 Changed Minor version to 5.21.
|
||||||
|
* : 26.07.2019 1.33 Changed Minor version to 5.30.
|
||||||
|
* : 31.07.2019 1.34 Changed Minor version to 5.40.
|
||||||
|
* : 08.10.2019 1.35 Changed Minor version to 5.50.
|
||||||
|
* : 10.12.2019 1.36 Changed Minor version to 5.51.
|
||||||
|
* : 14.02.2020 1.37 Changed Minor version to 5.52.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* C99 (or later) is necessary because r_rx_compiler.h uses Pragma operator and variadic macros.
|
||||||
|
* This means that r_typedefs.h is not used in any case. */
|
||||||
|
#if !defined(__cplusplus) && !defined(CPPAPP)
|
||||||
|
/* All implementation is C99 (or later) */
|
||||||
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#else
|
||||||
|
#error "This version of FIT needs C99 (or later)."
|
||||||
|
#endif
|
||||||
|
#else /* defined(__cplusplus) || defined(CPPAPP) */
|
||||||
|
/* Interface might be referred from C++ */
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif /* !defined(__cplusplus) && !defined(CPPAPP) */
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__ICCRX__)
|
||||||
|
/* Intrinsic functions provided by compiler. */
|
||||||
|
#include <machine.h>
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
/* No header file for intrinsic functions. */
|
||||||
|
#else
|
||||||
|
/* PORT: Use header file for other compiler and port r_rx_compiler.h. */
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__), defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef R_BSP_COMMON_H
|
||||||
|
#define R_BSP_COMMON_H
|
||||||
|
|
||||||
|
/* Version Number of r_bsp. */
|
||||||
|
#define R_BSP_VERSION_MAJOR (5)
|
||||||
|
#define R_BSP_VERSION_MINOR (52)
|
||||||
|
|
||||||
|
/* This macro is used to suppress compiler messages about not only a parameter but also a auto variable not being used
|
||||||
|
* in a function. The nice thing about using this implementation is that it does not take any extra RAM or ROM.
|
||||||
|
* This macro is available for the followings:
|
||||||
|
* CC-RX's 'M0520826:Parameter "XXXX" was never referenced'
|
||||||
|
* CC-RX's 'W0520550:Variable "XXXX" was set but never used'
|
||||||
|
* GNURX's 'unused parameter 'XXXX' [-Wunused-parameter]'
|
||||||
|
* GNURX's 'variable 'XXXX' set but not used [-Wunused-but-set-variable]'
|
||||||
|
* When the variable is declared as volatile, the '&' can be applied like 'R_INTERNAL_NOT_USED(&volatile_variable);'.
|
||||||
|
*/
|
||||||
|
#define INTERNAL_NOT_USED(p) ((void)(p))
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Available delay units. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BSP_DELAY_MICROSECS = 1000000, // Requested delay amount is in microseconds
|
||||||
|
BSP_DELAY_MILLISECS = 1000, // Requested delay amount is in milliseconds
|
||||||
|
BSP_DELAY_SECS = 1 // Requested delay amount is in seconds
|
||||||
|
} bsp_delay_units_t;
|
||||||
|
|
||||||
|
/* Easy to use typedef for FIT module callback functions. */
|
||||||
|
typedef void (*fit_callback_t)(void *p_args);
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
uint32_t R_BSP_GetVersion(void);
|
||||||
|
bool R_BSP_SoftwareDelay(uint32_t delay, bsp_delay_units_t units);
|
||||||
|
uint32_t R_BSP_GetIClkFreqHz(void);
|
||||||
|
|
||||||
|
/* End of multiple inclusion prevention macro */
|
||||||
|
#endif /* R_BSP_COMMON_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,672 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_cpu.c
|
||||||
|
* Description : This module implements CPU specific functions. An example is enabling/disabling interrupts.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* : 26.07.2019 3.10 Added the API function(R_BSP_SoftwareReset).
|
||||||
|
* Modified comment of API function to Doxygen style.
|
||||||
|
* Added the vbatt_voltage_stability_wait function.
|
||||||
|
* Modified the following functions.
|
||||||
|
* - R_BSP_RegisterProtectEnable
|
||||||
|
* - R_BSP_RegisterProtectDisable
|
||||||
|
* : 31.07.2019 3.11 Deleted the compile condition for R_BSP_SoftwareReset.
|
||||||
|
* : 08.10.2019 3.12 Changed the following functions.
|
||||||
|
* - R_BSP_InterruptsDisable
|
||||||
|
* - R_BSP_InterruptsEnable
|
||||||
|
* - R_BSP_CpuInterruptLevelWrite
|
||||||
|
* : 10.12.2019 3.13 Modified the following functions.
|
||||||
|
* - R_BSP_RegisterProtectEnable
|
||||||
|
* - R_BSP_RegisterProtectDisable
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Platform support. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
/* Key code for writing PRCR register. */
|
||||||
|
#define BSP_PRV_PRCR_KEY (0xA500)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_VOLTAGE_LEVEL_SETTING
|
||||||
|
/* The macro definition for combinations where settings of USBVON bit conflict. */
|
||||||
|
#define BSP_PRV_USBVON_CONFLICT (BSP_VOL_USB_POWEROFF | BSP_VOL_USB_POWERON)
|
||||||
|
/* The macro definition for combinations where settings of PGAVLS bit conflict. */
|
||||||
|
#define BSP_PRV_PGAVLS_CONFLICT (BSP_VOL_AD_NEGATIVE_VOLTAGE_INPUT | BSP_VOL_AD_NEGATIVE_VOLTAGE_NOINPUT)
|
||||||
|
/* The macro definition for combinations where settings of RICVLS bit conflict. */
|
||||||
|
#define BSP_PRV_RICVLS_CONFLICT (BSP_VOL_RIIC_4_5V_OROVER | BSP_VOL_RIIC_UNDER_4_5V)
|
||||||
|
/* Bit number of VOLSR register. */
|
||||||
|
#define BSP_PRV_VOLSR_RICVLS_BIT_NUM (7)
|
||||||
|
#define BSP_PRV_VOLSR_PGAVLS_BIT_NUM (6)
|
||||||
|
#define BSP_PRV_VOLSR_USBVON_BIT_NUM (2)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
/* Used for holding reference counters for protection bits. */
|
||||||
|
static volatile uint16_t s_protect_counters[BSP_REG_PROTECT_TOTAL_ITEMS];
|
||||||
|
|
||||||
|
/* Masks for setting or clearing the PRCR register. Use -1 for size because PWPR in MPC is used differently. */
|
||||||
|
static const uint16_t s_prcr_masks[BSP_REG_PROTECT_TOTAL_ITEMS-1] =
|
||||||
|
{
|
||||||
|
#ifdef BSP_MCU_RCPC_PRC0
|
||||||
|
0x0001, /* PRC0. */
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_RCPC_PRC1
|
||||||
|
0x0002, /* PRC1. */
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_RCPC_PRC2
|
||||||
|
0x0004, /* PRC2. */
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_RCPC_PRC3
|
||||||
|
0x0008, /* PRC3. */
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_InterruptsDisable
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Globally disables interrupts.
|
||||||
|
* @details This function globally disables interrupts. This is performed by clearing the 'I' bit in the CPU's
|
||||||
|
* Processor Status Word (PSW) register.
|
||||||
|
* @note The 'I' bit of the PSW can only be modified when in Supervisor Mode. If the CPU is in User Mode and this
|
||||||
|
* function is called, this function does nothing.
|
||||||
|
*/
|
||||||
|
void R_BSP_InterruptsDisable (void)
|
||||||
|
{
|
||||||
|
uint32_t pmode;
|
||||||
|
|
||||||
|
/* Read current processor mode. */
|
||||||
|
pmode = (R_BSP_GET_PSW() & 0x00100000);
|
||||||
|
|
||||||
|
/* Check current processor mode. */
|
||||||
|
if (0 == pmode)
|
||||||
|
{
|
||||||
|
/* Use the compiler intrinsic function to clear the I flag. */
|
||||||
|
R_BSP_CLRPSW_I();
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* End of function R_BSP_InterruptsDisable() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_InterruptsEnable
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Globally enable interrupts.
|
||||||
|
* @details This function globally enables interrupts. This is performed by setting the 'I' bit in the CPU's Processor
|
||||||
|
* Status Word (PSW) register.
|
||||||
|
* @note The 'I' bit of the PSW can only be modified when in Supervisor Mode. If the CPU is in User Mode and this
|
||||||
|
* function is called, this function does nothing.
|
||||||
|
*/
|
||||||
|
void R_BSP_InterruptsEnable (void)
|
||||||
|
{
|
||||||
|
uint32_t pmode;
|
||||||
|
|
||||||
|
/* Read current processor mode. */
|
||||||
|
pmode = (R_BSP_GET_PSW() & 0x00100000);
|
||||||
|
|
||||||
|
/* Check current processor mode. */
|
||||||
|
if (0 == pmode)
|
||||||
|
{
|
||||||
|
/* Use the compiler intrinsic function to set the I flag. */
|
||||||
|
R_BSP_SETPSW_I();
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* End of function R_BSP_InterruptsEnable() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_CpuInterruptLevelRead
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Reads the CPU's Interrupt Priority Level.
|
||||||
|
* @return The CPU's Interrupt Priority Level.
|
||||||
|
* @details This function reads the CPU's Interrupt Priority Level. This level is stored in the IPL bits of the
|
||||||
|
* Processor Status Word (PSW) register.
|
||||||
|
*/
|
||||||
|
uint32_t R_BSP_CpuInterruptLevelRead (void)
|
||||||
|
{
|
||||||
|
/* Use the compiler intrinsic function to read the CPU IPL. */
|
||||||
|
uint32_t psw_value;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
psw_value = (uint32_t)R_BSP_GET_PSW();
|
||||||
|
psw_value = psw_value & 0x0f000000;
|
||||||
|
psw_value = psw_value >> 24;
|
||||||
|
|
||||||
|
return psw_value;
|
||||||
|
} /* End of function R_BSP_CpuInterruptLevelRead() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_CpuInterruptLevelWrite
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Writes the CPU's Interrupt Priority Level.
|
||||||
|
* @param[in] level The level to write to the CPU's IPL.
|
||||||
|
* @retval true Successful, CPU's IPL has been written.
|
||||||
|
* @retval false Failure, provided 'level' has invalid IPL value or called when the CPU is in User Mode.
|
||||||
|
* @details This function writes the CPU's Interrupt Priority Level. This level is stored in the IPL bits of the
|
||||||
|
* Processor Status Word (PSW) register. This function does check to make sure that the IPL being written is valid.
|
||||||
|
* The maximum and minimum valid settings for the CPU IPL are defined in mcu_info.h using the BSP_MCU_IPL_MAX and
|
||||||
|
* BSP_MCU_IPL_MIN macros.
|
||||||
|
* @note The CPU's IPL can only be modified by the user when in Supervisor Mode. If the CPU is in User Mode and this
|
||||||
|
* function is called, this function does not control IPL and return false.
|
||||||
|
*/
|
||||||
|
bool R_BSP_CpuInterruptLevelWrite (uint32_t level)
|
||||||
|
{
|
||||||
|
bool ret;
|
||||||
|
uint32_t pmode;
|
||||||
|
|
||||||
|
/* The R_BSP_SET_IPL() function use the MVTIPL instruction.
|
||||||
|
The MVTIPL instruction needs to set an immediate value to src. */
|
||||||
|
|
||||||
|
ret = false;
|
||||||
|
|
||||||
|
/* Read current processor mode. */
|
||||||
|
pmode = (R_BSP_GET_PSW() & 0x00100000);
|
||||||
|
|
||||||
|
/* Check current processor mode. */
|
||||||
|
if (0 == pmode)
|
||||||
|
{
|
||||||
|
ret = true;
|
||||||
|
|
||||||
|
/* Use the compiler intrinsic function to set the CPU IPL. */
|
||||||
|
switch (level)
|
||||||
|
{
|
||||||
|
case (0):
|
||||||
|
|
||||||
|
/* IPL = 0 */
|
||||||
|
R_BSP_SET_IPL(0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (1):
|
||||||
|
|
||||||
|
/* IPL = 1 */
|
||||||
|
R_BSP_SET_IPL(1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (2):
|
||||||
|
|
||||||
|
/* IPL = 2 */
|
||||||
|
R_BSP_SET_IPL(2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (3):
|
||||||
|
|
||||||
|
/* IPL = 3 */
|
||||||
|
R_BSP_SET_IPL(3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (4):
|
||||||
|
|
||||||
|
/* IPL = 4 */
|
||||||
|
R_BSP_SET_IPL(4);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (5):
|
||||||
|
|
||||||
|
/* IPL = 5 */
|
||||||
|
R_BSP_SET_IPL(5);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (6):
|
||||||
|
|
||||||
|
/* IPL = 6 */
|
||||||
|
R_BSP_SET_IPL(6);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (7):
|
||||||
|
|
||||||
|
/* IPL = 7 */
|
||||||
|
R_BSP_SET_IPL(7);
|
||||||
|
break;
|
||||||
|
|
||||||
|
#if 7 < BSP_MCU_IPL_MAX
|
||||||
|
case (8):
|
||||||
|
|
||||||
|
/* IPL = 8 */
|
||||||
|
R_BSP_SET_IPL(8);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (9):
|
||||||
|
|
||||||
|
/* IPL = 9 */
|
||||||
|
R_BSP_SET_IPL(9);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (10):
|
||||||
|
|
||||||
|
/* IPL = 10 */
|
||||||
|
R_BSP_SET_IPL(10);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (11):
|
||||||
|
|
||||||
|
/* IPL = 11 */
|
||||||
|
R_BSP_SET_IPL(11);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (12):
|
||||||
|
|
||||||
|
/* IPL = 12 */
|
||||||
|
R_BSP_SET_IPL(12);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (13):
|
||||||
|
|
||||||
|
/* IPL = 13 */
|
||||||
|
R_BSP_SET_IPL(13);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (14):
|
||||||
|
|
||||||
|
/* IPL = 14 */
|
||||||
|
R_BSP_SET_IPL(14);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (15):
|
||||||
|
|
||||||
|
/* IPL = 15 */
|
||||||
|
R_BSP_SET_IPL(15);
|
||||||
|
break;
|
||||||
|
#endif /* BSP_MCU_IPL_MAX */
|
||||||
|
|
||||||
|
default:
|
||||||
|
ret = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_CpuInterruptLevelWrite() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RegisterProtectEnable
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Enables write protection for selected registers.
|
||||||
|
* @param[in] regs_to_protect Which registers to enable write protection for.
|
||||||
|
* @details This function enables write protection for the input registers. Only certain MCU registers have the
|
||||||
|
* ability to be write protected. To see which registers are available to be protected by this function look at the
|
||||||
|
* bsp_reg_protect_t enum in r_bsp_cpu.h for your MCU.
|
||||||
|
* This function, and R_BSP_RegisterProtectDisable(), use counters for each entry in the bsp_reg_protect_t enum so
|
||||||
|
* that users can call these functions multiple times without problem. This function uses the interrupt disable /
|
||||||
|
* enable function by controlling the Processor Interrupt Priority Level (IPL) of the R_BSP_InterruptControl function,
|
||||||
|
* because counter control is the critical section. If the function is executed while the processor mode is supervisor
|
||||||
|
* mode, interrupts that are at or below the specified interrupt priority level will be disabled by controlling the
|
||||||
|
* IPL. If the function is executed while the processor mode is user mode, the IPL controlling does not execute. An
|
||||||
|
* example of why this is needed is shown below in the Special Notes section below.
|
||||||
|
* @note
|
||||||
|
* (1) About why counters are needed. \n
|
||||||
|
* See Section 5.7 in the application note for details.\n
|
||||||
|
* (2) Notes on user mode \n
|
||||||
|
* The R_BSP_InterruptControl function used to secure atomicity in the critical section of the counter control with
|
||||||
|
* this function is valid only in supervisor mode. When this function is executed in user mode, the
|
||||||
|
* R_BSP_InterruptControl function is executed but atomicity is not to secure.
|
||||||
|
*/
|
||||||
|
void R_BSP_RegisterProtectEnable (bsp_reg_protect_t regs_to_protect)
|
||||||
|
{
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
bsp_int_ctrl_t int_ctrl;
|
||||||
|
|
||||||
|
/* Set IPL to the maximum value to disable all interrupts,
|
||||||
|
* so the scheduler can not be scheduled in critical region.
|
||||||
|
* Note: Please set this macro more than IPR for other FIT module interrupts. */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_EMPTY, BSP_INT_CMD_FIT_INTERRUPT_DISABLE, &int_ctrl);
|
||||||
|
|
||||||
|
/* Is it safe to disable write access? */
|
||||||
|
if (0 != s_protect_counters[regs_to_protect])
|
||||||
|
{
|
||||||
|
/* Decrement the protect counter */
|
||||||
|
s_protect_counters[regs_to_protect]--;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Is it safe to disable write access? */
|
||||||
|
if (0 == s_protect_counters[regs_to_protect])
|
||||||
|
{
|
||||||
|
if (BSP_REG_PROTECT_MPC != regs_to_protect)
|
||||||
|
{
|
||||||
|
/* Enable protection using PRCR register. */
|
||||||
|
/* When writing to the PRCR register the upper 8-bits must be the correct key. Set lower bits to 0 to
|
||||||
|
disable writes.
|
||||||
|
b15:b8 PRKEY - Write 0xA5 to upper byte to enable writing to lower byte
|
||||||
|
b7:b4 Reserved (set to 0)
|
||||||
|
b3 PRC3 - Please check the user's manual.
|
||||||
|
b2 PRC2 - Please check the user's manual.
|
||||||
|
b1 PRC1 - Please check the user's manual.
|
||||||
|
b0 PRC0 - Please check the user's manual.
|
||||||
|
*/
|
||||||
|
SYSTEM.PRCR.WORD = (uint16_t)((SYSTEM.PRCR.WORD | BSP_PRV_PRCR_KEY) & (~s_prcr_masks[regs_to_protect]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Enable protection for MPC using PWPR register. */
|
||||||
|
/* Enable writing of PFSWE bit. It could be assumed that the B0WI bit is still cleared from a call to
|
||||||
|
protection disable function, but it is written here to make sure that the PFSWE bit always gets
|
||||||
|
cleared. */
|
||||||
|
MPC.PWPR.BIT.B0WI = 0;
|
||||||
|
|
||||||
|
/* Disable writing to PFS registers. */
|
||||||
|
MPC.PWPR.BIT.PFSWE = 0;
|
||||||
|
|
||||||
|
/* Disable writing of PFSWE bit. */
|
||||||
|
MPC.PWPR.BIT.B0WI = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore the IPL. */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_EMPTY, BSP_INT_CMD_FIT_INTERRUPT_ENABLE, &int_ctrl);
|
||||||
|
|
||||||
|
#else /* BSP_MCU_REGISTER_WRITE_PROTECTION */
|
||||||
|
/* No registers to protect. */
|
||||||
|
/* This code is only used to remove compiler info messages about this parameter not being used. */
|
||||||
|
INTERNAL_NOT_USED(regs_to_protect);
|
||||||
|
#endif /* BSP_MCU_REGISTER_WRITE_PROTECTION */
|
||||||
|
} /* End of function R_BSP_RegisterProtectEnable() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RegisterProtectDisable
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Disables write protection for selected registers.
|
||||||
|
* @param[in] regs_to_unprotect Which registers to disable write protection for.
|
||||||
|
* @details This function disables write protection for the input registers. Only certain MCU registers have the
|
||||||
|
* ability to be write protected. To see which registers are available to be protected by this function look at the
|
||||||
|
* bsp_reg_protect_t enum in r_bsp_cpu.h for your MCU.
|
||||||
|
* This function, and R_BSP_RegisterProtectEnable(), use counters for each entry in the bsp_reg_protect_t enum so that
|
||||||
|
* users can call these functions multiple times without problem. This function uses the interrupt disable /
|
||||||
|
* enable function by controlling the Processor Interrupt Priority Level (IPL) of the R_BSP_InterruptControl function,
|
||||||
|
* because counter control is the critical section. If the function is executed while the processor mode is supervisor
|
||||||
|
* mode, interrupts that are at or below the specified interrupt priority level will be disabled by controlling the
|
||||||
|
* IPL. If the function is executed while the processor mode is user mode, the IPL controlling does not execute.
|
||||||
|
* @note The R_BSP_InterruptControl function used to secure atomicity in the critical section of the counter control
|
||||||
|
* with this function is valid only in supervisor mode. When this function is executed in user mode, the
|
||||||
|
* R_BSP_InterruptControl function is executed but atomicity is not to secure.
|
||||||
|
*/
|
||||||
|
void R_BSP_RegisterProtectDisable (bsp_reg_protect_t regs_to_unprotect)
|
||||||
|
{
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
bsp_int_ctrl_t int_ctrl;
|
||||||
|
|
||||||
|
/* Set IPL to the maximum value to disable all interrupts,
|
||||||
|
* so the scheduler can not be scheduled in critical region.
|
||||||
|
* Note: Please set this macro more than IPR for other FIT module interrupts. */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_EMPTY, BSP_INT_CMD_FIT_INTERRUPT_DISABLE, &int_ctrl);
|
||||||
|
|
||||||
|
/* If this is first entry then disable protection. */
|
||||||
|
if (0 == s_protect_counters[regs_to_unprotect])
|
||||||
|
{
|
||||||
|
if (BSP_REG_PROTECT_MPC != regs_to_unprotect)
|
||||||
|
{
|
||||||
|
/* Enable protection using PRCR register. */
|
||||||
|
/* When writing to the PRCR register the upper 8-bits must be the correct key.
|
||||||
|
Set lower bits to 1 to enable writes.
|
||||||
|
b15:b8 PRKEY - Write 0xA5 to upper byte to enable writing to lower byte
|
||||||
|
b7:b4 Reserved (set to 0)
|
||||||
|
b3 PRC3 - Please check the user's manual.
|
||||||
|
b2 PRC2 - Please check the user's manual.
|
||||||
|
b1 PRC1 - Please check the user's manual.
|
||||||
|
b0 PRC0 - Please check the user's manual.
|
||||||
|
*/
|
||||||
|
SYSTEM.PRCR.WORD = (uint16_t)((SYSTEM.PRCR.WORD | BSP_PRV_PRCR_KEY) | s_prcr_masks[regs_to_unprotect]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Disable protection for MPC using PWPR register. */
|
||||||
|
/* Enable writing of PFSWE bit. */
|
||||||
|
MPC.PWPR.BIT.B0WI = 0;
|
||||||
|
|
||||||
|
/* Enable writing to PFS registers. */
|
||||||
|
MPC.PWPR.BIT.PFSWE = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Increment the protect counter */
|
||||||
|
s_protect_counters[regs_to_unprotect]++;
|
||||||
|
|
||||||
|
/* Restore the IPL. */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_EMPTY, BSP_INT_CMD_FIT_INTERRUPT_ENABLE, &int_ctrl);
|
||||||
|
|
||||||
|
#else /* BSP_MCU_REGISTER_WRITE_PROTECTION */
|
||||||
|
/* No registers to protect. */
|
||||||
|
/* This code is only used to remove compiler info messages about this parameter not being used. */
|
||||||
|
INTERNAL_NOT_USED(regs_to_unprotect);
|
||||||
|
#endif /* BSP_MCU_REGISTER_WRITE_PROTECTION */
|
||||||
|
} /* End of function R_BSP_RegisterProtectDisable() */
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_VOLTAGE_LEVEL_SETTING
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_VoltageLevelSetting
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief This API function is used excessively with the RX66T and RX72T. It makes settings to the voltage level
|
||||||
|
* setting register (VOLSR) that are necessary in order to use the USB, AD, and RIIC peripheral modules. Call this
|
||||||
|
* function only when it is necessary to change the register settings.
|
||||||
|
* @param[in] ctrl_ptn Register Setting Patterns
|
||||||
|
* The following setting patterns cannot be selected at the same time.
|
||||||
|
* When specifying more than one pattern at the same time, use the "|" (OR) operator.
|
||||||
|
* - BSP_VOL_USB_POWEROFF and BSP_VOL_USB_POWERON
|
||||||
|
* - BSP_VOL_AD_NEGATIVE_VOLTAGE_INPUT and BSP_VOL_AD_NEGATIVE_VOLTAGE_NOINPUT
|
||||||
|
* - BSP_VOL_RIIC_4_5V_OROVER and BSP_VOL_RIIC_UNDER_4_5V
|
||||||
|
*
|
||||||
|
* BSP_VOL_USB_POWEROFF: Updates the USBVON bit to 0.
|
||||||
|
*
|
||||||
|
* BSP_VOL_USB_POWERON: Updates the USBVON bit to 1.
|
||||||
|
*
|
||||||
|
* BSP_VOL_AD_NEGATIVE_VOLTAGE_INPUT: Updates the PGAVLS bit to 0.
|
||||||
|
*
|
||||||
|
* BSP_VOL_AD_NEGATIVE_VOLTAGE_NOINPUT: Updates the PGAVLS bit to 1.
|
||||||
|
*
|
||||||
|
* BSP_VOL_RIIC_4_5V_OROVER: Updates the RICVLS bit to 0.
|
||||||
|
*
|
||||||
|
* BSP_VOL_RIIC_UNDER_4_5V: Updates the RICVLS bit to 1.
|
||||||
|
* @retval true Processing completed, register successfully updated.
|
||||||
|
* @retval false The function was called under the following conditions, so the register setting was not updated.
|
||||||
|
* - Setting patterns that cannot be selected at the same time were selected.
|
||||||
|
* - A setting pattern related to the USB was selected when the USB was not in the module stop state.
|
||||||
|
* - A setting pattern related to the AD was selected when the AD was not in the module stop state.
|
||||||
|
* - A setting pattern related to the RIIC was selected when the RIIC was not in the module stop state.
|
||||||
|
* @details This function initializes the voltage level setting register (VOLSR), which is necessary in order to use
|
||||||
|
* the USB, AD and RIIC peripheral modules. When specifying a setting pattern related to the USB, call this function
|
||||||
|
* before the USB is released from the module stop state. When specifying a setting pattern related to the AD, call
|
||||||
|
* this function before the AD (unit 0 and unit 1) is released from the module stop state. When specifying a setting
|
||||||
|
* pattern related to the RIIC, call this function before the RIIC is released from the module stop state. If the
|
||||||
|
* function is called with a setting pattern related to the USB specified after the USB is released from the module
|
||||||
|
* stop state, the function returns "false" as the return value and does not update the register settings. If the
|
||||||
|
* function is called with a setting pattern related to the AD specified after the AD (unit 0 and unit 1) is released
|
||||||
|
* from the module stop state, the function returns "false" as the return value and does not update the register
|
||||||
|
* settings. Finally, if the function is called with a setting pattern related to the RIIC specified after the RIIC is
|
||||||
|
* released from the module stop state, the function returns "false" as the return value and does not update the
|
||||||
|
* register settings.
|
||||||
|
*/
|
||||||
|
bool R_BSP_VoltageLevelSetting (uint8_t ctrl_ptn)
|
||||||
|
{
|
||||||
|
uint8_t *p_volsr_addr;
|
||||||
|
|
||||||
|
#if BSP_CFG_PARAM_CHECKING_ENABLE == 1
|
||||||
|
/* ---- CHECK ARGUMENTS ---- */
|
||||||
|
if (BSP_PRV_USBVON_CONFLICT == (ctrl_ptn & BSP_PRV_USBVON_CONFLICT))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BSP_PRV_PGAVLS_CONFLICT == (ctrl_ptn & BSP_PRV_PGAVLS_CONFLICT))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BSP_PRV_RICVLS_CONFLICT == (ctrl_ptn & BSP_PRV_RICVLS_CONFLICT))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Check USB module stop state. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_PRV_USBVON_CONFLICT))
|
||||||
|
{
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
if(0 == MSTP(USB0))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check AD module stop state. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_PRV_PGAVLS_CONFLICT))
|
||||||
|
{
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
if((0 == MSTP(S12AD)) || (0 == MSTP(S12AD1)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check RIIC module stop state. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_PRV_RICVLS_CONFLICT))
|
||||||
|
{
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
if(0 == MSTP(RIIC0))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Protect off. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA502;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
p_volsr_addr = (uint8_t *)&SYSTEM.VOLSR.BYTE;
|
||||||
|
|
||||||
|
/* Updated the RICVLS bit. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_RIIC_UNDER_4_5V))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_SET(p_volsr_addr, BSP_PRV_VOLSR_RICVLS_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_RIIC_4_5V_OROVER))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_CLEAR(p_volsr_addr, BSP_PRV_VOLSR_RICVLS_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Updated the PGAVLS bit. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_AD_NEGATIVE_VOLTAGE_NOINPUT))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_SET(p_volsr_addr, BSP_PRV_VOLSR_PGAVLS_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_AD_NEGATIVE_VOLTAGE_INPUT))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_CLEAR(p_volsr_addr, BSP_PRV_VOLSR_PGAVLS_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Updated the USBVON bit. */
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_USB_POWERON))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_SET(p_volsr_addr, BSP_PRV_VOLSR_USBVON_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(0 != (ctrl_ptn & BSP_VOL_USB_POWEROFF))
|
||||||
|
{
|
||||||
|
R_BSP_BIT_CLEAR(p_volsr_addr, BSP_PRV_VOLSR_USBVON_BIT_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Protect on. */
|
||||||
|
SYSTEM.PRCR.WORD = 0xA500;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} /* End of function R_BSP_VoltageLevelSetting() */
|
||||||
|
#endif /* BSP_MCU_VOLTAGE_LEVEL_SETTING */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SoftwareReset
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @details Reset the MCU by Software Reset.
|
||||||
|
*/
|
||||||
|
void R_BSP_SoftwareReset(void)
|
||||||
|
{
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
/* Protect off. */
|
||||||
|
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_CGC_SWR);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Resets the MCU. */
|
||||||
|
SYSTEM.SWRR = 0xA501;
|
||||||
|
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
R_BSP_NOP();
|
||||||
|
}
|
||||||
|
} /* End of function R_BSP_SoftwareReset() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_register_protect_open
|
||||||
|
* Description : Initializes variables needed for register protection functionality.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void bsp_register_protect_open (void)
|
||||||
|
{
|
||||||
|
#ifdef BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
uint32_t i;
|
||||||
|
|
||||||
|
/* Initialize reference counters to 0. */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for (i = 0; i < BSP_REG_PROTECT_TOTAL_ITEMS; i++)
|
||||||
|
{
|
||||||
|
s_protect_counters[i] = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* No registers to protect. */
|
||||||
|
#endif
|
||||||
|
} /* End of function bsp_register_protect_open() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_ram_initialize
|
||||||
|
* Description : Initialize ram variable.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void bsp_ram_initialize (void)
|
||||||
|
{
|
||||||
|
uint32_t i;
|
||||||
|
|
||||||
|
/* Initialize g_bsp_Locks to 0. */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for (i = 0; i < BSP_NUM_LOCKS; i++)
|
||||||
|
{
|
||||||
|
g_bsp_Locks[i].lock = 0;
|
||||||
|
}
|
||||||
|
} /* End of function bsp_ram_initialize() */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,83 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_interrupts.h
|
||||||
|
* Description : This module allows for callbacks to be registered for certain interrupts.
|
||||||
|
* And handle exception interrupts.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef INTERRUPTS_H
|
||||||
|
#define INTERRUPTS_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_BSP_InterruptRequestEnable(uint32_t vector);
|
||||||
|
void R_BSP_InterruptRequestDisable(uint32_t vector);
|
||||||
|
bsp_int_err_t R_BSP_InterruptWrite(bsp_int_src_t vector, bsp_int_cb_t callback);
|
||||||
|
bsp_int_err_t R_BSP_InterruptRead(bsp_int_src_t vector, bsp_int_cb_t * callback);
|
||||||
|
bsp_int_err_t R_BSP_InterruptControl(bsp_int_src_t vector, bsp_int_cmd_t cmd, void * pdata);
|
||||||
|
|
||||||
|
void bsp_interrupt_open(void); //r_bsp internal function. DO NOT CALL.
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_EXCEP_SUPERVISOR_INST_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_FUNCTION(excep_supervisor_inst_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_EXCEP_ACCESS_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_FUNCTION(excep_access_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_EXCEP_UNDEFINED_INST_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_FUNCTION(excep_undefined_inst_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_EXCEP_FLOATING_POINT_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_FUNCTION(excep_floating_point_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_NON_MASKABLE_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_FUNCTION(non_maskable_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_UNDEFINED_INTERRUPT_SOURCE_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT_DEFAULT(undefined_interrupt_source_isr)
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_BUS_ERROR_ISR
|
||||||
|
R_BSP_PRAGMA_INTERRUPT(bus_error_isr, VECT(BSC,BUSERR))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_locking.c
|
||||||
|
* Description : This implements a locking mechanism that can be used by all code. The locking is done atomically so
|
||||||
|
* common resources can be accessed safely.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 2.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* : 26.07.2019 2.01 Modified comment of API function to Doxygen style.
|
||||||
|
* : 10.12.2019 2.02 Modified comment.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Platform configuration. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SoftwareLock
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Attempts to reserve a lock.
|
||||||
|
* @param[out] plock Pointer to lock structure with lock to try and acquire.
|
||||||
|
* @retval true Successful, lock was available and acquired.
|
||||||
|
* @retval false Failure, lock was already acquired and is not available.
|
||||||
|
* @details This function implements an atomic locking mechanism. Locks can be used in numerous ways. Two common uses
|
||||||
|
* of locks are to protect critical sections of code and to protect against duplicate resource allocation.
|
||||||
|
* For protecting critical sections of code the user would require that the code first obtain the critical section's
|
||||||
|
* lock before executing. An example of protecting against duplicate resource allocation would be if the user had two
|
||||||
|
* FIT modules that used the same peripheral. For example, the user may have one FIT module that uses the SCI
|
||||||
|
* peripheral in UART mode and another FIT module that uses the SCI peripheral in I2C mode. To make sure that both
|
||||||
|
* modules cannot use the same SCI channel, locks can be used.
|
||||||
|
* Care should be taken when using locks as they do not provide advanced features one might expect from an RTOS
|
||||||
|
* semaphore or mutex. If used improperly locks can lead to deadlock in the user's system.
|
||||||
|
* Users can override the default locking mechanisms.
|
||||||
|
*/
|
||||||
|
bool R_BSP_SoftwareLock (BSP_CFG_USER_LOCKING_TYPE * const plock)
|
||||||
|
{
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED == 0
|
||||||
|
bool ret = false;
|
||||||
|
|
||||||
|
/* Variable used in trying to acquire lock. Using the xchg instruction makes this atomic */
|
||||||
|
int32_t is_locked = true;
|
||||||
|
|
||||||
|
/* This example uses the RX MCU's atomic xchg() instruction. plock->lock is the lock we are trying to reserve.
|
||||||
|
The way this works is that 'is_locked' gets the value of the plock->lock and plock->lock gets the value of
|
||||||
|
'is_locked' which we just set to 'true'. Basically this is an atomic 'swap' command. If the lock had not yet been
|
||||||
|
reserved then its value would be 'false' and after the xchg() instruction finished 'is_locked' would have
|
||||||
|
'false'. If it had already been reserved then 'is_locked' would have 'true' after the xchg() instruction. Since
|
||||||
|
plock->lock was already 'true' and we just set it back to 'true' everything is ok. To see if we reserved the lock
|
||||||
|
we just need to check the value of 'is_locked' after this instruction finishes. */
|
||||||
|
|
||||||
|
/* Try to acquire semaphore to obtain lock */
|
||||||
|
R_BSP_EXCHANGE(&is_locked, &plock->lock);
|
||||||
|
|
||||||
|
/* Check to see if semaphore was successfully taken */
|
||||||
|
if (false == is_locked)
|
||||||
|
{
|
||||||
|
/* Lock obtained, return success. */
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Lock was not obtained, another task already has it. */
|
||||||
|
R_BSP_NOP();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
#else
|
||||||
|
/* User is going to handle the locking themselves. */
|
||||||
|
return BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION(plock);
|
||||||
|
#endif
|
||||||
|
} /* End of function R_BSP_SoftwareLock() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SoftwareUnlock
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Releases a lock.
|
||||||
|
* @param[out] plock Pointer to lock structure with lock to release.
|
||||||
|
* @retval true Successful, lock was released. Or the lock has been already released.
|
||||||
|
* @retval false Failure, lock could not be released.
|
||||||
|
* @details This function releases a lock that was previously acquired using the R_BSP_SoftwareLock() function.
|
||||||
|
*/
|
||||||
|
bool R_BSP_SoftwareUnlock (BSP_CFG_USER_LOCKING_TYPE * const plock)
|
||||||
|
{
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED == 0
|
||||||
|
/* Set lock back to unlocked. */
|
||||||
|
plock->lock = false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
/* User is going to handle the locking themselves. */
|
||||||
|
return BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION(plock);
|
||||||
|
#endif
|
||||||
|
} /* End of function R_BSP_SoftwareUnlock() */
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_HardwareLock
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Attempts to reserve a hardware peripheral lock.
|
||||||
|
* @param[in] hw_index Index of lock to acquire from the hardware lock array.
|
||||||
|
* @retval true Successful, lock was available and acquired.
|
||||||
|
* @retval false Failure, lock was already acquired and is not available.
|
||||||
|
* @details This function attempts to acquire the lock for a hardware resource of the MCU. Instead of sending in a
|
||||||
|
* pointer to a lock as with the R_BSP_SoftwareLock() function, the user sends in an index to an array that holds 1
|
||||||
|
* lock per MCU hardware resource. This array is shared amongst all FIT modules and user code therefore allowing
|
||||||
|
* multiple FIT modules (and user code) to use the same locks. The user can see the available hardware resources by
|
||||||
|
* looking at the mcu_lock_t enum in mcu_locks.h. These enum values are also the index into the hardware lock array.
|
||||||
|
* The same atomic locking mechanisms from the R_BSP_SoftwareLock() function are used with this function as well.
|
||||||
|
* @note Each entry in the mcu_lock_t enum in mcu_locks.h will be allocated a lock. On RX MCUs, each lock is required
|
||||||
|
* to be 4-bytes. If RAM space is an issue then the user can remove the entries from the mcu_lock_t enum they are not
|
||||||
|
* using. For example, if the user is not using the CRC peripheral then they could delete the BSP_LOCK_CRC entry. The
|
||||||
|
* user will save 4-bytes per deleted entry.
|
||||||
|
*/
|
||||||
|
bool R_BSP_HardwareLock (mcu_lock_t const hw_index)
|
||||||
|
{
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED == 0
|
||||||
|
/* Pass actual lock to software lock function. */
|
||||||
|
return R_BSP_SoftwareLock(&g_bsp_Locks[hw_index]);
|
||||||
|
#else
|
||||||
|
/* User is going to handle the locking themselves. */
|
||||||
|
return BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION(hw_index);
|
||||||
|
#endif
|
||||||
|
} /* End of function R_BSP_HardwareLock() */
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_HardwareUnlock
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Releases a hardware peripheral lock.
|
||||||
|
* @param[in] hw_index Index of lock to release from the hardware lock array.
|
||||||
|
* @retval true Successful, lock was released.
|
||||||
|
* @retval false Failure, lock could not be released.
|
||||||
|
* @details This function attempts to release the lock for a hardware resource of the MCU that was previously acquired
|
||||||
|
* using the R_BSP_HardwareLock() function.
|
||||||
|
* @note Each entry in the mcu_lock_t enum in mcu_locks.h will be allocated a lock. On RX MCUs, each lock is required
|
||||||
|
* to be 4-bytes. If RAM space is an issue then the user can remove the entries from the mcu_lock_t enum that they are
|
||||||
|
* not using. For example, if the user is not using the CRC peripheral then they could delete the BSP_LOCK_CRC entry.
|
||||||
|
* The user will save 4-bytes per deleted entry.
|
||||||
|
*/
|
||||||
|
bool R_BSP_HardwareUnlock (mcu_lock_t const hw_index)
|
||||||
|
{
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED == 0
|
||||||
|
/* Pass actual lock to software unlock function. */
|
||||||
|
return R_BSP_SoftwareUnlock(&g_bsp_Locks[hw_index]);
|
||||||
|
#else
|
||||||
|
/* User is going to handle the locking themselves. */
|
||||||
|
return BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION(hw_index);
|
||||||
|
#endif
|
||||||
|
} /* End of function R_BSP_HardwareUnlock() */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_mcu_startup.c
|
||||||
|
* Description : This module implements user startup specific functions.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 2.00 Merged processing of all devices.
|
||||||
|
* Fixed coding style.
|
||||||
|
* : 26.07.2019 2.01 Modified comment of API function to Doxygen style.
|
||||||
|
* Added Initialization the trigonometric function unit in R_BSP_StartupOpen function.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Platform support. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE != 0
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Error checking
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_StartupOpen
|
||||||
|
******************************************************************************************************************//**
|
||||||
|
* @brief Specifies settings to use the BSP and peripheral FIT modules. Call this function only when the BSP startup
|
||||||
|
* is disabled.
|
||||||
|
* @details This function performs initialization for the interrupt callback, register protection, and the hardware
|
||||||
|
* and pins. These processing are needed for using the BSP and peripheral FIT modules. Thus, this function must be
|
||||||
|
* called in the beginning of the main function. Call this function only when the BSP startup is disabled.
|
||||||
|
* @note The R_BSP_StartupOpen function performs a part of processing in the startup function.
|
||||||
|
* See Section 5.18 in the application note for more information.
|
||||||
|
*/
|
||||||
|
void R_BSP_StartupOpen (void)
|
||||||
|
{
|
||||||
|
/* Initializes the trigonometric function unit. */
|
||||||
|
#ifdef BSP_MCU_TRIGONOMETRIC
|
||||||
|
#ifdef __TFU
|
||||||
|
R_BSP_INIT_TFU();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
/* Initialize RAM. */
|
||||||
|
bsp_ram_initialize();
|
||||||
|
|
||||||
|
/* Initialize MCU interrupt callbacks. */
|
||||||
|
bsp_interrupt_open();
|
||||||
|
|
||||||
|
/* Initialize register protection functionality. */
|
||||||
|
bsp_register_protect_open();
|
||||||
|
|
||||||
|
/* Configure the MCU and board hardware */
|
||||||
|
hardware_setup();
|
||||||
|
} /* End of function R_BSP_StartupOpen() */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE != 0 */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_mcu_startup.h
|
||||||
|
* Description : This module implements user startup specific functions.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 2.00 Merged processing of all devices.
|
||||||
|
* Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_STARTUP_H
|
||||||
|
#define MCU_STARTUP_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_BSP_StartupOpen(void);
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,138 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_software_interrupt.h
|
||||||
|
* Description : This module implements software interrupt specific functions.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef SOFTWARE_INTERRUPT_H
|
||||||
|
#define SOFTWARE_INTERRUPT_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if (defined(BSP_CFG_SWINT_UNIT1_ENABLE) && (BSP_CFG_SWINT_UNIT1_ENABLE == 1)) || \
|
||||||
|
(defined(BSP_CFG_SWINT_UNIT2_ENABLE) && (BSP_CFG_SWINT_UNIT2_ENABLE == 1))
|
||||||
|
|
||||||
|
typedef enum e_bsp_swint_unit
|
||||||
|
{
|
||||||
|
#if (defined(BSP_CFG_SWINT_UNIT1_ENABLE) && (BSP_CFG_SWINT_UNIT1_ENABLE == 1))
|
||||||
|
BSP_SWINT_UNIT1,
|
||||||
|
#endif /* (defined(BSP_CFG_SWINT_UNIT1_ENABLE) && (BSP_CFG_SWINT_UNIT1_ENABLE == 1)) */
|
||||||
|
#if (defined(BSP_CFG_SWINT_UNIT2_ENABLE) && (BSP_CFG_SWINT_UNIT2_ENABLE == 1))
|
||||||
|
BSP_SWINT_UNIT2,
|
||||||
|
#endif /* (defined(BSP_CFG_SWINT_UNIT2_ENABLE) && (BSP_CFG_SWINT_UNIT2_ENABLE == 1)) */
|
||||||
|
BSP_SWINT_UNIT_MAX
|
||||||
|
} e_bsp_swint_unit_t;
|
||||||
|
|
||||||
|
typedef enum e_bsp_swint_err
|
||||||
|
{
|
||||||
|
BSP_SWINT_SUCCESS = 0,
|
||||||
|
BSP_SWINT_ERR_ALREADY_OPEN,
|
||||||
|
BSP_SWINT_ERR_NOT_CLOSED,
|
||||||
|
BSP_SWINT_ERR_INVALID_UNIT,
|
||||||
|
BSP_SWINT_ERR_INVALID_IPR,
|
||||||
|
BSP_SWINT_ERR_INVALID_CMD,
|
||||||
|
BSP_SWINT_ERR_INVALID_TASK,
|
||||||
|
BSP_SWINT_ERR_INVALID_BUFFER_NUMBER,
|
||||||
|
BSP_SWINT_ERR_TASK_EXECUTING,
|
||||||
|
BSP_SWINT_ERR_FULL_BUFFER,
|
||||||
|
BSP_SWINT_ERR_ACCESS_REJECTION
|
||||||
|
} e_bsp_swint_err_t;
|
||||||
|
|
||||||
|
typedef enum e_bsp_swint_cmd
|
||||||
|
{
|
||||||
|
BSP_SWINT_CMD_GET_INTERRUPT_INFORMATION = 0,
|
||||||
|
BSP_SWINT_CMD_ENABLE_INTERRUPT,
|
||||||
|
BSP_SWINT_CMD_DISABLE_INTERRUPT,
|
||||||
|
BSP_SWINT_CMD_SET_INTERRUPT_PRIORITY,
|
||||||
|
BSP_SWINT_CMD_SET_INTERRUPT_REQUEST,
|
||||||
|
BSP_SWINT_CMD_CLEAR_INTERRUPT_REQUEST,
|
||||||
|
BSP_SWINT_CMD_ENABLE_NESTED_INTERRUPT,
|
||||||
|
BSP_SWINT_CMD_DISABLE_NESTED_INTERRUPT,
|
||||||
|
BSP_SWINT_CMD_CLEAR_TASK,
|
||||||
|
BSP_SWINT_CMD_CLEAR_ALL_TASK,
|
||||||
|
BSP_SWINT_CMD_GET_ALL_TASK_STATUS,
|
||||||
|
BSP_SWINT_CMD_GET_USED_BUFFER,
|
||||||
|
BSP_SWINT_CMD_GET_UNUSED_BUFFER
|
||||||
|
} e_bsp_swint_cmd_t;
|
||||||
|
|
||||||
|
typedef struct st_bsp_swint_int_info
|
||||||
|
{
|
||||||
|
uint8_t ipr;
|
||||||
|
uint8_t ien;
|
||||||
|
uint8_t ir;
|
||||||
|
uint8_t nested_int;
|
||||||
|
} st_bsp_swint_int_info_t;
|
||||||
|
|
||||||
|
typedef enum e_bsp_swint_task_status
|
||||||
|
{
|
||||||
|
BSP_SWINT_TASK_STATUS_NO_REQUEST = 0,
|
||||||
|
BSP_SWINT_TASK_STATUS_REQUESTED,
|
||||||
|
BSP_SWINT_TASK_STATUS_EXECUTING,
|
||||||
|
BSP_SWINT_TASK_STATUS_COMPLETED
|
||||||
|
} e_bsp_swint_task_status_t;
|
||||||
|
|
||||||
|
typedef struct st_bsp_swint_task
|
||||||
|
{
|
||||||
|
e_bsp_swint_task_status_t status;
|
||||||
|
void (*p_taskAddr)(void *p_task_args);
|
||||||
|
void *p_context;
|
||||||
|
} st_bsp_swint_task_t;
|
||||||
|
|
||||||
|
typedef struct st_bsp_swint_task_buffer
|
||||||
|
{
|
||||||
|
uint8_t number;
|
||||||
|
} st_bsp_swint_task_buffer_t;
|
||||||
|
|
||||||
|
typedef struct st_bsp_swint_access_control
|
||||||
|
{
|
||||||
|
int32_t status;
|
||||||
|
} st_bsp_swint_access_control_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
e_bsp_swint_err_t R_BSP_SoftwareInterruptOpen(e_bsp_swint_unit_t unit);
|
||||||
|
e_bsp_swint_err_t R_BSP_SoftwareInterruptClose(e_bsp_swint_unit_t unit);
|
||||||
|
e_bsp_swint_err_t R_BSP_SoftwareInterruptSetTask(e_bsp_swint_unit_t unit, st_bsp_swint_task_t set_task);
|
||||||
|
e_bsp_swint_err_t R_BSP_SoftwareInterruptControl(e_bsp_swint_unit_t unit, e_bsp_swint_cmd_t const cmd, void * const p_args);
|
||||||
|
|
||||||
|
#endif /* (BSP_CFG_SWINT_UNIT1_ENABLE == 1) || (BSP_CFG_SWINT_UNIT2_ENABLE == 1) */
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_rtos.h
|
||||||
|
* Description : This module implements functions of rtos.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
* : 08.10.2019 1.10 Added include file and macro definitions for Renesas RTOS (RI600V4 or RI600PX).
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 0 /* Non-OS */
|
||||||
|
#elif BSP_CFG_RTOS_USED == 1 /* FreeRTOS */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
#include "queue.h"
|
||||||
|
#include "croutine.h"
|
||||||
|
#include "timers.h"
|
||||||
|
#include "event_groups.h"
|
||||||
|
#include "freertos_start.h"
|
||||||
|
#elif BSP_CFG_RTOS_USED == 2 /* SEGGER embOS */
|
||||||
|
#elif BSP_CFG_RTOS_USED == 3 /* Micrium MicroC/OS */
|
||||||
|
#elif BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
#include "kernel.h"
|
||||||
|
#include "kernel_id.h"
|
||||||
|
|
||||||
|
#define RENESAS_RI600V4 0
|
||||||
|
#define RENESAS_RI600PX 1
|
||||||
|
|
||||||
|
#undef BSP_CFG_RTOS_SYSTEM_TIMER
|
||||||
|
#define BSP_CFG_RTOS_SYSTEM_TIMER _RI_CLOCK_TIMER
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef R_RTOS_H
|
||||||
|
#define R_RTOS_H
|
||||||
|
|
||||||
|
#endif /* R_RTOS_H */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,994 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_rx_intrinsic_functions.c
|
||||||
|
* Description : Defines built-in functions that are in CCRX but not in the GCC and IAR compiler.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
* : 26.07.2019 1.01 Fixed the below functions.
|
||||||
|
* - R_BSP_MulAndAccOperation_2byte
|
||||||
|
* - R_BSP_MulAndAccOperation_FixedPoint1
|
||||||
|
* - R_BSP_MulAndAccOperation_FixedPoint2
|
||||||
|
* Added the below functions.
|
||||||
|
* - R_BSP_CalcSine_Cosine
|
||||||
|
* - R_BSP_CalcAtan_SquareRoot
|
||||||
|
* : 31.07.2019 1.02 Modified the compile condition of the below functions.
|
||||||
|
* - R_BSP_InitTFU
|
||||||
|
* - R_BSP_CalcSine_Cosine
|
||||||
|
* - R_BSP_CalcAtan_SquareRoot
|
||||||
|
* : 10.12.2019 1.03 Fixed the below functions.
|
||||||
|
* - R_BSP_MulAndAccOperation_2byte
|
||||||
|
* - R_BSP_MulAndAccOperation_FixedPoint1
|
||||||
|
* - R_BSP_MulAndAccOperation_FixedPoint2
|
||||||
|
* : 17.12.2019 1.04 Modified the comment of description.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "r_rx_compiler.h"
|
||||||
|
#include "r_rx_intrinsic_functions.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_bpsw(uint32_t *data);
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_bpc(uint32_t *data);
|
||||||
|
#ifdef BSP_MCU_EXCEPTION_TABLE
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_extb(uint32_t *data);
|
||||||
|
#endif /* BSP_MCU_EXCEPTION_TABLE */
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_move_from_acc_hi_long(uint32_t *data);
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_move_from_acc_mi_long(uint32_t *data);
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#ifdef __DPFPU
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_dpsw(uint32_t *data);
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_decnt(uint32_t *data);
|
||||||
|
R_BSP_ATTRIB_STATIC_INLINE_ASM void bsp_get_depc(uint32_t *ret);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_Max
|
||||||
|
* Description : Selects the greater of two input values.
|
||||||
|
* Arguments : data1 - Input value 1.
|
||||||
|
* data2 - Input value 2.
|
||||||
|
* Return Value : The greater value of data1 and data2.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
signed long R_BSP_Max(signed long data1, signed long data2)
|
||||||
|
{
|
||||||
|
return (data1 > data2)? data1 : data2;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_Min
|
||||||
|
* Description : Selects the smaller of two input values.
|
||||||
|
* Arguments : data1 - Input value 1.
|
||||||
|
* data2 - Input value 2.
|
||||||
|
* Return Value : The smaller value of data1 and data2.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
signed long R_BSP_Min(signed long data1, signed long data2)
|
||||||
|
{
|
||||||
|
return (data1 < data2)? data1 : data2;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_B
|
||||||
|
* Description : Performs a multiply-and-accumulate operation with the initial value specified by init, the number of
|
||||||
|
* multiply-and-accumulate operations specified by count, and the start addresses of values to be
|
||||||
|
* multiplied specified by addr1 and addr2.
|
||||||
|
* Arguments : init - Initial value.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* *addr1 - Start address of values 1 to be multiplied.
|
||||||
|
* *addr2 - Start address of values 2 to be multiplied.
|
||||||
|
* Return Value : result - Lower 64 bits of the init + S(data1[n] * data2[n]) result. (n=0, 1, ..., const-1)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
long long R_BSP_MulAndAccOperation_B(long long init, unsigned long count, signed char *addr1, signed char *addr2)
|
||||||
|
{
|
||||||
|
long long result = init;
|
||||||
|
unsigned long index;
|
||||||
|
for(index = 0; index < count; index++)
|
||||||
|
{
|
||||||
|
result += addr1[index] * addr2[index];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_W
|
||||||
|
* Description : Performs a multiply-and-accumulate operation with the initial value specified by init, the number of
|
||||||
|
* multiply-and-accumulate operations specified by count, and the start addresses of values to be
|
||||||
|
* multiplied specified by addr1 and addr2.
|
||||||
|
* Arguments : init - Initial value.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* *addr1 - Start address of values 1 to be multiplied.
|
||||||
|
* *addr2 - Start address of values 2 to be multiplied.
|
||||||
|
* Return Value : result - Lower 64 bits of the init + S(data1[n] * data2[n]) result. (n=0, 1, ..., const-1)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
long long R_BSP_MulAndAccOperation_W(long long init, unsigned long count, short *addr1, short *addr2)
|
||||||
|
{
|
||||||
|
long long result = init;
|
||||||
|
unsigned long index;
|
||||||
|
for(index = 0; index < count; index++)
|
||||||
|
{
|
||||||
|
result += addr1[index] * addr2[index];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_L
|
||||||
|
* Description : Performs a multiply-and-accumulate operation with the initial value specified by init, the number of
|
||||||
|
* multiply-and-accumulate operations specified by count, and the start addresses of values to be
|
||||||
|
* multiplied specified by addr1 and addr2.
|
||||||
|
* Arguments : init - Initial value.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* *addr1 - Start address of values 1 to be multiplied.
|
||||||
|
* *addr2 - Start address of values 2 to be multiplied.
|
||||||
|
* Return Value : result - Lower 64 bits of the init + S(data1[n] * data2[n]) result. (n=0, 1, ..., const-1)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
long long R_BSP_MulAndAccOperation_L(long long init, unsigned long count, long *addr1, long *addr2)
|
||||||
|
{
|
||||||
|
long long result = init;
|
||||||
|
unsigned long index;
|
||||||
|
for(index = 0; index < count; index++)
|
||||||
|
{
|
||||||
|
result += addr1[index] * addr2[index];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RotateLeftWithCarry
|
||||||
|
* Description : Rotates data including the C flag to left by one bit.
|
||||||
|
* The bit pushed out of the operand is set to the C flag.
|
||||||
|
* Arguments : data - Data to be rotated to left.
|
||||||
|
* Return Value : data - Result of 1-bit left rotation of data including the C flag.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
unsigned long R_BSP_RotateLeftWithCarry(unsigned long data)
|
||||||
|
{
|
||||||
|
__asm("rolc %0":"=r"(data) : "r"(data):);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RotateRightWithCarry
|
||||||
|
* Description : Rotates data including the C flag to right by one bit.
|
||||||
|
* The bit pushed out of the operand is set to the C flag.
|
||||||
|
* Arguments : data - Data to be rotated to right.
|
||||||
|
* Return Value : data - Result of 1-bit right rotation of data including the C flag.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
unsigned long R_BSP_RotateRightWithCarry(unsigned long data)
|
||||||
|
{
|
||||||
|
__asm("rorc %0":"=r"(data) : "r"(data):);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RotateLeft
|
||||||
|
* Description : Rotates data to left by the specified number of bits.
|
||||||
|
* The bit pushed out of the operand is set to the C flag.
|
||||||
|
* Arguments : data - Data to be rotated to left.
|
||||||
|
* num - Number of bits to be rotated.
|
||||||
|
* Return Value : data - Result of num-bit left rotation of data.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
unsigned long R_BSP_RotateLeft(unsigned long data, unsigned long num)
|
||||||
|
{
|
||||||
|
__asm("rotl %1, %0":"=r"(data) : "r"(num),"0"(data) :);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_RotateRight
|
||||||
|
* Description : Rotates data to right by the specified number of bits.
|
||||||
|
* The bit pushed out of the operand is set to the C flag.
|
||||||
|
* Arguments : data - Data to be rotated to right.
|
||||||
|
* num - Number of bits to be rotated.
|
||||||
|
* Return Value : result - Result of num-bit right rotation of data.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
unsigned long R_BSP_RotateRight(unsigned long data, unsigned long num)
|
||||||
|
{
|
||||||
|
__asm("rotr %1, %0":"=r"(data) : "r"(num),"0"(data) :);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SignedMultiplication
|
||||||
|
* Description : Performs signed multiplication of significant 64 bits.
|
||||||
|
* Arguments : data 1 - Input value 1.
|
||||||
|
* data 2 - Input value 2.
|
||||||
|
* Return Value : Result of signed multiplication. (signed 64-bit value)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__) || defined(__ICCRX__)
|
||||||
|
signed long long R_BSP_SignedMultiplication(signed long data1, signed long data2)
|
||||||
|
{
|
||||||
|
return ((signed long long)data1) * ((signed long long)data2);
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_UnsignedMultiplication
|
||||||
|
* Description : Performs unsigned multiplication of significant 64 bits.
|
||||||
|
* Arguments : data 1 - Input value 1.
|
||||||
|
* data 2 - Input value 2.
|
||||||
|
* Return Value : Result of unsigned multiplication. (unsigned 64-bit value)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__) || defined(__ICCRX__)
|
||||||
|
unsigned long long R_BSP_UnsignedMultiplication(unsigned long data1, unsigned long data2)
|
||||||
|
{
|
||||||
|
return ((unsigned long long)data1) * ((unsigned long long)data2);
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: R_BSP_ChangeToUserMode
|
||||||
|
* Description : Switches to user mode. The PSW will be changed as following.
|
||||||
|
* Before Execution After Execution
|
||||||
|
* PSW.PM PSW.U PSW.PM PSW.U
|
||||||
|
* 0 (supervisor mode) 0 (interrupt stack) --> 1 (user mode) 1 (user stack)
|
||||||
|
* 0 (supervisor mode) 1 (user stack) --> 1 (user mode) 1 (user stack)
|
||||||
|
* 1 (user mode) 1 (user stack) --> NO CHANGE
|
||||||
|
* 1 (user mode) 0 (interrupt stack)) <== N/A
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_ChangeToUserMode)
|
||||||
|
void R_BSP_ChangeToUserMode(void)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM(;_R_BSP_Change_PSW_PM_to_UserMode: )
|
||||||
|
R_BSP_ASM( PUSH.L R1 ; push the R1 value )
|
||||||
|
R_BSP_ASM( MVFC PSW, R1 ; get the current PSW value )
|
||||||
|
R_BSP_ASM( BTST #20, R1 ; check PSW.PM )
|
||||||
|
R_BSP_ASM( BNE.B R_BSP_ASM_LAB_NEXT(0);_psw_pm_is_user_mode )
|
||||||
|
R_BSP_ASM(;_psw_pm_is_supervisor_mode: )
|
||||||
|
R_BSP_ASM( BSET #20, R1 ; change PM = 0(Supervisor Mode) --> 1(User Mode) )
|
||||||
|
R_BSP_ASM( PUSH.L R2 ; push the R2 value )
|
||||||
|
R_BSP_ASM( MOV.L R0, R2 ; move the current SP value to the R2 value )
|
||||||
|
R_BSP_ASM( XCHG 8[R2].L, R1 ; exchange the value of R2 destination address and the R1 value )
|
||||||
|
R_BSP_ASM( ; (exchange the return address value of caller and the PSW value) )
|
||||||
|
R_BSP_ASM( XCHG 4[R2].L, R1 ; exchange the value of R2 destination address and the R1 value )
|
||||||
|
R_BSP_ASM( ; (exchange the R1 value of stack and the return address value of caller) )
|
||||||
|
R_BSP_ASM( POP R2 ; pop the R2 value of stack )
|
||||||
|
R_BSP_ASM( RTE )
|
||||||
|
R_BSP_ASM_LAB(0:;_psw_pm_is_user_mode: )
|
||||||
|
R_BSP_ASM( POP R1 ; pop the R1 value of stack )
|
||||||
|
R_BSP_ASM( ;RTS )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_ChangeToUserMode() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetACC
|
||||||
|
* Description : Sets a value to ACC.
|
||||||
|
* Arguments : data - Value to be set to ACC.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__) || defined(__ICCRX__)
|
||||||
|
void R_BSP_SetACC(signed long long data)
|
||||||
|
{
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
__builtin_rx_mvtachi(data >> 32);
|
||||||
|
__builtin_rx_mvtaclo(data & 0xFFFFFFFF);
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
int32_t data_hi;
|
||||||
|
int32_t data_lo;
|
||||||
|
|
||||||
|
data_hi = (int32_t)(data >> 32);
|
||||||
|
data_lo = (int32_t)(data & 0x00000000FFFFFFFF);
|
||||||
|
|
||||||
|
R_BSP_MoveToAccHiLong(data_hi);
|
||||||
|
R_BSP_MoveToAccLoLong(data_lo);
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetACC
|
||||||
|
* Description : Refers to the ACC value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : result - ACC value.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__) || defined(__ICCRX__)
|
||||||
|
signed long long R_BSP_GetACC(void)
|
||||||
|
{
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
signed long long result = ((signed long long)__builtin_rx_mvfachi()) << 32;
|
||||||
|
result |= (((signed long long)__builtin_rx_mvfacmi()) << 16) & 0xFFFF0000;
|
||||||
|
return result;
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
int64_t result;
|
||||||
|
|
||||||
|
result = ((int64_t)R_BSP_MoveFromAccHiLong()) << 32;
|
||||||
|
result |= (((int64_t)R_BSP_MoveFromAccMiLong()) << 16) & 0xFFFF0000;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_2byte
|
||||||
|
* Description : Performs a multiply-and-accumulate operation between data of two bytes each and returns the result as
|
||||||
|
* four bytes. The multiply-and-accumulate operation is executed with DSP functional instructions (MULLO,
|
||||||
|
* MACLO, and MACHI). Data in the middle of the multiply-and-accumulate operation is retained in ACC as
|
||||||
|
* 48-bit data. After all multiply-and-accumulate operations have finished, the contents of ACC are
|
||||||
|
* fetched by the MVFACMI instruction and used as the return value of the intrinsic function.
|
||||||
|
* Arguments : data1 - Start address of values 1 to be multiplied.
|
||||||
|
* data2 - Start address of values 2 to be multiplied.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* Return Value : S(data1[n] * data2[n]) result.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
long R_BSP_MulAndAccOperation_2byte(short* data1, short* data2, unsigned long count)
|
||||||
|
{
|
||||||
|
register signed long *ldata1 = (signed long *)data1;
|
||||||
|
register signed long *ldata2 = (signed long *)data2;
|
||||||
|
/* this is much more then an "intrinsic", no inline asm because of loop */
|
||||||
|
/* will implement this.. interesting function as described in ccrx manual */
|
||||||
|
__builtin_rx_mullo(0, 0);
|
||||||
|
while (count > 1)
|
||||||
|
{
|
||||||
|
__builtin_rx_maclo(*ldata1, *ldata2);
|
||||||
|
__builtin_rx_machi(*ldata1, *ldata2);
|
||||||
|
ldata1++;
|
||||||
|
ldata2++;
|
||||||
|
count -= 2;
|
||||||
|
}
|
||||||
|
if (count != 0) __builtin_rx_maclo(*(short*)ldata1, *(short*)ldata2);
|
||||||
|
return __builtin_rx_mvfacmi();
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_FixedPoint1
|
||||||
|
* Description : Performs a multiply-and-accumulate operation between data of two bytes each and returns the result as
|
||||||
|
* two bytes. The multiply-and-accumulate operation is executed with DSP functional instructions (MULLO,
|
||||||
|
* MACLO, and MACHI). Data in the middle of the multiply-and-accumulate operation is retained in ACC as
|
||||||
|
* 48-bit data. After all multiply-and-accumulate operations have finished, rounding is applied to the
|
||||||
|
* multiply-and-accumulate operation result of ACC.
|
||||||
|
* The macw1 function performs rounding with the "RACW #1" instruction.
|
||||||
|
* Arguments : data1 - Start address of values 1 to be multiplied.
|
||||||
|
* data2 - Start address of values 2 to be multiplied.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* Return Value : Value obtained by rounding the multiply-and-accumulate operation result with the RACW instruction.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
short R_BSP_MulAndAccOperation_FixedPoint1(short* data1, short* data2, unsigned long count)
|
||||||
|
{
|
||||||
|
register signed long *ldata1 = (signed long *)data1;
|
||||||
|
register signed long *ldata2 = (signed long *)data2;
|
||||||
|
/* this is much more then an "intrinsic", no inline asm because of loop */
|
||||||
|
/* will implement this.. interesting function as described in ccrx manual */
|
||||||
|
__builtin_rx_mullo(0, 0);
|
||||||
|
while (count > 1)
|
||||||
|
{
|
||||||
|
__builtin_rx_maclo(*ldata1, *ldata2);
|
||||||
|
__builtin_rx_machi(*ldata1, *ldata2);
|
||||||
|
ldata1++;
|
||||||
|
ldata2++;
|
||||||
|
count -= 2;
|
||||||
|
}
|
||||||
|
if (count != 0) __builtin_rx_maclo(*(short*)ldata1, *(short*)ldata2);
|
||||||
|
__builtin_rx_racw(1);
|
||||||
|
return __builtin_rx_mvfachi();
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MulAndAccOperation_FixedPoint2
|
||||||
|
* Description : Performs a multiply-and-accumulate operation between data of two bytes each and returns the result as
|
||||||
|
* two bytes. The multiply-and-accumulate operation is executed with DSP functional instructions (MULLO,
|
||||||
|
* MACLO, and MACHI). Data in the middle of the multiply-and-accumulate operation is retained in ACC as
|
||||||
|
* 48-bit data. After all multiply-and-accumulate operations have finished, rounding is applied to the
|
||||||
|
* multiply-and-accumulate operation result of ACC.
|
||||||
|
* the macw2 function performs rounding with the "RACW #2" instruction.
|
||||||
|
* Arguments : data1 - Start address of values 1 to be multiplied.
|
||||||
|
* data2 - Start address of values 2 to be multiplied.
|
||||||
|
* count - Count of multiply-and-accumulate operations.
|
||||||
|
* Return Value : Value obtained by rounding the multiply-and-accumulate operation result with the RACW instruction.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
short R_BSP_MulAndAccOperation_FixedPoint2(short* data1, short* data2, unsigned long count)
|
||||||
|
{
|
||||||
|
register signed long *ldata1 = (signed long *)data1;
|
||||||
|
register signed long *ldata2 = (signed long *)data2;
|
||||||
|
/* this is much more then an "intrinsic", no inline asm because of loop */
|
||||||
|
/* will implement this.. interesting function as described in ccrx manual */
|
||||||
|
__builtin_rx_mullo(0, 0);
|
||||||
|
while (count > 1)
|
||||||
|
{
|
||||||
|
__builtin_rx_maclo(*ldata1, *ldata2);
|
||||||
|
__builtin_rx_machi(*ldata1, *ldata2);
|
||||||
|
ldata1++;
|
||||||
|
ldata2++;
|
||||||
|
count -= 2;
|
||||||
|
}
|
||||||
|
if (count != 0) __builtin_rx_maclo(*(short*)ldata1, *(short*)ldata2);
|
||||||
|
__builtin_rx_racw(2);
|
||||||
|
return __builtin_rx_mvfachi();
|
||||||
|
}
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetBPSW
|
||||||
|
* Description : Sets a value to BPSW.
|
||||||
|
* Arguments : data - Value to be set.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_SetBPSW)
|
||||||
|
void R_BSP_SetBPSW(uint32_t data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTC R1, BPSW )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_SetBPSW() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_bpsw
|
||||||
|
* Description : Refers to the BPSW value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_bpsw)
|
||||||
|
void bsp_get_bpsw(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFC BPSW, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_bpsw() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetBPSW
|
||||||
|
* Description : Refers to the BPSW value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : BPSW value.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
uint32_t R_BSP_GetBPSW(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_bpsw((uint32_t *)&ret);
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_GetBPSW() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetBPC
|
||||||
|
* Description : Sets a value to BPC.
|
||||||
|
* Arguments : data - Value to be set.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_SetBPC)
|
||||||
|
void R_BSP_SetBPC(void *data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTC R1, BPC )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_SetBPC() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_bpc
|
||||||
|
* Description : Refers to the BPC value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_bpc)
|
||||||
|
void bsp_get_bpc(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFC BPC, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_bpc() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetBPC
|
||||||
|
* Description : Refers to the BPC value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : BPC value
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void *R_BSP_GetBPC(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_bpc((uint32_t *)&ret);
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or return. */
|
||||||
|
return (void *)ret;
|
||||||
|
} /* End of function R_BSP_GetBPC() */
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_EXCEPTION_TABLE
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetEXTB
|
||||||
|
* Description : Sets a value for EXTB.
|
||||||
|
* Arguments : data - Value to be set.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_SetEXTB)
|
||||||
|
void R_BSP_SetEXTB(void *data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTC R1, EXTB )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_SetEXTB() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_extb
|
||||||
|
* Description : Refers to the EXTB value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_extb)
|
||||||
|
void bsp_get_extb(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFC EXTB, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_extb() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetEXTB
|
||||||
|
* Description : Refers to the EXTB value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : EXTB value.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void *R_BSP_GetEXTB(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_extb((uint32_t *)&ret);
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or return. */
|
||||||
|
return (void *)ret;
|
||||||
|
} /* End of function R_BSP_GetEXTB() */
|
||||||
|
#endif /* BSP_MCU_EXCEPTION_TABLE */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MoveToAccHiLong
|
||||||
|
* Description : This function moves the contents of src to the higher-order 32 bits of the accumulator.
|
||||||
|
* Arguments : data - Input value.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_MoveToAccHiLong)
|
||||||
|
void R_BSP_MoveToAccHiLong(int32_t data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTACHI R1 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_MoveToAccHiLong() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MoveToAccLoLong
|
||||||
|
* Description : This function moves the contents of src to the lower-order 32 bits of the accumulator.
|
||||||
|
* Arguments : data - Input value.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_MoveToAccLoLong)
|
||||||
|
void R_BSP_MoveToAccLoLong(int32_t data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTACLO R1 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_MoveToAccLoLong() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_move_from_acc_hi_long
|
||||||
|
* Description : This function moves the higher-order 32 bits of the accumulator to dest.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_move_from_acc_hi_long)
|
||||||
|
void bsp_move_from_acc_hi_long(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFACHI R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_move_from_acc_hi_long() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MoveFromAccHiLong
|
||||||
|
* Description : This function moves the higher-order 32 bits of the accumulator to dest.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : The higher-order 32 bits of the accumulator.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int32_t R_BSP_MoveFromAccHiLong(void)
|
||||||
|
{
|
||||||
|
int32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_move_from_acc_hi_long((uint32_t *)&ret);
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_MoveFromAccHiLong() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_move_from_acc_mi_long
|
||||||
|
* Description : This function moves the contents of bits 47 to 16 of the accumulator to dest.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_move_from_acc_mi_long)
|
||||||
|
void bsp_move_from_acc_mi_long(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFACMI R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_move_from_acc_mi_long() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_MoveFromAccMiLong
|
||||||
|
* Description : This function moves the contents of bits 47 to 16 of the accumulator to dest.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : The contents of bits 47 to 16 of the accumulator.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int32_t R_BSP_MoveFromAccMiLong(void)
|
||||||
|
{
|
||||||
|
int32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_move_from_acc_mi_long((uint32_t *)&ret);
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_MoveFromAccMiLong() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_BitSet
|
||||||
|
* Description : Sets the specified one bit in the specified 1-byte area to 1.
|
||||||
|
* Arguments : data - Address of the target 1-byte area
|
||||||
|
* bit - Position of the bit to be manipulated
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_BitSet)
|
||||||
|
void R_BSP_BitSet(uint8_t *data, uint32_t bit)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
R_BSP_ASM_INTERNAL_USED(bit)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( BSET R2, [R1] )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_BitSet() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_BitClear
|
||||||
|
* Description : Sets the specified one bit in the specified 1-byte area to 0.
|
||||||
|
* Arguments : data - Address of the target 1-byte area
|
||||||
|
* bit - Position of the bit to be manipulated
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_BitClear)
|
||||||
|
void R_BSP_BitClear(uint8_t *data, uint32_t bit)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
R_BSP_ASM_INTERNAL_USED(bit)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( BCLR R2, [R1] )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_BitClear() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_BitReverse
|
||||||
|
* Description : Reverses the value of the specified one bit in the specified 1-byte area.
|
||||||
|
* Arguments : data - Address of the target 1-byte area
|
||||||
|
* bit - Position of the bit to be manipulated
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_BitReverse)
|
||||||
|
void R_BSP_BitReverse(uint8_t *data, uint32_t bit)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
R_BSP_ASM_INTERNAL_USED(bit)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( BNOT R2, [R1] )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_BitReverse() */
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#ifdef __DPFPU
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetDPSW
|
||||||
|
* Description : Sets a value to DPSW.
|
||||||
|
* Arguments : data - Value to be set.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_SetDPSW)
|
||||||
|
void R_BSP_SetDPSW(uint32_t data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTDC R1, DPSW )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_SetDPSW() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_dpsw
|
||||||
|
* Description : Refers to the DPSW value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_dpsw)
|
||||||
|
void bsp_get_dpsw(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFDC DPSW, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_dpsw() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetDPSW
|
||||||
|
* Description : Refers to the DPSW value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : DPSW value.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
uint32_t R_BSP_GetDPSW(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_dpsw((uint32_t *)&ret);
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_GetDPSW() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_SetDECNT
|
||||||
|
* Description : Sets a value to DECNT.
|
||||||
|
* Arguments : data - Value to be set.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_SetDECNT)
|
||||||
|
void R_BSP_SetDECNT(uint32_t data)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(data)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( MVTDC R1, DECNT )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_SetDECNT() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_decnt
|
||||||
|
* Description : Refers to the DECNT value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_decnt)
|
||||||
|
void bsp_get_decnt(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFDC DECNT, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_decnt() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetDECNT
|
||||||
|
* Description : Refers to the DECNT value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : DECNT value.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
uint32_t R_BSP_GetDECNT(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_decnt((uint32_t *)&ret);
|
||||||
|
return ret;
|
||||||
|
} /* End of function R_BSP_GetDECNT() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_get_depc
|
||||||
|
* Description : Refers to the DEPC value.
|
||||||
|
* Arguments : ret - Return value address.
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INLINE_ASM(bsp_get_depc)
|
||||||
|
void bsp_get_depc(uint32_t *ret)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_INTERNAL_USED(ret)
|
||||||
|
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R2 )
|
||||||
|
R_BSP_ASM( MVFDC DEPC, R2 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R1] )
|
||||||
|
R_BSP_ASM( POP R2 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function bsp_get_decnt() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_GetDEPC
|
||||||
|
* Description : Refers to the DEPC value.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : DEPC value.
|
||||||
|
* Note : This function exists to avoid code analysis errors. Because, when inline assembler function has
|
||||||
|
* a return value, the error of "No return, in function returning non-void" occurs.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void *R_BSP_GetDEPC(void)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
bsp_get_depc((uint32_t *)&ret);
|
||||||
|
return (void *)ret;
|
||||||
|
} /* End of function R_BSP_GetDECNT() */
|
||||||
|
#endif /* __DPFPU */
|
||||||
|
#endif /* BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT */
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_TRIGONOMETRIC
|
||||||
|
#ifdef __TFU
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_InitTFU
|
||||||
|
* Description : Initialize arithmetic unit for trigonometric functions.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_InitTFU)
|
||||||
|
void R_BSP_InitTFU(void)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R1 )
|
||||||
|
R_BSP_ASM( MOV.L #81400H, R1 )
|
||||||
|
R_BSP_ASM( MOV.B #7, [R1] )
|
||||||
|
R_BSP_ASM( MOV.B #7, 1[R1] )
|
||||||
|
R_BSP_ASM( POP R1 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_InitTFU() */
|
||||||
|
|
||||||
|
#ifdef __FPU
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_CalcSine_Cosine
|
||||||
|
* Description : Uses the trigonometric function unit to calculate the sine and cosine of an angle at the same time
|
||||||
|
* (single precision).
|
||||||
|
* Arguments : f - Value in radians from which to calculate the sine and cosine
|
||||||
|
* : sin - Address for storing the result of the sine operation
|
||||||
|
* : cos - Address for storing the result of the cosine operation
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_CalcSine_Cosine)
|
||||||
|
void R_BSP_CalcSine_Cosine(float f, float *sin, float *cos)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSH.L R4 )
|
||||||
|
R_BSP_ASM( MOV.L #81410H, R4 )
|
||||||
|
R_BSP_ASM( MOV.L R1, 4[R4] )
|
||||||
|
R_BSP_ASM( MOV.L 4[R4], [R2] )
|
||||||
|
R_BSP_ASM( MOV.L [R4], [R3] )
|
||||||
|
R_BSP_ASM( POP R4 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_CalcSine_Cosine() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: R_BSP_CalcAtan_SquareRoot
|
||||||
|
* Description : Uses the trigonometric function unit to calculate the arc tangent of x and y and the square root of
|
||||||
|
* the sum of squares of these values at the same time (single precision).
|
||||||
|
* Arguments : y - Coordinate y (the numerator of the tangent)
|
||||||
|
* x - Coordinate x (the denominator of the tangent)
|
||||||
|
* atan2 - Address for storing the result of the arc tangent operation for y/x
|
||||||
|
* hypot - Address for storing the result of the square root of the sum of squares of x and y
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_INLINE_ASM(R_BSP_CalcAtan_SquareRoot)
|
||||||
|
void R_BSP_CalcAtan_SquareRoot(float y, float x, float *atan2, float *hypot)
|
||||||
|
{
|
||||||
|
R_BSP_ASM_BEGIN
|
||||||
|
R_BSP_ASM( PUSHM R5-R6 )
|
||||||
|
R_BSP_ASM( MOV.L #81418H, R5 )
|
||||||
|
R_BSP_ASM( MOV.L R2, [R5] )
|
||||||
|
R_BSP_ASM( MOV.L R1, 4[R5] )
|
||||||
|
R_BSP_ASM( MOV.L 4[R5], [R3] )
|
||||||
|
R_BSP_ASM( MOV.L [R5], R6 )
|
||||||
|
R_BSP_ASM( FMUL #3F1B74EEH, R6 )
|
||||||
|
R_BSP_ASM( MOV.L R6, [R4] )
|
||||||
|
R_BSP_ASM( POPM R5-R6 )
|
||||||
|
R_BSP_ASM_END
|
||||||
|
} /* End of function R_BSP_CalcAtan_SquareRoot() */
|
||||||
|
#endif /* __FPU */
|
||||||
|
#endif /* __TFU */
|
||||||
|
#endif /* BSP_MCU_TRIGONOMETRIC */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,822 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_rx_intrinsic_functions.h
|
||||||
|
* Description : This is a file for integrating the definitions of built-in functions that differ for each compilers.
|
||||||
|
* Replace different functions for each compiler.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
* : 26.07.2019 1.10 Added the following function.
|
||||||
|
* - R_BSP_SINCOSF
|
||||||
|
* - R_BSP_ATAN2HYPOTF
|
||||||
|
* - R_BSP_CalcSine_Cosine
|
||||||
|
* - R_BSP_CalcAtan_SquareRoot
|
||||||
|
* : 31.07.2019 1.11 Modified the compile condition of the below functions.
|
||||||
|
* - R_BSP_InitTFU
|
||||||
|
* - R_BSP_CalcSine_Cosine
|
||||||
|
* - R_BSP_CalcAtan_SquareRoot
|
||||||
|
* : 08.10.2019 1.12 Modified the followind definition of intrinsic function of TFU for ICCRX.
|
||||||
|
* - R_BSP_INIT_TFU
|
||||||
|
* - R_BSP_SINCOSF
|
||||||
|
* - R_BSP_ATAN2HYPOTF
|
||||||
|
* : 17.12.2019 1.13 Modified the comment of description.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef R_RX_INTRINSIC_FUNCTIONS_H
|
||||||
|
#define R_RX_INTRINSIC_FUNCTIONS_H
|
||||||
|
|
||||||
|
/* ---------- Maximum value and minimum value ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* signed long max(signed long data1, signed long data2) */
|
||||||
|
#define R_BSP_MAX(x, y) max((signed long)(x), (signed long)(y))
|
||||||
|
/* signed long min(signed long data1, signed long data2) */
|
||||||
|
#define R_BSP_MIN(x, y) min((signed long)(x), (signed long)(y))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* signed long R_BSP_Max(signed long data1, signed long data2) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_MAX(x, y) R_BSP_Max((signed long)(x), (signed long)(y))
|
||||||
|
/* signed long R_BSP_Min(signed long data1, signed long data2) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_MIN(x, y) R_BSP_Min((signed long)(x), (signed long)(y))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* signed long __MAX(signed long, signed long) */
|
||||||
|
#define R_BSP_MAX(x, y) __MAX((signed long)(x), (signed long)(y))
|
||||||
|
/* signed long __MIN(signed long, signed long) */
|
||||||
|
#define R_BSP_MIN(x, y) __MIN((signed long)(x), (signed long)(y))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Byte switch ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* unsigned long revl(unsigned long data) */
|
||||||
|
#define R_BSP_REVL(x) revl((unsigned long)(x))
|
||||||
|
/* unsigned long revw(unsigned long data) */
|
||||||
|
#define R_BSP_REVW(x) revw((unsigned long)(x))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* uint32_t __builtin_bswap32(uint32_t x) */
|
||||||
|
#define R_BSP_REVL(x) __builtin_bswap32((uint32_t)(x))
|
||||||
|
/* int __builtin_rx_revw(int) */
|
||||||
|
#define R_BSP_REVW(x) (unsigned long)__builtin_rx_revw((int)(x))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* unsigned long __REVL(unsigned long) */
|
||||||
|
#define R_BSP_REVL(x) __REVL((unsigned long)(x))
|
||||||
|
/* unsigned long __REVW(unsigned long) */
|
||||||
|
#define R_BSP_REVW(x) __REVW((unsigned long)(x))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Data Exchange ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void xchg(signed long *data1, signed long *data2) */
|
||||||
|
#define R_BSP_EXCHANGE(x, y) xchg((signed long *)(x), (signed long *)(y))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_xchg (int *, int *) */
|
||||||
|
#define R_BSP_EXCHANGE(x, y) __builtin_rx_xchg((int *)(x), (int *)(y))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void _builtin_xchg(signed long *, signed long *) */
|
||||||
|
#define R_BSP_EXCHANGE(x, y) _builtin_xchg((signed long *)(x), (signed long *)(y))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Multiply-and-accumulate operation ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* long long rmpab(long long init, unsigned long count, signed char *addr1, signed char *addr2) */
|
||||||
|
#define R_BSP_RMPAB(w, x, y, z) rmpab((long long)(w), (unsigned long)(x), (signed char *)(y), (signed char *)(z))
|
||||||
|
/* long long rmpaw(long long init, unsigned long count, short *addr1, short *addr2) */
|
||||||
|
#define R_BSP_RMPAW(w, x, y, z) rmpaw((long long)(w), (unsigned long)(x), (short *)(y), (short *)(z))
|
||||||
|
/* long long rmpal(long long init, unsigned long count, long *addr1, long *addr2) */
|
||||||
|
#define R_BSP_RMPAL(w, x, y, z) rmpal((long long)(w), (unsigned long)(x), (long *)(y), (long *)(z))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* long long R_BSP_MulAndAccOperation_B(long long init, unsigned long count, signed char *addr1, signed char *addr2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_RMPAB(w, x, y, z) R_BSP_MulAndAccOperation_B((long long)(w), (unsigned long)(x), (signed char *)(y), (signed char *)(z))
|
||||||
|
/* long long R_BSP_MulAndAccOperation_W(long long init, unsigned long count, short *addr1, short *addr2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_RMPAW(w, x, y, z) R_BSP_MulAndAccOperation_W((long long)(w), (unsigned long)(x), (short *)(y), (short *)(z))
|
||||||
|
/* long long R_BSP_MulAndAccOperation_L(long long init, unsigned long count, long *addr1, long *addr2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_RMPAL(w, x, y, z) R_BSP_MulAndAccOperation_L((long long)(w), (unsigned long)(x), (long *)(y), (long *)(z))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* long long rmpab(long long init, unsigned long count, signed char *addr1, signed char *addr2) */
|
||||||
|
#define R_BSP_RMPAB(w, x, y, z) rmpab((long long)(w), (unsigned long)(x), (signed char *)(y), (signed char *)(z))
|
||||||
|
/* long long rmpaw(long long init, unsigned long count, short *addr1, short *addr2) */
|
||||||
|
#define R_BSP_RMPAW(w, x, y, z) rmpaw((long long)(w), (unsigned long)(x), (short *)(y), (short *)(z))
|
||||||
|
/* long long rmpal(long long init, unsigned long count, long *addr1, long *addr2) */
|
||||||
|
#define R_BSP_RMPAL(w, x, y, z) rmpal((long long)(w), (unsigned long)(x), (long *)(y), (long *)(z))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Rotation ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* unsigned long rolc(unsigned long data) */
|
||||||
|
#define R_BSP_ROLC(x) rolc((unsigned long)(x))
|
||||||
|
/* unsigned long rorc(unsigned long data) */
|
||||||
|
#define R_BSP_RORC(x) rorc((unsigned long)(x))
|
||||||
|
/* unsigned long rotl(unsigned long data, unsigned long num) */
|
||||||
|
#define R_BSP_ROTL(x, y) rotl((unsigned long)(x), (unsigned long)(y))
|
||||||
|
/* unsigned long rotr (unsigned long data, unsigned long num) */
|
||||||
|
#define R_BSP_ROTR(x, y) rotr((unsigned long)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* unsigned long R_BSP_RotateLeftWithCarry(unsigned long data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_ROLC(x) R_BSP_RotateLeftWithCarry((unsigned long)(x))
|
||||||
|
/* unsigned long R_BSP_RotateRightWithCarry(unsigned long data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_RORC(x) R_BSP_RotateRightWithCarry((unsigned long)(x))
|
||||||
|
/* unsigned long R_BSP_RotateLeft(unsigned long data, unsigned long num) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_ROTL(x, y) R_BSP_RotateLeft((unsigned long)(x), (unsigned long)(y))
|
||||||
|
/* unsigned long R_BSP_RotateRight (unsigned long data, unsigned long num) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_ROTR(x, y) R_BSP_RotateRight((unsigned long)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* unsigned long __ROLC(unsigned long) */
|
||||||
|
#define R_BSP_ROLC(x) __ROLC((unsigned long)(x))
|
||||||
|
/* unsigned long __RORC(unsigned long) */
|
||||||
|
#define R_BSP_RORC(x) __RORC((unsigned long)(x))
|
||||||
|
/* unsigned long __ROTL(unsigned long, unsigned long) */
|
||||||
|
#define R_BSP_ROTL(x, y) __ROTL((unsigned long)(y), (unsigned long)(x))
|
||||||
|
/* unsigned long __ROTR(unsigned long, unsigned long) */
|
||||||
|
#define R_BSP_ROTR(x, y) __ROTR((unsigned long)(y), (unsigned long)(x))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Special Instructions ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void brk(void) */
|
||||||
|
#define R_BSP_BRK() brk()
|
||||||
|
/* void int_exception(signed long num) */
|
||||||
|
#define R_BSP_INT(x) int_exception((signed long)(x))
|
||||||
|
/* void wait(void) */
|
||||||
|
#define R_BSP_WAIT() wait()
|
||||||
|
/* void nop(void) */
|
||||||
|
#define R_BSP_NOP() nop()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_brk (void) */
|
||||||
|
#define R_BSP_BRK() __builtin_rx_brk()
|
||||||
|
/* void __builtin_rx_int (int) */
|
||||||
|
#define R_BSP_INT(x) __builtin_rx_int((int)(x))
|
||||||
|
/* void __builtin_rx_wait (void) */
|
||||||
|
#define R_BSP_WAIT() __builtin_rx_wait()
|
||||||
|
/* __asm("nop") */
|
||||||
|
#define R_BSP_NOP() __asm("nop")
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __break(void) */
|
||||||
|
#define R_BSP_BRK() __break()
|
||||||
|
/* void __software_interrupt(unsigned char) */
|
||||||
|
#define R_BSP_INT(x) __software_interrupt((unsigned char)(x))
|
||||||
|
/* void __wait_for_interrupt(void) */
|
||||||
|
#define R_BSP_WAIT() __wait_for_interrupt()
|
||||||
|
/* void __no_operation(void) */
|
||||||
|
#define R_BSP_NOP() __no_operation()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Processor interrupt priority level (IPL) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_ipl(signed long level) */
|
||||||
|
#define R_BSP_SET_IPL(x) set_ipl((signed long)(x))
|
||||||
|
/* unsigned char get_ipl(void) */
|
||||||
|
#define R_BSP_GET_IPL() get_ipl()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtipl (int) */
|
||||||
|
#define R_BSP_SET_IPL(x) __builtin_rx_mvtipl((int)(x))
|
||||||
|
/* uint32_t R_BSP_CpuInterruptLevelRead (void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_IPL() (unsigned char)R_BSP_CpuInterruptLevelRead()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_interrupt_level(__ilevel_t) */
|
||||||
|
#define R_BSP_SET_IPL(x) __set_interrupt_level((__ilevel_t)(x))
|
||||||
|
/* __ilevel_t __get_interrupt_level(void) */
|
||||||
|
#define R_BSP_GET_IPL() (unsigned char)__get_interrupt_level()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Processor status word (PSW) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_psw(unsigned long data) */
|
||||||
|
#define R_BSP_SET_PSW(x) set_psw((unsigned long)(x))
|
||||||
|
/* unsigned long get_psw(void) */
|
||||||
|
#define R_BSP_GET_PSW() get_psw()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_PSW(x) __builtin_rx_mvtc(0x0, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_PSW() (unsigned long)__builtin_rx_mvfc(0x0)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_PSW_register(unsigned long) */
|
||||||
|
#define R_BSP_SET_PSW(x) __set_PSW_register((unsigned long)(x))
|
||||||
|
/* unsigned long __get_PSW_register(void) */
|
||||||
|
#define R_BSP_GET_PSW() __get_PSW_register()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Floating-point status word (FPSW) ---------- */
|
||||||
|
#ifdef __FPU
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_fpsw(unsigned long data) */
|
||||||
|
#define R_BSP_SET_FPSW(x) set_fpsw((unsigned long)(x))
|
||||||
|
/* unsigned long get_fpsw(void) */
|
||||||
|
#define R_BSP_GET_FPSW() get_fpsw()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_FPSW(x) __builtin_rx_mvtc(0x3, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_FPSW() (unsigned long)__builtin_rx_mvfc(0x3)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_FPSW_register(unsigned long) */
|
||||||
|
#define R_BSP_SET_FPSW(x) __set_FPSW_register((unsigned long)(x))
|
||||||
|
/* unsigned long __get_FPSW_register(void) */
|
||||||
|
#define R_BSP_GET_FPSW() __get_FPSW_register()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- User Stack Pointer (USP) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_usp(void *data) */
|
||||||
|
#define R_BSP_SET_USP(x) set_usp((void *)(x))
|
||||||
|
/* void *get_usp(void) */
|
||||||
|
#define R_BSP_GET_USP() get_usp()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_USP(x) __builtin_rx_mvtc(0x2, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_USP() (void *)__builtin_rx_mvfc(0x2)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_USP_register(unsigned long) */
|
||||||
|
#define R_BSP_SET_USP(x) __set_USP_register((unsigned long)(x))
|
||||||
|
/* unsigned long __get_USP_register(void) */
|
||||||
|
#define R_BSP_GET_USP() (void *)__get_USP_register()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Interrupt Stack Pointer (ISP) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_isp(void *data) */
|
||||||
|
#define R_BSP_SET_ISP(x) set_isp((void *)(x))
|
||||||
|
/* void *get_isp(void) */
|
||||||
|
#define R_BSP_GET_ISP() get_isp()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_ISP(x) __builtin_rx_mvtc(0xA, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_ISP() (void *)__builtin_rx_mvfc(0xA)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_ISP_register(unsigned long) */
|
||||||
|
#define R_BSP_SET_ISP(x) __set_ISP_register((unsigned long)(x))
|
||||||
|
/* unsigned long __get_ISP_register(void) */
|
||||||
|
#define R_BSP_GET_ISP() (void *)__get_ISP_register()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Interrupt Table Register (INTB) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_intb(void *data) */
|
||||||
|
#define R_BSP_SET_INTB(x) set_intb((void *)(x))
|
||||||
|
/* void *get_intb(void) */
|
||||||
|
#define R_BSP_GET_INTB() get_intb()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_INTB(x) __builtin_rx_mvtc(0xC, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_INTB() (void *)__builtin_rx_mvfc(0xC)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_interrupt_table(unsigned long address) */
|
||||||
|
#define R_BSP_SET_INTB(x) __set_interrupt_table((unsigned long)(x))
|
||||||
|
/* unsigned long __get_interrupt_table(void); */
|
||||||
|
#define R_BSP_GET_INTB() (void *)__get_interrupt_table()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Backup PSW (BPSW) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_bpsw(unsigned long data) */
|
||||||
|
#define R_BSP_SET_BPSW(x) set_bpsw((unsigned long)(x))
|
||||||
|
/* unsigned long get_bpsw(void) */
|
||||||
|
#define R_BSP_GET_BPSW() get_bpsw()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_BPSW(x) __builtin_rx_mvtc(0x8, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_BPSW() (unsigned long)__builtin_rx_mvfc(0x8)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetBPSW(uint32_t data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_BPSW(x) R_BSP_SetBPSW((uint32_t)(x))
|
||||||
|
/* uint32_t R_BSP_GetBPSW(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_BPSW() R_BSP_GetBPSW()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Backup PC (BPC) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_bpc(void *data) */
|
||||||
|
#define R_BSP_SET_BPC(x) set_bpc((void *)(x))
|
||||||
|
/* void *get_bpc(void) */
|
||||||
|
#define R_BSP_GET_BPC() get_bpc()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_BPC(x) __builtin_rx_mvtc(0x9, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_BPC() (void *)__builtin_rx_mvfc(0x9)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetBPC(void * data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_BPC(x) R_BSP_SetBPC((void *)(x))
|
||||||
|
/* void *R_BSP_GetBPC(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_BPC() R_BSP_GetBPC()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Fast Interrupt Vector Register (FINTV) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_fintv(void *data) */
|
||||||
|
#define R_BSP_SET_FINTV(x) set_fintv((void *)(x))
|
||||||
|
/* void *get_fintv(void) */
|
||||||
|
#define R_BSP_GET_FINTV() get_fintv()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_FINTV(x) __builtin_rx_mvtc(0xB, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_FINTV() (void *)__builtin_rx_mvfc(0xB)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __set_FINTV_register(__fast_int_f) */
|
||||||
|
#define R_BSP_SET_FINTV(x) __set_FINTV_register((__fast_int_f)(x))
|
||||||
|
/* __fast_int_f __get_FINTV_register(void) */
|
||||||
|
#define R_BSP_GET_FINTV() (void *)__get_FINTV_register()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Significant 64-bit multiplication ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* signed long long emul(signed long data1, signed long data2) */
|
||||||
|
#define R_BSP_EMUL(x, y) emul((signed long)(x), (signed long)(y))
|
||||||
|
/* unsigned long long emulu(unsigned long data1, unsigned long data2) */
|
||||||
|
#define R_BSP_EMULU(x, y) emulu((unsigned long)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* signed long long R_BSP_SignedMultiplication(signed long data1, signed long data2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_EMUL(x, y) R_BSP_SignedMultiplication((signed long)(x), (signed long)(y))
|
||||||
|
/* unsigned long long R_BSP_UnsignedMultiplication(unsigned long data1, unsigned long data2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_EMULU(x, y) R_BSP_UnsignedMultiplication((unsigned long)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* signed long long R_BSP_SignedMultiplication(signed long data1, signed long data2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_EMUL(x, y) R_BSP_SignedMultiplication((signed long)(x), (signed long)(y))
|
||||||
|
/* unsigned long long R_BSP_UnsignedMultiplication(unsigned long data1, unsigned long data2)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_EMULU(x, y) R_BSP_UnsignedMultiplication((unsigned long)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Processor mode (PM) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void chg_pmusr(void) */
|
||||||
|
#define R_BSP_CHG_PMUSR() chg_pmusr()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_ChangeToUserMode(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_CHG_PMUSR() R_BSP_ChangeToUserMode()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_ChangeToUserMode(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_CHG_PMUSR() R_BSP_ChangeToUserMode()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Accumulator (ACC) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_acc(signed long long data) */
|
||||||
|
#define R_BSP_SET_ACC(x) set_acc((signed long long)(x))
|
||||||
|
/* signed long long get_acc(void) */
|
||||||
|
#define R_BSP_GET_ACC() get_acc()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetACC(signed long long data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_ACC(x) R_BSP_SetACC((signed long long)(x))
|
||||||
|
/* signed long long R_BSP_GetACC(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_ACC() R_BSP_GetACC()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetACC(signed long long data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_ACC(x) R_BSP_SetACC((signed long long)(x))
|
||||||
|
/* signed long long R_BSP_GetACC(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_ACC() R_BSP_GetACC()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Control of the interrupt enable bits ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void setpsw_i(void) */
|
||||||
|
#define R_BSP_SETPSW_I() setpsw_i()
|
||||||
|
/* void clrpsw_i(void) */
|
||||||
|
#define R_BSP_CLRPSW_I() clrpsw_i()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_setpsw (int) */
|
||||||
|
#define R_BSP_SETPSW_I() __builtin_rx_setpsw('I')
|
||||||
|
/* void __builtin_rx_clrpsw (int) */
|
||||||
|
#define R_BSP_CLRPSW_I() __builtin_rx_clrpsw('I')
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void __enable_interrupt(void) */
|
||||||
|
#define R_BSP_SETPSW_I() __enable_interrupt()
|
||||||
|
/* void __disable_interrupt(void) */
|
||||||
|
#define R_BSP_CLRPSW_I() __disable_interrupt()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Multiply-and-accumulate operation ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* long macl(short *data1, short *data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACL(x, y, z) macl((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short macw1(short *data1, short *data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACW1(x, y, z) macw1((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short macw2(short *data1, short *data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACW2(x, y, z) macw2((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* long R_BSP_MulAndAccOperation_2byte(short *data1, short *data2, unsigned long count)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_MACL(x, y, z) R_BSP_MulAndAccOperation_2byte((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short R_BSP_MulAndAccOperation_FixedPoint1(short *data1, short *data2, unsigned long count)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_MACW1(x, y, z) R_BSP_MulAndAccOperation_FixedPoint1((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short R_BSP_MulAndAccOperation_FixedPoint2(short *data1, short *data2, unsigned long count)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_MACW2(x, y, z) R_BSP_MulAndAccOperation_FixedPoint2((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* long __macl(short * data1, short * data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACL(x, y, z) __macl((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short __macw1(short * data1, short * data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACW1(x, y, z) __macw1((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
/* short __macw2(short * data1, short * data2, unsigned long count) */
|
||||||
|
#define R_BSP_MACW2(x, y, z) __macw2((short *)(x), (short *)(y), (unsigned long)(z))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Exception Table Register (EXTB) ---------- */
|
||||||
|
#ifdef BSP_MCU_EXCEPTION_TABLE
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_extb(void *data) */
|
||||||
|
#define R_BSP_SET_EXTB(x) set_extb((void *)(x))
|
||||||
|
/* void *get_extb(void) */
|
||||||
|
#define R_BSP_GET_EXTB() get_extb()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void __builtin_rx_mvtc (int reg, int val) */
|
||||||
|
#define R_BSP_SET_EXTB(x) __builtin_rx_mvtc(0xD, (int)(x))
|
||||||
|
/* int __builtin_rx_mvfc (int) */
|
||||||
|
#define R_BSP_GET_EXTB() (void *)__builtin_rx_mvfc(0xD)
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetEXTB(void * data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_EXTB(x) R_BSP_SetEXTB((void *)(x))
|
||||||
|
/* void *R_BSP_GetEXTB(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_EXTB() R_BSP_GetEXTB()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Bit Manipulation ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void __bclr(unsigned char *data, unsigned long bit) */
|
||||||
|
#define R_BSP_BIT_CLEAR(x, y) __bclr((unsigned char *)(x), (unsigned long)(y))
|
||||||
|
/* void __bset(unsigned char *data, unsigned long bit) */
|
||||||
|
#define R_BSP_BIT_SET(x, y) __bset((unsigned char *)(x), (unsigned long)(y))
|
||||||
|
/* void __bnot(unsigned char *data, unsigned long bit) */
|
||||||
|
#define R_BSP_BIT_REVERSE(x, y) __bnot((unsigned char *)(x), (unsigned long)(y))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_BitClear(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_CLEAR(x, y) R_BSP_BitClear((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
/* void R_BSP_BitSet(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_SET(x, y) R_BSP_BitSet((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
/* void R_BSP_BitReverse(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_REVERSE(x, y) R_BSP_BitReverse((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_BitClear(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_CLEAR(x, y) R_BSP_BitClear((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
/* void R_BSP_BitSet(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_SET(x, y) R_BSP_BitSet((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
/* void R_BSP_BitReverse(uint8_t *data, uint32_t bit) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_BIT_REVERSE(x, y) R_BSP_BitReverse((uint8_t *)(x), (uint32_t)(y))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#ifdef __DPFPU
|
||||||
|
/* ---------- Double-Precision Floating-Point Status Word (DPSW) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void set_dpsw(unsigned long data) */
|
||||||
|
#define R_BSP_SET_DPSW(x) __set_dpsw((unsigned long)(x))
|
||||||
|
/* unsigned long get_dpsw(void) */
|
||||||
|
#define R_BSP_GET_DPSW() __get_dpsw()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetDPSW(uint32_t data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_DPSW(x) R_BSP_SetDPSW((uint32_t)(x))
|
||||||
|
/* uint32_t R_BSP_GetDPSW(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DPSW() R_BSP_GetDPSW()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetDPSW(uint32_t data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_DPSW(x) R_BSP_SetDPSW((uint32_t)(x))
|
||||||
|
/* uint32_t R_BSP_GetDPSW(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DPSW() R_BSP_GetDPSW()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Double-precision floating-point exception handling operation control register (DECNT) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void __set_decnt(unsigned long data) */
|
||||||
|
#define R_BSP_SET_DECNT(x) __set_decnt((unsigned long)(x))
|
||||||
|
/* unsigned long __get_decnt(void) */
|
||||||
|
#define R_BSP_GET_DECNT() __get_decnt()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetDECNT(uint32_t data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_DECNT(x) R_BSP_SetDECNT((uint32_t)(x))
|
||||||
|
/* uint32_t R_BSP_GetDECNT(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DECNT() R_BSP_GetDECNT()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_SetDECNT(uint32_t data) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SET_DECNT(x) R_BSP_SetDECNT((uint32_t)(x))
|
||||||
|
/* uint32_t R_BSP_GetDECNT(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DECNT() R_BSP_GetDECNT()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Double-precision floating-point exception program counter (DEPC) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void *__get_depc(void) */
|
||||||
|
#define R_BSP_GET_DEPC() __get_depc()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void *R_BSP_GetDEPC(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DEPC() R_BSP_GetDEPC()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void *R_BSP_GetDEPC(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_GET_DEPC() R_BSP_GetDEPC()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif /* __DPFPU */
|
||||||
|
#endif /* BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT */
|
||||||
|
|
||||||
|
/* ---------- Initializing Arithmetic Unit for Trigonometric Functions ---------- */
|
||||||
|
#ifdef BSP_MCU_TRIGONOMETRIC
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void __init_tfu(void) */
|
||||||
|
#define R_BSP_INIT_TFU() __init_tfu()
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_InitTFU(void) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_INIT_TFU() R_BSP_InitTFU()
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* Invalid for ICCRX.
|
||||||
|
Because the initilaze function of TFU is called automatically when the TFU function is called. */
|
||||||
|
#define R_BSP_INIT_TFU()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Calculating the Sine and Cosine of an angle at the same time(single precision) ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void __sincosf(float f, float *sin, float *cos) */
|
||||||
|
#define R_BSP_SINCOSF(x, y, z) __sincosf((float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_CalcSine_Cosine(float f, float *sin, float *cos) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SINCOSF(x, y, z) R_BSP_CalcSine_Cosine((float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_CalcSine_Cosine(float f, float *sin, float *cos) (This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_SINCOSF(x, y, z) __sincosf((float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------- Initializing Arithmetic Unit for Trigonometric Functions ---------- */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
/* void __atan2hypotf(float y, float x, float *atan2, float *hypot) */
|
||||||
|
#define R_BSP_ATAN2HYPOTF(w, x, y, z) __atan2hypotf((float)(w), (float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
/* void R_BSP_CalcAtan_SquareRoot(float y, float x, float *atan2, float *hypot)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_ATAN2HYPOTF(w, x, y, z) R_BSP_CalcAtan_SquareRoot((float)(w), (float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
/* void R_BSP_CalcAtan_SquareRoot(float y, float x, float *atan2, float *hypot)
|
||||||
|
(This macro uses API function of BSP.) */
|
||||||
|
#define R_BSP_ATAN2HYPOTF(w, x, y, z) __atan2hypotf((float)(w), (float)(x), (float *)(y), (float *)(z))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif /* BSP_MCU_TRIGONOMETRIC */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
signed long R_BSP_Max(signed long data1, signed long data2);
|
||||||
|
signed long R_BSP_Min(signed long data1, signed long data2);
|
||||||
|
long long R_BSP_MulAndAccOperation_B(long long init, unsigned long count, signed char *addr1, signed char *addr2);
|
||||||
|
long long R_BSP_MulAndAccOperation_W(long long init, unsigned long count, short *addr1, short *addr2);
|
||||||
|
long long R_BSP_MulAndAccOperation_L(long long init, unsigned long count, long *addr1, long *addr2);
|
||||||
|
unsigned long R_BSP_RotateLeftWithCarry(unsigned long data);
|
||||||
|
unsigned long R_BSP_RotateRightWithCarry(unsigned long data);
|
||||||
|
unsigned long R_BSP_RotateLeft(unsigned long data, unsigned long num);
|
||||||
|
unsigned long R_BSP_RotateRight(unsigned long data, unsigned long num);
|
||||||
|
long R_BSP_MulAndAccOperation_2byte(short* data1, short* data2, unsigned long count);
|
||||||
|
short R_BSP_MulAndAccOperation_FixedPoint1(short* data1, short* data2, unsigned long count);
|
||||||
|
short R_BSP_MulAndAccOperation_FixedPoint2(short* data1, short* data2, unsigned long count);
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__ICCRX__)
|
||||||
|
signed long long R_BSP_SignedMultiplication(signed long data1, signed long data2);
|
||||||
|
unsigned long long R_BSP_UnsignedMultiplication(unsigned long data1, unsigned long data2);
|
||||||
|
void R_BSP_SetACC(signed long long data);
|
||||||
|
signed long long R_BSP_GetACC(void);
|
||||||
|
#endif /* defined(__GNUC__) || defined(__ICCRX__) */
|
||||||
|
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_ChangeToUserMode(void);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_SetBPSW(uint32_t data);
|
||||||
|
uint32_t R_BSP_GetBPSW(void);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_SetBPC(void * data);
|
||||||
|
void *R_BSP_GetBPC(void);
|
||||||
|
#ifdef BSP_MCU_EXCEPTION_TABLE
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_SetEXTB(void * data);
|
||||||
|
void *R_BSP_GetEXTB(void);
|
||||||
|
#endif /* BSP_MCU_EXCEPTION_TABLE */
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_BitSet(uint8_t *data, uint32_t bit);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_BitClear(uint8_t *data, uint32_t bit);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_BitReverse(uint8_t *data, uint32_t bit);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_MoveToAccHiLong(int32_t data);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_MoveToAccLoLong(int32_t data);
|
||||||
|
int32_t R_BSP_MoveFromAccHiLong(void);
|
||||||
|
int32_t R_BSP_MoveFromAccMiLong(void);
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#ifdef __DPFPU
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_SetDPSW(uint32_t data);
|
||||||
|
uint32_t R_BSP_GetDPSW(void);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_SetDECNT(uint32_t data);
|
||||||
|
uint32_t R_BSP_GetDECNT(void);
|
||||||
|
void *R_BSP_GetDEPC(void);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef BSP_MCU_TRIGONOMETRIC
|
||||||
|
#ifdef __TFU
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_InitTFU(void);
|
||||||
|
#ifdef __FPU
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_CalcSine_Cosine(float f, float *sin, float *cos);
|
||||||
|
R_BSP_ATTRIB_INLINE_ASM void R_BSP_CalcAtan_SquareRoot(float y, float x, float *atan2, float *hypot);
|
||||||
|
#endif /* __FPU */
|
||||||
|
#endif /* __TFU */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* End of multiple inclusion prevention macro */
|
||||||
|
#endif /* R_RX_INTRINSIC_FUNCTIONS_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_typedefs.h
|
||||||
|
* Description : This has fixed-width integer and bool support for compilers that are not C99 compliant and do not have
|
||||||
|
* the header files stdint.h, stdbool.h, and stddef.h.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 18.09.2012 1.00 First Release
|
||||||
|
* : 21.06.2013 1.10 Added NULL and size_t support.
|
||||||
|
* : 22.11.2013 1.11 Changed size_t to 'unsigned long' from 'unsigned int'.
|
||||||
|
* : 28.02.2019 1.12 Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef R_TYPEDEFS_H
|
||||||
|
#define R_TYPEDEFS_H
|
||||||
|
|
||||||
|
#define bool (_Bool)
|
||||||
|
#define false (0)
|
||||||
|
#define true (1)
|
||||||
|
#define NULL (0)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef signed short int16_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef signed long int32_t;
|
||||||
|
typedef unsigned long uint32_t;
|
||||||
|
typedef signed long long int64_t;
|
||||||
|
typedef unsigned long long uint64_t;
|
||||||
|
typedef unsigned int _Bool;
|
||||||
|
typedef unsigned long size_t;
|
||||||
|
|
||||||
|
#endif /* End of multiple inclusion prevention macro */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,183 @@
|
||||||
|
;;/***********************************************************************************************************************
|
||||||
|
;;* 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 WARRANTIES REGARDING
|
||||||
|
;;* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
;;***********************************************************************************************************************/
|
||||||
|
;;/***********************************************************************************************************************
|
||||||
|
;;* File Name : reset_program.asm
|
||||||
|
;;* Description : Defines post-reset routines that are used to configure the MCU prior to the main program starting.
|
||||||
|
;;* This is where the program counter starts on power-up or reset.
|
||||||
|
;;***********************************************************************************************************************/
|
||||||
|
;;/***********************************************************************************************************************
|
||||||
|
;;* History : DD.MM.YYYY Version Description
|
||||||
|
;;* : 28.02.2019 1.00 First Release
|
||||||
|
;;***********************************************************************************************************************/
|
||||||
|
|
||||||
|
.if __GNUC__
|
||||||
|
|
||||||
|
;;reset_program.asm
|
||||||
|
|
||||||
|
.list
|
||||||
|
.section .text
|
||||||
|
.global _PowerON_Reset_PC ;;global Start routine
|
||||||
|
.global _PowerON_Reset ;;for backward compatibility
|
||||||
|
|
||||||
|
.extern _PowerON_Reset_PC_Prg ;;external Power ON Reset main function in RESETPRG.C
|
||||||
|
.extern _data
|
||||||
|
.extern _mdata
|
||||||
|
.extern _ebss
|
||||||
|
.extern _bss
|
||||||
|
.extern _edata
|
||||||
|
.extern _ustack
|
||||||
|
.extern _istack
|
||||||
|
.extern _exit
|
||||||
|
|
||||||
|
|
||||||
|
_PowerON_Reset_PC :
|
||||||
|
_PowerON_Reset :
|
||||||
|
;;initialise user stack pointer
|
||||||
|
mvtc #_ustack,USP
|
||||||
|
|
||||||
|
;;initialise interrupt stack pointer
|
||||||
|
mvtc #_istack,ISP
|
||||||
|
|
||||||
|
;;jump to Power ON Reset main function in RESETPRG.C
|
||||||
|
bra _PowerON_Reset_PC_Prg
|
||||||
|
|
||||||
|
;;init section
|
||||||
|
.global __INITSCT
|
||||||
|
.type __INITSCT,@function
|
||||||
|
__INITSCT:
|
||||||
|
|
||||||
|
;;load data section from ROM to RAM
|
||||||
|
pushm r1-r3
|
||||||
|
mov #_mdata,r2 ;;src ROM address of data section in R2
|
||||||
|
mov #_data,r1 ;;dest start RAM address of data section in R1
|
||||||
|
mov #_edata,r3 ;;end RAM address of data section in R3
|
||||||
|
sub r1,r3 ;;size of data section in R3 (R3=R3-R1)
|
||||||
|
smovf ;;block copy R3 bytes from R2 to R1
|
||||||
|
|
||||||
|
;;bss initialisation : zero out bss
|
||||||
|
mov #00h,r2 ;;load R2 reg with zero
|
||||||
|
mov #_ebss, r3 ;;store the end address of bss in R3
|
||||||
|
mov #_bss, r1 ;;store the start address of bss in R1
|
||||||
|
sub r1,r3 ;;size of bss section in R3 (R3=R3-R1)
|
||||||
|
sstr.b
|
||||||
|
popm r1-r3
|
||||||
|
rts
|
||||||
|
|
||||||
|
#ifdef CPPAPP
|
||||||
|
|
||||||
|
;;init global class object
|
||||||
|
.global __CALL_INIT
|
||||||
|
.type __CALL_INIT,@function
|
||||||
|
__CALL_INIT:
|
||||||
|
bra __rx_init
|
||||||
|
|
||||||
|
.global _rx_run_preinit_array
|
||||||
|
.type _rx_run_preinit_array,@function
|
||||||
|
_rx_run_preinit_array:
|
||||||
|
mov #__preinit_array_start,r1
|
||||||
|
mov #__preinit_array_end,r2
|
||||||
|
bra.a _rx_run_inilist
|
||||||
|
|
||||||
|
.global _rx_run_init_array
|
||||||
|
.type _rx_run_init_array,@function
|
||||||
|
_rx_run_init_array:
|
||||||
|
mov #__init_array_start,r1
|
||||||
|
mov #__init_array_end,r2
|
||||||
|
mov #4, r3
|
||||||
|
bra.a _rx_run_inilist
|
||||||
|
|
||||||
|
.global _rx_run_fini_array
|
||||||
|
.type _rx_run_fini_array,@function
|
||||||
|
_rx_run_fini_array:
|
||||||
|
mov #__fini_array_start,r2
|
||||||
|
mov #__fini_array_end,r1
|
||||||
|
mov #-4, r3
|
||||||
|
;;fall through
|
||||||
|
|
||||||
|
_rx_run_inilist:
|
||||||
|
next_inilist:
|
||||||
|
cmp r1,r2
|
||||||
|
beq.b done_inilist
|
||||||
|
mov.l [r1],r4
|
||||||
|
cmp #-1, r4
|
||||||
|
beq.b skip_inilist
|
||||||
|
cmp #0, r4
|
||||||
|
beq.b skip_inilist
|
||||||
|
pushm r1-r3
|
||||||
|
jsr r4
|
||||||
|
popm r1-r3
|
||||||
|
skip_inilist:
|
||||||
|
add r3,r1
|
||||||
|
bra.b next_inilist
|
||||||
|
done_inilist:
|
||||||
|
rts
|
||||||
|
|
||||||
|
.section .init,"ax"
|
||||||
|
.balign 4
|
||||||
|
|
||||||
|
.global __rx_init
|
||||||
|
__rx_init:
|
||||||
|
|
||||||
|
.section .fini,"ax"
|
||||||
|
.balign 4
|
||||||
|
|
||||||
|
.global __rx_fini
|
||||||
|
__rx_fini:
|
||||||
|
bsr.a _rx_run_fini_array
|
||||||
|
|
||||||
|
.section .sdata
|
||||||
|
.balign 4
|
||||||
|
.global __gp
|
||||||
|
.weak __gp
|
||||||
|
__gp:
|
||||||
|
|
||||||
|
.section .data
|
||||||
|
.global ___dso_handle
|
||||||
|
.weak ___dso_handle
|
||||||
|
___dso_handle:
|
||||||
|
.long 0
|
||||||
|
|
||||||
|
.section .init,"ax"
|
||||||
|
bsr.a _rx_run_preinit_array
|
||||||
|
bsr.a _rx_run_init_array
|
||||||
|
rts
|
||||||
|
|
||||||
|
.global __rx_init_end
|
||||||
|
__rx_init_end:
|
||||||
|
|
||||||
|
.section .fini,"ax"
|
||||||
|
|
||||||
|
rts
|
||||||
|
.global __rx_fini_end
|
||||||
|
__rx_fini_end:
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;;call to exit
|
||||||
|
_exit:
|
||||||
|
bra _loop_here
|
||||||
|
_loop_here:
|
||||||
|
bra _loop_here
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.end
|
||||||
|
|
||||||
|
|
@ -0,0 +1,365 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2014 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : resetprg.c
|
||||||
|
* Description : Defines post-reset routines that are used to configure the MCU prior to the main program starting.
|
||||||
|
* This is where the program counter starts on power-up or reset.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* Renamed following macro definitions.
|
||||||
|
* - BSP_PRV_PSW_INIT
|
||||||
|
* - BSP_PRV_FPSW_INIT
|
||||||
|
* - BSP_PRV_FPU_ROUND
|
||||||
|
* - BSP_PRV_FPU_DENOM
|
||||||
|
* Added following macro definitions.
|
||||||
|
* - BSP_PRV_DPSW_INIT
|
||||||
|
* : 26.07.2019 3.01 Added vbatt_voltage_stability_wait function.
|
||||||
|
* : 08.10.2019 3.10 Changed for added support of Renesas RTOS (RI600V4 or RI600PX).
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
/* Defines MCU configuration functions used in this file */
|
||||||
|
#include <_h_c_lib.h>
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
|
||||||
|
/* Define the target platform */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
|
||||||
|
#if BSP_CFG_RENESAS_RTOS_USED == RENESAS_RI600PX
|
||||||
|
#pragma section P PS
|
||||||
|
#pragma section B BS
|
||||||
|
#pragma section C CS
|
||||||
|
#pragma section D DS
|
||||||
|
#else
|
||||||
|
#include "ri_cmt.h" /* Generated by cfg600 */
|
||||||
|
#endif /* BSP_CFG_RENESAS_RTOS_USED */
|
||||||
|
|
||||||
|
#else /* BSP_CFG_RTOS_USED!=4 */
|
||||||
|
|
||||||
|
/* Declaration of stack size. */
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
R_BSP_PRAGMA_STACKSIZE_SU(BSP_CFG_USTACK_BYTES)
|
||||||
|
#endif
|
||||||
|
R_BSP_PRAGMA_STACKSIZE_SI(BSP_CFG_ISTACK_BYTES)
|
||||||
|
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
#define BSP_PRV_PSW_INIT (0x00000000) /* Supervisor mode & Disable Interrupt */
|
||||||
|
#else /* BSP_CFG_RTOS_USED!=4 */
|
||||||
|
/* If the user chooses only 1 stack then the 'U' bit will not be set and the CPU will always use the interrupt stack. */
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
#define BSP_PRV_PSW_INIT (0x00030000)
|
||||||
|
#else
|
||||||
|
#define BSP_PRV_PSW_INIT (0x00010000)
|
||||||
|
#endif
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_FLOATING_POINT
|
||||||
|
/* Initialize FPSW for floating-point operations */
|
||||||
|
#define BSP_PRV_FPSW_INIT (0x00000000) /* Currently nothing set by default. */
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
/* Initialize DPSW for double-precision floating-point operations */
|
||||||
|
#define BSP_PRV_DPSW_INIT (0x00000000) /* Currently nothing set by default. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __ROZ
|
||||||
|
#define BSP_PRV_FPU_ROUND (0x00000001) /* Let FPSW RMbits=01 (round to zero) */
|
||||||
|
#else
|
||||||
|
#define BSP_PRV_FPU_ROUND (0x00000000) /* Let FPSW RMbits=00 (round to nearest) */
|
||||||
|
#endif
|
||||||
|
#ifdef __DOFF
|
||||||
|
#define BSP_PRV_FPU_DENOM (0x00000100) /* Let FPSW DNbit=1 (denormal as zero) */
|
||||||
|
#else
|
||||||
|
#define BSP_PRV_FPU_DENOM (0x00000000) /* Let FPSW DNbit=0 (denormal as is) */
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Pre-processor Directives
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Set this as the entry point from a power-on reset */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
#pragma entry PowerON_Reset_PC
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
External function Prototypes
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Initialize C runtime environment */
|
||||||
|
extern void _INITSCT(void);
|
||||||
|
|
||||||
|
#if defined(CPPAPP)
|
||||||
|
/* Initialize C++ global class object */
|
||||||
|
extern void _CALL_INIT(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED != 0
|
||||||
|
/* If user is requesting warm start callback functions then these are the prototypes. */
|
||||||
|
void BSP_CFG_USER_WARM_START_PRE_C_FUNCTION(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED != 0
|
||||||
|
/* If user is requesting warm start callback functions then these are the prototypes. */
|
||||||
|
void BSP_CFG_USER_WARM_START_POST_C_FUNCTION(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 1 /* FreeRTOS */
|
||||||
|
/* A function is used to create a main task, rtos's objects required to be available in advance. */
|
||||||
|
extern void Processing_Before_Start_Kernel(void);
|
||||||
|
#elif BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
/* kernel initialization routine */
|
||||||
|
extern void vsta_knl(void);
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Power-on reset function declaration */
|
||||||
|
R_BSP_POR_FUNCTION(R_BSP_STARTUP_FUNCTION);
|
||||||
|
|
||||||
|
/* Main program function declaration */
|
||||||
|
#if BSP_CFG_RTOS_USED == 0 /* Non-OS */
|
||||||
|
extern void R_BSP_MAIN_FUNCTION(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: PowerON_Reset_PC
|
||||||
|
* Description : This function is the MCU's entry point from a power-on reset.
|
||||||
|
* The following steps are taken in the startup code:
|
||||||
|
* 1. The User Stack Pointer (USP) and Interrupt Stack Pointer (ISP) are both set immediately after entry
|
||||||
|
* to this function. The USP and ISP stack sizes are set in the file bsp_config.h.
|
||||||
|
* 2. The interrupt vector base register is set to point to the beginning of the relocatable interrupt
|
||||||
|
* vector table.
|
||||||
|
* 3. The MCU is setup for floating point operations by setting the initial value of the Floating Point
|
||||||
|
* Status Word (FPSW).
|
||||||
|
* 4. The MCU operating frequency is set by configuring the Clock Generation Circuit (CGC) in
|
||||||
|
* operating_frequency_set.
|
||||||
|
* 5. Calls are made to functions to setup the C runtime environment which involves initializing all
|
||||||
|
* initialed data, zeroing all uninitialized variables, and configuring STDIO if used
|
||||||
|
* (calls to _INITSCT and init_iolib).
|
||||||
|
* 6. Board-specific hardware setup, including configuring I/O pins on the MCU, in hardware_setup.
|
||||||
|
* 7. Global interrupts are enabled by setting the I bit in the Program Status Word (PSW), and the stack
|
||||||
|
* is switched from the ISP to the USP. The initial Interrupt Priority Level is set to zero, enabling
|
||||||
|
* any interrupts with a priority greater than zero to be serviced.
|
||||||
|
* 8. The processor is optionally switched to user mode. To run in user mode, set the macro
|
||||||
|
* BSP_CFG_RUN_IN_USER_MODE above to a 1.
|
||||||
|
* 9. The bus error interrupt is enabled to catch any accesses to invalid or reserved areas of memory.
|
||||||
|
*
|
||||||
|
* Once this initialization is complete, the user's main() function is called. It should not return.
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_POR_FUNCTION(R_BSP_STARTUP_FUNCTION)
|
||||||
|
{
|
||||||
|
/* Stack pointers are setup prior to calling this function - see comments above */
|
||||||
|
|
||||||
|
/* You can use auto variables in this function but such variables other than register variables
|
||||||
|
* will be unavailable after you change the stack from the I stack to the U stack (if change). */
|
||||||
|
|
||||||
|
/* The bss sections have not been cleared and the data sections have not been initialized
|
||||||
|
* and constructors of C++ objects have not been executed until the _INITSCT() is executed. */
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
INTERNAL_NOT_USED(ustack_area);
|
||||||
|
#endif
|
||||||
|
INTERNAL_NOT_USED(istack_area);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
/* Initialize the Interrupt Table Register */
|
||||||
|
R_BSP_SET_INTB(R_BSP_SECTOP_INTVECTTBL);
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_EXCEPTION_TABLE
|
||||||
|
/* Initialize the Exception Table Register */
|
||||||
|
R_BSP_SET_EXTB(R_BSP_SECTOP_EXCEPTVECTTBL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_FLOATING_POINT
|
||||||
|
#ifdef __FPU
|
||||||
|
/* Initialize the Floating-Point Status Word Register. */
|
||||||
|
R_BSP_SET_FPSW(BSP_PRV_FPSW_INIT | BSP_PRV_FPU_ROUND | BSP_PRV_FPU_DENOM);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#ifdef __DPFPU
|
||||||
|
/* Initialize the Double-Precision Floating-Point Status Word Register. */
|
||||||
|
R_BSP_SET_DPSW(BSP_PRV_DPSW_INIT | BSP_PRV_FPU_ROUND | BSP_PRV_FPU_DENOM);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initializes the trigonometric function unit. */
|
||||||
|
#ifdef BSP_MCU_TRIGONOMETRIC
|
||||||
|
#ifdef __TFU
|
||||||
|
R_BSP_INIT_TFU();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
/* Wait for power voltage stabilization of VBATT function. */
|
||||||
|
#if (defined(BSP_CFG_VBATT_ENABLE) && (BSP_CFG_VBATT_ENABLE == 0))
|
||||||
|
vbatt_voltage_stability_wait();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Switch to high-speed operation */
|
||||||
|
mcu_clock_setup();
|
||||||
|
|
||||||
|
/* If the warm start Pre C runtime callback is enabled, then call it. */
|
||||||
|
#if BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED == 1
|
||||||
|
BSP_CFG_USER_WARM_START_PRE_C_FUNCTION();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize C runtime environment */
|
||||||
|
_INITSCT();
|
||||||
|
|
||||||
|
#if defined(CPPAPP)
|
||||||
|
/* Initialize C++ global class object */
|
||||||
|
_CALL_INIT();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize RAM */
|
||||||
|
bsp_ram_initialize();
|
||||||
|
|
||||||
|
/* If the warm start Post C runtime callback is enabled, then call it. */
|
||||||
|
#if BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED == 1
|
||||||
|
BSP_CFG_USER_WARM_START_POST_C_FUNCTION();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_IO_LIB_ENABLE == 1
|
||||||
|
/* Comment this out if not using I/O lib */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
init_iolib();
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Initialize MCU interrupt callbacks. */
|
||||||
|
bsp_interrupt_open();
|
||||||
|
|
||||||
|
/* Initialize register protection functionality. */
|
||||||
|
bsp_register_protect_open();
|
||||||
|
|
||||||
|
/* Configure the MCU and board hardware */
|
||||||
|
hardware_setup();
|
||||||
|
|
||||||
|
/* Enable interrupt and select the I stack or the U stack */
|
||||||
|
R_BSP_SET_PSW(BSP_PRV_PSW_INIT);
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
/* Does not change the MCU's user mode to user in Renesas RTOS. */
|
||||||
|
#else /* BSP_CFG_RTOS_USED != 4 */
|
||||||
|
#if BSP_CFG_RUN_IN_USER_MODE == 1
|
||||||
|
/* Change the MCU's user mode from supervisor to user */
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
R_BSP_CHG_PMUSR();
|
||||||
|
#else
|
||||||
|
#error "Settings of BSP_CFG_RUN_IN_USER_MODE and BSP_CFG_USER_STACK_ENABLE are inconsistent with each other."
|
||||||
|
#endif
|
||||||
|
#endif /* BSP_CFG_RUN_IN_USER_MODE */
|
||||||
|
#endif /* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
/* Enable the bus error interrupt to catch accesses to illegal/reserved areas of memory */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BUS_ERROR, BSP_INT_CMD_INTERRUPT_ENABLE, FIT_NO_PTR);
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 0 /* Non-OS */
|
||||||
|
/* Call the main program function (should not return) */
|
||||||
|
R_BSP_MAIN_FUNCTION();
|
||||||
|
#elif BSP_CFG_RTOS_USED == 1 /* FreeRTOS */
|
||||||
|
/* Lock the channel that system timer of RTOS is using. */
|
||||||
|
#if (((BSP_CFG_RTOS_SYSTEM_TIMER) >=0) && ((BSP_CFG_RTOS_SYSTEM_TIMER) <= 3))
|
||||||
|
if (R_BSP_HardwareLock((mcu_lock_t)(BSP_LOCK_CMT0 + BSP_CFG_RTOS_SYSTEM_TIMER)) == false)
|
||||||
|
{
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#error "Setting BSP_CFG_RTOS_SYSTEM_TIMER is invalid."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Prepare the necessary tasks, FreeRTOS's resources... required to be executed at the beginning
|
||||||
|
* after vTaskStarScheduler() is called. Other tasks can also be created after starting scheduler at any time */
|
||||||
|
Processing_Before_Start_Kernel();
|
||||||
|
|
||||||
|
/* Call the kernel startup (should not return) */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
#elif BSP_CFG_RTOS_USED == 2 /* SEGGER embOS */
|
||||||
|
#elif BSP_CFG_RTOS_USED == 3 /* Micrium MicroC/OS */
|
||||||
|
#elif BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
#if BSP_CFG_RENESAS_RTOS_USED == RENESAS_RI600V4
|
||||||
|
/* Lock a timer resource by r_bsp, if using time function on RTOS. */
|
||||||
|
if(R_BSP_HardwareLock((mcu_lock_t)(BSP_LOCK_CMT0 + _RI_CLOCK_TIMER)) == false)
|
||||||
|
{
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
/* Initialize CMT for RI600V4 */
|
||||||
|
_RI_init_cmt();
|
||||||
|
#else
|
||||||
|
/* When RI600PX, the above are in _RI_init_cmt_knl called from the kernel. */
|
||||||
|
#endif
|
||||||
|
/* Make sure to disable interrupt. */
|
||||||
|
R_BSP_CLRPSW_I();/* clrpsw_i() */
|
||||||
|
vsta_knl();
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
#if BSP_CFG_IO_LIB_ENABLE == 1
|
||||||
|
/* Comment this out if not using I/O lib - cleans up open files */
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
close_all();
|
||||||
|
#endif /* defined(__CCRX__) */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Infinite loop is intended here. */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
/* Infinite loop. Put a breakpoint here if you want to catch an exit of main(). */
|
||||||
|
R_BSP_NOP();
|
||||||
|
}
|
||||||
|
} /* End of function PowerON_Reset_PC() */
|
||||||
|
|
||||||
|
#if BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
/* Definition of Kernel data section */
|
||||||
|
#include "kernel_ram.h" /* generated by cfg600 */
|
||||||
|
#include "kernel_rom.h" /* generated by cfg600 */
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : sbrk.c
|
||||||
|
* Description : Configures the MCU heap memory. The size of the heap is defined by the macro HEAPSIZE below.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 3.00 Merged processing of all devices.
|
||||||
|
* Added support for GNUC and ICCRX.
|
||||||
|
* Fixed coding style.
|
||||||
|
* : 26.07.2019 3.01 Fixed coding style.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "sbrk.h"
|
||||||
|
|
||||||
|
/* Only use this file if heap is enabled in r_bsp_config. */
|
||||||
|
#if BSP_CFG_HEAP_BYTES > 0
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Declare memory heap area */
|
||||||
|
static u_heap_type_t s_heap_area;
|
||||||
|
|
||||||
|
/* End address allocated by sbrk (CC-RX and GNURX+NEWLIB) */
|
||||||
|
static int8_t *sp_brk=(int8_t *)&s_heap_area;
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
/* Start address of allocated heap area (GNURX+OPTLIB only) */
|
||||||
|
int8_t *_heap_of_memory=(int8_t *)&s_heap_area;
|
||||||
|
/* End address of allocated heap area (GNURX+OPTLIB only) */
|
||||||
|
int8_t *_last_heap_object=(int8_t *)&s_heap_area;
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: sbrk
|
||||||
|
* Description : This function configures MCU memory area allocation. (CC-RX and GNURX+NEWLIB)
|
||||||
|
* Arguments : size -
|
||||||
|
* assigned area size
|
||||||
|
* Return value : Start address of allocated area (pass)
|
||||||
|
* -1 (failure)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int8_t *sbrk(size_t size)
|
||||||
|
{
|
||||||
|
int8_t *p_area;
|
||||||
|
|
||||||
|
if ((sp_brk + size) > (s_heap_area.heap + BSP_CFG_HEAP_BYTES))
|
||||||
|
{
|
||||||
|
/* Empty area size */
|
||||||
|
p_area = (int8_t *)-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Area assignment */
|
||||||
|
p_area = sp_brk;
|
||||||
|
|
||||||
|
/* End address update */
|
||||||
|
sp_brk += size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return result */
|
||||||
|
return p_area;
|
||||||
|
} /* End of function sbrk() */
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function name: _top_of_heap
|
||||||
|
* Description : This function returns end address of reserved heap area. (GNURX+OPTLIB only)
|
||||||
|
* Arguments : none
|
||||||
|
* Return value : End address of reserved heap area
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
int8_t *_top_of_heap(void)
|
||||||
|
{
|
||||||
|
return (int8_t *)(s_heap_area.heap + BSP_CFG_HEAP_BYTES);
|
||||||
|
} /* End of function End of function sbrk()() */
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_HEAP_BYTES */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : sbrk.h
|
||||||
|
* Description : Configures the MCU heap memory. The size of the heap is defined by the macro HEAPSIZE below.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 28.02.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "r_bsp_common.h"
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef SBRK_H
|
||||||
|
#define SBRK_H
|
||||||
|
|
||||||
|
/* Only use this file if heap is enabled in r_bsp_config. */
|
||||||
|
#if BSP_CFG_HEAP_BYTES > 0
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
int32_t dummy; /* Dummy for 4-byte boundary */
|
||||||
|
int8_t heap[BSP_CFG_HEAP_BYTES]; /* Declaration of the area managed by sbrk*/
|
||||||
|
} u_heap_type_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* const size_t _sbrk_size= // Specifies the minimum unit of */
|
||||||
|
/* the defined heap area */
|
||||||
|
int8_t *_s1ptr;
|
||||||
|
|
||||||
|
/* Memory allocation function prototype declaration (CC-RX and GNURX+NEWLIB) */
|
||||||
|
int8_t *sbrk(size_t size);
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
/* Memory address function prototype declaration (GNURX+OPTLIB only) */
|
||||||
|
int8_t *_top_of_heap(void);
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_HEAP_BYTES */
|
||||||
|
|
||||||
|
#endif /* SBRK_H */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,51 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_clocks.h
|
||||||
|
* Description : Contains clock specific routines.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_CLOCKS_H
|
||||||
|
#define MCU_CLOCKS_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
uint32_t get_iclk_freq_hz(void);
|
||||||
|
void mcu_clock_setup(void);
|
||||||
|
|
||||||
|
/* End of multiple inclusion prevention macro */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -0,0 +1,269 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_info.h
|
||||||
|
* Device(s) : RX72N
|
||||||
|
* Description : Information about the MCU.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Gets MCU configuration information. */
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_INFO
|
||||||
|
#define MCU_INFO
|
||||||
|
|
||||||
|
/* MCU CPU Version */
|
||||||
|
#define BSP_MCU_CPU_VERSION (3)
|
||||||
|
|
||||||
|
/* CPU cycles. Known number of RXv3 CPU cycles required to execute the delay_wait() loop */
|
||||||
|
#define CPU_CYCLES_PER_LOOP (3)
|
||||||
|
|
||||||
|
/* MCU Series. */
|
||||||
|
#if BSP_CFG_MCU_PART_SERIES == 0x0
|
||||||
|
#define BSP_MCU_SERIES_RX700 (1)
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_MCU_PART_SERIES - Unknown MCU Series chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This macro means that this MCU is part of the RX72x collection of MCUs (i.e. RX72N). */
|
||||||
|
#define BSP_MCU_RX72_ALL (1)
|
||||||
|
|
||||||
|
/* MCU Group name. */
|
||||||
|
#if BSP_CFG_MCU_PART_GROUP == 0x0
|
||||||
|
#define BSP_MCU_RX72N (1)
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_MCU_PART_GROUP - Unknown MCU Group chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Package. */
|
||||||
|
#if BSP_CFG_MCU_PART_PACKAGE == 0x0
|
||||||
|
#define BSP_PACKAGE_LFQFP176 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (176)
|
||||||
|
#elif BSP_CFG_MCU_PART_PACKAGE == 0x1
|
||||||
|
#define BSP_PACKAGE_LFBGA176 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (176)
|
||||||
|
#elif BSP_CFG_MCU_PART_PACKAGE == 0x2
|
||||||
|
#define BSP_PACKAGE_LFBGA224 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (224)
|
||||||
|
#elif BSP_CFG_MCU_PART_PACKAGE == 0x3
|
||||||
|
#define BSP_PACKAGE_LFQFP144 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (144)
|
||||||
|
#elif BSP_CFG_MCU_PART_PACKAGE == 0x4
|
||||||
|
#define BSP_PACKAGE_TFLGA145 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (145)
|
||||||
|
#elif BSP_CFG_MCU_PART_PACKAGE == 0x5
|
||||||
|
#define BSP_PACKAGE_LFQFP100 (1)
|
||||||
|
#define BSP_PACKAGE_PINS (100)
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_MCU_PART_PACKAGE - Unknown package chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Memory size of your MCU. */
|
||||||
|
#if BSP_CFG_MCU_PART_MEMORY_SIZE == 0xD
|
||||||
|
#define BSP_ROM_SIZE_BYTES (2097152)
|
||||||
|
#define BSP_RAM_SIZE_BYTES (1048576)
|
||||||
|
#define BSP_DATA_FLASH_SIZE_BYTES (32768)
|
||||||
|
#elif BSP_CFG_MCU_PART_MEMORY_SIZE == 0x17
|
||||||
|
#define BSP_ROM_SIZE_BYTES (4194304)
|
||||||
|
#define BSP_RAM_SIZE_BYTES (1048576)
|
||||||
|
#define BSP_DATA_FLASH_SIZE_BYTES (32768)
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_MCU_PART_MEMORY_SIZE - Unknown memory size chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* These macros define clock speeds for fixed speed clocks. */
|
||||||
|
#define BSP_LOCO_HZ (240000)
|
||||||
|
#define BSP_SUB_CLOCK_HZ (32768)
|
||||||
|
|
||||||
|
/* Define frequency of HOCO. */
|
||||||
|
#if BSP_CFG_HOCO_FREQUENCY == 0
|
||||||
|
#define BSP_HOCO_HZ (16000000)
|
||||||
|
#elif BSP_CFG_HOCO_FREQUENCY == 1
|
||||||
|
#define BSP_HOCO_HZ (18000000)
|
||||||
|
#elif BSP_CFG_HOCO_FREQUENCY == 2
|
||||||
|
#define BSP_HOCO_HZ (20000000)
|
||||||
|
#else
|
||||||
|
#error "ERROR - Invalid HOCO frequency chosen in r_bsp_config.h! Set valid value for BSP_CFG_HOCO_FREQUENCY."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Clock source select (CKSEL).
|
||||||
|
0 = Low Speed On-Chip Oscillator (LOCO)
|
||||||
|
1 = High Speed On-Chip Oscillator (HOCO)
|
||||||
|
2 = Main Clock Oscillator
|
||||||
|
3 = Sub-Clock Oscillator
|
||||||
|
4 = PLL Circuit
|
||||||
|
*/
|
||||||
|
#if BSP_CFG_CLOCK_SOURCE == 0
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ (BSP_LOCO_HZ)
|
||||||
|
#elif BSP_CFG_CLOCK_SOURCE == 1
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ (BSP_HOCO_HZ)
|
||||||
|
#elif BSP_CFG_CLOCK_SOURCE == 2
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ (BSP_CFG_XTAL_HZ)
|
||||||
|
#elif BSP_CFG_CLOCK_SOURCE == 3
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ (BSP_SUB_CLOCK_HZ)
|
||||||
|
#elif BSP_CFG_CLOCK_SOURCE == 4
|
||||||
|
#if BSP_CFG_PLL_SRC == 0
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ ((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL)
|
||||||
|
#elif BSP_CFG_PLL_SRC == 1
|
||||||
|
#define BSP_SELECTED_CLOCK_HZ ((BSP_HOCO_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL)
|
||||||
|
#else
|
||||||
|
#error "ERROR - Valid PLL clock source must be chosen in r_bsp_config.h using BSP_CFG_PLL_SRC macro."
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_CLOCK_SOURCE - Unknown clock source chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define frequency of PPLL clock. */
|
||||||
|
#if BSP_CFG_PLL_SRC == 0
|
||||||
|
#define BSP_PPLL_CLOCK_HZ ((BSP_CFG_XTAL_HZ/BSP_CFG_PPLL_DIV) * BSP_CFG_PPLL_MUL)
|
||||||
|
#elif BSP_CFG_PLL_SRC == 1
|
||||||
|
#define BSP_PPLL_CLOCK_HZ ((BSP_HOCO_HZ/BSP_CFG_PPLL_DIV) * BSP_CFG_PPLL_MUL)
|
||||||
|
#else
|
||||||
|
#error "ERROR - Valid PLL clock source must be chosen in r_bsp_config.h using BSP_CFG_PLL_SRC macro."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Extended Bus Master Priority setting
|
||||||
|
0 = GLCDC graphics 1 data read
|
||||||
|
1 = DRW2D texture data read
|
||||||
|
2 = DRW2D frame buffer data read write and display list data read
|
||||||
|
3 = GLCDC graphics 2 data read
|
||||||
|
4 = EDMAC
|
||||||
|
|
||||||
|
Note : Settings other than above are prohibited.
|
||||||
|
Duplicate priority settings can not be made.
|
||||||
|
*/
|
||||||
|
#if (BSP_CFG_EBMAPCR_1ST_PRIORITY == BSP_CFG_EBMAPCR_2ND_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_1ST_PRIORITY == BSP_CFG_EBMAPCR_3RD_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_1ST_PRIORITY == BSP_CFG_EBMAPCR_4TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_1ST_PRIORITY == BSP_CFG_EBMAPCR_5TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_2ND_PRIORITY == BSP_CFG_EBMAPCR_3RD_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_2ND_PRIORITY == BSP_CFG_EBMAPCR_4TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_2ND_PRIORITY == BSP_CFG_EBMAPCR_5TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_3RD_PRIORITY == BSP_CFG_EBMAPCR_4TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_3RD_PRIORITY == BSP_CFG_EBMAPCR_5TH_PRIORITY) ||\
|
||||||
|
(BSP_CFG_EBMAPCR_4TH_PRIORITY == BSP_CFG_EBMAPCR_5TH_PRIORITY)
|
||||||
|
#error "Error! Invalid setting for Extended Bus Master Priority in r_bsp_config.h. Please check BSP_CFG_EX_BUS_1ST_PRIORITY to BSP_CFG_EX_BUS_5TH_PRIORITY"
|
||||||
|
#endif
|
||||||
|
#if (5 <= BSP_CFG_EBMAPCR_1ST_PRIORITY) ||\
|
||||||
|
(5 <= BSP_CFG_EBMAPCR_2ND_PRIORITY) ||\
|
||||||
|
(5 <= BSP_CFG_EBMAPCR_3RD_PRIORITY) ||\
|
||||||
|
(5 <= BSP_CFG_EBMAPCR_4TH_PRIORITY) ||\
|
||||||
|
(5 <= BSP_CFG_EBMAPCR_5TH_PRIORITY)
|
||||||
|
#error "Error! Invalid setting for Extended Bus Master Priority in r_bsp_config.h. Please check BSP_CFG_EX_BUS_1ST_PRIORITY to BSP_CFG_EX_BUS_5TH_PRIORITY"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* System clock speed in Hz. */
|
||||||
|
#define BSP_ICLK_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_ICK_DIV)
|
||||||
|
/* Peripheral Module Clock A speed in Hz. Used for ETHERC and EDMAC. */
|
||||||
|
#define BSP_PCLKA_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_PCKA_DIV)
|
||||||
|
/* Peripheral Module Clock B speed in Hz. */
|
||||||
|
#define BSP_PCLKB_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_PCKB_DIV)
|
||||||
|
/* Peripheral Module Clock C speed in Hz. */
|
||||||
|
#define BSP_PCLKC_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_PCKC_DIV)
|
||||||
|
/* Peripheral Module Clock D speed in Hz. */
|
||||||
|
#define BSP_PCLKD_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_PCKD_DIV)
|
||||||
|
/* External bus clock speed in Hz. */
|
||||||
|
#define BSP_BCLK_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_BCK_DIV)
|
||||||
|
/* FlashIF clock speed in Hz. */
|
||||||
|
#define BSP_FCLK_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_FCK_DIV)
|
||||||
|
/* USB clock speed in Hz. */
|
||||||
|
#if BSP_CFG_USB_CLOCK_SOURCE == 2
|
||||||
|
#define BSP_UCLK_HZ (BSP_SELECTED_CLOCK_HZ / BSP_CFG_UCK_DIV)
|
||||||
|
#elif BSP_CFG_USB_CLOCK_SOURCE == 3
|
||||||
|
#define BSP_UCLK_HZ (BSP_PPLL_CLOCK_HZ / BSP_CFG_PPLCK_DIV)
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_USB_CLOCK_SOURCE - Unknown usb clock source chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* CLKOUT25M clock speed in Hz. */
|
||||||
|
#if BSP_CFG_PHY_CLOCK_SOURCE == 0
|
||||||
|
#define BSP_CLKOUT25M_HZ (BSP_SELECTED_CLOCK_HZ/8)
|
||||||
|
#elif BSP_CFG_PHY_CLOCK_SOURCE == 1
|
||||||
|
#define BSP_CLKOUT25M_HZ (BSP_PPLL_CLOCK_HZ / 8)
|
||||||
|
#elif BSP_CFG_PHY_CLOCK_SOURCE == 2
|
||||||
|
/* Ethernet-PHY not use */
|
||||||
|
#else
|
||||||
|
#error "ERROR - BSP_CFG_PHY_CLOCK_SOURCE - Unknown Ethernet-PHY clock source chosen in r_bsp_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Null argument definitions. */
|
||||||
|
#define FIT_NO_FUNC ((void (*)(void *))0x10000000) /* Reserved space on RX */
|
||||||
|
#define FIT_NO_PTR ((void *)0x10000000) /* Reserved space on RX */
|
||||||
|
|
||||||
|
/* Mininum and maximum IPL levels available for this MCU. */
|
||||||
|
#define BSP_MCU_IPL_MAX (0xF)
|
||||||
|
#define BSP_MCU_IPL_MIN (0)
|
||||||
|
|
||||||
|
/* Frequency threshold of memory wait cycle setting. */
|
||||||
|
#define BSP_MCU_MEMWAIT_FREQ_THRESHOLD (120000000) /* ICLK > 120MHz requires MEMWAIT register update */
|
||||||
|
|
||||||
|
/* Frequency threshold of iclk. */
|
||||||
|
#define BSP_MCU_ICLK_FREQ_THRESHOLD (70000000)
|
||||||
|
|
||||||
|
/* MCU functions */
|
||||||
|
#define BSP_MCU_REGISTER_WRITE_PROTECTION
|
||||||
|
#define BSP_MCU_RCPC_PRC0
|
||||||
|
#define BSP_MCU_RCPC_PRC1
|
||||||
|
#define BSP_MCU_RCPC_PRC3
|
||||||
|
#define BSP_MCU_FLOATING_POINT
|
||||||
|
#define BSP_MCU_DOUBLE_PRECISION_FLOATING_POINT
|
||||||
|
#define BSP_MCU_EXCEPTION_TABLE
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_IE0
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_BE0
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_BL0
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_BL1
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_BL2
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_AL0
|
||||||
|
#define BSP_MCU_GROUP_INTERRUPT_AL1
|
||||||
|
#define BSP_MCU_SOFTWARE_CONFIGURABLE_INTERRUPT
|
||||||
|
#define BSP_MCU_EXCEP_SUPERVISOR_INST_ISR
|
||||||
|
#define BSP_MCU_EXCEP_ACCESS_ISR
|
||||||
|
#define BSP_MCU_EXCEP_UNDEFINED_INST_ISR
|
||||||
|
#define BSP_MCU_EXCEP_FLOATING_POINT_ISR
|
||||||
|
#define BSP_MCU_NON_MASKABLE_ISR
|
||||||
|
#define BSP_MCU_UNDEFINED_INTERRUPT_SOURCE_ISR
|
||||||
|
#define BSP_MCU_BUS_ERROR_ISR
|
||||||
|
#define BSP_MCU_TRIGONOMETRIC
|
||||||
|
|
||||||
|
#define BSP_MCU_NMI_EXC_NMI_PIN
|
||||||
|
#define BSP_MCU_NMI_OSC_STOP_DETECT
|
||||||
|
#define BSP_MCU_NMI_WDT_ERROR
|
||||||
|
#define BSP_MCU_NMI_IWDT_ERROR
|
||||||
|
#define BSP_MCU_NMI_LVD1
|
||||||
|
#define BSP_MCU_NMI_LVD2
|
||||||
|
#define BSP_MCU_NMI_EXNMI
|
||||||
|
#define BSP_MCU_NMI_EXNMI_RAM
|
||||||
|
#define BSP_MCU_NMI_EXNMI_RAM_EXRAM
|
||||||
|
#define BSP_MCU_NMI_EXNMI_RAM_ECCRAM
|
||||||
|
#define BSP_MCU_NMI_EXNMI_DPFPUEX
|
||||||
|
|
||||||
|
#endif /* MCU_INFO */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,249 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_init.c
|
||||||
|
* Description : Performs initialization common to all MCUs in this Group
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Get specifics on this MCU. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* RX MCUs come in different packages and different pin counts.
|
||||||
|
Each bit of PORTm.PDR corresponds to each pin of port m; I/O direction can be specified in 1-bit units.
|
||||||
|
Each bit of PDR corresponding to port m that does not exist is reserved.
|
||||||
|
Also, each bit of PDR corresponding to P35 pins is reserved, because such pins are input only.
|
||||||
|
Make settings of the reserved bit according to the description in section 22.4, Initialization of the Port Direction
|
||||||
|
Register (PDR). These values are then ORed into the direction registers to set non-existent pins as outputs or
|
||||||
|
inputs, which can help save power.
|
||||||
|
*/
|
||||||
|
#if BSP_PACKAGE_PINS == 224
|
||||||
|
/* Refer User's Manual: Hardware Table 22.4. */
|
||||||
|
#define BSP_PRV_PORT0_NE_PIN_MASK (0x50)
|
||||||
|
#define BSP_PRV_PORT1_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT2_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT3_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT4_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT5_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT6_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT7_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT8_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT9_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTA_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTB_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTC_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTD_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTE_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTF_NE_PIN_MASK (0xC0)
|
||||||
|
#define BSP_PRV_PORTG_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTH_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTJ_NE_PIN_MASK (0xD0)
|
||||||
|
#define BSP_PRV_PORTK_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTL_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTM_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTN_NE_PIN_MASK (0xC0)
|
||||||
|
#define BSP_PRV_PORTQ_NE_PIN_MASK (0x00)
|
||||||
|
#elif BSP_PACKAGE_PINS == 176
|
||||||
|
/* Refer User's Manual: Hardware Table 22.5. */
|
||||||
|
#define BSP_PRV_PORT0_NE_PIN_MASK (0x50)
|
||||||
|
#define BSP_PRV_PORT1_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT2_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT3_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT4_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT5_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT6_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT7_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT8_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT9_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTA_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTB_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTC_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTD_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTE_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTF_NE_PIN_MASK (0xC0)
|
||||||
|
#define BSP_PRV_PORTG_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTH_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTJ_NE_PIN_MASK (0xD0)
|
||||||
|
#define BSP_PRV_PORTK_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTL_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTM_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTN_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTQ_NE_PIN_MASK (0xFF)
|
||||||
|
#elif (BSP_PACKAGE_PINS == 145) || (BSP_PACKAGE_PINS == 144)
|
||||||
|
/* Refer User's Manual: Hardware Table 22.6. */
|
||||||
|
#define BSP_PRV_PORT0_NE_PIN_MASK (0x50)
|
||||||
|
#define BSP_PRV_PORT1_NE_PIN_MASK (0x03)
|
||||||
|
#define BSP_PRV_PORT2_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT3_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT4_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT5_NE_PIN_MASK (0x80)
|
||||||
|
#define BSP_PRV_PORT6_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT7_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT8_NE_PIN_MASK (0x30)
|
||||||
|
#define BSP_PRV_PORT9_NE_PIN_MASK (0xF0)
|
||||||
|
#define BSP_PRV_PORTA_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTB_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTC_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTD_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTE_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTF_NE_PIN_MASK (0xDF)
|
||||||
|
#define BSP_PRV_PORTG_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTH_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTJ_NE_PIN_MASK (0xD7)
|
||||||
|
#define BSP_PRV_PORTK_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTL_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTM_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTN_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTQ_NE_PIN_MASK (0xFF)
|
||||||
|
#elif BSP_PACKAGE_PINS == 100
|
||||||
|
/* Refer User's Manual: Hardware Table 22.7. */
|
||||||
|
#define BSP_PRV_PORT0_NE_PIN_MASK (0x5F)
|
||||||
|
#define BSP_PRV_PORT1_NE_PIN_MASK (0x03)
|
||||||
|
#define BSP_PRV_PORT2_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT3_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT4_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORT5_NE_PIN_MASK (0xC0)
|
||||||
|
#define BSP_PRV_PORT6_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORT7_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORT8_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORT9_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTA_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTB_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTC_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTD_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTE_NE_PIN_MASK (0x00)
|
||||||
|
#define BSP_PRV_PORTF_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTG_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTH_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTJ_NE_PIN_MASK (0xF7)
|
||||||
|
#define BSP_PRV_PORTK_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTL_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTM_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTN_NE_PIN_MASK (0xFF)
|
||||||
|
#define BSP_PRV_PORTQ_NE_PIN_MASK (0xFF)
|
||||||
|
#else
|
||||||
|
#error "ERROR - This package is not defined in mcu_init.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_non_existent_port_init
|
||||||
|
* Description : For MCUs that do not have the maximum number of pins for their group (e.g. MCU with 176 pins when
|
||||||
|
* maximum is 224 pins) these 'non-existent' pins that are not bonded out need to be initialized to save
|
||||||
|
* power.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : none
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void bsp_non_existent_port_init (void)
|
||||||
|
{
|
||||||
|
/* OR in missing pin masks from above. */
|
||||||
|
|
||||||
|
/* Set PORT0.PDR */
|
||||||
|
PORT0.PDR.BYTE |= BSP_PRV_PORT0_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT1.PDR */
|
||||||
|
PORT1.PDR.BYTE |= BSP_PRV_PORT1_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT2.PDR */
|
||||||
|
PORT2.PDR.BYTE |= BSP_PRV_PORT2_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT3.PDR */
|
||||||
|
PORT3.PDR.BYTE |= BSP_PRV_PORT3_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT4.PDR */
|
||||||
|
PORT4.PDR.BYTE |= BSP_PRV_PORT4_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT5.PDR */
|
||||||
|
PORT5.PDR.BYTE |= BSP_PRV_PORT5_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT6.PDR */
|
||||||
|
PORT6.PDR.BYTE |= BSP_PRV_PORT6_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT7.PDR */
|
||||||
|
PORT7.PDR.BYTE |= BSP_PRV_PORT7_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT8.PDR */
|
||||||
|
PORT8.PDR.BYTE |= BSP_PRV_PORT8_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORT9.PDR */
|
||||||
|
PORT9.PDR.BYTE |= BSP_PRV_PORT9_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTA.PDR */
|
||||||
|
PORTA.PDR.BYTE |= BSP_PRV_PORTA_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTB.PDR */
|
||||||
|
PORTB.PDR.BYTE |= BSP_PRV_PORTB_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTC.PDR */
|
||||||
|
PORTC.PDR.BYTE |= BSP_PRV_PORTC_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTD.PDR */
|
||||||
|
PORTD.PDR.BYTE |= BSP_PRV_PORTD_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTE.PDR */
|
||||||
|
PORTE.PDR.BYTE |= BSP_PRV_PORTE_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTF.PDR */
|
||||||
|
PORTF.PDR.BYTE |= BSP_PRV_PORTF_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTG.PDR */
|
||||||
|
PORTG.PDR.BYTE |= BSP_PRV_PORTG_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTH.PDR */
|
||||||
|
PORTH.PDR.BYTE |= BSP_PRV_PORTH_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTJ.PDR */
|
||||||
|
PORTJ.PDR.BYTE |= BSP_PRV_PORTJ_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTK.PDR */
|
||||||
|
PORTK.PDR.BYTE |= BSP_PRV_PORTK_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTL.PDR */
|
||||||
|
PORTL.PDR.BYTE |= BSP_PRV_PORTL_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTM.PDR */
|
||||||
|
PORTM.PDR.BYTE |= BSP_PRV_PORTM_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTN.PDR */
|
||||||
|
PORTN.PDR.BYTE |= BSP_PRV_PORTN_NE_PIN_MASK;
|
||||||
|
|
||||||
|
/* Set PORTQ.PDR */
|
||||||
|
PORTQ.PDR.BYTE |= BSP_PRV_PORTQ_NE_PIN_MASK;
|
||||||
|
} /* End of function bsp_non_existent_port_init() */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_init.h
|
||||||
|
* Description : Performs initialization common to all MCUs in this Group
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_INIT_H
|
||||||
|
#define MCU_INIT_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void bsp_non_existent_port_init(void); //r_bsp internal function. DO NOT CALL.
|
||||||
|
|
||||||
|
#endif /* MCU_INIT_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,822 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_interrupts.c
|
||||||
|
* Description : This module is the control of the interrupt enable.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Access to r_bsp. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Let FPSW EV, EO, EZ, EU, EX=1 (FPU exceptions enabled.) */
|
||||||
|
#define BSP_PRV_FPU_EXCEPTIONS_ENABLE (0x00007C00)
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_bl0_handler_isr, VECT(ICU,GROUPBL0))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_bl1_handler_isr, VECT(ICU,GROUPBL1))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_bl2_handler_isr, VECT(ICU,GROUPBL2))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_al0_handler_isr, VECT(ICU,GROUPAL0))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_al1_handler_isr, VECT(ICU,GROUPAL1))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_ie0_handler_isr, VECT(ICU,GROUPIE0))
|
||||||
|
R_BSP_PRAGMA_STATIC_INTERRUPT(group_be0_handler_isr, VECT(ICU,GROUPBE0))
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_interrupt_enable_disable
|
||||||
|
* Description : Either enables or disables an interrupt.
|
||||||
|
* Arguments : vector -
|
||||||
|
* Which vector to enable or disable.
|
||||||
|
* enable -
|
||||||
|
* Whether to enable or disable the interrupt.
|
||||||
|
* Return Value : BSP_INT_SUCCESS -
|
||||||
|
* Interrupt enabled or disabled.
|
||||||
|
* BSP_INT_ERR_UNSUPPORTED -
|
||||||
|
* API does not support enabling/disabling for this vector.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
bsp_int_err_t bsp_interrupt_enable_disable (bsp_int_src_t vector, bool enable)
|
||||||
|
{
|
||||||
|
#ifdef __FPU
|
||||||
|
uint32_t tmp_fpsw;
|
||||||
|
#endif
|
||||||
|
bsp_int_err_t err = BSP_INT_SUCCESS;
|
||||||
|
|
||||||
|
switch (vector)
|
||||||
|
{
|
||||||
|
case (BSP_INT_SRC_BUS_ERROR):
|
||||||
|
if (true == enable)
|
||||||
|
{
|
||||||
|
/* Enable the bus error interrupt to catch accesses to illegal/reserved areas of memory */
|
||||||
|
/* Clear any pending interrupts */
|
||||||
|
IR(BSC,BUSERR) = 0;
|
||||||
|
|
||||||
|
/* Make this the highest priority interrupt (adjust as necessary for your application */
|
||||||
|
IPR(BSC,BUSERR) = 0x0F;
|
||||||
|
|
||||||
|
/* Enable the interrupt in the ICU*/
|
||||||
|
R_BSP_InterruptRequestEnable(VECT(BSC,BUSERR));
|
||||||
|
|
||||||
|
/* Enable illegal address interrupt in the BSC */
|
||||||
|
BSC.BEREN.BIT.IGAEN = 1;
|
||||||
|
|
||||||
|
/* Enable timeout detection enable. */
|
||||||
|
BSC.BEREN.BIT.TOEN = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Disable the bus error interrupt. */
|
||||||
|
/* Disable the interrupt in the ICU*/
|
||||||
|
R_BSP_InterruptRequestDisable(VECT(BSC,BUSERR));
|
||||||
|
|
||||||
|
/* Disable illegal address interrupt in the BSC */
|
||||||
|
BSC.BEREN.BIT.IGAEN = 0;
|
||||||
|
|
||||||
|
/* Disable timeout detection enable. */
|
||||||
|
BSC.BEREN.BIT.TOEN = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
#ifdef __FPU
|
||||||
|
case (BSP_INT_SRC_EXC_FPU):
|
||||||
|
|
||||||
|
/* Get current FPSW. */
|
||||||
|
tmp_fpsw = (uint32_t)R_BSP_GET_FPSW();
|
||||||
|
|
||||||
|
if (true == enable)
|
||||||
|
{
|
||||||
|
/* Set the FPU exception flags. */
|
||||||
|
R_BSP_SET_FPSW((tmp_fpsw | (uint32_t)BSP_PRV_FPU_EXCEPTIONS_ENABLE));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Clear only the FPU exception flags. */
|
||||||
|
R_BSP_SET_FPSW((tmp_fpsw & (uint32_t)~BSP_PRV_FPU_EXCEPTIONS_ENABLE));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case (BSP_INT_SRC_EXC_NMI_PIN):
|
||||||
|
if (true == enable)
|
||||||
|
{
|
||||||
|
/* Enable NMI pin interrupt (cannot undo!) */
|
||||||
|
ICU.NMIER.BIT.NMIEN = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* NMI pin interrupts cannot be disabled after being enabled. */
|
||||||
|
err = BSP_INT_ERR_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
err = BSP_INT_ERR_UNSUPPORTED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
|
} /* End of function bsp_interrupt_enable_disable() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_bl0_handler_isr
|
||||||
|
* Description : Interrupt handler for Group BL0 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_bl0_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* BL0 IS1 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS1)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI0_ERI0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI0_ERI0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS0 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS0)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI0_TEI0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI0_TEI0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS3 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS3)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI1_ERI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI1_ERI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS2 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS2)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI1_TEI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI1_TEI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS5 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS5)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI2_ERI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI2_ERI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS4 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS4)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI2_TEI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI2_TEI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS7 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS7)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI3_ERI3 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI3_ERI3, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS6 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS6)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI3_TEI3 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI3_TEI3, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS9 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS9)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI4_ERI4 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI4_ERI4, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS8 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS8)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI4_TEI4 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI4_TEI4, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS11 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS11)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI5_ERI5 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI5_ERI5, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS10 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS10)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI5_TEI5 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI5_TEI5, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS13 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS13)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI6_ERI6 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI6_ERI6, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS12 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS12)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI6_TEI6 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI6_TEI6, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS17 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS17)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_ERI12 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_ERI12, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS16 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS16)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_TEI12 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_TEI12, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS18 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS18)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_SCIX0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_SCIX0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS19 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS19)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_SCIX1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_SCIX1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS20 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS20)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_SCIX2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_SCIX2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS21 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS21)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_SCI12_SCIX3 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_SCI12_SCIX3, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS24 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS24)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_QSPI_QSPSSLI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_QSPI_QSPSSLI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS26 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS26)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_CAC_FERRI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_CAC_FERRI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS27 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS27)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_CAC_MENDI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_CAC_MENDI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS28 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS28)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_CAC_OVFI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_CAC_OVFI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS29 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS29)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_DOC_DOPCI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_DOC_DOPCI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS31 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS31)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_PDC_PCERI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_PDC_PCERI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL0 IS30 */
|
||||||
|
if (1 == ICU.GRPBL0.BIT.IS30)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL0_PDC_PCFEI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL0_PDC_PCFEI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_bl0_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_bl1_handler_isr
|
||||||
|
* Description : Interrupt handler for Group BL1 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_bl1_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* BL1 IS3 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS3)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_SDHI_CDETI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_SDHI_CDETI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS4 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS4)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_SDHI_CACI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_SDHI_CACI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS5 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS5)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_SDHI_SDACI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_SDHI_SDACI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS6 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS6)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_MMCIF_CDETIO */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_MMCIF_CDETIO, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS7 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS7)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_MMCIF_ERRIO */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_MMCIF_ERRIO, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS8 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS8)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_MMCIF_ACCIO */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_MMCIF_ACCIO, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS9 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS9)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_POE3_OEI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_POE3_OEI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS10 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS10)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_POE3_OEI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_POE3_OEI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS11 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS11)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_POE3_OEI3 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_POE3_OEI3, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS12 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS12)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_POE3_OEI4 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_POE3_OEI4, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS14 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS14)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC0_EEI0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC0_EEI0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS13 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS13)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC0_TEI0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC0_TEI0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS16 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS16)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC2_EEI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC2_EEI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS15 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS15)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC2_TEI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC2_TEI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS17 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS17)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_SSIE0_SSIF0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_SSIE0_SSIF0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS18 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS18)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_SSIE1_SSIF1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_SSIE1_SSIF1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS20 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS20)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_S12AD0_S12CMPAI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_S12AD0_S12CMPAI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS21 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS21)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_S12AD0_S12CMPBI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_S12AD0_S12CMPBI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS22 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS22)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_S12AD1_S12CMPAI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_S12AD1_S12CMPAI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS23 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS23)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_S12AD1_S12CMPBI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_S12AD1_S12CMPBI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS29 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS29)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC1_EEI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC1_EEI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL1 IS28 */
|
||||||
|
if (1 == ICU.GRPBL1.BIT.IS28)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL1_RIIC1_TEI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL1_RIIC1_TEI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_bl1_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_bl2_handler_isr
|
||||||
|
* Description : Interrupt handler for Group BL1 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_bl2_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* BL2 IS7 */
|
||||||
|
if (1 == ICU.GRPBL2.BIT.IS7)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL2_POEG_POEGGAI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL2_POEG_POEGGAI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL2 IS8 */
|
||||||
|
if (1 == ICU.GRPBL2.BIT.IS8)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL2_POEG_POEGGBI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL2_POEG_POEGGBI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL2 IS9 */
|
||||||
|
if (1 == ICU.GRPBL2.BIT.IS9)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL2_POEG_POEGGCI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL2_POEG_POEGGCI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BL2 IS10 */
|
||||||
|
if (1 == ICU.GRPBL2.BIT.IS10)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_BL2_POEG_POEGGDI */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BL2_POEG_POEGGDI, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_bl2_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_al0_handler_isr
|
||||||
|
* Description : Interrupt handler for Group AL0 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_al0_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* AL0 IS1 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS1)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI8_ERI8 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI8_ERI8, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS0 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS0)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI8_TEI8 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI8_TEI8, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS5 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS5)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI9_ERI9 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI9_ERI9, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS4 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS4)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI9_TEI9 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI9_TEI9, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS9 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS9)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI10_ERI10 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI10_ERI10, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS8 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS8)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI10_TEI10 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI10_TEI10, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS13 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS13)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI11_ERI11 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI11_ERI11, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS12 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS12)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI11_TEI11 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI11_TEI11, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS17 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS17)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI0_SPEI0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI0_SPEI0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS16 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS16)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI0_SPII0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI0_SPII0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS19 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS19)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI1_SPEI1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI1_SPEI1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS18 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS18)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI1_SPII1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI1_SPII1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS21 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS21)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI2_SPEI2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI2_SPEI2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS20 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS20)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_RSPI2_SPII2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_RSPI2_SPII2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS23 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS23)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI7_ERI7 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI7_ERI7, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL0 IS22 */
|
||||||
|
if (1 == ICU.GRPAL0.BIT.IS22)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL0_SCI7_TEI7 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL0_SCI7_TEI7, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_al0_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_al1_handler_isr
|
||||||
|
* Description : Interrupt handler for Group AL1 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_al1_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* AL1 IS0 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS0)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_EPTPC_MINT */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_EPTPC_MINT, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS1 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS1)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_PTPEDMAC_PINT */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_PTPEDMAC_PINT, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS4 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS4)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_EDMAC0_EINT0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_EDMAC0_EINT0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS5 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS5)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_EDMAC1_EINT1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_EDMAC1_EINT1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS9 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS9)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_GLCDC_GR1UF */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_GLCDC_GR1UF, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS10 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS10)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_GLCDC_GR2UF */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_GLCDC_GR2UF, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS8 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS8)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_GLCDC_VPOS */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_GLCDC_VPOS, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AL1 IS11 */
|
||||||
|
if (1 == ICU.GRPAL1.BIT.IS11)
|
||||||
|
{
|
||||||
|
/* BSP_INT_SRC_AL1_DRW2D_DRW_IRQ */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_AL1_DRW2D_DRW_IRQ, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_al1_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_ie0_handler_isr
|
||||||
|
* Description : Interrupt handler for Group IE0 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_ie0_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* IE0 IS0 */
|
||||||
|
if (1 == ICU.GRPIE0.BIT.IS0)
|
||||||
|
{
|
||||||
|
/* Clear the interrupt status flag. */
|
||||||
|
ICU.GCRIE0.BIT.CLR0 = 1;
|
||||||
|
|
||||||
|
/* BSP_INT_SRC_IE0_DPFPU_DPFPUEX */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_IE0_DPFPU_DPFPUEX, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_ie0_handler_isr() */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: group_be0_handler_isr
|
||||||
|
* Description : Interrupt handler for Group BE0 interrupts. The way this code works is that for each possible interrupt
|
||||||
|
* in this group the following will be performed:
|
||||||
|
* 1) Test to see if an interrupt is requested for this source
|
||||||
|
* 2) If an interrupt is requested then the registered callback is called (if one is registered)
|
||||||
|
* NOTE: The interrupt request flag must be cleared in the peripheral.
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_ATTRIB_STATIC_INTERRUPT void group_be0_handler_isr (void)
|
||||||
|
{
|
||||||
|
/* BE0 IS0 */
|
||||||
|
if (1 == ICU.GRPBE0.BIT.IS0)
|
||||||
|
{
|
||||||
|
/* Clear the interrupt status flag. */
|
||||||
|
ICU.GCRBE0.BIT.CLR0 = 1;
|
||||||
|
|
||||||
|
/* BSP_INT_SRC_BE0_CAN0_ERS0 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BE0_CAN0_ERS0, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BE0 IS1 */
|
||||||
|
if (1 == ICU.GRPBE0.BIT.IS1)
|
||||||
|
{
|
||||||
|
/* Clear the interrupt status flag. */
|
||||||
|
ICU.GCRBE0.BIT.CLR1 = 1;
|
||||||
|
|
||||||
|
/* BSP_INT_SRC_BE0_CAN1_ERS1 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BE0_CAN1_ERS1, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BE0 IS2 */
|
||||||
|
if (1 == ICU.GRPBE0.BIT.IS2)
|
||||||
|
{
|
||||||
|
/* Clear the interrupt status flag. */
|
||||||
|
ICU.GCRBE0.BIT.CLR2 = 1;
|
||||||
|
|
||||||
|
/* BSP_INT_SRC_BE0_CAN2_ERS2 */
|
||||||
|
R_BSP_InterruptControl(BSP_INT_SRC_BE0_CAN2_ERS2, BSP_INT_CMD_CALL_CALLBACK, FIT_NO_PTR);
|
||||||
|
}
|
||||||
|
} /* End of function group_be0_handler_isr() */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_interrupts.h
|
||||||
|
* Description : This module is the control of the interrupt enable.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_INTERRUPTS_H
|
||||||
|
#define MCU_INTERRUPTS_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Available return codes. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BSP_INT_SUCCESS = 0,
|
||||||
|
BSP_INT_ERR_NO_REGISTERED_CALLBACK, /* There is not a registered callback for this interrupt source */
|
||||||
|
BSP_INT_ERR_INVALID_ARG, /* Illegal argument input */
|
||||||
|
BSP_INT_ERR_UNSUPPORTED, /* Operation is not supported by this API */
|
||||||
|
BSP_INT_ERR_GROUP_STILL_ENABLED, /* Not all group interrupts were disabled so group interrupt was not
|
||||||
|
disabled */
|
||||||
|
BSP_INT_ERR_INVALID_IPL /* Illegal IPL value input */
|
||||||
|
} bsp_int_err_t;
|
||||||
|
|
||||||
|
/* Available interrupts to register a callback for. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BSP_INT_SRC_EXC_SUPERVISOR_INSTR = 0, /* Occurs when privileged instruction is executed in User Mode */
|
||||||
|
BSP_INT_SRC_EXC_UNDEFINED_INSTR, /* Occurs when MCU encounters an unknown instruction */
|
||||||
|
BSP_INT_SRC_EXC_NMI_PIN, /* NMI Pin interrupt */
|
||||||
|
BSP_INT_SRC_EXC_FPU, /* FPU exception */
|
||||||
|
BSP_INT_SRC_EXC_ACCESS, /* Access exception */
|
||||||
|
BSP_INT_SRC_OSC_STOP_DETECT, /* Oscillation stop is detected */
|
||||||
|
BSP_INT_SRC_WDT_ERROR, /* WDT underflow/refresh error has occurred */
|
||||||
|
BSP_INT_SRC_IWDT_ERROR, /* IWDT underflow/refresh error has occurred */
|
||||||
|
BSP_INT_SRC_LVD1, /* Voltage monitoring 1 interrupt */
|
||||||
|
BSP_INT_SRC_LVD2, /* Voltage monitoring 2 interrupt */
|
||||||
|
BSP_INT_SRC_UNDEFINED_INTERRUPT, /* Interrupt has triggered for a vector that user did not write a handler. */
|
||||||
|
BSP_INT_SRC_BUS_ERROR, /* Bus error: illegal address access or timeout */
|
||||||
|
BSP_INT_SRC_RAM, /* RAM error interrupt */
|
||||||
|
BSP_INT_SRC_EXRAM, /* EXRAM error interrupt */
|
||||||
|
BSP_INT_SRC_ECCRAM_1BIT, /* ECCRAM 1-bit error interrupt */
|
||||||
|
BSP_INT_SRC_ECCRAM_2BIT, /* ECCRAM 2-bit error interrupt */
|
||||||
|
BSP_INT_SRC_DPFPUEX, /* Double-Precision Floating-Point Exception interrupt */
|
||||||
|
|
||||||
|
BSP_INT_SRC_GR_INT_TOP,
|
||||||
|
|
||||||
|
/* IE0 Group Interrupts */
|
||||||
|
BSP_INT_SRC_GR_INT_IE0_TOP,
|
||||||
|
BSP_INT_SRC_IE0_DPFPU_DPFPUEX,
|
||||||
|
|
||||||
|
/* BE0 Group Interrupts */
|
||||||
|
BSP_INT_SRC_GR_INT_BE0_TOP,
|
||||||
|
BSP_INT_SRC_BE0_CAN0_ERS0,
|
||||||
|
BSP_INT_SRC_BE0_CAN1_ERS1,
|
||||||
|
BSP_INT_SRC_BE0_CAN2_ERS2,
|
||||||
|
|
||||||
|
/* BL0 Group Interrupts. */
|
||||||
|
BSP_INT_SRC_GR_INT_BL0_TOP,
|
||||||
|
BSP_INT_SRC_BL0_SCI0_TEI0,
|
||||||
|
BSP_INT_SRC_BL0_SCI0_ERI0,
|
||||||
|
BSP_INT_SRC_BL0_SCI1_TEI1,
|
||||||
|
BSP_INT_SRC_BL0_SCI1_ERI1,
|
||||||
|
BSP_INT_SRC_BL0_SCI2_TEI2,
|
||||||
|
BSP_INT_SRC_BL0_SCI2_ERI2,
|
||||||
|
BSP_INT_SRC_BL0_SCI3_TEI3,
|
||||||
|
BSP_INT_SRC_BL0_SCI3_ERI3,
|
||||||
|
BSP_INT_SRC_BL0_SCI4_TEI4,
|
||||||
|
BSP_INT_SRC_BL0_SCI4_ERI4,
|
||||||
|
BSP_INT_SRC_BL0_SCI5_TEI5,
|
||||||
|
BSP_INT_SRC_BL0_SCI5_ERI5,
|
||||||
|
BSP_INT_SRC_BL0_SCI6_TEI6,
|
||||||
|
BSP_INT_SRC_BL0_SCI6_ERI6,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_TEI12,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_ERI12,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_SCIX0,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_SCIX1,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_SCIX2,
|
||||||
|
BSP_INT_SRC_BL0_SCI12_SCIX3,
|
||||||
|
BSP_INT_SRC_BL0_QSPI_QSPSSLI,
|
||||||
|
BSP_INT_SRC_BL0_CAC_FERRI,
|
||||||
|
BSP_INT_SRC_BL0_CAC_MENDI,
|
||||||
|
BSP_INT_SRC_BL0_CAC_OVFI,
|
||||||
|
BSP_INT_SRC_BL0_DOC_DOPCI,
|
||||||
|
BSP_INT_SRC_BL0_PDC_PCFEI,
|
||||||
|
BSP_INT_SRC_BL0_PDC_PCERI,
|
||||||
|
|
||||||
|
/* BL1 Group Interrupts. */
|
||||||
|
BSP_INT_SRC_GR_INT_BL1_TOP,
|
||||||
|
BSP_INT_SRC_BL1_SDHI_CDETI,
|
||||||
|
BSP_INT_SRC_BL1_SDHI_CACI,
|
||||||
|
BSP_INT_SRC_BL1_SDHI_SDACI,
|
||||||
|
BSP_INT_SRC_BL1_MMCIF_CDETIO,
|
||||||
|
BSP_INT_SRC_BL1_MMCIF_ERRIO,
|
||||||
|
BSP_INT_SRC_BL1_MMCIF_ACCIO,
|
||||||
|
BSP_INT_SRC_BL1_POE3_OEI1,
|
||||||
|
BSP_INT_SRC_BL1_POE3_OEI2,
|
||||||
|
BSP_INT_SRC_BL1_POE3_OEI3,
|
||||||
|
BSP_INT_SRC_BL1_POE3_OEI4,
|
||||||
|
BSP_INT_SRC_BL1_RIIC0_TEI0,
|
||||||
|
BSP_INT_SRC_BL1_RIIC0_EEI0,
|
||||||
|
BSP_INT_SRC_BL1_RIIC2_TEI2,
|
||||||
|
BSP_INT_SRC_BL1_RIIC2_EEI2,
|
||||||
|
BSP_INT_SRC_BL1_SSIE0_SSIF0,
|
||||||
|
BSP_INT_SRC_BL1_SSIE1_SSIF1,
|
||||||
|
BSP_INT_SRC_BL1_S12AD0_S12CMPAI,
|
||||||
|
BSP_INT_SRC_BL1_S12AD0_S12CMPBI,
|
||||||
|
BSP_INT_SRC_BL1_S12AD1_S12CMPAI1,
|
||||||
|
BSP_INT_SRC_BL1_S12AD1_S12CMPBI1,
|
||||||
|
BSP_INT_SRC_BL1_RIIC1_TEI1,
|
||||||
|
BSP_INT_SRC_BL1_RIIC1_EEI1,
|
||||||
|
|
||||||
|
/* BL2 Group Interrupts. */
|
||||||
|
BSP_INT_SRC_GR_INT_BL2_TOP,
|
||||||
|
BSP_INT_SRC_BL2_POEG_POEGGAI,
|
||||||
|
BSP_INT_SRC_BL2_POEG_POEGGBI,
|
||||||
|
BSP_INT_SRC_BL2_POEG_POEGGCI,
|
||||||
|
BSP_INT_SRC_BL2_POEG_POEGGDI,
|
||||||
|
|
||||||
|
/* AL0 Group Interrupts. */
|
||||||
|
BSP_INT_SRC_GR_INT_AL0_TOP,
|
||||||
|
BSP_INT_SRC_AL0_SCI8_TEI8,
|
||||||
|
BSP_INT_SRC_AL0_SCI8_ERI8,
|
||||||
|
BSP_INT_SRC_AL0_SCI9_TEI9,
|
||||||
|
BSP_INT_SRC_AL0_SCI9_ERI9,
|
||||||
|
BSP_INT_SRC_AL0_SCI10_TEI10,
|
||||||
|
BSP_INT_SRC_AL0_SCI10_ERI10,
|
||||||
|
BSP_INT_SRC_AL0_SCI11_TEI11,
|
||||||
|
BSP_INT_SRC_AL0_SCI11_ERI11,
|
||||||
|
BSP_INT_SRC_AL0_RSPI0_SPII0,
|
||||||
|
BSP_INT_SRC_AL0_RSPI0_SPEI0,
|
||||||
|
BSP_INT_SRC_AL0_RSPI1_SPII1,
|
||||||
|
BSP_INT_SRC_AL0_RSPI1_SPEI1,
|
||||||
|
BSP_INT_SRC_AL0_RSPI2_SPII2,
|
||||||
|
BSP_INT_SRC_AL0_RSPI2_SPEI2,
|
||||||
|
BSP_INT_SRC_AL0_SCI7_TEI7,
|
||||||
|
BSP_INT_SRC_AL0_SCI7_ERI7,
|
||||||
|
|
||||||
|
/* AL1 Group Interrupts. */
|
||||||
|
BSP_INT_SRC_GR_INT_AL1_TOP,
|
||||||
|
BSP_INT_SRC_AL1_EPTPC_MINT,
|
||||||
|
BSP_INT_SRC_AL1_PTPEDMAC_PINT,
|
||||||
|
BSP_INT_SRC_AL1_EDMAC0_EINT0,
|
||||||
|
BSP_INT_SRC_AL1_EDMAC1_EINT1,
|
||||||
|
BSP_INT_SRC_AL1_GLCDC_VPOS,
|
||||||
|
BSP_INT_SRC_AL1_GLCDC_GR1UF,
|
||||||
|
BSP_INT_SRC_AL1_GLCDC_GR2UF,
|
||||||
|
BSP_INT_SRC_AL1_DRW2D_DRW_IRQ,
|
||||||
|
|
||||||
|
BSP_INT_SRC_GR_INT_END,
|
||||||
|
BSP_INT_SRC_EMPTY,
|
||||||
|
BSP_INT_SRC_TOTAL_ITEMS /* DO NOT MODIFY! This is used for sizing the interrupt callback array. */
|
||||||
|
} bsp_int_src_t;
|
||||||
|
|
||||||
|
/* Available commands for R_BSP_InterruptControl() function. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BSP_INT_CMD_CALL_CALLBACK = 0, /* Calls registered callback function if one exists */
|
||||||
|
BSP_INT_CMD_INTERRUPT_ENABLE, /* Enables a given interrupt (Available for NMI pin, FPU, and Bus Error) */
|
||||||
|
BSP_INT_CMD_INTERRUPT_DISABLE, /* Disables a given interrupt (Available for FPU, and Bus Error) */
|
||||||
|
BSP_INT_CMD_GROUP_INTERRUPT_ENABLE, /* Enables a group interrupt when a group interrupt source is given. The
|
||||||
|
pdata argument should give the IPL to be used using the bsp_int_ctrl_t
|
||||||
|
type. If a group interrupt is enabled multiple times with different IPL
|
||||||
|
levels it will use the highest given IPL. */
|
||||||
|
BSP_INT_CMD_GROUP_INTERRUPT_DISABLE, /* Disables a group interrupt when a group interrupt source is given.
|
||||||
|
This will only disable a group interrupt when all interrupt
|
||||||
|
sources for that group are already disabled. */
|
||||||
|
BSP_INT_CMD_FIT_INTERRUPT_ENABLE, /* Enables interrupt by control of IPL. */
|
||||||
|
BSP_INT_CMD_FIT_INTERRUPT_DISABLE /* Disables interrupt by control of IPL. */
|
||||||
|
} bsp_int_cmd_t;
|
||||||
|
|
||||||
|
/* Type to be used for pdata argument in Control function. */
|
||||||
|
typedef union
|
||||||
|
{
|
||||||
|
uint32_t ipl; /* Used at the following times.
|
||||||
|
- When enabling an interrupt to set that interrupt's priority level
|
||||||
|
by BSP_INT_CMD_GROUP_INTERRUPT_ENABLE command.
|
||||||
|
- When disabling an interrupt to save that interrupt's priority level
|
||||||
|
by BSP_INT_CMD_FIT_INTERRUPT_DISABLE command.
|
||||||
|
- When enabling an interrupt to set that interrupt's priority level
|
||||||
|
by BSP_INT_CMD_FIT_INTERRUPT_ENABLE command. */
|
||||||
|
} bsp_int_ctrl_t;
|
||||||
|
|
||||||
|
/* Easy to use typedef for callback functions. */
|
||||||
|
typedef void (*bsp_int_cb_t)(void *);
|
||||||
|
|
||||||
|
/* This structure is the common one that is passed as the 'void *' argument to callback functions when an
|
||||||
|
* exception occurs.
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
bsp_int_src_t vector; /* Which vector caused this interrupt */
|
||||||
|
} bsp_int_cb_args_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
bsp_int_err_t bsp_interrupt_enable_disable(bsp_int_src_t vector, bool enable);
|
||||||
|
|
||||||
|
#endif /* MCU_INTERRUPTS_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,211 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_locks.h
|
||||||
|
* Device(s) : RX72N
|
||||||
|
* Description : This source file has 1 lock per MCU resource.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Gets MCU configuration information. */
|
||||||
|
#include "r_bsp_config.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_LOCKS_H
|
||||||
|
#define MCU_LOCKS_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* This enum defines all of the available hardware locks for this MCU. If you delete an entry out of this list then you
|
||||||
|
will decrease the size of the locks array but will not be able to use that lock. For example, if your design is not
|
||||||
|
using CAN at all then you can safely remove the BSP_LOCK_CAN# entries below. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
BSP_LOCK_BSC = 0,
|
||||||
|
BSP_LOCK_CAC,
|
||||||
|
BSP_LOCK_CAN0,
|
||||||
|
BSP_LOCK_CAN1,
|
||||||
|
BSP_LOCK_CAN2,
|
||||||
|
BSP_LOCK_CMT,
|
||||||
|
BSP_LOCK_CMT0,
|
||||||
|
BSP_LOCK_CMT1,
|
||||||
|
BSP_LOCK_CMT2,
|
||||||
|
BSP_LOCK_CMT3,
|
||||||
|
BSP_LOCK_CMTW0,
|
||||||
|
BSP_LOCK_CMTW1,
|
||||||
|
BSP_LOCK_CRC,
|
||||||
|
BSP_LOCK_DA,
|
||||||
|
BSP_LOCK_DMAC,
|
||||||
|
BSP_LOCK_DMAC0,
|
||||||
|
BSP_LOCK_DMAC1,
|
||||||
|
BSP_LOCK_DMAC2,
|
||||||
|
BSP_LOCK_DMAC3,
|
||||||
|
BSP_LOCK_DMAC4,
|
||||||
|
BSP_LOCK_DMAC5,
|
||||||
|
BSP_LOCK_DMAC6,
|
||||||
|
BSP_LOCK_DMAC7,
|
||||||
|
BSP_LOCK_DOC,
|
||||||
|
BSP_LOCK_DRW2D,
|
||||||
|
BSP_LOCK_DTC,
|
||||||
|
BSP_LOCK_ECCRAM,
|
||||||
|
BSP_LOCK_EDMAC0,
|
||||||
|
BSP_LOCK_EDMAC1,
|
||||||
|
BSP_LOCK_ELC,
|
||||||
|
BSP_LOCK_EPTPC,
|
||||||
|
BSP_LOCK_EPTPC0,
|
||||||
|
BSP_LOCK_EPTPC1,
|
||||||
|
BSP_LOCK_ETHERC0,
|
||||||
|
BSP_LOCK_ETHERC1,
|
||||||
|
BSP_LOCK_EXDMAC,
|
||||||
|
BSP_LOCK_EXDMAC0,
|
||||||
|
BSP_LOCK_EXDMAC1,
|
||||||
|
BSP_LOCK_FLASH,
|
||||||
|
BSP_LOCK_GLCDC,
|
||||||
|
BSP_LOCK_GPTW0,
|
||||||
|
BSP_LOCK_GPTW1,
|
||||||
|
BSP_LOCK_GPTW2,
|
||||||
|
BSP_LOCK_GPTW3,
|
||||||
|
BSP_LOCK_IRQ0,
|
||||||
|
BSP_LOCK_IRQ1,
|
||||||
|
BSP_LOCK_IRQ2,
|
||||||
|
BSP_LOCK_IRQ3,
|
||||||
|
BSP_LOCK_IRQ4,
|
||||||
|
BSP_LOCK_IRQ5,
|
||||||
|
BSP_LOCK_IRQ6,
|
||||||
|
BSP_LOCK_IRQ7,
|
||||||
|
BSP_LOCK_IRQ8,
|
||||||
|
BSP_LOCK_IRQ9,
|
||||||
|
BSP_LOCK_IRQ10,
|
||||||
|
BSP_LOCK_IRQ11,
|
||||||
|
BSP_LOCK_IRQ12,
|
||||||
|
BSP_LOCK_IRQ13,
|
||||||
|
BSP_LOCK_IRQ14,
|
||||||
|
BSP_LOCK_IRQ15,
|
||||||
|
BSP_LOCK_ICU,
|
||||||
|
BSP_LOCK_IWDT,
|
||||||
|
BSP_LOCK_MMC,
|
||||||
|
BSP_LOCK_MPC,
|
||||||
|
BSP_LOCK_MPU,
|
||||||
|
BSP_LOCK_MTU,
|
||||||
|
BSP_LOCK_MTU0,
|
||||||
|
BSP_LOCK_MTU1,
|
||||||
|
BSP_LOCK_MTU2,
|
||||||
|
BSP_LOCK_MTU3,
|
||||||
|
BSP_LOCK_MTU4,
|
||||||
|
BSP_LOCK_MTU5,
|
||||||
|
BSP_LOCK_MTU6,
|
||||||
|
BSP_LOCK_MTU7,
|
||||||
|
BSP_LOCK_MTU8,
|
||||||
|
BSP_LOCK_PDC,
|
||||||
|
BSP_LOCK_PMGI0,
|
||||||
|
BSP_LOCK_PMGI1,
|
||||||
|
BSP_LOCK_POE,
|
||||||
|
BSP_LOCK_POEG,
|
||||||
|
BSP_LOCK_PPG0,
|
||||||
|
BSP_LOCK_PPG1,
|
||||||
|
BSP_LOCK_PTPEDMAC,
|
||||||
|
BSP_LOCK_QSPI,
|
||||||
|
BSP_LOCK_RAM,
|
||||||
|
BSP_LOCK_RIIC0,
|
||||||
|
BSP_LOCK_RIIC1,
|
||||||
|
BSP_LOCK_RIIC2,
|
||||||
|
BSP_LOCK_RSPI0,
|
||||||
|
BSP_LOCK_RSPI1,
|
||||||
|
BSP_LOCK_RSPI2,
|
||||||
|
BSP_LOCK_RTC,
|
||||||
|
BSP_LOCK_S12AD,
|
||||||
|
BSP_LOCK_S12AD1,
|
||||||
|
BSP_LOCK_SCI0,
|
||||||
|
BSP_LOCK_SCI1,
|
||||||
|
BSP_LOCK_SCI2,
|
||||||
|
BSP_LOCK_SCI3,
|
||||||
|
BSP_LOCK_SCI4,
|
||||||
|
BSP_LOCK_SCI5,
|
||||||
|
BSP_LOCK_SCI6,
|
||||||
|
BSP_LOCK_SCI7,
|
||||||
|
BSP_LOCK_SCI8,
|
||||||
|
BSP_LOCK_SCI9,
|
||||||
|
BSP_LOCK_SCI10,
|
||||||
|
BSP_LOCK_SCI11,
|
||||||
|
BSP_LOCK_SCI12,
|
||||||
|
BSP_LOCK_SDHI,
|
||||||
|
BSP_LOCK_SSIE0,
|
||||||
|
BSP_LOCK_SSIE1,
|
||||||
|
BSP_LOCK_SYSTEM,
|
||||||
|
BSP_LOCK_TEMPS,
|
||||||
|
BSP_LOCK_TMR0,
|
||||||
|
BSP_LOCK_TMR1,
|
||||||
|
BSP_LOCK_TMR2,
|
||||||
|
BSP_LOCK_TMR3,
|
||||||
|
BSP_LOCK_TMR01,
|
||||||
|
BSP_LOCK_TMR23,
|
||||||
|
BSP_LOCK_TPU0,
|
||||||
|
BSP_LOCK_TPU1,
|
||||||
|
BSP_LOCK_TPU2,
|
||||||
|
BSP_LOCK_TPU3,
|
||||||
|
BSP_LOCK_TPU4,
|
||||||
|
BSP_LOCK_TPU5,
|
||||||
|
BSP_LOCK_TPUA,
|
||||||
|
BSP_LOCK_USB,
|
||||||
|
BSP_LOCK_USB0,
|
||||||
|
BSP_LOCK_WDT,
|
||||||
|
BSP_LOCK_FLASHCONST,
|
||||||
|
BSP_LOCK_TEMPSCONST,
|
||||||
|
BSP_LOCK_SWINT,
|
||||||
|
BSP_LOCK_SWINT2,
|
||||||
|
BSP_NUM_LOCKS //This entry is not a valid lock. It is used for sizing g_bsp_Locks[] array below. Do not touch!
|
||||||
|
} mcu_lock_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
/* The actual lock. int32_t is used because this is what the xchg() instruction takes as parameters. */
|
||||||
|
int32_t lock;
|
||||||
|
|
||||||
|
/* Could add a ID for locking and unlocking. In this could protect against any function being able to unlock. */
|
||||||
|
} bsp_lock_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Error checking
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED == 0
|
||||||
|
#undef BSP_CFG_USER_LOCKING_TYPE
|
||||||
|
#define BSP_CFG_USER_LOCKING_TYPE bsp_lock_t
|
||||||
|
#else
|
||||||
|
#if !defined(BSP_CFG_USER_LOCKING_TYPE)
|
||||||
|
#error "R_BSP ERROR - If you are using your own locking mechanism then you must define BSP_CFG_USER_LOCKING_TYPE in r_bsp_config.h."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
extern BSP_CFG_USER_LOCKING_TYPE g_bsp_Locks[];
|
||||||
|
|
||||||
|
#endif /* MCU_LOCKS_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,877 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_mapped_interrupts.c
|
||||||
|
* Description : This module maps Interrupt A & B interrupts. Which interrupts are mapped depends on the macros in
|
||||||
|
* r_bsp_interrupt_config.h.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Access to r_bsp. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* Function Name: bsp_mapped_interrupt_open
|
||||||
|
* Description : Initializes mapped interrupts. This code does the following for each possible mapped interrupt:
|
||||||
|
* 1) PREPROCCESOR - Test to see if this interrupt is chosen to be used
|
||||||
|
* 2) PREPROCESSOR - Figure out which interrupt select register needs to be written to
|
||||||
|
* 3) RUNTIME C - Set the appropriate select register with the number of this mapped interrupt
|
||||||
|
* Arguments : None
|
||||||
|
* Return Value : None
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void bsp_mapped_interrupt_open (void)
|
||||||
|
{
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMT2_CMI2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMT2_CMI2) = BSP_PRV_INT_B_NUM_CMT2_CMI2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMT3_CMI3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMT3_CMI3) = BSP_PRV_INT_B_NUM_CMT3_CMI3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIA0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIA0) = BSP_PRV_INT_B_NUM_TMR0_CMIA0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIB0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIB0) = BSP_PRV_INT_B_NUM_TMR0_CMIB0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_OVI0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR0_OVI0) = BSP_PRV_INT_B_NUM_TMR0_OVI0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIA1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIA1) = BSP_PRV_INT_B_NUM_TMR1_CMIA1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIB1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIB1) = BSP_PRV_INT_B_NUM_TMR1_CMIB1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_OVI1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR1_OVI1) = BSP_PRV_INT_B_NUM_TMR1_OVI1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIA2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIA2) = BSP_PRV_INT_B_NUM_TMR2_CMIA2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIB2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIB2) = BSP_PRV_INT_B_NUM_TMR2_CMIB2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_OVI2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR2_OVI2) = BSP_PRV_INT_B_NUM_TMR2_OVI2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIA3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIA3) = BSP_PRV_INT_B_NUM_TMR3_CMIA3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIB3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIB3) = BSP_PRV_INT_B_NUM_TMR3_CMIB3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_OVI3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TMR3_OVI3) = BSP_PRV_INT_B_NUM_TMR3_OVI3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0A) = BSP_PRV_INT_B_NUM_TPU0_TGI0A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0B) = BSP_PRV_INT_B_NUM_TPU0_TGI0B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0C)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0C) = BSP_PRV_INT_B_NUM_TPU0_TGI0C;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0D)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0D) = BSP_PRV_INT_B_NUM_TPU0_TGI0D;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TCI0V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU0_TCI0V) = BSP_PRV_INT_B_NUM_TPU0_TCI0V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1A) = BSP_PRV_INT_B_NUM_TPU1_TGI1A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1B) = BSP_PRV_INT_B_NUM_TPU1_TGI1B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1V) = BSP_PRV_INT_B_NUM_TPU1_TCI1V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1U)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1U) = BSP_PRV_INT_B_NUM_TPU1_TCI1U;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2A) = BSP_PRV_INT_B_NUM_TPU2_TGI2A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2B) = BSP_PRV_INT_B_NUM_TPU2_TGI2B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2V) = BSP_PRV_INT_B_NUM_TPU2_TCI2V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2U)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2U) = BSP_PRV_INT_B_NUM_TPU2_TCI2U;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3A) = BSP_PRV_INT_B_NUM_TPU3_TGI3A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3B) = BSP_PRV_INT_B_NUM_TPU3_TGI3B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3C)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3C) = BSP_PRV_INT_B_NUM_TPU3_TGI3C;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3D)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3D) = BSP_PRV_INT_B_NUM_TPU3_TGI3D;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TCI3V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU3_TCI3V) = BSP_PRV_INT_B_NUM_TPU3_TCI3V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4A) = BSP_PRV_INT_B_NUM_TPU4_TGI4A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4B) = BSP_PRV_INT_B_NUM_TPU4_TGI4B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4V) = BSP_PRV_INT_B_NUM_TPU4_TCI4V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4U)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4U) = BSP_PRV_INT_B_NUM_TPU4_TCI4U;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5A)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5A) = BSP_PRV_INT_B_NUM_TPU5_TGI5A;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5B)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5B) = BSP_PRV_INT_B_NUM_TPU5_TGI5B;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5V)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5V) = BSP_PRV_INT_B_NUM_TPU5_TCI5V;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5U)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5U) = BSP_PRV_INT_B_NUM_TPU5_TCI5U;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC0I0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC0I0) = BSP_PRV_INT_B_NUM_CMTW0_IC0I0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC1I0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC1I0) = BSP_PRV_INT_B_NUM_CMTW0_IC1I0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC0I0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC0I0) = BSP_PRV_INT_B_NUM_CMTW0_OC0I0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC1I0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC1I0) = BSP_PRV_INT_B_NUM_CMTW0_OC1I0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC0I1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC0I1) = BSP_PRV_INT_B_NUM_CMTW1_IC0I1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC1I1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC1I1) = BSP_PRV_INT_B_NUM_CMTW1_IC1I1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC0I1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC0I1) = BSP_PRV_INT_B_NUM_CMTW1_OC0I1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC1I1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC1I1) = BSP_PRV_INT_B_NUM_CMTW1_OC1I1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP) = BSP_PRV_INT_B_NUM_RTC_CUP;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXF0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXF0) = BSP_PRV_INT_B_NUM_CAN0_RXF0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXF0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXF0) = BSP_PRV_INT_B_NUM_CAN0_TXF0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXM0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXM0) = BSP_PRV_INT_B_NUM_CAN0_RXM0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXM0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXM0) = BSP_PRV_INT_B_NUM_CAN0_TXM0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXF1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXF1) = BSP_PRV_INT_B_NUM_CAN1_RXF1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXF1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXF1) = BSP_PRV_INT_B_NUM_CAN1_TXF1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXM1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXM1) = BSP_PRV_INT_B_NUM_CAN1_RXM1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXM1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXM1) = BSP_PRV_INT_B_NUM_CAN1_TXM1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXF2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXF2) = BSP_PRV_INT_B_NUM_CAN2_RXF2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXF2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXF2) = BSP_PRV_INT_B_NUM_CAN2_TXF2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXM2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXM2) = BSP_PRV_INT_B_NUM_CAN2_RXM2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXM2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXM2) = BSP_PRV_INT_B_NUM_CAN2_TXM2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_USB0_USBI0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_USB0_USBI0) = BSP_PRV_INT_B_NUM_USB0_USBI0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12ADI0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12ADI0) = BSP_PRV_INT_B_NUM_S12ADC0_S12ADI0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GBADI0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GBADI0) = BSP_PRV_INT_B_NUM_S12ADC0_S12GBADI0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GCADI0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GCADI0) = BSP_PRV_INT_B_NUM_S12ADC0_S12GCADI0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12ADI1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12ADI1) = BSP_PRV_INT_B_NUM_S12ADC1_S12ADI1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GBADI1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GBADI1) = BSP_PRV_INT_B_NUM_S12ADC1_S12GBADI1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GCADI1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GCADI1) = BSP_PRV_INT_B_NUM_S12ADC1_S12GCADI1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR18I)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR18I) = BSP_PRV_INT_B_NUM_ELC_ELSR18I;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR19I)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR19I) = BSP_PRV_INT_B_NUM_ELC_ELSR19I;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_PROC_BUSY)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_PROC_BUSY) = BSP_PRV_INT_B_NUM_TSIP_PROC_BUSY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_ROMOK)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_ROMOK) = BSP_PRV_INT_B_NUM_TSIP_ROMOK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_LONG_PLG)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_LONG_PLG) = BSP_PRV_INT_B_NUM_TSIP_LONG_PLG;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_TEST_BUSY)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_TEST_BUSY) = BSP_PRV_INT_B_NUM_TSIP_TEST_BUSY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY0) = BSP_PRV_INT_B_NUM_TSIP_WRRDY0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY1) = BSP_PRV_INT_B_NUM_TSIP_WRRDY1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY4) = BSP_PRV_INT_B_NUM_TSIP_WRRDY4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY0) = BSP_PRV_INT_B_NUM_TSIP_RDRDY0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY1) = BSP_PRV_INT_B_NUM_TSIP_RDRDY1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_WRRDY)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_WRRDY) = BSP_PRV_INT_B_NUM_TSIP_INTEGRATE_WRRDY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_RDRDY)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_B, BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_RDRDY) = BSP_PRV_INT_B_NUM_TSIP_INTEGRATE_RDRDY;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIA0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIA0) = BSP_PRV_INT_A_NUM_MTU0_TGIA0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIB0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIB0) = BSP_PRV_INT_A_NUM_MTU0_TGIB0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIC0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIC0) = BSP_PRV_INT_A_NUM_MTU0_TGIC0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGID0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGID0) = BSP_PRV_INT_A_NUM_MTU0_TGID0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TCIV0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TCIV0) = BSP_PRV_INT_A_NUM_MTU0_TCIV0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIE0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIE0) = BSP_PRV_INT_A_NUM_MTU0_TGIE0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIF0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIF0) = BSP_PRV_INT_A_NUM_MTU0_TGIF0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIA1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIA1) = BSP_PRV_INT_A_NUM_MTU1_TGIA1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIB1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIB1) = BSP_PRV_INT_A_NUM_MTU1_TGIB1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIV1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIV1) = BSP_PRV_INT_A_NUM_MTU1_TCIV1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIU1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIU1) = BSP_PRV_INT_A_NUM_MTU1_TCIU1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIA2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIA2) = BSP_PRV_INT_A_NUM_MTU2_TGIA2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIB2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIB2) = BSP_PRV_INT_A_NUM_MTU2_TGIB2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIV2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIV2) = BSP_PRV_INT_A_NUM_MTU2_TCIV2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIU2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIU2) = BSP_PRV_INT_A_NUM_MTU2_TCIU2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIA3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIA3) = BSP_PRV_INT_A_NUM_MTU3_TGIA3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIB3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIB3) = BSP_PRV_INT_A_NUM_MTU3_TGIB3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIC3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIC3) = BSP_PRV_INT_A_NUM_MTU3_TGIC3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGID3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGID3) = BSP_PRV_INT_A_NUM_MTU3_TGID3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TCIV3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU3_TCIV3) = BSP_PRV_INT_A_NUM_MTU3_TCIV3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIA4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIA4) = BSP_PRV_INT_A_NUM_MTU4_TGIA4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIB4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIB4) = BSP_PRV_INT_A_NUM_MTU4_TGIB4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIC4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIC4) = BSP_PRV_INT_A_NUM_MTU4_TGIC4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGID4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGID4) = BSP_PRV_INT_A_NUM_MTU4_TGID4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TCIV4)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU4_TCIV4) = BSP_PRV_INT_A_NUM_MTU4_TCIV4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIU5)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIU5) = BSP_PRV_INT_A_NUM_MTU5_TGIU5;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIV5)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIV5) = BSP_PRV_INT_A_NUM_MTU5_TGIV5;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIW5)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIW5) = BSP_PRV_INT_A_NUM_MTU5_TGIW5;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIA6)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIA6) = BSP_PRV_INT_A_NUM_MTU6_TGIA6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIB6)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIB6) = BSP_PRV_INT_A_NUM_MTU6_TGIB6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIC6)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIC6) = BSP_PRV_INT_A_NUM_MTU6_TGIC6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGID6)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGID6) = BSP_PRV_INT_A_NUM_MTU6_TGID6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TCIV6)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU6_TCIV6) = BSP_PRV_INT_A_NUM_MTU6_TCIV6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIA7)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIA7) = BSP_PRV_INT_A_NUM_MTU7_TGIA7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIB7)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIB7) = BSP_PRV_INT_A_NUM_MTU7_TGIB7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIC7)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIC7) = BSP_PRV_INT_A_NUM_MTU7_TGIC7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGID7)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGID7) = BSP_PRV_INT_A_NUM_MTU7_TGID7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TCIV7)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU7_TCIV7) = BSP_PRV_INT_A_NUM_MTU7_TCIV7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIA8)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIA8) = BSP_PRV_INT_A_NUM_MTU8_TGIA8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIB8)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIB8) = BSP_PRV_INT_A_NUM_MTU8_TGIB8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIC8)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIC8) = BSP_PRV_INT_A_NUM_MTU8_TGIC8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGID8)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGID8) = BSP_PRV_INT_A_NUM_MTU8_TGID8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TCIV8)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_MTU8_TCIV8) = BSP_PRV_INT_A_NUM_MTU8_TCIV8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIA0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIA0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIA0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIB0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIB0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIB0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIC0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIC0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIC0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCID0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCID0) = BSP_PRV_INT_A_NUM_GPTW0_GTCID0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GDTE0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GDTE0) = BSP_PRV_INT_A_NUM_GPTW0_GDTE0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIE0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIE0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIE0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIF0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIF0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIF0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIV0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIV0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIV0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIU0)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIU0) = BSP_PRV_INT_A_NUM_GPTW0_GTCIU0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIA1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIA1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIA1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIB1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIB1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIB1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIC1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIC1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIC1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCID1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCID1) = BSP_PRV_INT_A_NUM_GPTW1_GTCID1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GDTE1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GDTE1) = BSP_PRV_INT_A_NUM_GPTW1_GDTE1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIE1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIE1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIE1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIF1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIF1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIF1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIV1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIV1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIV1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIU1)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIU1) = BSP_PRV_INT_A_NUM_GPTW1_GTCIU1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIA2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIA2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIA2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIB2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIB2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIB2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIC2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIC2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIC2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCID2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCID2) = BSP_PRV_INT_A_NUM_GPTW2_GTCID2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GDTE2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GDTE2) = BSP_PRV_INT_A_NUM_GPTW2_GDTE2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIE2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIE2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIE2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIF2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIF2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIF2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIV2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIV2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIV2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIU2)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIU2) = BSP_PRV_INT_A_NUM_GPTW2_GTCIU2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIA3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIA3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIA3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIB3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIB3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIB3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIC3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIC3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIC3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCID3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCID3) = BSP_PRV_INT_A_NUM_GPTW3_GTCID3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GDTE3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GDTE3) = BSP_PRV_INT_A_NUM_GPTW3_GDTE3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIE3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIE3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIE3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIF3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIF3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIF3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIV3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIV3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIV3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIU3)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIU3) = BSP_PRV_INT_A_NUM_GPTW3_GTCIU3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_EPTPC_IPLS)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_EPTPC_IPLS) = BSP_PRV_INT_A_NUM_EPTPC_IPLS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_PMGI0_PMGI0I)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_PMGI0_PMGI0I) = BSP_PRV_INT_A_NUM_PMGI0_PMGI0I;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_PRV_VALID_MAP_INT(A, BSP_MAPPED_INT_CFG_A_VECT_PMGI1_PMGI1I)
|
||||||
|
/* Casting is valid because it matches the type to the right side or argument. */
|
||||||
|
BSP_PRV_INT_SELECT(BSP_PRV_A, BSP_MAPPED_INT_CFG_A_VECT_PMGI1_PMGI1I) = BSP_PRV_INT_A_NUM_PMGI1_PMGI1I;
|
||||||
|
#endif
|
||||||
|
} /* End of function bsp_mapped_interrupt_open() */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,360 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : mcu_mapped_interrupts_private.h
|
||||||
|
* Description : This module contains macros used for mapping interrupts.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef MCU_MAPPED_INTERRUPTS_PRIVATE_H
|
||||||
|
#define MCU_MAPPED_INTERRUPTS_PRIVATE_H
|
||||||
|
|
||||||
|
/* These macros are calculated values for x % 8. These macros are used when preprocessor arithmetic cannot be used.
|
||||||
|
* For example, 'IEN0'-'IEN7' needs to be defined for a macro based on 'vector_number % 8' but preprocessor arithmetic
|
||||||
|
* is only evaluated at compile-time when it is used in a preprocessor conditional. For this reason the calculated
|
||||||
|
* value of 'vector_number % 8' must be calculated before compile-time.
|
||||||
|
*/
|
||||||
|
#define BSP_PRV_CALC_128_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_129_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_130_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_131_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_132_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_133_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_134_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_135_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_136_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_137_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_138_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_139_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_140_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_141_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_142_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_143_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_144_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_145_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_146_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_147_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_148_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_149_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_150_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_151_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_152_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_153_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_154_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_155_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_156_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_157_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_158_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_159_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_160_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_161_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_162_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_163_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_164_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_165_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_166_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_167_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_168_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_169_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_170_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_171_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_172_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_173_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_174_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_175_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_176_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_177_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_178_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_179_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_180_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_181_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_182_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_183_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_184_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_185_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_186_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_187_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_188_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_189_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_190_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_191_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_192_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_193_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_194_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_195_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_196_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_197_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_198_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_199_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_200_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_201_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_202_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_203_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_204_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_205_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_206_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_207_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_208_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_209_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_210_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_211_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_212_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_213_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_214_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_215_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_216_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_217_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_218_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_219_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_220_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_221_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_222_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_223_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_224_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_225_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_226_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_227_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_228_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_229_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_230_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_231_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_232_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_233_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_234_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_235_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_236_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_237_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_238_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_239_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_240_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_241_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_242_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_243_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_244_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_245_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_246_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_247_MOD_8 7
|
||||||
|
#define BSP_PRV_CALC_248_MOD_8 0
|
||||||
|
#define BSP_PRV_CALC_249_MOD_8 1
|
||||||
|
#define BSP_PRV_CALC_250_MOD_8 2
|
||||||
|
#define BSP_PRV_CALC_251_MOD_8 3
|
||||||
|
#define BSP_PRV_CALC_252_MOD_8 4
|
||||||
|
#define BSP_PRV_CALC_253_MOD_8 5
|
||||||
|
#define BSP_PRV_CALC_254_MOD_8 6
|
||||||
|
#define BSP_PRV_CALC_255_MOD_8 7
|
||||||
|
|
||||||
|
/* These macros are used to determine if the SLIBXRn or SLIBRn select register should be written to. */
|
||||||
|
#define BSP_PRV_INT_B_SELECT_128 ICU.SLIBXR128.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_129 ICU.SLIBXR129.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_130 ICU.SLIBXR130.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_131 ICU.SLIBXR131.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_132 ICU.SLIBXR132.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_133 ICU.SLIBXR133.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_134 ICU.SLIBXR134.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_135 ICU.SLIBXR135.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_136 ICU.SLIBXR136.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_137 ICU.SLIBXR137.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_138 ICU.SLIBXR138.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_139 ICU.SLIBXR139.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_140 ICU.SLIBXR140.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_141 ICU.SLIBXR141.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_142 ICU.SLIBXR142.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_143 ICU.SLIBXR143.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_144 ICU.SLIBR144.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_145 ICU.SLIBR145.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_146 ICU.SLIBR146.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_147 ICU.SLIBR147.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_148 ICU.SLIBR148.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_149 ICU.SLIBR149.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_150 ICU.SLIBR150.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_151 ICU.SLIBR151.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_152 ICU.SLIBR152.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_153 ICU.SLIBR153.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_154 ICU.SLIBR154.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_155 ICU.SLIBR155.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_156 ICU.SLIBR156.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_157 ICU.SLIBR157.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_158 ICU.SLIBR158.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_159 ICU.SLIBR159.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_160 ICU.SLIBR160.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_161 ICU.SLIBR161.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_162 ICU.SLIBR162.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_163 ICU.SLIBR163.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_164 ICU.SLIBR164.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_165 ICU.SLIBR165.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_166 ICU.SLIBR166.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_167 ICU.SLIBR167.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_168 ICU.SLIBR168.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_169 ICU.SLIBR169.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_170 ICU.SLIBR170.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_171 ICU.SLIBR171.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_172 ICU.SLIBR172.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_173 ICU.SLIBR173.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_174 ICU.SLIBR174.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_175 ICU.SLIBR175.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_176 ICU.SLIBR176.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_177 ICU.SLIBR177.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_178 ICU.SLIBR178.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_179 ICU.SLIBR179.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_180 ICU.SLIBR180.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_181 ICU.SLIBR181.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_182 ICU.SLIBR182.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_183 ICU.SLIBR183.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_184 ICU.SLIBR184.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_185 ICU.SLIBR185.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_186 ICU.SLIBR186.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_187 ICU.SLIBR187.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_188 ICU.SLIBR188.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_189 ICU.SLIBR189.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_190 ICU.SLIBR190.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_191 ICU.SLIBR191.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_192 ICU.SLIBR192.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_193 ICU.SLIBR193.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_194 ICU.SLIBR194.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_195 ICU.SLIBR195.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_196 ICU.SLIBR196.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_197 ICU.SLIBR197.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_198 ICU.SLIBR198.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_199 ICU.SLIBR199.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_200 ICU.SLIBR200.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_201 ICU.SLIBR201.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_202 ICU.SLIBR202.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_203 ICU.SLIBR203.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_204 ICU.SLIBR204.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_205 ICU.SLIBR205.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_206 ICU.SLIBR206.BYTE
|
||||||
|
#define BSP_PRV_INT_B_SELECT_207 ICU.SLIBR207.BYTE
|
||||||
|
/* Interrupt A interrupts are also defined even though there is only 1 select register. */
|
||||||
|
#define BSP_PRV_INT_A_SELECT_208 ICU.SLIAR208.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_209 ICU.SLIAR209.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_210 ICU.SLIAR210.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_211 ICU.SLIAR211.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_212 ICU.SLIAR212.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_213 ICU.SLIAR213.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_214 ICU.SLIAR214.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_215 ICU.SLIAR215.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_216 ICU.SLIAR216.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_217 ICU.SLIAR217.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_218 ICU.SLIAR218.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_219 ICU.SLIAR219.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_220 ICU.SLIAR220.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_221 ICU.SLIAR221.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_222 ICU.SLIAR222.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_223 ICU.SLIAR223.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_224 ICU.SLIAR224.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_225 ICU.SLIAR225.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_226 ICU.SLIAR226.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_227 ICU.SLIAR227.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_228 ICU.SLIAR228.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_229 ICU.SLIAR229.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_230 ICU.SLIAR230.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_231 ICU.SLIAR231.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_232 ICU.SLIAR232.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_233 ICU.SLIAR233.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_234 ICU.SLIAR234.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_235 ICU.SLIAR235.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_236 ICU.SLIAR236.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_237 ICU.SLIAR237.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_238 ICU.SLIAR238.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_239 ICU.SLIAR239.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_240 ICU.SLIAR240.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_241 ICU.SLIAR241.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_242 ICU.SLIAR242.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_243 ICU.SLIAR243.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_244 ICU.SLIAR244.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_245 ICU.SLIAR245.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_246 ICU.SLIAR246.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_247 ICU.SLIAR247.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_248 ICU.SLIAR248.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_249 ICU.SLIAR249.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_250 ICU.SLIAR250.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_251 ICU.SLIAR251.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_252 ICU.SLIAR252.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_253 ICU.SLIAR253.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_254 ICU.SLIAR254.BYTE
|
||||||
|
#define BSP_PRV_INT_A_SELECT_255 ICU.SLIAR255.BYTE
|
||||||
|
|
||||||
|
/* Start and end of Interrupt B and A vectors. */
|
||||||
|
#define BSP_PRV_B_INT_VECTOR_START (128)
|
||||||
|
#define BSP_PRV_B_INT_VECTOR_END (207)
|
||||||
|
#define BSP_PRV_A_INT_VECTOR_START (208)
|
||||||
|
#define BSP_PRV_A_INT_VECTOR_END (255)
|
||||||
|
|
||||||
|
/* Start and end of Interrupt B select registers. */
|
||||||
|
#define BSP_PRV_SLIBXR_START (128)
|
||||||
|
#define BSP_PRV_SLIBXR_END (143)
|
||||||
|
#define BSP_PRV_SLIBR_START (144)
|
||||||
|
#define BSP_PRV_SLIBR_END (207)
|
||||||
|
|
||||||
|
/* Starting IER register for mapped interrupts. This is used for calculating the IER register based on the
|
||||||
|
* given vector number.
|
||||||
|
*/
|
||||||
|
#define BSP_PRV_MAP_INT_IER_START (0x10)
|
||||||
|
|
||||||
|
/* These are used in function-like macros to expand to letters. */
|
||||||
|
#define BSP_PRV_A A
|
||||||
|
#define BSP_PRV_B B
|
||||||
|
|
||||||
|
/* Test to see if chosen vector is valid for a mapped interrupt. */
|
||||||
|
#define BSP_PRV_VALID_MAP_INT(x, y) (((y + 0) >= BSP_PRV_ ## x ## _INT_VECTOR_START) && \
|
||||||
|
((y + 0) <= BSP_PRV_ ## x ## _INT_VECTOR_END))
|
||||||
|
|
||||||
|
/* Calculation for getting IER register. */
|
||||||
|
#define BSP_PRIV_CALC_IER_REG(x) (((x - BSP_PRV_B_INT_VECTOR_START)/8) + BSP_PRV_MAP_INT_IER_START)
|
||||||
|
|
||||||
|
/* These macros generate the macros needed to use the function-like macros from iodefine.h */
|
||||||
|
#define BSP_PRV_IR(x, y) _BSP_PRV_IR(x, y)
|
||||||
|
#define _BSP_PRV_IR(x, y) IR_PERI ## x ## _INT ## x ## y
|
||||||
|
#define BSP_PRV_DTCE(x, y) _BSP_PRV_DTCE(x, y)
|
||||||
|
#define _BSP_PRV_DTCE(x, y) DTCE_PERI ## x ## _INT ## x ## y
|
||||||
|
#define BSP_PRV_IPR(x, y) _BSP_PRV_IPR(x, y)
|
||||||
|
#define _BSP_PRV_IPR(x, y) IPR_PERI ## x ## _INT ## x ## y
|
||||||
|
#define BSP_PRV_VECT(x, y) _BSP_PRV_VECT(x, y)
|
||||||
|
#define _BSP_PRV_VECT(x, y) VECT_PERI ## x ## _INT ## x ## y
|
||||||
|
|
||||||
|
#define BSP_PRV_IEN(x) _BSP_PRV_IEN(x)
|
||||||
|
#define _BSP_PRV_IEN(x) __BSP_PRV_IEN(BSP_PRV_CALC_ ## x ## _MOD_8)
|
||||||
|
#define __BSP_PRV_IEN(x) ___BSP_PRV_IEN(x)
|
||||||
|
#define ___BSP_PRV_IEN(x) IEN ## x
|
||||||
|
|
||||||
|
/* Chooses the correct interrupt select register. */
|
||||||
|
#define BSP_PRV_INT_SELECT(x, y) _BSP_PRV_INT_SELECT(x, y)
|
||||||
|
#define _BSP_PRV_INT_SELECT(x, y) BSP_PRV_INT_ ## x ## _SELECT_ ## y
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#endif /* MCU_MAPPED_INTERRUPTS_PRIVATE_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_cpu.h
|
||||||
|
* Description : This module implements CPU specific functions. An example is enabling/disabling interrupts.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef CPU_H
|
||||||
|
#define CPU_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* The different types of registers that can be protected. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
/* PRC0
|
||||||
|
Enables writing to the registers related to the clock generation circuit: SCKCR, SCKCR2, SCKCR3, PACKCR, PLLCR,
|
||||||
|
PLLCR2, PPLLCR, PPLLCR2, BCKCR, MOSCCR, SOSCCR, LOCOCR, ILOCOCR, HOCOCR, HOCOCR2, OSTDCR, OSTDSR, CKOCR. */
|
||||||
|
BSP_REG_PROTECT_CGC = 0,
|
||||||
|
|
||||||
|
/* PRC1
|
||||||
|
Enables writing to the registers related to operating modes, low power consumption, the clock generation circuit,
|
||||||
|
and software reset: SYSCR0, SYSCR1, SBYCR, MSTPCRA, MSTPCRB, MSTPCRC, MSTPCRD, OPCCR, RSTCKCR,
|
||||||
|
DPSBYCR, DPSIER0, DPSIER1, DPSIER2, DPSIER3, DPSIFR0, DPSIFR1, DPSIFR2, DPSIFR3,
|
||||||
|
DPSIEGR0, DPSIEGR1, DPSIEGR2, DPSIEGR3, MOSCWTCR, SOSCWTCR, MOFCR, HOCOPCR, SWRR. */
|
||||||
|
BSP_REG_PROTECT_LPC_CGC_SWR,
|
||||||
|
|
||||||
|
/* PRC3
|
||||||
|
Enables writing to the registers related to the LVD:LVCMPCR, LVDLVLR, LVD1CR0, LVD1CR1, LVD1SR, LVD2CR0,
|
||||||
|
LVD2CR1, LVD2SR. */
|
||||||
|
BSP_REG_PROTECT_LVD,
|
||||||
|
|
||||||
|
/* MPC.PWPR
|
||||||
|
Enables writing to MPC's PFS registers. */
|
||||||
|
BSP_REG_PROTECT_MPC,
|
||||||
|
|
||||||
|
/* This entry is used for getting the number of enum items. This must be the last entry. DO NOT REMOVE THIS ENTRY!*/
|
||||||
|
BSP_REG_PROTECT_TOTAL_ITEMS
|
||||||
|
} bsp_reg_protect_t;
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
void R_BSP_InterruptsDisable(void);
|
||||||
|
void R_BSP_InterruptsEnable(void);
|
||||||
|
uint32_t R_BSP_CpuInterruptLevelRead(void);
|
||||||
|
bool R_BSP_CpuInterruptLevelWrite(uint32_t level);
|
||||||
|
void R_BSP_RegisterProtectEnable(bsp_reg_protect_t regs_to_protect);
|
||||||
|
void R_BSP_RegisterProtectDisable(bsp_reg_protect_t regs_to_unprotect);
|
||||||
|
void R_BSP_SoftwareReset(void);
|
||||||
|
|
||||||
|
void bsp_register_protect_open(void); //r_bsp internal function. DO NOT CALL.
|
||||||
|
void bsp_ram_initialize(void);
|
||||||
|
|
||||||
|
#endif /* CPU_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_locking.h
|
||||||
|
* Description : This implements a locking mechanism that can be used by all code. The locking is done atomically so
|
||||||
|
* common resources can be accessed safely.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Lock types. */
|
||||||
|
#include "mcu_locks.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef LOCKING_H
|
||||||
|
#define LOCKING_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global variables
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
bool R_BSP_SoftwareLock(BSP_CFG_USER_LOCKING_TYPE * const plock);
|
||||||
|
bool R_BSP_SoftwareUnlock(BSP_CFG_USER_LOCKING_TYPE * const plock);
|
||||||
|
bool R_BSP_HardwareLock(mcu_lock_t const hw_index);
|
||||||
|
bool R_BSP_HardwareUnlock(mcu_lock_t const hw_index);
|
||||||
|
|
||||||
|
#if BSP_CFG_USER_LOCKING_ENABLED != 0
|
||||||
|
/* Is user is using their own lock functions then these are the prototypes. */
|
||||||
|
bool BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * const plock);
|
||||||
|
bool BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * const plock);
|
||||||
|
bool BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION(mcu_lock_t const hw_index);
|
||||||
|
bool BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION(mcu_lock_t const hw_index);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* LOCKING_H */
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,202 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : vecttbl.c
|
||||||
|
* Device(s) : RX72N
|
||||||
|
* Description : Definition of the exception vector table, reset vector, and user boot options.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* BSP configuration. */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* When using the user startup program, disable the following code. */
|
||||||
|
#if BSP_CFG_STARTUP_DISABLE == 0
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
R_BSP_POR_FUNCTION(R_BSP_POWER_ON_RESET_FUNCTION);
|
||||||
|
R_BSP_UB_POR_FUNCTION(R_BSP_UB_POWER_ON_RESET_FUNCTION);
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* The following array fills in the option function select registers, fixed vector table, and the ID code protection
|
||||||
|
* bytes.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifdef __BIG
|
||||||
|
#define BSP_PRV_MDE_VALUE (0xfffffff8) /* big */
|
||||||
|
#else
|
||||||
|
#define BSP_PRV_MDE_VALUE (0xffffffff) /* little */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_CODE_FLASH_BANK_MODE == 0
|
||||||
|
#define BSP_PRV_BANK_MODE_VALUE (0xffffff8f) /* dual */
|
||||||
|
#else
|
||||||
|
#define BSP_PRV_BANK_MODE_VALUE (0xffffffff) /* linear */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BSP_CFG_CODE_FLASH_START_BANK == 0
|
||||||
|
/* The address range of bank 1 from FFC00000h to FFDFFFFFh and bank 0 from FFE00000h to FFFFFFFFh. */
|
||||||
|
#define BSP_PRV_START_BANK_VALUE (0xffffffff)
|
||||||
|
#else
|
||||||
|
/* The address range of bank 1 from FFE00000h to FFFFFFFFh and bank 0 from FFC00000h to FFDFFFFFh. */
|
||||||
|
#define BSP_PRV_START_BANK_VALUE (0xfffffff8)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__CCRX__)
|
||||||
|
|
||||||
|
#pragma address __MDEreg = 0xFE7F5D00
|
||||||
|
#pragma address __OFS0reg = 0xFE7F5D04
|
||||||
|
#pragma address __OFS1reg = 0xFE7F5D08
|
||||||
|
#pragma address __TMINFreg = 0xFE7F5D10
|
||||||
|
#pragma address __BANKSELreg = 0xFE7F5D20
|
||||||
|
#pragma address __SPCCreg = 0xFE7F5D40
|
||||||
|
#pragma address __TMEFreg = 0xFE7F5D48
|
||||||
|
#pragma address __OSIS1reg = 0xFE7F5D50
|
||||||
|
#pragma address __OSIS2reg = 0xFE7F5D54
|
||||||
|
#pragma address __OSIS3reg = 0xFE7F5D58
|
||||||
|
#pragma address __OSIS4reg = 0xFE7F5D5C
|
||||||
|
#pragma address __FAWreg = 0xFE7F5D64
|
||||||
|
#pragma address __ROMCODEreg = 0xFE7F5D70
|
||||||
|
|
||||||
|
const uint32_t __MDEreg = (BSP_PRV_MDE_VALUE & BSP_PRV_BANK_MODE_VALUE);
|
||||||
|
const uint32_t __OFS0reg = BSP_CFG_OFS0_REG_VALUE;
|
||||||
|
const uint32_t __OFS1reg = BSP_CFG_OFS1_REG_VALUE;
|
||||||
|
const uint32_t __TMINFreg = 0xffffffff;
|
||||||
|
const uint32_t __BANKSELreg = BSP_PRV_START_BANK_VALUE;
|
||||||
|
const uint32_t __SPCCreg = 0xffffffff;
|
||||||
|
const uint32_t __TMEFreg = BSP_CFG_TRUSTED_MODE_FUNCTION;
|
||||||
|
const uint32_t __OSIS1reg = BSP_CFG_ID_CODE_LONG_1;
|
||||||
|
const uint32_t __OSIS2reg = BSP_CFG_ID_CODE_LONG_2;
|
||||||
|
const uint32_t __OSIS3reg = BSP_CFG_ID_CODE_LONG_3;
|
||||||
|
const uint32_t __OSIS4reg = BSP_CFG_ID_CODE_LONG_4;
|
||||||
|
const uint32_t __FAWreg = BSP_CFG_FAW_REG_VALUE;
|
||||||
|
const uint32_t __ROMCODEreg = BSP_CFG_ROMCODE_REG_VALUE;
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
|
const st_ofsm_sec_ofs1_t __ofsm_sec_ofs1 __attribute__ ((section(".ofs1"))) = {
|
||||||
|
(BSP_PRV_MDE_VALUE & BSP_PRV_BANK_MODE_VALUE), /* __MDEreg */
|
||||||
|
BSP_CFG_OFS0_REG_VALUE, /* __OFS0reg */
|
||||||
|
BSP_CFG_OFS1_REG_VALUE /* __OFS1reg */
|
||||||
|
};
|
||||||
|
const uint32_t __TMINFreg __attribute__ ((section(".ofs2"))) = 0xffffffff;
|
||||||
|
const uint32_t __BANKSELreg __attribute__ ((section(".ofs3"))) = BSP_PRV_START_BANK_VALUE;
|
||||||
|
const uint32_t __SPCCreg __attribute__ ((section(".ofs4"))) = 0xffffffff;
|
||||||
|
const uint32_t __TMEFreg __attribute__ ((section(".ofs5"))) = BSP_CFG_TRUSTED_MODE_FUNCTION;
|
||||||
|
const st_ofsm_sec_ofs6_t __ofsm_sec_ofs6 __attribute__ ((section(".ofs6"))) = {
|
||||||
|
BSP_CFG_ID_CODE_LONG_1, /* __OSIS1reg */
|
||||||
|
BSP_CFG_ID_CODE_LONG_2, /* __OSIS2reg */
|
||||||
|
BSP_CFG_ID_CODE_LONG_3, /* __OSIS3reg */
|
||||||
|
BSP_CFG_ID_CODE_LONG_4 /* __OSIS4reg */
|
||||||
|
};
|
||||||
|
const uint32_t __FAWreg __attribute__ ((section(".ofs7"))) = BSP_CFG_FAW_REG_VALUE;
|
||||||
|
const uint32_t __ROMCODEreg __attribute__ ((section(".ofs8"))) = BSP_CFG_ROMCODE_REG_VALUE;
|
||||||
|
|
||||||
|
#elif defined(__ICCRX__)
|
||||||
|
|
||||||
|
#pragma public_equ = "__MDE", (BSP_PRV_MDE_VALUE & BSP_PRV_BANK_MODE_VALUE)
|
||||||
|
#pragma public_equ = "__OFS0", BSP_CFG_OFS0_REG_VALUE
|
||||||
|
#pragma public_equ = "__OFS1", BSP_CFG_OFS1_REG_VALUE
|
||||||
|
#pragma public_equ = "__TMINF", 0xffffffff
|
||||||
|
#pragma public_equ = "__BANKSEL", BSP_PRV_START_BANK_VALUE
|
||||||
|
#pragma public_equ = "__SPCC", 0xffffffff
|
||||||
|
#pragma public_equ = "__TMEF", BSP_CFG_TRUSTED_MODE_FUNCTION
|
||||||
|
#pragma public_equ = "__OSIS_1", BSP_CFG_ID_CODE_LONG_1
|
||||||
|
#pragma public_equ = "__OSIS_2", BSP_CFG_ID_CODE_LONG_2
|
||||||
|
#pragma public_equ = "__OSIS_3", BSP_CFG_ID_CODE_LONG_3
|
||||||
|
#pragma public_equ = "__OSIS_4", BSP_CFG_ID_CODE_LONG_4
|
||||||
|
#pragma public_equ = "__FAW", BSP_CFG_FAW_REG_VALUE
|
||||||
|
#pragma public_equ = "__ROM_CODE", BSP_CFG_ROMCODE_REG_VALUE
|
||||||
|
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__), defined(__ICCRX__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* The following array fills in the exception vector table.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if BSP_CFG_RTOS_USED == 4 /* Renesas RI600V4 & RI600PX */
|
||||||
|
/* System configurator generates the ritble.src as interrupt & exception vector tables. */
|
||||||
|
#else /* BSP_CFG_RTOS_USED!=4 */
|
||||||
|
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
R_BSP_ATTRIB_SECTION_CHANGE_EXCEPTVECT void (* const Except_Vectors[])(void) =
|
||||||
|
{
|
||||||
|
/* Offset from EXTB: Reserved area - must be all 0xFF */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x00 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x04 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x08 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x0c - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x10 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x14 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x18 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x1c - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x20 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x24 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x28 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x2c - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x30 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x34 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x38 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x3c - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x40 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x44 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x48 - Reserved */
|
||||||
|
(void (*)(void))0xFFFFFFFF, /* 0x4c - Reserved */
|
||||||
|
|
||||||
|
/* Exception vector table */
|
||||||
|
excep_supervisor_inst_isr, /* 0x50 Exception(Supervisor Instruction) */
|
||||||
|
excep_access_isr, /* 0x54 Exception(Access exception) */
|
||||||
|
undefined_interrupt_source_isr, /* 0x58 Reserved */
|
||||||
|
excep_undefined_inst_isr, /* 0x5c Exception(Undefined Instruction) */
|
||||||
|
undefined_interrupt_source_isr, /* 0x60 Reserved */
|
||||||
|
excep_floating_point_isr, /* 0x64 Exception(Floating Point) */
|
||||||
|
undefined_interrupt_source_isr, /* 0x68 Reserved */
|
||||||
|
undefined_interrupt_source_isr, /* 0x6c Reserved */
|
||||||
|
undefined_interrupt_source_isr, /* 0x70 Reserved */
|
||||||
|
undefined_interrupt_source_isr, /* 0x74 Reserved */
|
||||||
|
non_maskable_isr, /* 0x78 NMI */
|
||||||
|
};
|
||||||
|
R_BSP_ATTRIB_SECTION_CHANGE_END
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* The following array fills in the reset vector.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__CCRX__) || defined(__GNUC__)
|
||||||
|
R_BSP_ATTRIB_SECTION_CHANGE_RESETVECT void (* const Reset_Vector[])(void) =
|
||||||
|
{
|
||||||
|
R_BSP_POWER_ON_RESET_FUNCTION /* 0xfffffffc RESET */
|
||||||
|
};
|
||||||
|
R_BSP_ATTRIB_SECTION_CHANGE_END
|
||||||
|
#endif /* defined(__CCRX__), defined(__GNUC__) */
|
||||||
|
|
||||||
|
#endif/* BSP_CFG_RTOS_USED */
|
||||||
|
|
||||||
|
#endif /* BSP_CFG_STARTUP_DISABLE == 0 */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : vecttbl.h
|
||||||
|
* Description : Has function prototypes for exception callback functions.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef VECTTBL_HEADER_INC
|
||||||
|
#define VECTTBL_HEADER_INC
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
typedef struct st_ofsm_sec_ofs1
|
||||||
|
{
|
||||||
|
uint32_t __MDEreg;
|
||||||
|
uint32_t __OFS0reg;
|
||||||
|
uint32_t __OFS1reg;
|
||||||
|
} st_ofsm_sec_ofs1_t;
|
||||||
|
|
||||||
|
typedef struct st_ofsm_sec_ofs6
|
||||||
|
{
|
||||||
|
uint32_t __OSIS1reg;
|
||||||
|
uint32_t __OSIS2reg;
|
||||||
|
uint32_t __OSIS3reg;
|
||||||
|
uint32_t __OSIS4reg;
|
||||||
|
} st_ofsm_sec_ofs6_t;
|
||||||
|
#endif /* defined(__GNUC__) */
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Exported global functions (to be accessed by other files)
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#endif /* VECTTBL_HEADER_INC */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,224 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2011 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : platform.h
|
||||||
|
* Description : The user chooses which MCU and board they are developing for in this file. If the board you are using
|
||||||
|
* is not listed below, please add your own or use the default 'User Board'.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 30.11.2011 1.00 First Release
|
||||||
|
* : 13.01.2012 1.10 Moved from having platform defined using macro definition, to having platform defined
|
||||||
|
* by choosing an include path. This makes this file simpler and cleans up the issue
|
||||||
|
* where HEW shows all header files for all platforms under 'Dependencies'.
|
||||||
|
* : 14.02.2012 1.20 Added RX210 BSP.
|
||||||
|
* : 18.04.2012 1.30 Updated to v0.70 of FIT S/W Spec and v0.20 of FIT r_bsp Spec. This includes adding
|
||||||
|
* locking.c and locking.h in board folders. Also, r_bsp can now be configured through
|
||||||
|
* r_bsp_config.h.
|
||||||
|
* : 26.06.2012 1.40 Added new options such as exception callbacks and the ability to choose your MCU using
|
||||||
|
* its part number in r_bsp_config.h. Moved mcu_info.h to the 'mcu' folder. Made an effort
|
||||||
|
* to remove any extra files that the user would need to touch. Removed the flash_options.c
|
||||||
|
* file and put its contents in vecttbl.c.
|
||||||
|
* : 17.07.2012 1.50 Fixed bug with exception callback function names. Added BCLK_OUTPUT and SDCLK_OUTPUT
|
||||||
|
* macro options in r_bsp_config.h. Added some extra code to handle exceptions in
|
||||||
|
* vecttbl.c. Added vecttbl.h so that user has prototypes for exception callbacks.
|
||||||
|
* : 09.08.2012 1.60 Added IO_LIB_ENABLE macro to r_bsp_config_reference.h.
|
||||||
|
* : 14.11.2012 1.70 Added RSKRX62G, RSKRX63T, and RSKRX111 support.
|
||||||
|
* : 28.11.2012 2.00 Updated to be compliant with v1.00 r_bsp specification.
|
||||||
|
* : 21.01.2013 2.10 Added RSKRX63T_144PIN support.
|
||||||
|
* : 10.05.2013 2.20 Added new packages and memory variants to RX210. All iodefine.h files have been updated
|
||||||
|
* to latest revisions. On reset, all MCUs will now initialize non-bonded out pins to
|
||||||
|
* reduce current draw. r_bsp_common.c and .h files were added to support functionality
|
||||||
|
* common to all BSPs. cpu.c and cpu.h files were added to all MCU groups to support
|
||||||
|
* CPU functions such as enabling/disabling interrupts, setting the IPL, and controlling
|
||||||
|
* register protection. mcu_init.c and mcu_init.h were add to all MCU groups to support
|
||||||
|
* initialization functions that are common to a MCU group such as non-bonded pin init.
|
||||||
|
* Choosing MCU endian has been removed from r_bsp_config.h and is now automatically
|
||||||
|
* set based on compiler macros. RX-C, IAR, and GCC endian macros are supported. RX210
|
||||||
|
* now has support for choosing HOCO frequency. All r_bsp_config.h files now have macro
|
||||||
|
* for defining Vcc which is needed by some FIT modules. IRQ locks were added for all
|
||||||
|
* MCU groups. BSP_PACKAGE_PINS macro was added to mcu_info.h which defines number of pins
|
||||||
|
* for the currently chosen package. RX111 and RX210 now have the option of using the
|
||||||
|
* r_cgc_rx module for clock management based on BSP_CFG_USE_CGC_MODULE macro in
|
||||||
|
* r_bsp_config.h.
|
||||||
|
* : 31.05.2013 2.21 Added latest iodefine.h files for RX111 (v0.9a), RX630 (v1,50a), and RX63N (v1.60). Also
|
||||||
|
* added 'doc' folder to root of r_bsp. Currently the only the document in there is the
|
||||||
|
* preliminary version of the r_bsp User's Manual. For RX210, the ability to choose chip
|
||||||
|
* version C was added to its r_bsp_config.h file.
|
||||||
|
* : 01.07.2013 2.30 Removed RSPI pin setup in RSKRX111 which caused excess current draw in low power
|
||||||
|
* modes. Changed FIT_NO_PTR and FIT_NO_FUNC macros to 0x10000000 which works for all
|
||||||
|
* RX MCUs. Added ability for user to use 1 or 2 stacks for RX MCUs. Added new interrupt
|
||||||
|
* handling features which allows for interrupt callback registration. This feature allows
|
||||||
|
* all interrupts that map to the NMI vector to be used and replaces the static callback
|
||||||
|
* definitions that were in r_bsp_config.h previously. RX111 information has been updated
|
||||||
|
* according to v1.00 HW manual. This includes support for 40-pin packages. All compiler
|
||||||
|
* messages and warnings for lowsrc.c have been cleaned up. Non-existent port init has
|
||||||
|
* been moved to end of hardware_setup() to ensure user does not overwrite the settings.
|
||||||
|
* Added blank lines between clock macros in r_bsp_config.h to aid in readability. Added
|
||||||
|
* '(void *)' cast to FIT_NO_PTR to remove compiler warnings. All r_bsp.h files now include
|
||||||
|
* r_bsp_common.h which has common includes (stdint.h, stddef.h, & stdbool.h) and uses
|
||||||
|
* r_typedefs.h when C99 is not available. RX111 and RX210 MCUs have the option of using
|
||||||
|
* the r_cgc_rx module for clock management. When this is used, the clock info macros in
|
||||||
|
* mcu_info.h (e.g. BSP_ICLK_HZ) will now make calls to the r_cgc_rx module instead of
|
||||||
|
* providing static info. For debug console output, lowlvl.src was replaced by lowlvl.c
|
||||||
|
* (assembly converted to C source).
|
||||||
|
* : 10.02.2014 2.40 Added support for the RSKRX110, RPBRX111, RSKRX220, and HSBRX21AP. Made sure
|
||||||
|
* in hwsetup.c files that the PMR registers are set after the MPC registers. Replaced
|
||||||
|
* use of stdint.h, stdbool.h, and stddef.h with platform.h to remove compiler warnings.
|
||||||
|
* Removed includes for machine.h since it is compiler specific and replaced with
|
||||||
|
* platform.h. Fixed bug in resetprg.c for many boards where LOCO was not being turned off
|
||||||
|
* when it was not being used. RX100 code now uses the oscillation stabilization flags
|
||||||
|
* instead of SW delay loop. Changed size_t to unsigned long. Defined PRC2 in register
|
||||||
|
* protection section for RX111. Fixed bug in non-existent pin setup for RX111. No
|
||||||
|
* platform is chosen by default (used to be the RSKRX111). This makes it easier to
|
||||||
|
* understand the problem when you build a new project and have not selected your platform.
|
||||||
|
* : 24.03.2014 2.50 Added support for the RSKRX64M.
|
||||||
|
* : 16.06.2014 2.60 Added version control for r_bsp_config.h Two user callback functions may now be
|
||||||
|
* configured allowing callbacks from PowerON_Reset_PC() for warm start detection.
|
||||||
|
* Stdio charget() and charput() functions may now be redirected to user defined functions.
|
||||||
|
* Added support for RSKRX631 and RDKRX631.
|
||||||
|
* : 05.08.2014 2.70 Added support for RSKRX113.
|
||||||
|
* : 29.09.2014 2.80 Added support for RSKRX71M.
|
||||||
|
* : 22.12.2014 2.90 Added support for RSKRX231.
|
||||||
|
* : 30.09.2015 3.00 Added support for RSSKRX23T and RSKRX23T.
|
||||||
|
* : 30.09.2015 3.01 Fix for RSKRX231 and RSKRX23T(RSSKRX23T).
|
||||||
|
* : 01.12.2015 3.10 Added support for RSKRX130.
|
||||||
|
* : 01.02.2016 3.20 Added support for RSKRX24T.
|
||||||
|
* : 29.02.2016 3.30 Added support for RSKRX230.
|
||||||
|
* : 01.10.2016 3.40 Added support for RSKRX65N.
|
||||||
|
* : 22.08.2016 3.50 Added support for RSKRX24U.
|
||||||
|
* : 15.05.2017 3.60 Added support for RSKRX65N-2MB.
|
||||||
|
* Added support for GENERIC_RX65N.
|
||||||
|
* Added support for RSKRX130-512KB.
|
||||||
|
* : 01.11.2017 3.70 Added support for GENERIC_RX130.
|
||||||
|
* Added support for GENERIC_RX110.
|
||||||
|
* Added support for GENERIC_RX111.
|
||||||
|
* Added support for GENERIC_RX113.
|
||||||
|
* Added support for GENERIC_RX230.
|
||||||
|
* Added support for GENERIC_RX231.
|
||||||
|
* Added support for GENERIC_RX23T.
|
||||||
|
* Added support for GENERIC_RX24T.
|
||||||
|
* Added support for GENERIC_RX24U.
|
||||||
|
* Added support for GENERIC_RX64M.
|
||||||
|
* Added support for GENERIC_RX71M.
|
||||||
|
* Added support for ENVISIONRX65N.
|
||||||
|
* : 01.11.2017 3.71 Corrected typo in Rev3.70 BSP.
|
||||||
|
* : 01.07.2018 3.80 Added support for TARGETBOARDRX65N.
|
||||||
|
* Added support for TARGETBOARDRX231.
|
||||||
|
* Added support for TARGETBOARDRX130.
|
||||||
|
* : 27.07.2018 3.90 Added support for GENERIC_RX66T.
|
||||||
|
* Deleted the below board folders, since other boards can all be substituted with
|
||||||
|
* GENERIC_RXxxx.
|
||||||
|
* - RSKRX64M, RSKRX65N, RSKRX65N_2MB, TARGETBOARDRX65N, ENVISIONRX65N, RSKRX71M,
|
||||||
|
* RSKRX230, RSKRX231, TARGETBOARDRX231, RSKRX110, RSKRX111, RPBRX111, RSKRX113,
|
||||||
|
* RSKRX130, RSKRX130_512KB, and TARGETBOARDRX130
|
||||||
|
* : 31.10.2018 4.00 Added support for GENERIC_RX72T.
|
||||||
|
* Deleted the below board folders, since other boards can all be substituted with
|
||||||
|
* GENERIC_RXxxx.
|
||||||
|
* - RSSKRX23T, RSKRX23T, RSKRX24T, and RSKRX24U
|
||||||
|
* : 28.02.2019 5.00 Deleted the below board folders.
|
||||||
|
* - RSKRX610, RSKRX62N, RSKRX62T, RSKRX62G, RDKRX62N, RSKRX630, RSKRX631, RSKRX63T_64PIN,
|
||||||
|
* RSKRX63T_144PIN, RDKRX63N, RDKRX631, RSKRX210, HSBRX21AP and RSKRX220
|
||||||
|
* : 29.03.2019 5.10 Added support for GENERIC_RX23W.
|
||||||
|
* : 08.04.2019 5.20 Added support for GENERIC_RX72M.
|
||||||
|
* : 26.07.2019 5.30 Added support for GENERIC_RX13T.
|
||||||
|
* : 31.07.2019 5.40 Added support for GENERIC_RX23E-A.
|
||||||
|
* : 08.10.2019 5.50 Added support for GENERIC_RX72N, and GENERIC_RX66N.
|
||||||
|
* Deleted the board folders of RSKRX63N.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* Multiple inclusion prevention macro */
|
||||||
|
#ifndef PLATFORM_H
|
||||||
|
#define PLATFORM_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
DEFINE YOUR SYSTEM - UNCOMMENT THE INCLUDE PATH FOR THE PLATFORM YOU ARE USING.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* GENERIC_RX64M */
|
||||||
|
//#include "./board/generic_rx64m/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX65N */
|
||||||
|
//#include "./board/generic_rx65n/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX66N */
|
||||||
|
//#include "./board/generic_rx66n/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX66T */
|
||||||
|
//#include "./board/generic_rx66t/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX71M */
|
||||||
|
//#include "./board/generic_rx71m/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX72M */
|
||||||
|
//#include "./board/generic_rx72m/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX72N */
|
||||||
|
#include "./board/generic_rx72n/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX72T */
|
||||||
|
//#include "./board/generic_rx72t/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX230 */
|
||||||
|
//#include "./board/generic_rx230/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX231 */
|
||||||
|
//#include "./board/generic_rx231/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX23E-A */
|
||||||
|
//#include "./board/generic_rx23e-a/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX23T */
|
||||||
|
//#include "./board/generic_rx23t/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX23W */
|
||||||
|
//#include "./board/generic_rx23w/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX24T */
|
||||||
|
//#include "./board/generic_rx24t/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX24U */
|
||||||
|
//#include "./board/generic_rx24u/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX111 */
|
||||||
|
//#include "./board/generic_rx111/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX110 */
|
||||||
|
//#include "./board/generic_rx110/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX113 */
|
||||||
|
//#include "./board/generic_rx113/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX130 */
|
||||||
|
//#include "./board/generic_rx130/r_bsp.h"
|
||||||
|
|
||||||
|
/* GENERIC_RX13T */
|
||||||
|
//#include "./board/generic_rx13t/r_bsp.h"
|
||||||
|
|
||||||
|
/* User Board - Define your own board here. */
|
||||||
|
//#include "./board/user/r_bsp.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
MAKE SURE AT LEAST ONE PLATFORM WAS DEFINED - DO NOT EDIT BELOW THIS POINT
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef PLATFORM_DEFINED
|
||||||
|
#error "Error - No platform defined in platform.h!"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PLATFORM_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
r_bsp Package
|
||||||
|
=============
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
The r_bsp package provides a foundation for code to be built on top of. It provides startup code, iodefines, and MCU
|
||||||
|
information for different boards. There are 2 folders that make up the r_bsp package. The 'mcu' folder contains files
|
||||||
|
that are common to a MCU group. These files provide functionality such as easy register access, CPU functions,
|
||||||
|
and a file named 'mcu_info.h' for each MCU group. The 'mcu_info.h' file has information about the MCU on the board
|
||||||
|
and is configured based on the information given in r_bsp_config.h. The information in 'mcu_info.h' is used to help
|
||||||
|
configure Renesas middleware that uses the r_bsp package. The 'board' folder has a folder with startup code for each
|
||||||
|
supported board. Which MCU and board is chosen is decided by the settings in 'platform.h'. The user can choose which
|
||||||
|
board they are using by uncommenting the include path that applies to their board. For example, if you are using the
|
||||||
|
RSK+RX62N then you would uncomment the #include "./board/rskrx62n/r_bsp.h" include path. Users are encouraged to add
|
||||||
|
their own boards to the 'board' directory. BSPs are configured by using the r_bsp_config.h file. Each board will have a
|
||||||
|
reference configuration file named r_bsp_config_reference.h. The user should copy this file to their project, rename it
|
||||||
|
to r_bsp_config.h, and use the options inside the file to configure the BSP for their project.
|
||||||
|
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
* Provides foundation to build code on top of.
|
||||||
|
* Provides MCU startup code.
|
||||||
|
* Provides SFR access through iodefine.h
|
||||||
|
* Stores details of MCU in 'mcu_info.h' to help configure Renesas middleware.
|
||||||
|
* Easily configure BSP through r_bsp_config.h.
|
||||||
|
* Choose MCU easily by inputting part number details in r_bsp_config.h.
|
||||||
|
* Provides callbacks for MCU exceptions and the bus error interrupt.
|
||||||
|
* Supports initializing non-bonded out pins to reduce power
|
||||||
|
* Provides API to control CPU functions such as setting the IPL, enabling/disabling interrupts, and controlling
|
||||||
|
register protection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File Structure
|
||||||
|
--------------
|
||||||
|
r_bsp
|
||||||
|
| platform.h
|
||||||
|
| readme.txt
|
||||||
|
|
|
||||||
|
+---board
|
||||||
|
| +---generic_rx111
|
||||||
|
| | :
|
||||||
|
| :
|
||||||
|
| \---user
|
||||||
|
|
|
||||||
|
+---doc
|
||||||
|
| +---en
|
||||||
|
| r01an1685ej{VERSION_NUMBER}-rx-bsp.pdf
|
||||||
|
| +---ja
|
||||||
|
| r01an1685jj{VERSION_NUMBER}-rx-bsp.pdf
|
||||||
|
|
|
||||||
|
\---mcu
|
||||||
|
+---all
|
||||||
|
+---rx111
|
||||||
|
| :
|
||||||
|
:
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_byteq_if.h
|
||||||
|
* Description : Functions for using byte queues/circular buffers
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 24.07.2013 1.00 Initial Release
|
||||||
|
* : 11.21.2014 1.20 Removed dependency to BSP
|
||||||
|
* : 01.22.2015 1.30 Updated version to 1.30 for RX71M release
|
||||||
|
* : 04.04.2015 1.40 Updated version to 1.40 for RX231 release
|
||||||
|
* : 30.09.2015 1.50 Added dependency to BSP
|
||||||
|
* : 29.01.2016 1.60 Updated version to 1.60 for correspondence to RX Family
|
||||||
|
* : 01.06.2018 1.70 Updated version to 1.70
|
||||||
|
* : 03.12.2018 1.71 Updated version to 1.71 for update of xml file.
|
||||||
|
* : 07.02.2019 1.80 Updated version to 1.80.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef BYTEQ_IF_H
|
||||||
|
#define BYTEQ_IF_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* Version Number of API. */
|
||||||
|
#define BYTEQ_VERSION_MAJOR (1)
|
||||||
|
#define BYTEQ_VERSION_MINOR (80)
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
typedef enum e_byteq_err // BYTEQ API error codes
|
||||||
|
{
|
||||||
|
BYTEQ_SUCCESS = 0,
|
||||||
|
BYTEQ_ERR_NULL_PTR, // received null ptr; missing required argument
|
||||||
|
BYTEQ_ERR_INVALID_ARG, // argument is not valid for parameter
|
||||||
|
BYTEQ_ERR_MALLOC_FAIL, // can't allocate memory for ctrl block; increase heap
|
||||||
|
BYTEQ_ERR_NO_MORE_CTRL_BLKS, // no more control blocks, increase BYTEQ_MAX_CTRL_BLKS
|
||||||
|
BYTEQ_ERR_QUEUE_FULL, // queue full; cannot add another byte
|
||||||
|
BYTEQ_ERR_QUEUE_EMPTY // queue empty; no byte to fetch
|
||||||
|
} byteq_err_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* BYTE QUEUE HANDLE */
|
||||||
|
|
||||||
|
typedef struct st_byteq_ctrl * byteq_hdl_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Public Functions
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Open(uint8_t * const p_buf,
|
||||||
|
uint16_t const size,
|
||||||
|
byteq_hdl_t * const p_hdl);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Close(byteq_hdl_t const hdl);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Put(byteq_hdl_t const hdl,
|
||||||
|
uint8_t const byte);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Get(byteq_hdl_t const hdl,
|
||||||
|
uint8_t * const p_byte);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Flush(byteq_hdl_t const hdl);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Used(byteq_hdl_t const hdl,
|
||||||
|
uint16_t * const p_cnt);
|
||||||
|
|
||||||
|
byteq_err_t R_BYTEQ_Unused(byteq_hdl_t const hdl,
|
||||||
|
uint16_t * const p_cnt);
|
||||||
|
|
||||||
|
uint32_t R_BYTEQ_GetVersion(void);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* BYTEQ_IF_H */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
|
||||||
|
r_byteq
|
||||||
|
=======
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
The r_byteq module is a collection of circular buffer routines for byte data.
|
||||||
|
The application passes a buffer to be used as a circular buffer to the Open()
|
||||||
|
function which assigns a queue control block to it to handle indexing. The
|
||||||
|
Open() function returns a handle which is then used as a queue/buffer id for all
|
||||||
|
other API functions. These functions include routines for adding and removing
|
||||||
|
data from a queue, inspecting the amount of data in a queue, and the ability to
|
||||||
|
flush a queue.
|
||||||
|
|
||||||
|
The queue control blocks can be allocated at compile time or dynamically at run
|
||||||
|
time. A configuration option for this exists in "r_config\r_byteq_config.h".
|
||||||
|
An original copy of the configuration file is stored in "r_byteq\ref\
|
||||||
|
r_byteq_config_reference.h".
|
||||||
|
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
* Statically or dynamically allocated queue control blocks.
|
||||||
|
* Number of queues limited only by the amount of RAM available on the mcu.
|
||||||
|
|
||||||
|
File Structure
|
||||||
|
--------------
|
||||||
|
r_byteq
|
||||||
|
| readme.txt
|
||||||
|
| r_byteq_if.h
|
||||||
|
|
|
||||||
|
+---doc
|
||||||
|
| +---en
|
||||||
|
| | r01an1683ej{VERSION_NUMBER}-rx.pdf
|
||||||
|
| |
|
||||||
|
| +---ja
|
||||||
|
| r01an1683jj{VERSION_NUMBER}-rx.pdf
|
||||||
|
|
|
||||||
|
+---ref
|
||||||
|
| r_byteq_config_reference.h
|
||||||
|
|
|
||||||
|
+---src
|
||||||
|
r_byteq.c
|
||||||
|
r_byteq_private.h
|
||||||
|
|
||||||
|
r_config
|
||||||
|
r_byteq_config.h
|
||||||
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_byteq_config.h
|
||||||
|
* Description : Configures the byte queue memory allocation
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 24.07.2013 1.00 Initial Release
|
||||||
|
* : 11.21.2014 1.20 Removed dependency to BSP
|
||||||
|
* : 30.09.2015 1.50 Added dependency to BSP
|
||||||
|
* : 01.06.2018 1.70 Changed the default value of the following macro definition.
|
||||||
|
* - BYTEQ_CFG_MAX_CTRL_BLKS - Changed the default value from 4 to 32.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef BYTEQ_CONFIG_H
|
||||||
|
#define BYTEQ_CONFIG_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* SPECIFY WHETHER TO INCLUDE CODE FOR API PARAMETER CHECKING
|
||||||
|
Available settings:
|
||||||
|
BSP_CFG_PARAM_CHECKING_ENABLE:
|
||||||
|
Utilizes the system default setting
|
||||||
|
1:
|
||||||
|
Includes parameter checking
|
||||||
|
0:
|
||||||
|
Compiles out parameter checking
|
||||||
|
*/
|
||||||
|
#define BYTEQ_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
|
||||||
|
|
||||||
|
/* SPECIFY IF SHOULD USE MALLOC() TO ALLOCATE MEMORY FOR QUEUE CONTROL BLOCKS */
|
||||||
|
#define BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS (0)
|
||||||
|
|
||||||
|
/* SPECIFY NUMBER OF STATIC QUEUE CONTROL BLOCKS TO SUPPORT */
|
||||||
|
/* valid only when BYTEQ_USE_HEAP_FOR_CTRL_BLKS is set to 0 */
|
||||||
|
#define BYTEQ_CFG_MAX_CTRL_BLKS (32)
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* BYTEQ_CONFIG_H */
|
||||||
|
|
@ -0,0 +1,422 @@
|
||||||
|
/*****************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
******************************************************************************/
|
||||||
|
/*****************************************************************************
|
||||||
|
* File Name : r_byteq.c
|
||||||
|
* Description : Functions for using byte queues/circular buffers.
|
||||||
|
******************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 24.07.2013 1.00 Initial Release
|
||||||
|
* : 11.21.2014 1.20 Removed dependency to BSP
|
||||||
|
* : 30.09.2015 1.50 Added dependency to BSP
|
||||||
|
* : 29.01.2016 1.60 Fixed the initial setting process in the R_LONGQ_Open function.
|
||||||
|
* Fixed a program according to the Renesas coding rules.
|
||||||
|
* : 01.06.2018 1.70 Added the comment to while statement.
|
||||||
|
* : 07.02.2019 1.80 Deleted the inline expansion of the R_BYTEQ_GetVersion function.
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
******************************************************************************/
|
||||||
|
/* Used functions of malloc() and the free() */
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* Used the common type */
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/* Defines for BYTEQ support */
|
||||||
|
#include "r_byteq_private.h"
|
||||||
|
#include "r_byteq_if.h"
|
||||||
|
#include "r_byteq_config.h"
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Private global variables and functions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* QUEUE CONTROL BLOCK ALLOCATIONS */
|
||||||
|
|
||||||
|
#if (BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS == 0)
|
||||||
|
static byteq_ctrl_t g_qcb[BYTEQ_CFG_MAX_CTRL_BLKS];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Open
|
||||||
|
* Description : Allocates or assigns a queue control block for the buffer
|
||||||
|
* pointed to by p_buf (see BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS in
|
||||||
|
* config.h). Initializes the queue to an empty state and
|
||||||
|
* provides a Handle to its control structure in p_hdl which is
|
||||||
|
* then used as a queue ID for the other API functions.
|
||||||
|
* Arguments : p_buf -
|
||||||
|
* Pointer to byte buffer.
|
||||||
|
* size -
|
||||||
|
* Buffer size in bytes.
|
||||||
|
* p_hdl -
|
||||||
|
* Pointer to a handle for queue (value set here)
|
||||||
|
* Return Value : SCI_SUCCESS -
|
||||||
|
* queue initialized successfully
|
||||||
|
* BYTEQ_ERR_NULL_PTR
|
||||||
|
* received null ptr; missing required argument
|
||||||
|
* BYTEQ_ERR_INVALID_ARG
|
||||||
|
* argument is not valid for parameter
|
||||||
|
* BYTEQ_ERR_MALLOC_FAIL
|
||||||
|
* can't allocate memory for ctrl block; increase heap
|
||||||
|
* BYTEQ_ERR_NO_MORE_CTRL_BLKS
|
||||||
|
* no more control blocks, increase BYTEQ_CFG_MAX_CTRL_BLKS
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Open(uint8_t * const p_buf,
|
||||||
|
uint16_t const size,
|
||||||
|
byteq_hdl_t * const p_hdl)
|
||||||
|
{
|
||||||
|
byteq_ctrl_t *p_qcb = 0;
|
||||||
|
#if (BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS == 0)
|
||||||
|
uint32_t i;
|
||||||
|
static bool qcb_init = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* CHECK ARGUMENTS */
|
||||||
|
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == p_hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_INVALID_ARG; // return if invalid location
|
||||||
|
}
|
||||||
|
if (NULL == p_buf)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR; // return if no buffer pointer
|
||||||
|
}
|
||||||
|
if (size < 2)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_INVALID_ARG; // return insufficient buffer size
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GET QUEUE CONTROL BLOCK */
|
||||||
|
|
||||||
|
#if BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS
|
||||||
|
|
||||||
|
/* allocate memory for a QCB */
|
||||||
|
p_qcb = (byteq_ctrl_t *)malloc(sizeof(byteq_ctrl_t));
|
||||||
|
if (NULL == p_qcb)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_MALLOC_FAIL;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* if first Open call, mark all QCBs as being available */
|
||||||
|
if (false == qcb_init)
|
||||||
|
{
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for (i=0; i < BYTEQ_CFG_MAX_CTRL_BLKS; i++)
|
||||||
|
{
|
||||||
|
g_qcb[i].buffer = NULL;
|
||||||
|
}
|
||||||
|
qcb_init = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* locate first available QCB */
|
||||||
|
/* WAIT_LOOP */
|
||||||
|
for (i=0; i < BYTEQ_CFG_MAX_CTRL_BLKS; i++)
|
||||||
|
{
|
||||||
|
if (NULL == g_qcb[i].buffer)
|
||||||
|
{
|
||||||
|
p_qcb = &g_qcb[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return error if none available */
|
||||||
|
if (BYTEQ_CFG_MAX_CTRL_BLKS == i)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NO_MORE_CTRL_BLKS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* INITIALIZE QCB FIELDS */
|
||||||
|
|
||||||
|
p_qcb->buffer = p_buf;
|
||||||
|
p_qcb->size = size;
|
||||||
|
p_qcb->count = 0;
|
||||||
|
p_qcb->in_index = 0;
|
||||||
|
p_qcb->out_index = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/* SET HANDLE */
|
||||||
|
|
||||||
|
*p_hdl = p_qcb;
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Put
|
||||||
|
* Description : This function adds a byte of data to the queue.
|
||||||
|
*
|
||||||
|
* NOTE: This function does not disable/enable interrupts. If the queue is
|
||||||
|
* accessed from both the interrupt and application level, the app must
|
||||||
|
* disable/enable interrupts before/after calling this routine.
|
||||||
|
*
|
||||||
|
* Arguments : hdl -
|
||||||
|
* Handle for queue.
|
||||||
|
* byte -
|
||||||
|
* Byte to add to queue.
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; byte sent or queued for transmit
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL
|
||||||
|
* BYTEQ_ERR_QUEUE_FULL -
|
||||||
|
* Queue full; cannot add byte to queue.
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Put(byteq_hdl_t const hdl,
|
||||||
|
uint8_t const byte)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR; // return if no handle
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (hdl->count >= hdl->size)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_QUEUE_FULL; // return if queue is full
|
||||||
|
}
|
||||||
|
|
||||||
|
/* load byte into queue */
|
||||||
|
hdl->buffer[hdl->in_index++] = byte; // add byte
|
||||||
|
if (hdl->in_index >= hdl->size) // adjust index
|
||||||
|
{
|
||||||
|
hdl->in_index = 0;
|
||||||
|
}
|
||||||
|
hdl->count++; // adjust count
|
||||||
|
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Get
|
||||||
|
* Description : This function removes a byte of data from the queue.
|
||||||
|
*
|
||||||
|
* NOTE: This function does not disable/enable interrupts. If the queue is
|
||||||
|
* accessed from both the interrupt and application level, the app must
|
||||||
|
* disable/enable interrupts before/after calling this routine.
|
||||||
|
*
|
||||||
|
* Arguments : hdl -
|
||||||
|
* Handle for queue.
|
||||||
|
* p_byte -
|
||||||
|
* Pointer to load byte to.
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; byte sent or queued for transmit
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL
|
||||||
|
* BYTEQ_ERR_INVALID_ARG -
|
||||||
|
* p_byte is NULL
|
||||||
|
* BYTEQ_ERR_QUEUE_EMPTY -
|
||||||
|
* Queue empty; no data available to fetch
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Get(byteq_hdl_t const hdl,
|
||||||
|
uint8_t * const p_byte)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR; // return if no handle
|
||||||
|
}
|
||||||
|
if (NULL == p_byte)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_INVALID_ARG; // return if invalid location
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (0 == hdl->count)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_QUEUE_EMPTY; // return if queue empty
|
||||||
|
}
|
||||||
|
|
||||||
|
*p_byte = hdl->buffer[hdl->out_index++]; // get byte
|
||||||
|
if (hdl->out_index >= hdl->size) // adjust index
|
||||||
|
{
|
||||||
|
hdl->out_index = 0;
|
||||||
|
}
|
||||||
|
hdl->count--; // adjust count
|
||||||
|
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Flush
|
||||||
|
* Description : This function resets a queue to an empty state.
|
||||||
|
*
|
||||||
|
* NOTE: This function does not disable/enable interrupts. If the queue is
|
||||||
|
* accessed from both the interrupt and application level, the app must
|
||||||
|
* disable/enable interrupts before/after calling this routine.
|
||||||
|
*
|
||||||
|
* Arguments : hdl -
|
||||||
|
* Handle for queue.
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; queue is reset to en ampty state
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Flush(byteq_hdl_t const hdl)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* RESET QUEUE */
|
||||||
|
|
||||||
|
hdl->in_index = 0;
|
||||||
|
hdl->out_index = 0;
|
||||||
|
hdl->count = 0;
|
||||||
|
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Used
|
||||||
|
* Description : This function provides the number of data bytes in the queue.
|
||||||
|
* Arguments : hdl -
|
||||||
|
* Handle for queue.
|
||||||
|
* p_cnt -
|
||||||
|
* Pointer to load queue data count to.
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; *p_cnt loaded with number of bytes in queue
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL
|
||||||
|
* BYTEQ_ERR_INVALID_ARG -
|
||||||
|
* p_cnt is NULL
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Used(byteq_hdl_t const hdl,
|
||||||
|
uint16_t * const p_cnt)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR;
|
||||||
|
}
|
||||||
|
if (NULL == p_cnt)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_INVALID_ARG; // return if invalid location
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
*p_cnt = hdl->count;
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Unused
|
||||||
|
* Description : This function provides the number of data bytes available
|
||||||
|
* for storage in the queue.
|
||||||
|
* Arguments : hdl -
|
||||||
|
* Handle for queue.
|
||||||
|
* p_cnt -
|
||||||
|
* Pointer to load queue unused byte count to.
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; *p_cnt loaded with number of bytes available in
|
||||||
|
* queue
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL
|
||||||
|
* BYTEQ_ERR_INVALID_ARG -
|
||||||
|
* p_cnt is NULL
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Unused(byteq_hdl_t const hdl,
|
||||||
|
uint16_t * const p_cnt)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR;
|
||||||
|
}
|
||||||
|
if (NULL == p_cnt)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_INVALID_ARG; // return if invalid location
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
*p_cnt = (uint16_t) (hdl->size - hdl->count);
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_Close
|
||||||
|
* Description : If the control block associated with this Handle was allocated
|
||||||
|
* dynamically at run time (BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS set to 1
|
||||||
|
* in config.h), then that memory is free()d by this function. If
|
||||||
|
* the control block was statically allocated at compile time
|
||||||
|
* (BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS set to 0 in config.h), then this
|
||||||
|
* function marks the control block as available for use by another
|
||||||
|
* buffer. Nothing is done to the contents of the buffer referenced
|
||||||
|
* by this Handle.
|
||||||
|
* Arguments : hdl -
|
||||||
|
* handle for queue
|
||||||
|
* Return Value : BYTEQ_SUCCESS -
|
||||||
|
* Successful; control block freed
|
||||||
|
* BYTEQ_ERR_NULL_PTR -
|
||||||
|
* hdl is NULL.
|
||||||
|
******************************************************************************/
|
||||||
|
byteq_err_t R_BYTEQ_Close(byteq_hdl_t const hdl)
|
||||||
|
{
|
||||||
|
#if (BYTEQ_CFG_PARAM_CHECKING_ENABLE == 1)
|
||||||
|
if (NULL == hdl)
|
||||||
|
{
|
||||||
|
return BYTEQ_ERR_NULL_PTR;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS
|
||||||
|
free(hdl); // free QCB memory
|
||||||
|
#else
|
||||||
|
hdl->buffer = NULL; // mark QCB as free
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return BYTEQ_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Function Name: R_BYTEQ_GetVersion
|
||||||
|
* Description : Returns the version of this module. The version number is
|
||||||
|
* encoded such that the top two bytes are the major version
|
||||||
|
* number and the bottom two bytes are the minor version number.
|
||||||
|
* Arguments : none
|
||||||
|
* Return Value : version number
|
||||||
|
******************************************************************************/
|
||||||
|
uint32_t R_BYTEQ_GetVersion(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
uint32_t const version = (BYTEQ_VERSION_MAJOR << 16) | BYTEQ_VERSION_MINOR;
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_private.h
|
||||||
|
* Description : Definitions internal to byte queue module
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 24.07.2013 1.0 Initial Release
|
||||||
|
* : 30.09.2015 1.50 Added dependency to BSP
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef BYTEQ_PRIVATE_H
|
||||||
|
#define BYTEQ_PRIVATE_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* QUEUE CONTROL BLOCK */
|
||||||
|
|
||||||
|
typedef struct st_byteq_ctrl // Byte Queue Control Block (for handle)
|
||||||
|
{
|
||||||
|
uint8_t *buffer; // pointer to buffer
|
||||||
|
uint16_t size; // buffer size
|
||||||
|
uint16_t count; // number data bytes in queue
|
||||||
|
uint16_t in_index; // index used by Put function to add data
|
||||||
|
uint16_t out_index; // index used by Get function to remove data
|
||||||
|
} byteq_ctrl_t;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* BYTEQ_PRIVATE_H */
|
||||||
|
|
@ -0,0 +1,774 @@
|
||||||
|
/* Generated configuration header file - do not edit */
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_config_reference.h
|
||||||
|
* Device(s) : RX72N
|
||||||
|
* Description : The file r_bsp_config.h is used to configure your BSP. r_bsp_config.h should be included
|
||||||
|
* somewhere in your package so that the r_bsp code has access to it. This file (r_bsp_config_reference.h)
|
||||||
|
* is just a reference file that the user can use to make their own r_bsp_config.h file.
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 08.10.2019 1.00 First Release.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef R_BSP_CONFIG_REF_HEADER_FILE
|
||||||
|
#define R_BSP_CONFIG_REF_HEADER_FILE
|
||||||
|
|
||||||
|
/* Include for various workarounds. */
|
||||||
|
#include "smc_workaround.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* NOTE:
|
||||||
|
The default settings are the same as when using RSKRX72N.
|
||||||
|
Change to the settings for the user board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Start up select
|
||||||
|
0 = Enable BSP startup program.
|
||||||
|
1 = Disable BSP startup program. (e.g. Using user startup program.)
|
||||||
|
NOTE: This setting is available only when using CCRX. */
|
||||||
|
#define BSP_CFG_STARTUP_DISABLE (0)
|
||||||
|
|
||||||
|
/* Enter the product part number for your MCU. This information will be used to obtain information about your MCU such
|
||||||
|
as package and memory size.
|
||||||
|
To help parse this information, the part number will be defined using multiple macros.
|
||||||
|
R 5 F 57 2N N D D BD
|
||||||
|
| | | | | | | | | Macro Name Description
|
||||||
|
| | | | | | | | |__BSP_CFG_MCU_PART_PACKAGE = Package type, number of pins, and pin pitch
|
||||||
|
| | | | | | | |____not used = Products with wide temperature range
|
||||||
|
| | | | | | |______BSP_CFG_MCU_PART_ENCRYPTION_INCLUDED = Encryption module included/not included
|
||||||
|
| | | | | |________BSP_CFG_MCU_PART_MEMORY_SIZE = ROM, RAM, and Data Flash Capacity
|
||||||
|
| | | | |___________BSP_CFG_MCU_PART_GROUP = Group name
|
||||||
|
| | | |______________BSP_CFG_MCU_PART_SERIES = Series name
|
||||||
|
| | |________________BSP_CFG_MCU_PART_MEMORY_TYPE = Type of memory (Flash, ROMless)
|
||||||
|
| |__________________not used = Renesas MCU
|
||||||
|
|____________________not used = Renesas semiconductor product.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Package type. Set the macro definition based on values below:
|
||||||
|
Character(s) = Value for macro = Package Type/Number of Pins/Pin Pitch
|
||||||
|
FC = 0x0 = LFQFP/176/0.50
|
||||||
|
BG = 0x1 = LFBGA/176/0.80
|
||||||
|
BD = 0x2 = LFBGA/224/0.80
|
||||||
|
FB = 0x3 = LFQFP/144/0.50
|
||||||
|
LK = 0x4 = TFLGA/145/0.50
|
||||||
|
FP = 0x5 = LFQFP/100/0.50
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_PACKAGE (0x3) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Whether Encryption is included or not.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
D = 0xD = Encryption module not included
|
||||||
|
H = 0x11 = Encryption module included
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_FUNCTION (0x11) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* ROM, RAM, and Data Flash Capacity.
|
||||||
|
Character(s) = Value for macro = ROM Size/Ram Size/Data Flash Size
|
||||||
|
D = 0xD = 2MB/1MB/32KB
|
||||||
|
N = 0x17 = 4MB/1MB/32KB
|
||||||
|
NOTE: The RAM areas are not contiguous.It is separated by 512 KB each.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_MEMORY_SIZE (0x17) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Group name.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
2N = 0x0 = RX72N Group
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_GROUP (0x0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Series name.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
57 = 0x0 = RX700 Series
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_SERIES (0x0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Memory type.
|
||||||
|
Character(s) = Value for macro = Description
|
||||||
|
F = 0x0 = Flash memory version
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MCU_PART_MEMORY_TYPE (0x0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Whether to use 1 stack or 2. RX MCUs have the ability to use 2 stacks: an interrupt stack and a user stack.
|
||||||
|
* When using 2 stacks the user stack will be used during normal user code. When an interrupt occurs the CPU
|
||||||
|
* will automatically shift to using the interrupt stack. Having 2 stacks can make it easier to figure out how
|
||||||
|
* much stack space to allocate since the user does not have to worry about always having enough room on the
|
||||||
|
* user stack for if-and-when an interrupt occurs. Some users will not want 2 stacks though because it is not
|
||||||
|
* needed in all applications and can lead to wasted RAM (i.e. space in between stacks that is not used).
|
||||||
|
* If only 1 stack is used then the interrupt stack is the one that will be used. If 1 stack is chosen then
|
||||||
|
* the user may want to remove the 'SU' section from the linker sections to remove any linker warnings.
|
||||||
|
*
|
||||||
|
* 0 = Use 1 stack. Disable user stack. User stack size set below will be ignored.
|
||||||
|
* 1 = Use 2 stacks. User stack and interrupt stack will both be used.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC.
|
||||||
|
* This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_STACK_ENABLE (0)
|
||||||
|
|
||||||
|
/* If only 1 stack is chosen using BSP_CFG_USER_STACK_ENABLE then no RAM will be allocated for the user stack. */
|
||||||
|
#if BSP_CFG_USER_STACK_ENABLE == 1
|
||||||
|
/* User Stack size in bytes.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC.
|
||||||
|
* This is invalid when using Renesas RTOS with CCRX. */
|
||||||
|
#define BSP_CFG_USTACK_BYTES (0x0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Interrupt Stack size in bytes.
|
||||||
|
* NOTE: This setting is available only when using CCRX and GNUC. */
|
||||||
|
#define BSP_CFG_ISTACK_BYTES (0x400)
|
||||||
|
|
||||||
|
/* Heap size in bytes.
|
||||||
|
To disable the heap you must follow these steps:
|
||||||
|
1) Set this macro (BSP_CFG_HEAP_BYTES) to 0.
|
||||||
|
2) Set the macro BSP_CFG_IO_LIB_ENABLE to 0.
|
||||||
|
3) Disable stdio from being built into the project library. This is done by going into the Renesas RX Toolchain
|
||||||
|
settings and choosing the Standard Library section. After that choose 'Contents' in e2 studio.
|
||||||
|
This will present a list of modules that can be included. Uncheck the box for stdio.h.
|
||||||
|
NOTE: This setting is available only when using CCRX and GNUC. */
|
||||||
|
#define BSP_CFG_HEAP_BYTES (0x0)
|
||||||
|
|
||||||
|
/* Initializes C input & output library functions.
|
||||||
|
0 = Disable I/O library initialization in resetprg.c. If you are not using stdio then use this value.
|
||||||
|
1 = Enable I/O library initialization in resetprg.c. This is default and needed if you are using stdio.
|
||||||
|
NOTE: This setting is available only when using CCRX. */
|
||||||
|
#define BSP_CFG_IO_LIB_ENABLE (1)
|
||||||
|
|
||||||
|
/* If desired the user may redirect the stdio charget() and/or charput() functions to their own respective functions
|
||||||
|
by enabling below and providing and replacing the my_sw_... function names with the names of their own functions. */
|
||||||
|
#define BSP_CFG_USER_CHARGET_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_CHARGET_FUNCTION my_sw_charget_function
|
||||||
|
|
||||||
|
#define BSP_CFG_USER_CHARPUT_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_CHARPUT_FUNCTION my_sw_charput_function
|
||||||
|
|
||||||
|
/* After reset MCU will operate in Supervisor mode. To switch to User mode, set this macro to '1'. For more information
|
||||||
|
on the differences between these 2 modes see the CPU >> Processor Mode section of your MCU's hardware manual.
|
||||||
|
0 = Stay in Supervisor mode.
|
||||||
|
1 = Switch to User mode.
|
||||||
|
NOTE: This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RUN_IN_USER_MODE (0)
|
||||||
|
|
||||||
|
/* Set your desired ID code. NOTE, leave at the default (all 0xFF's) if you do not wish to use an ID code. If you set
|
||||||
|
this value and program it into the MCU then you will need to remember the ID code because the debugger will ask for
|
||||||
|
it when trying to connect. Note that the E1/E20 will ignore the ID code when programming the MCU during debugging.
|
||||||
|
If you set this value and then forget it then you can clear the ID code by connecting up in serial boot mode using
|
||||||
|
FDT. The ID Code is 16 bytes long. The macro below define the ID Code in 4-byte sections. */
|
||||||
|
/* Lowest 4-byte section, address 0xFE7F5D50. From MSB to LSB: ID code 4, ID code 3, ID code 2, ID code 1/Control Code.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_1 (0xFFFFFFFF)
|
||||||
|
/* 2nd ID Code section, address 0xFE7F5D54. From MSB to LSB: ID code 8, ID code 7, ID code 6, ID code 5. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_2 (0xFFFFFFFF)
|
||||||
|
/* 3rd ID Code section, address 0xFE7F5D58. From MSB to LSB: ID code 12, ID code 11, ID code 10, ID code 9. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_3 (0xFFFFFFFF)
|
||||||
|
/* 4th ID Code section, address 0xFE7F5D5C. From MSB to LSB: ID code 16, ID code 15, ID code 14, ID code 13. */
|
||||||
|
#define BSP_CFG_ID_CODE_LONG_4 (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Clock source select (CKSEL).
|
||||||
|
0 = Low Speed On-Chip Oscillator (LOCO)
|
||||||
|
1 = High Speed On-Chip Oscillator (HOCO)
|
||||||
|
2 = Main Clock Oscillator
|
||||||
|
3 = Sub-Clock Oscillator
|
||||||
|
4 = PLL Circuit (default)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLOCK_SOURCE (4) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Main clock Oscillator Switching (MOSEL).
|
||||||
|
0 = Resonator (default)
|
||||||
|
1 = External clock input
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MAIN_CLOCK_SOURCE (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* USB Clock source select (UPLLSEL). Choose which clock source to input to the USB circuit.
|
||||||
|
0 = System Clock (PLL Circuit/No division) (This is not available.)
|
||||||
|
1 = USB PLL Circuit (This is not available.)
|
||||||
|
2 = PLL Circuit (UDIVCLK) (default)
|
||||||
|
3 = PPLL Circuit (PPLLDIVCLK)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USB_CLOCK_SOURCE (2) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Ethernet-PHY clock source (OUTCKSEL). Choose which clock source to input to the Ethernet PHY LSI.
|
||||||
|
Available clock sources:
|
||||||
|
0 = PLL circuit
|
||||||
|
1 = PPLL circuit (default)
|
||||||
|
2 = Ethernet-PHY not use
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PHY_CLOCK_SOURCE (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Configure clock source of clock output(CLKOUT) pin (CKOSEL).
|
||||||
|
Available clock sources:
|
||||||
|
0 = LOCO
|
||||||
|
1 = HOCO
|
||||||
|
2 = Main clock oscillator (default)
|
||||||
|
3 = Sub-clock oscillator
|
||||||
|
4 = PLL circuit
|
||||||
|
6 = PPLL circuit
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_SOURCE (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* The sub-clock oscillation control for using the RTC.
|
||||||
|
When '1' is selected, the registers related to RTC are initialized and the sub-clock oscillator is operated.
|
||||||
|
0 = The RTC is not to be used.
|
||||||
|
1 = The RTC is to be used.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RTC_ENABLE (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Sub-Clock Oscillator Drive Capacity Control (RTCDV).
|
||||||
|
0 = Drive capacity for standard CL. (default)
|
||||||
|
1 = Drive capacity for low CL.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SOSC_DRV_CAP (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Clock configuration options.
|
||||||
|
The input clock frequency is specified and then the system clocks are set by specifying the multipliers used. The
|
||||||
|
multiplier settings are used to set the clock registers in resetprg.c. If a 24MHz clock is used and the
|
||||||
|
ICLK is 120MHz, PCLKA is 120MHz, PCLKB is 60MHz, PCLKC is 60MHz, PCLKD is 60MHz, FCLK is 60MHz, BCLK is 80MHz,
|
||||||
|
USB Clock is 48MHz, ESC Clock is 100MHz, Ether-Phy Clock is 25MHz then the settings would be:
|
||||||
|
|
||||||
|
BSP_CFG_XTAL_HZ = 24000000
|
||||||
|
BSP_CFG_PLL_DIV = 1 (no division)
|
||||||
|
BSP_CFG_PLL_MUL = 10.0 (24MHz x 10.0 = 240MHz)
|
||||||
|
BSP_CFG_PPLL_DIV = 3 (divide by 3)
|
||||||
|
BSP_CFG_PPLL_MUL = 25.0 (8MHz x 25.0 = 200MHz)
|
||||||
|
BSP_CFG_PPLCK_DIV = 2 (divide by 2)
|
||||||
|
BSP_CFG_ICK_DIV = 1 : System Clock (ICLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_ICK_DIV) = 240MHz
|
||||||
|
BSP_CFG_PCKA_DIV = 2 : Peripheral Clock A (PCLKA) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKA_DIV) = 120MHz
|
||||||
|
BSP_CFG_PCKB_DIV = 4 : Peripheral Clock B (PCLKB) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKB_DIV) = 60MHz
|
||||||
|
BSP_CFG_PCKC_DIV = 4 : Peripheral Clock C (PCLKC) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKC_DIV) = 60MHz
|
||||||
|
BSP_CFG_PCKD_DIV = 4 : Peripheral Clock D (PCLKD) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_PCKD_DIV) = 60MHz
|
||||||
|
BSP_CFG_FCK_DIV = 4 : Flash IF Clock (FCLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_FCK_DIV) = 60MHz
|
||||||
|
BSP_CFG_BCK_DIV = 3 : External Bus Clock (BCK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_BCK_DIV) = 80MHz
|
||||||
|
BSP_CFG_UCK_DIV = 5 : USB Clock (UCLK) =
|
||||||
|
(((BSP_CFG_XTAL_HZ/BSP_CFG_PLL_DIV) * BSP_CFG_PLL_MUL) / BSP_CFG_UCK_DIV) = 48MHz
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Input clock frequency in Hz (XTAL or EXTAL). */
|
||||||
|
#define BSP_CFG_XTAL_HZ (16000000) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* The HOCO can operate at several different frequencies. Choose which one using the macro below.
|
||||||
|
Available frequency settings:
|
||||||
|
0 = 16MHz (default)
|
||||||
|
1 = 18MHz
|
||||||
|
2 = 20MHz
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_HOCO_FREQUENCY (2) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PLL clock source (PLLSRCSEL). Choose which clock source to input to the PLL circuit.
|
||||||
|
Available clock sources:
|
||||||
|
0 = Main clock (default)
|
||||||
|
1 = HOCO
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_SRC (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PLL Input Frequency Division Ratio Select (PLIDIV).
|
||||||
|
Available divisors = /1 (no division), /2, /3
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_DIV (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PLL Frequency Multiplication Factor Select (STC).
|
||||||
|
Available multipliers = x10.0 to x30.0 in 0.5 increments (e.g. 10.0, 10.5, 11.0, 11.5, ..., 29.0, 29.5, 30.0)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PLL_MUL (12.0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* System Clock Divider (ICK).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ICK_DIV (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Peripheral Module Clock A Divider (PCKA).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKA_DIV (2) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Peripheral Module Clock B Divider (PCKB).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKB_DIV (4) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Peripheral Module Clock C Divider (PCKC).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKC_DIV (4) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Peripheral Module Clock D Divider (PCKD).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PCKD_DIV (4) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* External Bus Clock Divider (BCLK).
|
||||||
|
Available divisors = /1 (no division), /2, /3, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_BCK_DIV (3) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Flash IF Clock Divider (FCK).
|
||||||
|
Available divisors = /1 (no division), /2, /4, /8, /16, /32, /64
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FCK_DIV (4) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* USB Clock Divider Select.
|
||||||
|
Available divisors = /2, /3, /4, /5
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_UCK_DIV (2) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PPLL Input Frequency Division Ratio Select (PPLIDIV).
|
||||||
|
Available divisors = /1 (no division), /2, /3
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLL_DIV (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PPLL Frequency Multiplication Factor Select (PPLSTC).
|
||||||
|
Available multipliers = x10.0 to x30.0 in 0.5 increments (e.g. 10.0, 10.5, 11.0, 11.5, ..., 29.0, 29.5, 30.0)
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLL_MUL (10.0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* PPLL Clock Divider Select.
|
||||||
|
Available divisors = /2, /3, /4, /5
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PPLCK_DIV (2) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Configure BCLK output pin (only effective when external bus enabled)
|
||||||
|
Values 0=no output, 1 = BCK frequency, 2= BCK/2 frequency
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_BCLK_OUTPUT (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Configure SDCLK output pin (only effective when external bus enabled)
|
||||||
|
Values 0=no output, 1 = BCK frequency
|
||||||
|
NOTE: The definition is invalid.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SDCLK_OUTPUT (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* CLKOUT Output Frequency Division Ratio Select. (CKODIV)
|
||||||
|
Values
|
||||||
|
0 = x1/1 (default)
|
||||||
|
1 = x1/2
|
||||||
|
2 = x1/4
|
||||||
|
3 = x1/8
|
||||||
|
4 = x1/16
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_DIV (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Configure clock output(CLKOUT) pin (CKOSTP).
|
||||||
|
Values
|
||||||
|
0 = CLKOUT pin output stopped. (Fixed to the low level) (default)
|
||||||
|
1 = CLKOUT pin output enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CLKOUT_OUTPUT (0) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Main Clock Oscillator Wait Time (MOSCWTCR).
|
||||||
|
The value of MOSCWTCR register required for correspondence with the waiting time required to secure stable
|
||||||
|
oscillation by the main clock oscillator is obtained by using the maximum frequency for fLOCO in the formula below.
|
||||||
|
|
||||||
|
BSP_CFG_MOSC_WAIT_TIME > (tMAINOSC * (fLOCO_max) + 16)/32
|
||||||
|
(tMAINOSC: main clock oscillation stabilization time; fLOCO_max: maximum frequency for fLOCO)
|
||||||
|
|
||||||
|
If tMAINOSC is 9.98 ms and fLOCO_max is 264 kHz (the period is 1/3.78 us), the formula gives
|
||||||
|
BSP_CFG_MOSC_WAIT_TIME > (9.98 ms * (264 kHZ) + 16)/32 = 82.83, so set the BSP_CFG_MOSC_WAIT_TIME to 83(53h).
|
||||||
|
|
||||||
|
NOTE: The waiting time is not required when an external clock signal is input for the main clock oscillator.
|
||||||
|
Set the BSP_CFG_MOSC_WAIT_TIME to 00h.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_MOSC_WAIT_TIME (0x53) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Sub-Clock Oscillator Wait Time (SOSCWTCR).
|
||||||
|
The value of SOSCWTCR register required for correspondence with the expected time to secure settling of oscillation
|
||||||
|
by the sub-clock oscillator is obtained by using the maximum frequency for fLOCO in the formula below.
|
||||||
|
|
||||||
|
BSP_CFG_SOSC_WAIT_TIME > (tSUBOSC * (fLOCO_max) + 16)/16384
|
||||||
|
(tSUBOSC: sub-clock oscillation stabilization time; fLOCO_max: maximum frequency for fLOCO)
|
||||||
|
|
||||||
|
If tSUBOSC is 2 s and fLOCO is 264 kHz (the period is 1/3.78 us), the formula gives
|
||||||
|
BSP_CFG_SOSC_WAIT_TIME > (2 s * (264 kHz) +16)/16384 = 32.22, so set the BSP_CFG_SOSC_WAIT_TIME bits to 33(21h).
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SOSC_WAIT_TIME (0x21) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* ROM Cache Enable Register (ROMCE).
|
||||||
|
0 = ROM cache operation disabled.
|
||||||
|
1 = ROM cache operation enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ROM_CACHE_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure non-cacheable area 0 of the ROM cache function.
|
||||||
|
0 = Non-cacheable area 0 settings disabled.
|
||||||
|
1 = Non-cacheable area 0 settings enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_ENABLE (0)
|
||||||
|
|
||||||
|
/* Specifies the start address of non-cacheable area 0.
|
||||||
|
Selects the start address of non-cacheable area 0.
|
||||||
|
The upper 10 bits are fixed at 1. The lower 4 bits are fixed at 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_ADDR (0xFFE00000)
|
||||||
|
|
||||||
|
/* Configures the size of non-cacheable area 0.
|
||||||
|
Selects the size of non-cacheable area 0 in byte units from among the following:
|
||||||
|
0x0 = 16 bytes, 0xA = 16K bytes,
|
||||||
|
0x1 = 32 bytes, 0xB = 32K bytes,
|
||||||
|
0x2 = 64 bytes, 0xC = 64K bytes,
|
||||||
|
0x3 = 128 bytes, 0xD = 128K bytes,
|
||||||
|
0x4 = 256 bytes, 0xE = 256K bytes,
|
||||||
|
0x5 = 512 bytes, 0xF = 512K bytes,
|
||||||
|
0x6 = 1K bytes, 0x10= 1M bytes,
|
||||||
|
0x7 = 2K bytes, 0x11= 2M bytes,
|
||||||
|
0x8 = 4K bytes,
|
||||||
|
0x9 = 8K bytes
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_SIZE (0x0)
|
||||||
|
|
||||||
|
/* Specifies the IF non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of IF cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of IF cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_IF_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the OA non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of OA cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of OA cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_OA_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the DM non-cacheable area enable bit setting of non-cacheable area 0.
|
||||||
|
0 = Non-cacheable area 0 setting of DM cache disabled.
|
||||||
|
1 = Non-cacheable area 0 setting of DM cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA0_DM_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure non-cacheable area 1 of the ROM cache function.
|
||||||
|
0 = Non-cacheable area 1 settings disabled.
|
||||||
|
1 = Non-cacheable area 1 settings enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_ENABLE (0)
|
||||||
|
|
||||||
|
/* Specifies the start address of non-cacheable area 1.
|
||||||
|
Selects the start address of non-cacheable area 1.
|
||||||
|
The upper 10 bits are fixed at 1. The lower 4 bits are fixed at 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_ADDR (0xFFE00000)
|
||||||
|
|
||||||
|
/* Configures the size of non-cacheable area 1.
|
||||||
|
Selects the size of non-cacheable area 0 in byte units from among the following:
|
||||||
|
0x0 = 16 bytes, 0xA = 16K bytes,
|
||||||
|
0x1 = 32 bytes, 0xB = 32K bytes,
|
||||||
|
0x2 = 64 bytes, 0xC = 64K bytes,
|
||||||
|
0x3 = 128 bytes, 0xD = 128K bytes,
|
||||||
|
0x4 = 256 bytes, 0xE = 256K bytes,
|
||||||
|
0x5 = 512 bytes, 0xF = 512K bytes,
|
||||||
|
0x6 = 1K bytes, 0x10= 1M bytes,
|
||||||
|
0x7 = 2K bytes, 0x11= 2M bytes,
|
||||||
|
0x8 = 4K bytes,
|
||||||
|
0x9 = 8K bytes
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_SIZE (0x0)
|
||||||
|
|
||||||
|
/* Specifies the IF non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of IF cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of IF cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_IF_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the OA non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of OA cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of OA cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_OA_ENABLE (1)
|
||||||
|
|
||||||
|
/* Specifies the DM non-cacheable area enable bit setting of non-cacheable area 1.
|
||||||
|
0 = Non-cacheable area 1 setting of DM cache disabled.
|
||||||
|
1 = Non-cacheable area 1 setting of DM cache enabled.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_NONCACHEABLE_AREA1_DM_ENABLE (1)
|
||||||
|
|
||||||
|
/* Configure WDT and IWDT settings.
|
||||||
|
OFS0 - Option Function Select Register 0
|
||||||
|
b31:b29 Reserved When reading, these bits return the value written by the user. The write value should be 1.
|
||||||
|
b28 WDTRSTIRQS - WDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)
|
||||||
|
b27:b26 WDTRPSS - WDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)
|
||||||
|
b25:b24 WDTRPES - WDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)
|
||||||
|
b23:b20 WDTCKS - WDT Clock Frequency Division Ratio - (1=PCLKB/4, 4=PCLKB/64, 0xF=PCLKB/128, 6=PCLKB/256,
|
||||||
|
7=PCLKB/2048, 8=PCLKB/8192)
|
||||||
|
b19:b18 WDTTOPS - WDT Timeout Period Select (0=1024 cycles, 1=4096, 2=8192, 3=16384)
|
||||||
|
b17 WDTSTRT - WDT Start Mode Select - (0=auto-start after reset, 1=halt after reset)
|
||||||
|
b16:b15 Reserved (set to 1)
|
||||||
|
b14 IWDTSLCSTP - IWDT Sleep Mode Count Stop Control - (0=can't stop count, 1=stop w/some low power modes)
|
||||||
|
b13 Reserved (set to 1)
|
||||||
|
b12 IWDTRSTIRQS - IWDT Reset Interrupt Request - What to do on underflow (0=take interrupt, 1=reset MCU)
|
||||||
|
b11:b10 IWDTRPSS - IWDT Window Start Position Select - (0=25%, 1=50%, 2=75%, 3=100%,don't use)
|
||||||
|
b9:b8 IWDTRPES - IWDT Window End Position Select - (0=75%, 1=50%, 2=25%, 3=0%,don't use)
|
||||||
|
b7:b4 IWDTCKS - IWDT Clock Frequency Division Ratio - (0=none, 2=/16, 3 = /32, 4=/64, 0xF=/128, 5=/256)
|
||||||
|
b3:b2 IWDTTOPS - IWDT Timeout Period Select - (0=1024 cycles, 1=4096, 2=8192, 3=16384)
|
||||||
|
b1 IWDTSTRT - IWDT Start Mode Select - (0=auto-start after reset, 1=halt after reset)
|
||||||
|
b0 Reserved (set to 1)
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_OFS0_REG_VALUE (0xFFFFFFFF) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Configure whether voltage detection 0 circuit and HOCO are enabled after reset.
|
||||||
|
OFS1 - Option Function Select Register 1
|
||||||
|
b31:b9 Reserved (set to 1)
|
||||||
|
b8 HOCOEN - Enable/disable HOCO oscillation after a reset (0=enable, 1=disable)
|
||||||
|
b7:b3 Reserved When reading, these bits return the value written by the user. The write value should be 1.
|
||||||
|
b2 LVDAS - Voltage Detection 0 circuit start (1=monitoring disabled)
|
||||||
|
b1:b0 VDSEL - Voltage Detection 0 level select (1=2.94v, 2=2.87v, 3=2.80v)
|
||||||
|
NOTE: If HOCO oscillation is enabled by OFS1.HOCOEN, HOCO frequency is 16MHz.
|
||||||
|
BSP_CFG_HOCO_FREQUENCY should be default value.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_OFS1_REG_VALUE (0xFFFFFFFF) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Trusted memory is facility to prevent the reading of blocks 8 and 9 and blocks 78 and 79 (in dual mode) in
|
||||||
|
the code flash memory by third party software. This feature is disabled by default.
|
||||||
|
TMEF - TM Enable Flag Register
|
||||||
|
b31 Reserved (set to 1)
|
||||||
|
b30:b28 TMEFDB - Dual-Bank TM Enable - 000: The TM function in the address range from FFDE 0000h to
|
||||||
|
FFDE FFFFh is enabled in dual mode.
|
||||||
|
- 111: The TM function in the address range from FFDE 0000h to
|
||||||
|
FFDE FFFFh is disabled in dual mode.
|
||||||
|
b27 Reserved (set to 1)
|
||||||
|
b26:b24 TMEFF - TM Enable - 000: TM function is enabled.
|
||||||
|
- 111: TM function is disabled.
|
||||||
|
b23:b0 Reserved (set to 1)
|
||||||
|
NOTE: If the dual bank function has not been incorporated in a device,
|
||||||
|
TMEFDB bits [b30:b26] are reserved area.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_TRUSTED_MODE_FUNCTION (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Configure FAW register is used to set the write protection flag and boot area select flag
|
||||||
|
for setting the flash access window startaddress and flash access window end address.
|
||||||
|
FAW - Flash Access Window Setting Register
|
||||||
|
b31 BTFLG - Boot Area Select Flag - 0: FFFF C000h to FFFF DFFFh are used as the boot area
|
||||||
|
- 1: FFFF E000h to FFFF FFFFh are used as the boot area
|
||||||
|
b30:b28 Reserved - When reading, these bits return the value written by the user.The write value should be 1.
|
||||||
|
b27:b16 FAWE - Flash Access Window End Address - Flash access window end address
|
||||||
|
b15 FSPR - Access Window Protection Flag - 0: With protection (P/E disabled)
|
||||||
|
- 1: Without protection (P/E enabled)
|
||||||
|
b14:b12 Reserved - When reading, these bits return the value written by the user.The write value should be 1.
|
||||||
|
b11:b0 FAWS - Flash Access Window Start Address - Flash access window start address
|
||||||
|
NOTE: Once 0 is written to this bit, the bit can never be restored to 1.
|
||||||
|
Therefore, the access window and the BTFLG bit never be set again or the TM function
|
||||||
|
never be disabled once it has been enabled.
|
||||||
|
Exercise extra caution when handling the FSPR bit.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FAW_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* The ROM code protection register is a function to prohibit reading from or programming to the flash memory
|
||||||
|
when the flash programmer is used during off-board programming.
|
||||||
|
ROMCODE - ROM Code Protection Register
|
||||||
|
b31:b0 ROM Code - 0000 0000h: ROM code protection enabled (ROM code protection 1).
|
||||||
|
0000 0001h: ROM code protection enabled (ROM code protection 2).
|
||||||
|
Other than above: ROM code protection disabled.
|
||||||
|
Note: The ROMCODE register should be set in 32-bit units.
|
||||||
|
Default value is 0xFFFFFFFF.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_ROMCODE_REG_VALUE (0xFFFFFFFF)
|
||||||
|
|
||||||
|
/* Select the bank mode of dual-bank function of the code flash memory.
|
||||||
|
0 = Dual mode.
|
||||||
|
1 = Linear mode. (default)
|
||||||
|
NOTE: If the dual bank function has been incorporated in a device, select the bank mode in this macro.
|
||||||
|
Default setting of the bank mode is linear mode.
|
||||||
|
If the dual bank function has not been incorporated in a device, this macro should be 1.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CODE_FLASH_BANK_MODE (1)
|
||||||
|
|
||||||
|
/* Select the startup bank of the program when dual bank function is in dual mode.
|
||||||
|
0 = The address range of bank 1 from FFC00000h to FFDFFFFFh and bank 0 from FFE00000h to FFFFFFFFh. (default)
|
||||||
|
1 = The address range of bank 1 from FFE00000h to FFFFFFFFh and bank 0 from FFC00000h to FFDFFFFFh.
|
||||||
|
NOTE: If the dual bank function has been incorporated in a device, select the start bank in this macro.
|
||||||
|
Default setting of the start bank is bank0.
|
||||||
|
If the dual bank function has not been incorporated in a device, this macro should be 0.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CODE_FLASH_START_BANK (0)
|
||||||
|
|
||||||
|
/* This macro lets other modules no if a RTOS is being used.
|
||||||
|
0 = RTOS is not used.
|
||||||
|
1 = FreeRTOS is used.
|
||||||
|
2 = embOS is used.(This is not available.)
|
||||||
|
3 = MicroC_OS is used.(This is not available.)
|
||||||
|
4 = Renesas ITRON OS (RI600V4 or RI600PX) is used.
|
||||||
|
*/
|
||||||
|
#if !defined(BSP_CFG_RTOS_USED) || (BSP_CFG_RTOS_USED == 0)
|
||||||
|
#if defined(BSP_CFG_RTOS_USED)
|
||||||
|
#undef BSP_CFG_RTOS_USED
|
||||||
|
#endif
|
||||||
|
#define BSP_CFG_RTOS_USED (1) /* Generated value. Do not edit this manually */
|
||||||
|
#endif
|
||||||
|
/* This macro is used to select which Renesas ITRON OS.
|
||||||
|
0 = RI600V4 is used.
|
||||||
|
1 = RI600PX is used.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RENESAS_RTOS_USED (0)
|
||||||
|
|
||||||
|
/* This macro is used to select which CMT channel used for system timer of RTOS.
|
||||||
|
* The setting of this macro is only valid if the macro BSP_CFG_RTOS_USED is set to a value other than 0. */
|
||||||
|
#if BSP_CFG_RTOS_USED != 0
|
||||||
|
/* Setting value.
|
||||||
|
* 0 = CMT channel 0 used for system timer of RTOS (recommended to be used for RTOS).
|
||||||
|
* 1 = CMT channel 1 used for system timer of RTOS.
|
||||||
|
* 2 = CMT channel 2 used for system timer of RTOS.
|
||||||
|
* 3 = CMT channel 3 used for system timer of RTOS.
|
||||||
|
* Others = Invalid.
|
||||||
|
* NOTE: This is invalid when using Renesas RTOS with CCRX.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_RTOS_SYSTEM_TIMER (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* By default modules will use global locks found in mcu_locks.c. If the user is using a RTOS and would rather use its
|
||||||
|
locking mechanisms then they can change this macro.
|
||||||
|
NOTE: If '1' is chosen for this macro then the user must also change the next macro 'BSP_CFG_USER_LOCKING_TYPE'.
|
||||||
|
0 = Use default locking (non-RTOS)
|
||||||
|
1 = Use user defined locking mechanism.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_ENABLED (0)
|
||||||
|
|
||||||
|
/* If the user decides to use their own locking mechanism with FIT modules then they will need to redefine the typedef
|
||||||
|
that is used for the locks. If the user is using a RTOS then they would likely redefine the typedef to be
|
||||||
|
a semaphore/mutex type of their RTOS. Use the macro below to set the type that will be used for the locks.
|
||||||
|
NOTE: If BSP_CFG_USER_LOCKING_ENABLED == 0 then this typedef is ignored.
|
||||||
|
NOTE: Do not surround the type with parentheses '(' ')'.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_TYPE bsp_lock_t
|
||||||
|
|
||||||
|
/* If the user decides to use their own locking mechanism with FIT modules then they will need to define the functions
|
||||||
|
that will handle the locking and unlocking. These functions should be defined below.
|
||||||
|
If BSP_CFG_USER_LOCKING_ENABLED is != 0:
|
||||||
|
R_BSP_HardwareLock(mcu_lock_t hw_index) will call BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION(mcu_lock_t hw_index)
|
||||||
|
R_BSP_HardwareUnlock(mcu_lock_t hw_index) will call BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION(mcu_lock_t hw_index)
|
||||||
|
NOTE:With these functions the index into the array holding the global hardware locks is passed as the parameter.
|
||||||
|
R_BSP_SoftwareLock(BSP_CFG_USER_LOCKING_TYPE * plock) will call
|
||||||
|
BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * plock)
|
||||||
|
R_BSP_SoftwareUnlock(BSP_CFG_USER_LOCKING_TYPE * plock) will call
|
||||||
|
BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION(BSP_CFG_USER_LOCKING_TYPE * plock)
|
||||||
|
NOTE:With these functions the actual address of the lock to use is passed as the parameter.
|
||||||
|
NOTE: These functions must return a boolean. If lock was obtained or released successfully then return true. Else,
|
||||||
|
return false.
|
||||||
|
NOTE: If BSP_CFG_USER_LOCKING_ENABLED == 0 then this typedef is ignored.
|
||||||
|
NOTE: Do not surround the type with parentheses '(' ')'.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION my_hw_locking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION my_hw_unlocking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION my_sw_locking_function
|
||||||
|
#define BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION my_sw_unlocking_function
|
||||||
|
|
||||||
|
/* If the user would like to determine if a warm start reset has occurred, then they may enable one or more of the
|
||||||
|
following callback definitions AND provide a call back function name for the respective callback
|
||||||
|
function (to be defined by the user). Setting BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED = 1 will result
|
||||||
|
in a callback to the user defined my_sw_warmstart_prec_function just prior to the initialization of the C
|
||||||
|
runtime environment by resetprg.
|
||||||
|
Setting BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED = 1 will result in a callback to the user defined
|
||||||
|
my_sw_warmstart_postc_function just after the initialization of the C runtime environment by resetprg.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_WARM_START_PRE_C_FUNCTION my_sw_warmstart_prec_function
|
||||||
|
|
||||||
|
#define BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED (0)
|
||||||
|
#define BSP_CFG_USER_WARM_START_POST_C_FUNCTION my_sw_warmstart_postc_function
|
||||||
|
|
||||||
|
/* By default FIT modules will check input parameters to be valid. This is helpful during development but some users
|
||||||
|
will want to disable this for production code. The reason for this would be to save execution time and code space.
|
||||||
|
This macro is a global setting for enabling or disabling parameter checking. Each FIT module will also have its
|
||||||
|
own local macro for this same purpose. By default the local macros will take the global value from here though
|
||||||
|
they can be overridden. Therefore, the local setting has priority over this global setting. Disabling parameter
|
||||||
|
checking should only used when inputs are known to be good and the increase in speed or decrease in code space is
|
||||||
|
needed.
|
||||||
|
0 = Global setting for parameter checking is disabled.
|
||||||
|
1 = Global setting for parameter checking is enabled (Default).
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_PARAM_CHECKING_ENABLE (1)
|
||||||
|
|
||||||
|
/* The extended bus master has five transfer sources: EDMAC, GLCDC-GRA1 (GLCDC graphics 1 data read), GLCDCGRA2 (GLCDC
|
||||||
|
graphics 2 data read), DRW2D-TX (DRW2D texture data read), and DRW2D-FB (DRW2D frame buffer data read write and
|
||||||
|
display list data read).
|
||||||
|
The default priority order in bsp is below
|
||||||
|
GLCDC-GRA1 > GLCDC-GRA2 > DRW2D-TX > DRW2D-FB > EDMAC.
|
||||||
|
Priority can be changed with this macro.
|
||||||
|
|
||||||
|
Extended Bus Master Priority setting
|
||||||
|
0 = GLCDC graphics 1 data read
|
||||||
|
1 = DRW2D texture data read
|
||||||
|
2 = DRW2D frame buffer data read write and display list data read
|
||||||
|
3 = GLCDC graphics 2 data read
|
||||||
|
4 = EDMAC
|
||||||
|
|
||||||
|
Note : Settings other than above are prohibited.
|
||||||
|
Duplicate priority settings can not be made.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_EBMAPCR_1ST_PRIORITY (0) /* Extended Bus Master 1st Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_2ND_PRIORITY (3) /* Extended Bus Master 2nd Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_3RD_PRIORITY (1) /* Extended Bus Master 3rd Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_4TH_PRIORITY (2) /* Extended Bus Master 4th Priority Selection */
|
||||||
|
#define BSP_CFG_EBMAPCR_5TH_PRIORITY (4) /* Extended Bus Master 5th Priority Selection */
|
||||||
|
|
||||||
|
/* This macro is used to define the voltage that is supplied to the MCU (Vcc). This macro is defined in millivolts. This
|
||||||
|
macro does not actually change anything on the MCU. Some FIT modules need this information so it is defined here. */
|
||||||
|
#define BSP_CFG_MCU_VCC_MV (3300) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* Allow initialization of auto-generated peripheral initialization code by Smart Configurator tool.
|
||||||
|
When not using the Smart Configurator, set the value of BSP_CFG_CONFIGURATOR_SELECT to 0.
|
||||||
|
0 = Disabled (default)
|
||||||
|
1 = Smart Configurator initialization code used
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_CONFIGURATOR_SELECT (1) /* Generated value. Do not edit this manually */
|
||||||
|
|
||||||
|
/* For some BSP functions, it is necessary to ensure that, while these functions are executing, interrupts from other
|
||||||
|
FIT modules do not occur. By controlling the IPL, these functions disable interrupts that are at or below the
|
||||||
|
specified interrupt priority level.
|
||||||
|
This macro sets the IPL. Range is 0x0 - 0xF.
|
||||||
|
Please set this macro more than IPR for other FIT module interrupts.
|
||||||
|
The default value is 0xF (maximum value).
|
||||||
|
Don't change if there is no special processing with higher priority than all fit modules.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_FIT_IPL_MAX (0xF)
|
||||||
|
|
||||||
|
/* Software Interrupt (SWINT).
|
||||||
|
0 = Software interrupt is not used.
|
||||||
|
1 = Software interrupt is used.
|
||||||
|
NOTE: When this macro is set to 1, the software interrupt is initialized in bsp startup routine.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_UNIT1_ENABLE (0)
|
||||||
|
#define BSP_CFG_SWINT_UNIT2_ENABLE (1)
|
||||||
|
|
||||||
|
/* Software Interrupt Task Buffer Number.
|
||||||
|
For software interrupt, this value is number of buffering user tasks.
|
||||||
|
So user can increase this value if user system would have many software interrupt tasks
|
||||||
|
and user system has enough buffer. This value requires 9 byte per task.
|
||||||
|
NOTE: This setting is common to all units. It can not be set individually.
|
||||||
|
The maximum value is 254.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_TASK_BUFFER_NUMBER (8)
|
||||||
|
|
||||||
|
/* Initial value of the software interrupt priority.
|
||||||
|
For software interrupt, this value is interrupt priority. Range is 0x0 - 0xF.
|
||||||
|
NOTE: This setting is common to all units. It can not be set individually.
|
||||||
|
Please be careful that this setting is the initial value of the interrupt priority register(IPR).
|
||||||
|
It is possible to dynamically change the IPR.
|
||||||
|
*/
|
||||||
|
#define BSP_CFG_SWINT_IPR_INITIAL_VALUE (0x1)
|
||||||
|
|
||||||
|
#endif /* R_BSP_CONFIG_REF_HEADER_FILE */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
FIT r_config folder
|
||||||
|
-------------------
|
||||||
|
The purpose of the r_config folder is to provide one place where the user can store all of their FIT configuration
|
||||||
|
files. Putting the files in one place makes them easy to find, backup, and put in a version control system.
|
||||||
|
|
||||||
|
FIT Modules are distributed with a reference configuration file. These files end with '_reference.h'. For example,
|
||||||
|
the reference configuration file for the r_bsp is named r_bsp_config_reference.h. Reference configuration files are
|
||||||
|
provided so that the user always has a known-good configuration to revert to. When adding a FIT Module to a project the
|
||||||
|
user should copy this reference configuration file to this folder and remove '_reference' from the filename
|
||||||
|
(r_bsp_config_reference.h is renamed to r_bsp_config.h). For the r_bsp the reference configuration file can be found in
|
||||||
|
the 'board' folder for the currently chosen development board. For other FIT Modules the reference configuration file
|
||||||
|
can be found in the 'ref' folder of the FIT Module.
|
||||||
|
|
@ -0,0 +1,222 @@
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2019 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_bsp_interrupt_config.h
|
||||||
|
* Description : This module maps Interrupt A & B interrupts. More information on how this is done is given below.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/**********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 31.05.2019 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE
|
||||||
|
#define R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* If you wish to use one of the interrupt below then set the appropriate configuration macro to the vector number you
|
||||||
|
* wish to use for that interrupt. For example, if you want to use the RTC carry interrupt (CUP) at vector 176 then you
|
||||||
|
* would do the following:
|
||||||
|
*
|
||||||
|
* #define BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP 176
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Interrupt B Sources.
|
||||||
|
* -Valid vector numbers are 128-207.
|
||||||
|
* -There are more vector slots for B sources than actual B sources. By default none of the CAN2 interrupts are
|
||||||
|
* mapped.
|
||||||
|
* -If using the 'TPU1, TGI1A' interrupt it must be vector 144 or 145. It is set to 144 by default.
|
||||||
|
* -If a peripheral interrupt is going to be used to wake up the MCU from All-Module Clock Stop Mode then it must be
|
||||||
|
* in a vector between 146 to 157. Peripheral interrupts that can do this are TMR interrupts and the 'USB0, USBI0'
|
||||||
|
* interrupt. By default the TMR interrupts are chosen since there are 12 of them and there are 12 slots.
|
||||||
|
*/
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMT2_CMI2 128
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMT3_CMI3 129
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIA0 146
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_CMIB0 147
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR0_OVI0 148
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIA1 149
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_CMIB1 150
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR1_OVI1 151
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIA2 152
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_CMIB2 153
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR2_OVI2 154
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIA3 155
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_CMIB3 156
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TMR3_OVI3 157
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0A 130
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0B 131
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0C 132
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TGI0D 133
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU0_TCI0V 134
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1A 144
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TGI1B 135
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1V 136
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU1_TCI1U 137
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2A 138
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TGI2B 139
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2V 140
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU2_TCI2U 141
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3A 142
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3B 143
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3C 145
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TGI3D 158
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU3_TCI3V 159
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4A 160
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TGI4B 161
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4V 162
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU4_TCI4U 163
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5A 164
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TGI5B 165
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5V 166
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TPU5_TCI5U 167
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC0I0 168
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_IC1I0 169
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC0I0 170
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW0_OC1I0 171
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC0I1 172
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_IC1I1 173
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC0I1 174
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CMTW1_OC1I1 175
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_RTC_CUP 176
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXF0 177
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXF0 178
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_RXM0 179
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN0_TXM0 180
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXF1 181
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXF1 182
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_RXM1 183
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN1_TXM1 184
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_RXM2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_CAN2_TXM2
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_USB0_USBI0 185
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12ADI0 186
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GBADI0 187
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC0_S12GCADI0 188
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12ADI1 189
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GBADI1 190
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_S12ADC1_S12GCADI1 191
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR18I 192
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_ELC_ELSR19I 193
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_PROC_BUSY 194
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_ROMOK 195
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_LONG_PLG 196
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_TEST_BUSY 197
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY0 198
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY1 199
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_WRRDY4 200
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY0 201
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_RDRDY1 202
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_WRRDY 203
|
||||||
|
#define BSP_MAPPED_INT_CFG_B_VECT_TSIP_INTEGRATE_RDRDY 204
|
||||||
|
|
||||||
|
/* Interrupt A Sources.
|
||||||
|
* -Valid vector numbers are 208-255.
|
||||||
|
* -There are more A sources than A vector slots. By default none of the GPTW interrupts and the ESC interrupts are
|
||||||
|
* mapped.
|
||||||
|
* -If using the 'MTU1, TGI1A' interrupt it must be vector 208 or 209. It is set to 208 by default.
|
||||||
|
*/
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIA0 209
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIB0 210
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIC0 211
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGID0 212
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TCIV0 213
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIE0 214
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU0_TGIF0 215
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIA1 208
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TGIB1 216
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIV1 217
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU1_TCIU1 218
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIA2 219
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TGIB2 220
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIV2 221
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU2_TCIU2 222
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIA3 223
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIB3 224
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGIC3 225
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TGID3 226
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU3_TCIV3 227
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIA4 228
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIB4 229
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGIC4 230
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TGID4 231
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU4_TCIV4 232
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIU5 233
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIV5 234
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU5_TGIW5 235
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIA6 236
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIB6 237
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGIC6 238
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TGID6 239
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU6_TCIV6 240
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIA7 241
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIB7 242
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGIC7 243
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TGID7 244
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU7_TCIV7 245
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIA8 246
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIB8 247
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGIC8 248
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TGID8 249
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_MTU8_TCIV8 250
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIA0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIB0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIC0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCID0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GDTE0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIE0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIF0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIV0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW0_GTCIU0
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIA1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIB1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIC1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCID1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GDTE1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIE1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIF1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIV1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW1_GTCIU1
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIA2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIB2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIC2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCID2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GDTE2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIE2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIF2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIV2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW2_GTCIU2
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIA3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIB3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIC3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCID3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GDTE3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIE3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIF3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIV3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_GPTW3_GTCIU3
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_EPTPC_IPLS 251
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_PMGI0_PMGI0I 252
|
||||||
|
#define BSP_MAPPED_INT_CFG_A_VECT_PMGI1_PMGI1I 253
|
||||||
|
|
||||||
|
#endif /* R_BSP_INTERRUPT_CONFIG_REF_HEADER_FILE */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
/* Generated configuration header file - do not edit */
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_byteq_config.h
|
||||||
|
* Description : Configures the byte queue memory allocation
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 24.07.2013 1.00 Initial Release
|
||||||
|
* : 11.21.2014 1.20 Removed dependency to BSP
|
||||||
|
* : 30.09.2015 1.50 Added dependency to BSP
|
||||||
|
* : 01.06.2018 1.70 Changed the default value of the following macro definition.
|
||||||
|
* - BYTEQ_CFG_MAX_CTRL_BLKS - Changed the default value from 4 to 32.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef BYTEQ_CONFIG_H
|
||||||
|
#define BYTEQ_CONFIG_H
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* SPECIFY WHETHER TO INCLUDE CODE FOR API PARAMETER CHECKING
|
||||||
|
Available settings:
|
||||||
|
BSP_CFG_PARAM_CHECKING_ENABLE:
|
||||||
|
Utilizes the system default setting
|
||||||
|
1:
|
||||||
|
Includes parameter checking
|
||||||
|
0:
|
||||||
|
Compiles out parameter checking
|
||||||
|
*/
|
||||||
|
#define BYTEQ_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
|
||||||
|
|
||||||
|
/* SPECIFY IF SHOULD USE MALLOC() TO ALLOCATE MEMORY FOR QUEUE CONTROL BLOCKS */
|
||||||
|
#define BYTEQ_CFG_USE_HEAP_FOR_CTRL_BLKS (0)
|
||||||
|
|
||||||
|
/* SPECIFY NUMBER OF STATIC QUEUE CONTROL BLOCKS TO SUPPORT */
|
||||||
|
/* valid only when BYTEQ_USE_HEAP_FOR_CTRL_BLKS is set to 0 */
|
||||||
|
#define BYTEQ_CFG_MAX_CTRL_BLKS (32)
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* BYTEQ_CONFIG_H */
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
/* Generated configuration header file - do not edit */
|
||||||
|
/*******************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2014 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
*******************************************************************************/
|
||||||
|
/*******************************************************************************
|
||||||
|
* File Name : r_dtc_rx_config.h
|
||||||
|
* Description : Configures the DTC drivers
|
||||||
|
********************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 15.01.2014 1.00 Initial revision
|
||||||
|
* : 17.07.2014 2.00 Second revision
|
||||||
|
* : 12.11.2014 2.01 Added RX113.
|
||||||
|
* : 30.01.2015 2.02 Added RX71M.
|
||||||
|
* : 13.04.2015 2.03 Added RX231 and RX230.
|
||||||
|
* : 24.12.2015 2.04 Added RX130, RX23T and RX24T.
|
||||||
|
* : Modified #define name from "DTC_CFG_SHORT_ADDRRESS_MODE"
|
||||||
|
* : to "DTC_CFG_SHORT_ADDRESS_MODE".
|
||||||
|
* : 30.09.2016 2.05 Added RX65N.
|
||||||
|
* : Added #define DTC_CFG_USE_SEQUENCE_TRANSFER.
|
||||||
|
* : 31.03.2017 2.07 Added RX24U and RX24T-512KB.
|
||||||
|
* : 31.07.2017 2.08 Supported RX65N-2MB and RX130-512KB.
|
||||||
|
* Fixed to correspond to Renesas coding rule.
|
||||||
|
* : 28.09.2018 2.10 Supported RX66T.
|
||||||
|
* : 01.02.2019 2.20 Supported RX72T, RX65N-64pin.
|
||||||
|
*******************************************************************************/
|
||||||
|
#ifndef DTC_RX_CONFIG_H
|
||||||
|
#define DTC_RX_CONFIG_H
|
||||||
|
|
||||||
|
#define DTC_DISABLE (0)
|
||||||
|
#define DTC_ENABLE (1)
|
||||||
|
/*
|
||||||
|
* SPECIFY WHETHER TO INCLUDE CODE FOR API PARAMETER CHECKING
|
||||||
|
* 0 : Compiles out parameter checking.
|
||||||
|
* 1 : Includes parameter checking.
|
||||||
|
* Default value is set to BSP_CFG_PARAM_CHECKING_ENABLE to
|
||||||
|
* re-use the system default setting.
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPECIFY WHETHER THE DTCER REGISTERS WILL BE CLEARED IN R_DTC_OPEN()
|
||||||
|
* DTC_DISABLE : Do nothing.
|
||||||
|
* DTC_ENABLE : Clear all DTCER registers in R_DTC_Open().
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_DISABLE_ALL_ACT_SOURCE (DTC_ENABLE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPECIFY WHICH ADDRESS MODE IS SUPPORTED BY DTC
|
||||||
|
* DTC_DISABLE : Select the Full address mode.
|
||||||
|
* DTC_ENABLE : Select the Short address mode.
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_SHORT_ADDRESS_MODE (DTC_DISABLE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPECIFY WHETHER THE TRANSFER DATA READ SKIP IS ENABLED
|
||||||
|
* DTC_DISABLE : Disable Transfer Data Read Skip.
|
||||||
|
* DTC_ENABLE : Enable Transfer Data Read Skip.
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_TRANSFER_DATA_READ_SKIP_EN (DTC_ENABLE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPECIFY WHETHER THE DMAC FIT MODULE IS USED WITH DTC FIT MODULE
|
||||||
|
* DTC_DISABLE : DMAC FIT module is not used with DTC FIT module.
|
||||||
|
* DTC_ENABLE : DMAC FIT module is used with DTC FIT module.
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_USE_DMAC_FIT_MODULE (DTC_ENABLE)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPECIFY WHETHER THE SEQUENCE TRANSFER IS USED
|
||||||
|
* Also, set DTC_DISABLE to DTC_CFG_SHORT_ADDRESS_MODE.
|
||||||
|
* DTC_DISABLE : Not use sequence transfer.
|
||||||
|
* DTC_ENABLE : Use sequence transfer.
|
||||||
|
*/
|
||||||
|
#define DTC_CFG_USE_SEQUENCE_TRANSFER (DTC_ENABLE)
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* DTC_RX_CONFIG_H */
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* Generated configuration header file - do not edit */
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_gpio_rx_config.h
|
||||||
|
* Description : Configures the GPIO module.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 17.07.2013 1.00 First Release
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef GPIO_RX_CONFIG_HEADER_FILE
|
||||||
|
#define GPIO_RX_CONFIG_HEADER_FILE
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/* SPECIFY WHETHER TO INCLUDE CODE FOR API PARAMETER CHECKING
|
||||||
|
Available settings:
|
||||||
|
BSP_CFG_PARAM_CHECKING_ENABLE:
|
||||||
|
Utilizes the system default setting
|
||||||
|
1:
|
||||||
|
Includes parameter checking
|
||||||
|
0:
|
||||||
|
Compiles out parameter checking
|
||||||
|
*/
|
||||||
|
#define GPIO_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
|
||||||
|
|
||||||
|
#endif /* GPIO_RX_CONFIG_HEADER_FILE */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,199 @@
|
||||||
|
/* Generated configuration header file - do not edit */
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2013-2020 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
* File Name : r_sci_rx_config.h
|
||||||
|
* Description : Configures the SCI driver
|
||||||
|
************************************************************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* 25.09.2013 1.00 Initial Release
|
||||||
|
* 17.04.2014 1.20 Added comments for new RX110 support.
|
||||||
|
* 02.07.2014 1.30 Fixed bug that caused Group12 rx errors to only be enabled for channel 2.
|
||||||
|
* 25.11.2014 1.40 Added comments for RX113 support
|
||||||
|
* 30.09.2015 1.70 Added comments for RX23T support
|
||||||
|
* 01.10.2016 1.80 Added support for RX65N (comments and TX/RX FIFO THRESHOLD options)
|
||||||
|
* 19.12.2016 1.90 Added comments for RX24U support
|
||||||
|
* 07.03.2017 2.00 Added comments for RX130-512KB support
|
||||||
|
* 28.09.2018 2.10 Added comments for RX66T support
|
||||||
|
* 01.02.2019 2.20 Added comments for RX72T, RX65N-64pin support
|
||||||
|
* Added support received data match function for RX65N
|
||||||
|
* 28.06.2019 3.10 Added comments for RX23W support
|
||||||
|
* 15.08.2019 3.20 Added support received data match function for RX72M (SCI0- SCI11)
|
||||||
|
* Added support FIFO mode for RX72M (SCI7 - SCI11)
|
||||||
|
* 25.11.2019 3.30 Added support RX13T.
|
||||||
|
* Removed support for Generation 1 devices.
|
||||||
|
* 30.12.2019 3.40 Added support RX66N, RX72N.
|
||||||
|
* 31.03.2020 3.50 Added support RX23E-A.
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
#ifndef SCI_CONFIG_H
|
||||||
|
#define SCI_CONFIG_H
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
/***********************************************************************************************************************
|
||||||
|
Configuration Options
|
||||||
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
|
/* SPECIFY WHETHER TO INCLUDE CODE FOR API PARAMETER CHECKING */
|
||||||
|
/* Setting to BSP_CFG_PARAM_CHECKING_ENABLE utilizes the system default setting */
|
||||||
|
/* Setting to 1 includes parameter checking; 0 compiles out parameter checking */
|
||||||
|
#define SCI_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
|
||||||
|
|
||||||
|
/* SPECIFY WHETHER TO INCLUDE CODE FOR DIFFERENT SCI MODES */
|
||||||
|
/* Setting an equate to 1 includes code specific to that mode. */
|
||||||
|
#define SCI_CFG_ASYNC_INCLUDED (1)
|
||||||
|
#define SCI_CFG_SYNC_INCLUDED (0)
|
||||||
|
#define SCI_CFG_SSPI_INCLUDED (0)
|
||||||
|
|
||||||
|
/* SPECIFY BYTE VALUE TO TRANSMIT WHILE CLOCKING IN DATA IN SSPI MODES */
|
||||||
|
#define SCI_CFG_DUMMY_TX_BYTE (0xFF)
|
||||||
|
|
||||||
|
/* SPECIFY CHANNELS TO INCLUDE SOFTWARE SUPPORT FOR 1=included, 0=not */
|
||||||
|
/*
|
||||||
|
* NOTE: If using ASYNC mode, adjust BYTEQ_CFG_MAX_CTRL_BLKS in r_byteq_config.h
|
||||||
|
* to provide 2 queues per channel (static mode only).
|
||||||
|
* * = port connector RSKRX11x
|
||||||
|
* u = channel used by the USB-UART port (G1CUSB0)
|
||||||
|
* a = this channel is used only for RX130-512KB
|
||||||
|
* n = this channel is not available for RX65N-64pin.
|
||||||
|
* s = this channel is not available in simple SPI mode.
|
||||||
|
* RX MCU supported channels
|
||||||
|
*
|
||||||
|
* CH# 110 111 113 130 230 231 23T 24T 24U 64M 71M 65N 66T 72T 23W 72M 13T 72N 66N RX23E-A
|
||||||
|
* --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -------
|
||||||
|
* CH0 X Xa X X X X Xn X X X
|
||||||
|
* CH1 X X* X* Xu X X Xu Xu Xu X X Xs X X X X X X X Xu
|
||||||
|
* CH2 X X X Xu X X X
|
||||||
|
* CH3 X X Xs X X X
|
||||||
|
* CH4 X X Xn X X X
|
||||||
|
* CH5 X X X X X Xu X X X X X X X X X X X X X X
|
||||||
|
* CH6 X X X X X X X X Xn X X Xu X X X
|
||||||
|
* CH7 Xu Xu Xn X X X
|
||||||
|
* CH8 X Xa X X X X X X Xu X X X
|
||||||
|
* CH9 X Xa X X X Xs X X X X X
|
||||||
|
* CH10 X X X X
|
||||||
|
* CH11 X Xs X X X X X
|
||||||
|
* CH12 X X X X X X X X Xs X X X X X X X X
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define SCI_CFG_CH0_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH1_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH2_INCLUDED (1)
|
||||||
|
#define SCI_CFG_CH3_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH4_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH5_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH6_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH7_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH8_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH9_INCLUDED (1)
|
||||||
|
#define SCI_CFG_CH10_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH11_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH12_INCLUDED (0)
|
||||||
|
|
||||||
|
/* SPECIFY ASYNC MODE TX QUEUE BUFFER SIZES (will not allocate if chan not enabled */
|
||||||
|
#define SCI_CFG_CH0_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH1_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH2_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH3_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH4_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH5_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH6_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH7_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH8_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH9_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH10_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH11_TX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH12_TX_BUFSIZ (80)
|
||||||
|
|
||||||
|
/* SPECIFY ASYNC MODE RX QUEUE BUFFER SIZES (will not allocate if chan not enabled */
|
||||||
|
#define SCI_CFG_CH0_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH1_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH2_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH3_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH4_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH5_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH6_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH7_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH8_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH9_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH10_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH11_RX_BUFSIZ (80)
|
||||||
|
#define SCI_CFG_CH12_RX_BUFSIZ (80)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ENABLE TRANSMIT END INTERRUPT (ASYNCHRONOUS)
|
||||||
|
* This interrupt only occurs when the last bit of the last byte of data
|
||||||
|
* has been sent and the transmitter has become idle. The interrupt calls
|
||||||
|
* the user's callback function specified in R_SCI_Open() and passes it an
|
||||||
|
* SCI_EVT_TEI event. A typical use of this feature is to disable an external
|
||||||
|
* transceiver to save power. It would then be up to the user's code to
|
||||||
|
* re-enable the transceiver before sending again. Not including this feature
|
||||||
|
* reduces code space used by the interrupt. Note that this equate is only
|
||||||
|
* for including the TEI code. The interrupt itself must be enabled using an
|
||||||
|
* R_SCI_Control(hdl, SCI_CMD_EN_TEI, NULL) call.
|
||||||
|
*/
|
||||||
|
#define SCI_CFG_TEI_INCLUDED (1) /* 1=included, 0=not */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SET GROUPBL0 (ERI, TEI) INTERRUPT PRIORITY; RX64M/RX71M/RX65N/RX72M/RX72N/RX66N ONLY
|
||||||
|
* SET GROUPBL1; RX65N ONLY
|
||||||
|
* SET GROUPAL0 (ERI,TEI) INTERRUPT PRIORITY; RX65N, RX72M, RX72N, RX66N ONLY
|
||||||
|
* This sets the priority level for receiver overrun, framing, and parity errors
|
||||||
|
* as well as TEI interrupts for all SCI channels.
|
||||||
|
*/
|
||||||
|
#define SCI_CFG_ERI_TEI_PRIORITY (3) /* (RX64M/RX71M/RX65N/RX72M/RX72N/RX66N ONLY) 1 lowest, 15 highest */
|
||||||
|
|
||||||
|
/* ENABLE TX/RX FIFO; (SCIi supported MCU ONLY) 1=included, 0=not */
|
||||||
|
#define SCI_CFG_CH7_FIFO_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH8_FIFO_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH9_FIFO_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH10_FIFO_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH11_FIFO_INCLUDED (0)
|
||||||
|
|
||||||
|
/* SET TX FIFO THRESHOLD; (SCIi supported MCU ONLY) 0 lowest, 15 highest */
|
||||||
|
/* TX FIFO THRESHOLD is invalid in Clock Synchronous Mode and Simple SPI Mode. */
|
||||||
|
/* Set the same value for TX FIFO THRESHOLD and RX FIFO THRESHOLD in Clock Synchronous Mode and Simple SPI Mode. */
|
||||||
|
#define SCI_CFG_CH7_TX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH8_TX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH9_TX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH10_TX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH11_TX_FIFO_THRESH (8)
|
||||||
|
|
||||||
|
/* SET RX FIFO THRESHOLD; (SCIi supported MCU ONLY) 1 lowest, 15 highest */
|
||||||
|
#define SCI_CFG_CH7_RX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH8_RX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH9_RX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH10_RX_FIFO_THRESH (8)
|
||||||
|
#define SCI_CFG_CH11_RX_FIFO_THRESH (8)
|
||||||
|
|
||||||
|
/* ENABLE Received Data match function (SCIj and SCIi supported MCU RX65N/RX66T/RX72T/RX72M/RX72N/RX66N ONLY) 1=included, 0=not */
|
||||||
|
#define SCI_CFG_CH0_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH1_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH2_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH3_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH4_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH5_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH6_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH7_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH8_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH9_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH10_DATA_MATCH_INCLUDED (0)
|
||||||
|
#define SCI_CFG_CH11_DATA_MATCH_INCLUDED (0)
|
||||||
|
|
||||||
|
#endif /* SCI_CONFIG_H */
|
||||||
|
|
@ -0,0 +1,297 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* 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 WARRANTIES REGARDING
|
||||||
|
* 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) 2014 Renesas Electronics Corporation. All rights reserved.
|
||||||
|
*******************************************************************************/
|
||||||
|
/*******************************************************************************
|
||||||
|
* File Name : r_dtc_rx_if.h
|
||||||
|
* Description : Functions for DTC driver
|
||||||
|
*******************************************************************************/
|
||||||
|
/*******************************************************************************
|
||||||
|
* History : DD.MM.YYYY Version Description
|
||||||
|
* : 17.03.2014 1.00 Initial revision
|
||||||
|
* : 17.07.2014 2.00 Second revision
|
||||||
|
* : 12.11.2014 2.01 Added RX113.
|
||||||
|
* : 30.01.2015 2.02 Added RX71M.
|
||||||
|
* : 13.04.2015 2.03 Added RX231.
|
||||||
|
* : 24.12.2015 2.04 Added RX130, RX23T and RX24T.
|
||||||
|
* : Modified #define name from "DTC_CFG_SHORT_ADDRRESS_MODE"
|
||||||
|
* : to "DTC_CFG_SHORT_ADDRESS_MODE".
|
||||||
|
* : 30.09.2016 2.05 Added RX65N.
|
||||||
|
* : Supported to the register added in DTCb.
|
||||||
|
* : Moved struct dtc_transfer_data_cfg_t to r_dtc_rx_target_if.h
|
||||||
|
* : Added include pass of target mcu interface header file.
|
||||||
|
* : Added R_DTC_CreateSeq() function.
|
||||||
|
* : 31.01.2017 2.06 Modified r_dtc_rx.c.
|
||||||
|
* : 31.03.2017 2.07 Added RX24U and RX24T-512KB.
|
||||||
|
* : 31.07.2017 2.08 Supported RX65N-2MB and RX130-512KB.
|
||||||
|
* : 28.09.2018 2.10 Supported RX66T.
|
||||||
|
* : 01.02.2019 2.20 Supported RX72T, RX65N-64pin.
|
||||||
|
* : 20.05.2019 3.00 Added support for GNUC and ICCRX.
|
||||||
|
* : 18.06.2019 3.01 Modified r_dtc_rx_private.h.
|
||||||
|
* : 28.06.2019 3.10 Added support for RX23W.
|
||||||
|
* : 15.08.2019 3.20 Added support for RX72M.
|
||||||
|
: 12.11.2019 3.21 Removed definitions for MTU5 in DTC activation interrupt source for RX23W.
|
||||||
|
* : 25.11.2019 3.30 Added support for RX13T.
|
||||||
|
* : 30.12.2019 3.40 Added support for RX66N, RX72N.
|
||||||
|
* : 31.03.2020 3.50 Added support for RX23E-A.
|
||||||
|
*******************************************************************************/
|
||||||
|
#ifndef DTC_RX_IF_H
|
||||||
|
#define DTC_RX_IF_H
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
Includes <System Includes> , "Project Includes"
|
||||||
|
*******************************************************************************/
|
||||||
|
/* Includes board and MCU related header files. */
|
||||||
|
#include "platform.h"
|
||||||
|
/* Configuration for this package. */
|
||||||
|
#include "r_dtc_rx_config.h"
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
Macro definitions
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#if R_BSP_VERSION_MAJOR < 5
|
||||||
|
#error "This module must use BSP module of Rev.5.00 or higher. Please use the BSP module of Rev.5.00 or higher."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Version Number of API. */
|
||||||
|
#define DTC_VERSION_MAJOR (3)
|
||||||
|
#define DTC_VERSION_MINOR (50)
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
Typedef definitions
|
||||||
|
*******************************************************************************/
|
||||||
|
/* Configurable options for DTC Transfer mode */
|
||||||
|
typedef enum e_dtc_transfer_mode
|
||||||
|
{
|
||||||
|
DTC_TRANSFER_MODE_NORMAL = (0), /* = (0 << 6): Normal mode */
|
||||||
|
DTC_TRANSFER_MODE_REPEAT = (1 << 6), /* Repeat mode */
|
||||||
|
DTC_TRANSFER_MODE_BLOCK = (2 << 6) /* Block mode */
|
||||||
|
} dtc_transfer_mode_t;
|
||||||
|
|
||||||
|
/* Configurable options for DTC Data transfer size */
|
||||||
|
typedef enum e_dtc_data_size
|
||||||
|
{
|
||||||
|
DTC_DATA_SIZE_BYTE = (0), /* = (0 << 4): 8-bit (byte) data */
|
||||||
|
DTC_DATA_SIZE_WORD = (1 << 4), /* 16-bit (word) data */
|
||||||
|
DTC_DATA_SIZE_LWORD = (2 << 4) /* 32-bit (long word) data */
|
||||||
|
} dtc_data_size_t;
|
||||||
|
|
||||||
|
/* Configurable options for Source address addressing mode */
|
||||||
|
typedef enum e_dtc_src_addr_mode
|
||||||
|
{
|
||||||
|
DTC_SRC_ADDR_FIXED = (0), /* = (0 << 2): Source address is fixed. */
|
||||||
|
DTC_SRC_ADDR_INCR = (2 << 2), /* Source address is incremented after each transfer. */
|
||||||
|
DTC_SRC_ADDR_DECR = (3 << 2) /* Source address is decremented after each transfer. */
|
||||||
|
} dtc_src_addr_mode_t;
|
||||||
|
|
||||||
|
/* Configurable options for Chain transfer */
|
||||||
|
typedef enum e_dtc_chain_transfer
|
||||||
|
{
|
||||||
|
DTC_CHAIN_TRANSFER_DISABLE = (0), /* Disable Chain transfer. */
|
||||||
|
DTC_CHAIN_TRANSFER_ENABLE = (1 << 7) /* Enable Chain transfer. */
|
||||||
|
} dtc_chain_transfer_t;
|
||||||
|
|
||||||
|
/* Configurable options for how chain transfer is performed. */
|
||||||
|
typedef enum e_dtc_chain_transfer_mode
|
||||||
|
{
|
||||||
|
DTC_CHAIN_TRANSFER_CONTINUOUSLY = (0), /* = (0 << 6): Chain transfer is performed continuously. */
|
||||||
|
DTC_CHAIN_TRANSFER_NORMAL = (1 << 6) /* Chain transfer is performed only when the counter is changed to 0 or CRAH. */
|
||||||
|
} dtc_chain_transfer_mode_t;
|
||||||
|
|
||||||
|
/* Configurable options for Interrupt */
|
||||||
|
typedef enum e_dtc_interrupt
|
||||||
|
{
|
||||||
|
DTC_INTERRUPT_AFTER_ALL_COMPLETE = (0), /* Interrupt is generated when specified data transfer is completed. */
|
||||||
|
DTC_INTERRUPT_PER_SINGLE_TRANSFER = (1 << 5) /* Interrupt is generated when each transfer time is completed. */
|
||||||
|
} dtc_interrupt_t;
|
||||||
|
|
||||||
|
/* Configurable options for Side to be repeat or block */
|
||||||
|
typedef enum e_dtc_repeat_block_side
|
||||||
|
{
|
||||||
|
DTC_REPEAT_BLOCK_DESTINATION = (0), /* = (0 << 4): Destination is repeat or block area. */
|
||||||
|
DTC_REPEAT_BLOCK_SOURCE = (1 << 4) /* Source is repeat or block area. */
|
||||||
|
} dtc_repeat_block_side_t;
|
||||||
|
|
||||||
|
/* Configurable options for Destination address addressing mode */
|
||||||
|
typedef enum e_dtc_dest_addr_mode
|
||||||
|
{
|
||||||
|
DTC_DES_ADDR_FIXED = (1 << 2), /* Destination address is fixed. */
|
||||||
|
DTC_DES_ADDR_INCR = (2 << 2), /* Destination address is incremented after each transfer. */
|
||||||
|
DTC_DES_ADDR_DECR = (3 << 2) /* Destination address is decremented after each transfer. */
|
||||||
|
} dtc_dest_addr_mode_t;
|
||||||
|
|
||||||
|
/* Configurable options for Write-back Disable */
|
||||||
|
typedef enum e_dtc_write_back
|
||||||
|
{
|
||||||
|
DTC_WRITEBACK_ENABLE = (0),
|
||||||
|
DTC_WRITEBACK_DISABLE = (1)
|
||||||
|
} dtc_write_back_t;
|
||||||
|
|
||||||
|
/* Configurable options for Sequence Transfer End */
|
||||||
|
typedef enum e_dtc_sequence_end
|
||||||
|
{
|
||||||
|
DTC_SEQUENCE_TRANSFER_CONTINUE = (0),
|
||||||
|
DTC_SEQUENCE_TRANSFER_END = (1)
|
||||||
|
} dtc_sequence_end_t;
|
||||||
|
|
||||||
|
/* Configurable options for Index Table Reference */
|
||||||
|
typedef enum e_dtc_refer_index_table
|
||||||
|
{
|
||||||
|
DTC_REFER_INDEX_TABLE_DISABLE = (0),
|
||||||
|
DTC_REFER_INDEX_TABLE_ENABLE = (1 << 1)
|
||||||
|
} dtc_refer_index_table_t;
|
||||||
|
|
||||||
|
/* Configurable options for Displacement Addition */
|
||||||
|
typedef enum e_dtc_disp_add
|
||||||
|
{
|
||||||
|
DTC_SRC_ADDR_DISP_ADD_DISABLE = (0),
|
||||||
|
DTC_SRC_ADDR_DISP_ADD_ENABLE = (1)
|
||||||
|
} dtc_disp_add_t;
|
||||||
|
|
||||||
|
/* Enumerate list that can be selected as DTC activation source
|
||||||
|
* enum enum_dtce: is included from iodefine.h
|
||||||
|
*/
|
||||||
|
typedef enum enum_dtce dtc_activation_source_t;
|
||||||
|
|
||||||
|
typedef enum e_dtc_command {
|
||||||
|
DTC_CMD_DTC_START, /* DTC will can accept activation requests. */
|
||||||
|
DTC_CMD_DTC_STOP, /* DTC will not accept new activation request. */
|
||||||
|
DTC_CMD_ACT_SRC_ENABLE, /* Enable an activation source specified by vector number. */
|
||||||
|
DTC_CMD_ACT_SRC_DISABLE, /* Disable an activation source specified by vector number. */
|
||||||
|
DTC_CMD_DATA_READ_SKIP_ENABLE, /* Enable Transfer Data Read Skip. */
|
||||||
|
DTC_CMD_DATA_READ_SKIP_DISABLE, /* Disable Transfer Data Read Skip. */
|
||||||
|
DTC_CMD_STATUS_GET, /* Get the current status of DTC. */
|
||||||
|
DTC_CMD_CHAIN_TRANSFER_ABORT, /* Abort the current Chain transfer process. */
|
||||||
|
DTC_CMD_SEQUENCE_TRANSFER_ENABLE, /* Sequence transfer is enabled. */
|
||||||
|
DTC_CMD_SEQUENCE_TRANSFER_DISABLE, /* Sequence transfer is disabled. */
|
||||||
|
DTC_CMD_SEQUENCE_TRANSFER_ABORT, /* Abort the sequence transfer. */
|
||||||
|
DTC_CMD_CHANGING_DATA_FORCIBLY_SET /* Changing data forcibly set by R_DTC_Create(). */
|
||||||
|
} dtc_command_t;
|
||||||
|
|
||||||
|
typedef enum e_dtc_err /* DTC API error codes */
|
||||||
|
{
|
||||||
|
DTC_SUCCESS_DMAC_BUSY = 0, /* One or some DMAC resources are locked by another process. */
|
||||||
|
DTC_SUCCESS,
|
||||||
|
DTC_ERR_OPENED, /* DTC was initialized already. */
|
||||||
|
DTC_ERR_NOT_OPEN, /* DTC module is not initialized yet. */
|
||||||
|
DTC_ERR_INVALID_ARG, /* Arguments are invalid. */
|
||||||
|
DTC_ERR_INVALID_COMMAND, /* Command parameters are invalid. Or, forced data change failed. */
|
||||||
|
DTC_ERR_NULL_PTR, /* Argument pointers are NULL. */
|
||||||
|
DTC_ERR_BUSY, /* The DTC resources are locked by another process. */
|
||||||
|
DTC_ERR_ACT /* Data transfer is in progress. */
|
||||||
|
} dtc_err_t;
|
||||||
|
|
||||||
|
/* Transfer data type */
|
||||||
|
#if (DTC_ENABLE == DTC_CFG_SHORT_ADDRESS_MODE) /* Short-address mode */
|
||||||
|
|
||||||
|
typedef struct st_transfer_data { /* 3 long-words */
|
||||||
|
uint32_t lw1;
|
||||||
|
uint32_t lw2;
|
||||||
|
uint32_t lw3;
|
||||||
|
} dtc_transfer_data_t;
|
||||||
|
|
||||||
|
#else /* Full-address mode */
|
||||||
|
typedef struct st_transfer_data { /* 4 long-words */
|
||||||
|
uint32_t lw1;
|
||||||
|
uint32_t lw2;
|
||||||
|
uint32_t lw3;
|
||||||
|
uint32_t lw4;
|
||||||
|
} dtc_transfer_data_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Transfer data configuration */
|
||||||
|
/* Moved struct dtc_transfer_data_cfg_t to r_dtc_rx_target_if.h */
|
||||||
|
/* Include target mcu interface header file. */
|
||||||
|
#if defined(BSP_MCU_RX23T)
|
||||||
|
#include ".\src\targets\rx23t\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX24T)
|
||||||
|
#include ".\src\targets\rx24t\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX24U)
|
||||||
|
#include ".\src\targets\rx24u\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX130)
|
||||||
|
#include ".\src\targets\rx130\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX113)
|
||||||
|
#include ".\src\targets\rx113\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX111)
|
||||||
|
#include ".\src\targets\rx111\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX110)
|
||||||
|
#include ".\src\targets\rx110\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX64M)
|
||||||
|
#include ".\src\targets\rx64m\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX71M)
|
||||||
|
#include ".\src\targets\rx71m\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX72T)
|
||||||
|
#include ".\src\targets\rx72t\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX231)
|
||||||
|
#include ".\src\targets\rx231\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX23E_A)
|
||||||
|
#include ".\src\targets\rx23e-a\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX230)
|
||||||
|
#include ".\src\targets\rx230\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX65N)
|
||||||
|
#include ".\src\targets\rx65n\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX66T)
|
||||||
|
#include ".\src\targets\rx66t\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX66N)
|
||||||
|
#include ".\src\targets\rx66n\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX23W)
|
||||||
|
#include ".\src\targets\rx23w\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX72M)
|
||||||
|
#include ".\src\targets\rx72m\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX13T)
|
||||||
|
#include ".\src\targets\rx13t\r_dtc_rx_target_if.h"
|
||||||
|
#elif defined(BSP_MCU_RX72N)
|
||||||
|
#include ".\src\targets\rx72n\r_dtc_rx_target_if.h"
|
||||||
|
#else
|
||||||
|
#error "This MCU is not supported by the current r_dtc_rx module."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct st_dtc_stat {
|
||||||
|
uint8_t vect_nr; /* the current vector number */
|
||||||
|
bool in_progress; /* Active flag of DTC module */
|
||||||
|
} dtc_stat_t;
|
||||||
|
|
||||||
|
typedef struct st_dtc_cmd_arg {
|
||||||
|
dtc_activation_source_t act_src; /* The activation source will be controlled */
|
||||||
|
uint32_t chain_transfer_nr; /* Number of chain transfer when command is DTC_CMD_CHAIN_TRANSFER_ABORT. */
|
||||||
|
dtc_transfer_data_t *p_transfer_data; /* Pointer to start address of Transfer data area on RAM */
|
||||||
|
dtc_transfer_data_cfg_t *p_data_cfg; /* Pointer to contains the settings for Transfer data */
|
||||||
|
} dtc_cmd_arg_t;
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
Exported global variables and functions (to be accessed by other files)
|
||||||
|
*******************************************************************************/
|
||||||
|
dtc_err_t R_DTC_Open(void);
|
||||||
|
dtc_err_t R_DTC_Create(dtc_activation_source_t act_source, dtc_transfer_data_t *p_transfer_data,
|
||||||
|
dtc_transfer_data_cfg_t *p_data_cfg, uint32_t chain_transfer_nr);
|
||||||
|
dtc_err_t R_DTC_CreateSeq(dtc_activation_source_t act_source, dtc_transfer_data_t *p_transfer_data,
|
||||||
|
dtc_transfer_data_cfg_t *p_data_cfg, uint32_t sequence_transfer_nr,
|
||||||
|
uint8_t sequence_no);
|
||||||
|
dtc_err_t R_DTC_Close(void);
|
||||||
|
dtc_err_t R_DTC_Control(dtc_command_t command, dtc_stat_t *p_stat, dtc_cmd_arg_t *p_args);
|
||||||
|
uint32_t R_DTC_GetVersion(void);
|
||||||
|
|
||||||
|
#endif /* DTC_RX_IF_H */
|
||||||
|
|
||||||
|
/* End of File */
|
||||||
|
|
||||||
|
|
@ -0,0 +1,245 @@
|
||||||
|
PLEASE REFER TO THE APPLICATION NOTE FOR THIS MIDDLEWARE FOR MORE INFORMATION
|
||||||
|
|
||||||
|
r_dtc_rx
|
||||||
|
=========
|
||||||
|
|
||||||
|
Document Number
|
||||||
|
---------------
|
||||||
|
R01AN1819EJ0350
|
||||||
|
R01AN1819JJ0350
|
||||||
|
|
||||||
|
Version
|
||||||
|
-------
|
||||||
|
v3.50
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
The DTC driver provides a method to transmit the data using Data Transfer Controller (DTC).
|
||||||
|
The driver includes API functions to initialize DTC, create Transfer data, Control and get status of DTC.
|
||||||
|
The driver can be reduced in size by removing code used for parameter checking.
|
||||||
|
All configuration options can be found in "r_config\r_dtc_rx_config.h".
|
||||||
|
An original copy of the configuration file is stored in "r_dtc_rx\ref\r_dtc_rx_config_reference.h".
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
* Support Normal trasnsfer mode, Repeat trasnsfer mode and Block trasnsfer mode.
|
||||||
|
* Support chain transfer
|
||||||
|
|
||||||
|
Supported MCUs
|
||||||
|
--------------
|
||||||
|
* RX110 MCU
|
||||||
|
* RX111 MCU
|
||||||
|
* RX113 MCU
|
||||||
|
* RX130 MCU
|
||||||
|
* RX230 MCU
|
||||||
|
* RX231 MCU
|
||||||
|
* RX23E-A MCU
|
||||||
|
* RX64M MCU
|
||||||
|
* RX71M MCU
|
||||||
|
* RX23T MCU
|
||||||
|
* RX24T MCU
|
||||||
|
* RX24U MCU
|
||||||
|
* RX65N MCU
|
||||||
|
* RX651 MCU
|
||||||
|
* RX66T MCU
|
||||||
|
* RX66N MCU
|
||||||
|
* RX72T MCU
|
||||||
|
* RX23W MCU
|
||||||
|
* RX72M MCU
|
||||||
|
* RX13T MCU
|
||||||
|
* RX72N MCU
|
||||||
|
|
||||||
|
Boards Tested On
|
||||||
|
----------------
|
||||||
|
* RSKRX110
|
||||||
|
* RSKRX111
|
||||||
|
* RSKRX113
|
||||||
|
* RSKRX130
|
||||||
|
* RSKRX130_512KB
|
||||||
|
* RSKRX230
|
||||||
|
* RSKRX231
|
||||||
|
* RSKRX23E-A
|
||||||
|
* RSKRX64M
|
||||||
|
* RSKRX71M
|
||||||
|
* RSKRX23T
|
||||||
|
* RSKRX24T
|
||||||
|
* RSKRX24U
|
||||||
|
* RSKRX65N
|
||||||
|
* RSKRX65N_2MB
|
||||||
|
* RSKRX66T
|
||||||
|
* RSKRX66N
|
||||||
|
* RSKRX72T
|
||||||
|
* RSKRX23W
|
||||||
|
* RSKRX72M
|
||||||
|
* RSKRX13T
|
||||||
|
* RSKRX72N
|
||||||
|
Limitations
|
||||||
|
-----------
|
||||||
|
* None
|
||||||
|
|
||||||
|
Peripherals Used Directly
|
||||||
|
-------------------------
|
||||||
|
* Data Transfer Controller (DTC)
|
||||||
|
|
||||||
|
Required Packages
|
||||||
|
-----------------
|
||||||
|
* r_bsp
|
||||||
|
|
||||||
|
How to add to your project
|
||||||
|
--------------------------
|
||||||
|
This module must be added to each project in which it is used.
|
||||||
|
Renesas recommends using "Smart Configurator" described in (1) or (3).
|
||||||
|
However, "Smart Configurator" only supports some RX devices.
|
||||||
|
Please use the methods of (2) or (4) for unsupported RX devices.
|
||||||
|
|
||||||
|
(1) Adding the FIT module to your project using "Smart Configurator" in e2 studio
|
||||||
|
By using the "Smart Configurator" in e2 studio,
|
||||||
|
the FIT module is automatically added to your project.
|
||||||
|
Refer to "Renesas e2 studio Smart Configurator User Guide (R20AN0451)" for details.
|
||||||
|
|
||||||
|
(2) Adding the FIT module to your project using "FIT Configurator" in e2 studio
|
||||||
|
By using the "FIT Configurator" in e2 studio,
|
||||||
|
the FIT module is automatically added to your project.
|
||||||
|
Refer to "Adding Firmware Integration Technology Modules to Projects (R01AN1723)" for details.
|
||||||
|
|
||||||
|
(3) Adding the FIT module to your project using "Smart Configurator" on CS+
|
||||||
|
By using the "Smart Configurator Standalone version" in CS+,
|
||||||
|
the FIT module is automatically added to your project.
|
||||||
|
Refer to "Renesas e2 studio Smart Configurator User Guide (R20AN0451)" for details.
|
||||||
|
|
||||||
|
(4) Adding the FIT module to your project in CS+
|
||||||
|
In CS+, please manually add the FIT module to your project.
|
||||||
|
Refer to "Adding Firmware Integration Technology Modules to CS+ Projects (R01AN1826)" for details.
|
||||||
|
|
||||||
|
Toolchain(s) Used
|
||||||
|
-----------------
|
||||||
|
* Renesas RX v3.02.00
|
||||||
|
* GCC for Renesas RX 8.03.00.201904
|
||||||
|
* IAR C/C++ Compiler for Renesas RX 4.12.1
|
||||||
|
|
||||||
|
File Structure
|
||||||
|
--------------
|
||||||
|
r_dtc_rx
|
||||||
|
| r_dtc_rx_if.h
|
||||||
|
| readme.txt
|
||||||
|
|
|
||||||
|
+---doc
|
||||||
|
| |
|
||||||
|
| +---en
|
||||||
|
| | r01an1819ej{VERSION_NUMBER}-rx-dtc-dmac2.pdf
|
||||||
|
| +---ja
|
||||||
|
| r01an1819jj{VERSION_NUMBER}-rx-dtc-dmac2.pdf
|
||||||
|
|
|
||||||
|
+---ref
|
||||||
|
| r_dtc_rx_config_reference.h
|
||||||
|
|
|
||||||
|
+---src
|
||||||
|
| r_dtc_rx.c
|
||||||
|
| r_dtc_rx_private.h
|
||||||
|
|
|
||||||
|
+---targets
|
||||||
|
|
|
||||||
|
+---rx23t
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx23w
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx24t
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx24u
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx64m
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx65n
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx66t
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx66n
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx71m
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx72m
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx72n
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx72t
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx110
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx111
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx113
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx130
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx13t
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx230
|
||||||
|
| r_dtc_rx_target.c
|
||||||
|
| r_dtc_rx_target.h
|
||||||
|
| r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx231
|
||||||
|
r_dtc_rx_target.c
|
||||||
|
r_dtc_rx_target.h
|
||||||
|
r_dtc_rx_target_if.h
|
||||||
|
|
|
||||||
|
+---rx23E-A
|
||||||
|
r_dtc_rx_target.c
|
||||||
|
r_dtc_rx_target.h
|
||||||
|
r_dtc_rx_target_if.h
|
||||||
|
|
||||||
|
r_config
|
||||||
|
r_dtc_rx_config.h
|
||||||
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue