Compare commits
No commits in common. "eac6aebb43c47efa44df487b2027653edb19f3d4" and "420f22aa82c7f0d11f924f58a697532826e4bdeb" have entirely different histories.
eac6aebb43
...
420f22aa82
13
.gitattributes
vendored
13
.gitattributes
vendored
@ -1,13 +0,0 @@
|
|||||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
|
||||||
* text=auto
|
|
||||||
# Explicitly declare text files you want to be normalized and converted to
|
|
||||||
# LF on checkout.
|
|
||||||
*.c text eol=lf
|
|
||||||
*.h text eol=lf
|
|
||||||
*.ioc text eol=lf
|
|
||||||
*.ld text eol=lf
|
|
||||||
*.s text eol=lf
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
||||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,4 +3,3 @@
|
|||||||
.settings/
|
.settings/
|
||||||
Debug/
|
Debug/
|
||||||
Release/
|
Release/
|
||||||
.metadata/
|
|
||||||
|
@ -1,184 +0,0 @@
|
|||||||
<?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.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
|
||||||
<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="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactExtension="elf" 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" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug">
|
|
||||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.1432162465" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1161952376" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32L4A6ZGTx" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.136411878" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1500332517" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.1192855358" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.604983539" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1175879180" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.491770366" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32L4A6ZGTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L4A6xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L4A6ZGTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1211538381" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="5.917" valueType="string"/>
|
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1377931701" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
|
||||||
<builder buildPath="${workspace_loc:/stm32l4a6zg-f0x.at1}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.737021898" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1737121136" name="MCU/MPU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.237260748" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.493560861" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.655171909" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.278454632" name="MCU/MPU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1683620564" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.204464212" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.726501617" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
|
||||||
<listOptionValue builtIn="false" value="STM32L4A6xx"/>
|
|
||||||
</option>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.2061170237" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
|
||||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/STM32L4xx_HAL_Driver/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32L4xx/Include"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1948413059" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1301698323" name="MCU/MPU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.1985762225" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.977090165" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1475148767" name="MCU/MPU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.277688035" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32L4A6ZGTX_FLASH.ld}" valueType="string"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.167016380" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1421258902" name="MCU/MPU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.248176723" name="MCU/MPU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1963255542" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1375999736" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1857206206" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1509934111" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.968860888" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1479450132" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1151485785" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
|
||||||
<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="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactExtension="elf" 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.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
|
|
||||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.657288419" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1388601514" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32L4A6ZGTx" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.288640313" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1888256572" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.481879649" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1231534238" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.744351442" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1143339268" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32L4A6ZGTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L4A6xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L4A6ZGTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.331957753" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" value="5.917" valueType="string"/>
|
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1780156032" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
|
||||||
<builder buildPath="${workspace_loc:/stm32l4a6zg-f0x.at1}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.104869839" managedBuildOn="true" name="Gnu Make Builder.Release" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1888024135" name="MCU/MPU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1971287087" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1323814545" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1564257973" name="MCU/MPU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.2063047529" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.442879233" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1210413829" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
|
||||||
<listOptionValue builtIn="false" value="STM32L4A6xx"/>
|
|
||||||
</option>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.198942768" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
|
||||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/STM32L4xx_HAL_Driver/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32L4xx/Include"/>
|
|
||||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1929096592" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1039082182" name="MCU/MPU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.990150981" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.2131988876" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1411337991" name="MCU/MPU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1480173546" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32L4A6ZGTX_FLASH.ld}" valueType="string"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.2026844090" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1280291838" name="MCU/MPU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1906678140" name="MCU/MPU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1830641260" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1022477170" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.617967297" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1598695284" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1824540709" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.167132822" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1219511400" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="stm32l4a6zg-f0x.at1.null.851778403" name="stm32l4a6zg-f0x.at1"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1938234533.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1564257973;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1929096592">
|
|
||||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1938431532.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.278454632;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1948413059">
|
|
||||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
</cproject>
|
|
@ -88,7 +88,6 @@ void print_system_info(void);
|
|||||||
#define SWO_GPIO_Port GPIOB
|
#define SWO_GPIO_Port GPIOB
|
||||||
#define LD2_Pin GPIO_PIN_7
|
#define LD2_Pin GPIO_PIN_7
|
||||||
#define LD2_GPIO_Port GPIOB
|
#define LD2_GPIO_Port GPIOB
|
||||||
|
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
/* USER CODE END Private defines */
|
/* USER CODE END Private defines */
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||||
/*#define HAL_CAN_MODULE_ENABLED */
|
/*#define HAL_CAN_MODULE_ENABLED */
|
||||||
/*#define HAL_COMP_MODULE_ENABLED */
|
/*#define HAL_COMP_MODULE_ENABLED */
|
||||||
#define HAL_I2C_MODULE_ENABLED
|
|
||||||
/*#define HAL_CRC_MODULE_ENABLED */
|
/*#define HAL_CRC_MODULE_ENABLED */
|
||||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||||
/*#define HAL_DAC_MODULE_ENABLED */
|
/*#define HAL_DAC_MODULE_ENABLED */
|
||||||
@ -86,6 +85,7 @@
|
|||||||
/*#define HAL_PSSI_MODULE_ENABLED */
|
/*#define HAL_PSSI_MODULE_ENABLED */
|
||||||
#define HAL_GPIO_MODULE_ENABLED
|
#define HAL_GPIO_MODULE_ENABLED
|
||||||
#define HAL_EXTI_MODULE_ENABLED
|
#define HAL_EXTI_MODULE_ENABLED
|
||||||
|
#define HAL_I2C_MODULE_ENABLED
|
||||||
#define HAL_DMA_MODULE_ENABLED
|
#define HAL_DMA_MODULE_ENABLED
|
||||||
#define HAL_RCC_MODULE_ENABLED
|
#define HAL_RCC_MODULE_ENABLED
|
||||||
#define HAL_FLASH_MODULE_ENABLED
|
#define HAL_FLASH_MODULE_ENABLED
|
||||||
|
@ -154,7 +154,6 @@ void ringbuffer_callback(uint16_t delimiterfound, void * cb_data) {
|
|||||||
*/
|
*/
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
/* int status = 0; */
|
/* int status = 0; */
|
||||||
|
|
||||||
@ -339,10 +338,10 @@ int main(void)
|
|||||||
|
|
||||||
/* Create the semaphores(s) */
|
/* Create the semaphores(s) */
|
||||||
/* creation of si5351 */
|
/* creation of si5351 */
|
||||||
si5351Handle = osSemaphoreNew(1, 0, &si5351_attributes);
|
si5351Handle = osSemaphoreNew(1, 1, &si5351_attributes);
|
||||||
|
|
||||||
/* creation of command */
|
/* creation of command */
|
||||||
commandHandle = osSemaphoreNew(1, 0, &command_attributes);
|
commandHandle = osSemaphoreNew(1, 1, &command_attributes);
|
||||||
|
|
||||||
/* USER CODE BEGIN RTOS_SEMAPHORES */
|
/* USER CODE BEGIN RTOS_SEMAPHORES */
|
||||||
/* add semaphores, ... */
|
/* add semaphores, ... */
|
||||||
@ -381,7 +380,6 @@ int main(void)
|
|||||||
osKernelStart();
|
osKernelStart();
|
||||||
|
|
||||||
/* We should never get here as control is now taken by the scheduler */
|
/* We should never get here as control is now taken by the scheduler */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
/* USER CODE BEGIN WHILE */
|
/* USER CODE BEGIN WHILE */
|
||||||
while (1)
|
while (1)
|
||||||
@ -624,8 +622,6 @@ static void MX_DMA_Init(void)
|
|||||||
static void MX_GPIO_Init(void)
|
static void MX_GPIO_Init(void)
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
|
||||||
/* USER CODE END MX_GPIO_Init_1 */
|
|
||||||
|
|
||||||
/* GPIO Ports Clock Enable */
|
/* GPIO Ports Clock Enable */
|
||||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
@ -770,8 +766,6 @@ static void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
|
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
|
||||||
/* USER CODE END MX_GPIO_Init_2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 4 */
|
/* USER CODE BEGIN 4 */
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include "ringbuf.h"
|
#include "ringbuf.h"
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
|
@ -1,324 +1,319 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
/* USER CODE BEGIN Header */
|
/**
|
||||||
/**
|
******************************************************************************
|
||||||
******************************************************************************
|
* @file stm32l4xx_hal_msp.c
|
||||||
* @file stm32l4xx_hal_msp.c
|
* @brief This file provides code for the MSP Initialization
|
||||||
* @brief This file provides code for the MSP Initialization
|
* and de-Initialization codes.
|
||||||
* and de-Initialization codes.
|
******************************************************************************
|
||||||
******************************************************************************
|
* @attention
|
||||||
* @attention
|
*
|
||||||
*
|
* Copyright (c) 2022 STMicroelectronics.
|
||||||
* Copyright (c) 2022 STMicroelectronics.
|
* All rights reserved.
|
||||||
* All rights reserved.
|
*
|
||||||
*
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* in the root directory of this software component.
|
||||||
* in the root directory of this software component.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
*
|
||||||
*
|
******************************************************************************
|
||||||
******************************************************************************
|
*/
|
||||||
*/
|
/* USER CODE END Header */
|
||||||
/* USER CODE END Header */
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
/* Includes ------------------------------------------------------------------*/
|
#include "main.h"
|
||||||
#include "main.h"
|
/* USER CODE BEGIN Includes */
|
||||||
/* USER CODE BEGIN Includes */
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
/* USER CODE END Includes */
|
extern DMA_HandleTypeDef hdma_lpuart_rx;
|
||||||
extern DMA_HandleTypeDef hdma_lpuart_rx;
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* USER CODE BEGIN TD */
|
||||||
/* USER CODE BEGIN TD */
|
|
||||||
|
/* USER CODE END TD */
|
||||||
/* USER CODE END TD */
|
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* USER CODE BEGIN Define */
|
||||||
/* USER CODE BEGIN Define */
|
|
||||||
|
/* USER CODE END Define */
|
||||||
/* USER CODE END Define */
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* USER CODE BEGIN Macro */
|
||||||
/* USER CODE BEGIN Macro */
|
|
||||||
|
/* USER CODE END Macro */
|
||||||
/* USER CODE END Macro */
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* USER CODE BEGIN PV */
|
||||||
/* USER CODE BEGIN PV */
|
|
||||||
|
/* USER CODE END PV */
|
||||||
/* USER CODE END PV */
|
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* USER CODE BEGIN PFP */
|
||||||
/* USER CODE BEGIN PFP */
|
|
||||||
|
/* USER CODE END PFP */
|
||||||
/* USER CODE END PFP */
|
|
||||||
|
/* External functions --------------------------------------------------------*/
|
||||||
/* External functions --------------------------------------------------------*/
|
/* USER CODE BEGIN ExternalFunctions */
|
||||||
/* USER CODE BEGIN ExternalFunctions */
|
|
||||||
|
/* USER CODE END ExternalFunctions */
|
||||||
/* USER CODE END ExternalFunctions */
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
/* USER CODE BEGIN 0 */
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
/* USER CODE END 0 */
|
/**
|
||||||
/**
|
* Initializes the Global MSP.
|
||||||
* Initializes the Global MSP.
|
*/
|
||||||
*/
|
void HAL_MspInit(void)
|
||||||
void HAL_MspInit(void)
|
{
|
||||||
{
|
/* USER CODE BEGIN MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE BEGIN MspInit 0 */
|
/* USER CODE END MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END MspInit 0 */
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
||||||
|
__HAL_RCC_PWR_CLK_ENABLE();
|
||||||
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
|
||||||
__HAL_RCC_PWR_CLK_ENABLE();
|
/* System interrupt init*/
|
||||||
|
/* PendSV_IRQn interrupt configuration */
|
||||||
/* System interrupt init*/
|
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
|
||||||
/* PendSV_IRQn interrupt configuration */
|
|
||||||
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
|
/* USER CODE BEGIN MspInit 1 */
|
||||||
|
|
||||||
/* USER CODE BEGIN MspInit 1 */
|
/* USER CODE END MspInit 1 */
|
||||||
|
}
|
||||||
/* USER CODE END MspInit 1 */
|
|
||||||
}
|
/**
|
||||||
|
* @brief I2C MSP Initialization
|
||||||
/**
|
* This function configures the hardware resources used in this example
|
||||||
* @brief I2C MSP Initialization
|
* @param hi2c: I2C handle pointer
|
||||||
* This function configures the hardware resources used in this example
|
* @retval None
|
||||||
* @param hi2c: I2C handle pointer
|
*/
|
||||||
* @retval None
|
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
|
||||||
*/
|
{
|
||||||
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
{
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
if(hi2c->Instance==I2C1)
|
||||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
{
|
||||||
if(hi2c->Instance==I2C1)
|
/* USER CODE BEGIN I2C1_MspInit 0 */
|
||||||
{
|
|
||||||
/* USER CODE BEGIN I2C1_MspInit 0 */
|
/* USER CODE END I2C1_MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END I2C1_MspInit 0 */
|
/** Initializes the peripherals clock
|
||||||
|
*/
|
||||||
/** Initializes the peripherals clock
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
|
||||||
*/
|
PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;
|
||||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
||||||
PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;
|
{
|
||||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
Error_Handler();
|
||||||
{
|
}
|
||||||
Error_Handler();
|
|
||||||
}
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
/**I2C1 GPIO Configuration
|
||||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
PB8 ------> I2C1_SCL
|
||||||
/**I2C1 GPIO Configuration
|
PB9 ------> I2C1_SDA
|
||||||
PB8 ------> I2C1_SCL
|
*/
|
||||||
PB9 ------> I2C1_SDA
|
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
|
||||||
*/
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
|
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
/* Peripheral clock enable */
|
||||||
|
__HAL_RCC_I2C1_CLK_ENABLE();
|
||||||
/* Peripheral clock enable */
|
/* USER CODE BEGIN I2C1_MspInit 1 */
|
||||||
__HAL_RCC_I2C1_CLK_ENABLE();
|
|
||||||
/* USER CODE BEGIN I2C1_MspInit 1 */
|
/* USER CODE END I2C1_MspInit 1 */
|
||||||
|
}
|
||||||
/* USER CODE END I2C1_MspInit 1 */
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
}
|
* @brief I2C MSP De-Initialization
|
||||||
|
* This function freeze the hardware resources used in this example
|
||||||
/**
|
* @param hi2c: I2C handle pointer
|
||||||
* @brief I2C MSP De-Initialization
|
* @retval None
|
||||||
* This function freeze the hardware resources used in this example
|
*/
|
||||||
* @param hi2c: I2C handle pointer
|
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
|
||||||
* @retval None
|
{
|
||||||
*/
|
if(hi2c->Instance==I2C1)
|
||||||
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
|
{
|
||||||
{
|
/* USER CODE BEGIN I2C1_MspDeInit 0 */
|
||||||
if(hi2c->Instance==I2C1)
|
|
||||||
{
|
/* USER CODE END I2C1_MspDeInit 0 */
|
||||||
/* USER CODE BEGIN I2C1_MspDeInit 0 */
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_I2C1_CLK_DISABLE();
|
||||||
/* USER CODE END I2C1_MspDeInit 0 */
|
|
||||||
/* Peripheral clock disable */
|
/**I2C1 GPIO Configuration
|
||||||
__HAL_RCC_I2C1_CLK_DISABLE();
|
PB8 ------> I2C1_SCL
|
||||||
|
PB9 ------> I2C1_SDA
|
||||||
/**I2C1 GPIO Configuration
|
*/
|
||||||
PB8 ------> I2C1_SCL
|
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8);
|
||||||
PB9 ------> I2C1_SDA
|
|
||||||
*/
|
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9);
|
||||||
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8);
|
|
||||||
|
/* USER CODE BEGIN I2C1_MspDeInit 1 */
|
||||||
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9);
|
|
||||||
|
/* USER CODE END I2C1_MspDeInit 1 */
|
||||||
/* USER CODE BEGIN I2C1_MspDeInit 1 */
|
}
|
||||||
|
|
||||||
/* USER CODE END I2C1_MspDeInit 1 */
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
}
|
* @brief UART MSP Initialization
|
||||||
|
* This function configures the hardware resources used in this example
|
||||||
/**
|
* @param huart: UART handle pointer
|
||||||
* @brief UART MSP Initialization
|
* @retval None
|
||||||
* This function configures the hardware resources used in this example
|
*/
|
||||||
* @param huart: UART handle pointer
|
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
||||||
* @retval None
|
{
|
||||||
*/
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||||
{
|
if(huart->Instance==LPUART1)
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
{
|
||||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
/* USER CODE BEGIN LPUART1_MspInit 0 */
|
||||||
if(huart->Instance==LPUART1)
|
|
||||||
{
|
/* USER CODE END LPUART1_MspInit 0 */
|
||||||
/* USER CODE BEGIN LPUART1_MspInit 0 */
|
|
||||||
|
/** Initializes the peripherals clock
|
||||||
/* USER CODE END LPUART1_MspInit 0 */
|
*/
|
||||||
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_LPUART1;
|
||||||
/** Initializes the peripherals clock
|
PeriphClkInit.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PCLK1;
|
||||||
*/
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
||||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_LPUART1;
|
{
|
||||||
PeriphClkInit.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PCLK1;
|
Error_Handler();
|
||||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
}
|
||||||
{
|
|
||||||
Error_Handler();
|
/* Peripheral clock enable */
|
||||||
}
|
__HAL_RCC_LPUART1_CLK_ENABLE();
|
||||||
|
|
||||||
/* Peripheral clock enable */
|
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||||
__HAL_RCC_LPUART1_CLK_ENABLE();
|
HAL_PWREx_EnableVddIO2();
|
||||||
|
/**LPUART1 GPIO Configuration
|
||||||
__HAL_RCC_GPIOG_CLK_ENABLE();
|
PG7 ------> LPUART1_TX
|
||||||
HAL_PWREx_EnableVddIO2();
|
PG8 ------> LPUART1_RX
|
||||||
/**LPUART1 GPIO Configuration
|
*/
|
||||||
PG7 ------> LPUART1_TX
|
GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin;
|
||||||
PG8 ------> LPUART1_RX
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
*/
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
GPIO_InitStruct.Alternate = GPIO_AF8_LPUART1;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
|
||||||
GPIO_InitStruct.Alternate = GPIO_AF8_LPUART1;
|
/* LPUART1 DMA Init */
|
||||||
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
|
/* LPUART_RX Init */
|
||||||
|
hdma_lpuart_rx.Instance = DMA2_Channel7;
|
||||||
/* LPUART1 DMA Init */
|
hdma_lpuart_rx.Init.Request = DMA_REQUEST_4;
|
||||||
/* LPUART_RX Init */
|
hdma_lpuart_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||||
hdma_lpuart_rx.Instance = DMA2_Channel7;
|
hdma_lpuart_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||||
hdma_lpuart_rx.Init.Request = DMA_REQUEST_4;
|
hdma_lpuart_rx.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
hdma_lpuart_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
hdma_lpuart_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||||
hdma_lpuart_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
hdma_lpuart_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||||
hdma_lpuart_rx.Init.MemInc = DMA_MINC_ENABLE;
|
hdma_lpuart_rx.Init.Mode = DMA_NORMAL;
|
||||||
hdma_lpuart_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
hdma_lpuart_rx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
hdma_lpuart_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
if (HAL_DMA_Init(&hdma_lpuart_rx) != HAL_OK)
|
||||||
hdma_lpuart_rx.Init.Mode = DMA_NORMAL;
|
{
|
||||||
hdma_lpuart_rx.Init.Priority = DMA_PRIORITY_LOW;
|
Error_Handler();
|
||||||
if (HAL_DMA_Init(&hdma_lpuart_rx) != HAL_OK)
|
}
|
||||||
{
|
|
||||||
Error_Handler();
|
__HAL_LINKDMA(huart,hdmarx,hdma_lpuart_rx);
|
||||||
}
|
|
||||||
|
/* LPUART1 interrupt Init */
|
||||||
__HAL_LINKDMA(huart,hdmarx,hdma_lpuart_rx);
|
HAL_NVIC_SetPriority(LPUART1_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
|
||||||
/* LPUART1 interrupt Init */
|
/* USER CODE BEGIN LPUART1_MspInit 1 */
|
||||||
HAL_NVIC_SetPriority(LPUART1_IRQn, 5, 0);
|
|
||||||
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
|
/* USER CODE END LPUART1_MspInit 1 */
|
||||||
/* USER CODE BEGIN LPUART1_MspInit 1 */
|
}
|
||||||
|
|
||||||
/* USER CODE END LPUART1_MspInit 1 */
|
}
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* @brief UART MSP De-Initialization
|
||||||
}
|
* This function freeze the hardware resources used in this example
|
||||||
|
* @param huart: UART handle pointer
|
||||||
/**
|
* @retval None
|
||||||
* @brief UART MSP De-Initialization
|
*/
|
||||||
* This function freeze the hardware resources used in this example
|
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
||||||
* @param huart: UART handle pointer
|
{
|
||||||
* @retval None
|
if(huart->Instance==LPUART1)
|
||||||
*/
|
{
|
||||||
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
/* USER CODE BEGIN LPUART1_MspDeInit 0 */
|
||||||
{
|
|
||||||
if(huart->Instance==LPUART1)
|
/* USER CODE END LPUART1_MspDeInit 0 */
|
||||||
{
|
/* Peripheral clock disable */
|
||||||
/* USER CODE BEGIN LPUART1_MspDeInit 0 */
|
__HAL_RCC_LPUART1_CLK_DISABLE();
|
||||||
|
|
||||||
/* USER CODE END LPUART1_MspDeInit 0 */
|
/**LPUART1 GPIO Configuration
|
||||||
/* Peripheral clock disable */
|
PG7 ------> LPUART1_TX
|
||||||
__HAL_RCC_LPUART1_CLK_DISABLE();
|
PG8 ------> LPUART1_RX
|
||||||
|
*/
|
||||||
/**LPUART1 GPIO Configuration
|
HAL_GPIO_DeInit(GPIOG, STLK_RX_Pin|STLK_TX_Pin);
|
||||||
PG7 ------> LPUART1_TX
|
|
||||||
PG8 ------> LPUART1_RX
|
/* LPUART1 DMA DeInit */
|
||||||
*/
|
HAL_DMA_DeInit(huart->hdmarx);
|
||||||
HAL_GPIO_DeInit(GPIOG, STLK_RX_Pin|STLK_TX_Pin);
|
|
||||||
|
/* LPUART1 interrupt DeInit */
|
||||||
/* LPUART1 DMA DeInit */
|
HAL_NVIC_DisableIRQ(LPUART1_IRQn);
|
||||||
HAL_DMA_DeInit(huart->hdmarx);
|
/* USER CODE BEGIN LPUART1_MspDeInit 1 */
|
||||||
|
|
||||||
/* LPUART1 interrupt DeInit */
|
/* USER CODE END LPUART1_MspDeInit 1 */
|
||||||
HAL_NVIC_DisableIRQ(LPUART1_IRQn);
|
}
|
||||||
/* USER CODE BEGIN LPUART1_MspDeInit 1 */
|
|
||||||
|
}
|
||||||
/* USER CODE END LPUART1_MspDeInit 1 */
|
|
||||||
}
|
/**
|
||||||
|
* @brief RTC MSP Initialization
|
||||||
}
|
* This function configures the hardware resources used in this example
|
||||||
|
* @param hrtc: RTC handle pointer
|
||||||
/**
|
* @retval None
|
||||||
* @brief RTC MSP Initialization
|
*/
|
||||||
* This function configures the hardware resources used in this example
|
void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
|
||||||
* @param hrtc: RTC handle pointer
|
{
|
||||||
* @retval None
|
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||||
*/
|
if(hrtc->Instance==RTC)
|
||||||
void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
|
{
|
||||||
{
|
/* USER CODE BEGIN RTC_MspInit 0 */
|
||||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
|
||||||
if(hrtc->Instance==RTC)
|
/* USER CODE END RTC_MspInit 0 */
|
||||||
{
|
|
||||||
/* USER CODE BEGIN RTC_MspInit 0 */
|
/** Initializes the peripherals clock
|
||||||
|
*/
|
||||||
/* USER CODE END RTC_MspInit 0 */
|
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
||||||
|
PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
|
||||||
/** Initializes the peripherals clock
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
||||||
*/
|
{
|
||||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
Error_Handler();
|
||||||
PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
|
}
|
||||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
|
||||||
{
|
/* Peripheral clock enable */
|
||||||
Error_Handler();
|
__HAL_RCC_RTC_ENABLE();
|
||||||
}
|
/* USER CODE BEGIN RTC_MspInit 1 */
|
||||||
|
|
||||||
/* Peripheral clock enable */
|
/* USER CODE END RTC_MspInit 1 */
|
||||||
__HAL_RCC_RTC_ENABLE();
|
}
|
||||||
/* USER CODE BEGIN RTC_MspInit 1 */
|
|
||||||
|
}
|
||||||
/* USER CODE END RTC_MspInit 1 */
|
|
||||||
|
/**
|
||||||
}
|
* @brief RTC MSP De-Initialization
|
||||||
|
* This function freeze the hardware resources used in this example
|
||||||
}
|
* @param hrtc: RTC handle pointer
|
||||||
|
* @retval None
|
||||||
/**
|
*/
|
||||||
* @brief RTC MSP De-Initialization
|
void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
|
||||||
* This function freeze the hardware resources used in this example
|
{
|
||||||
* @param hrtc: RTC handle pointer
|
if(hrtc->Instance==RTC)
|
||||||
* @retval None
|
{
|
||||||
*/
|
/* USER CODE BEGIN RTC_MspDeInit 0 */
|
||||||
void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
|
|
||||||
{
|
/* USER CODE END RTC_MspDeInit 0 */
|
||||||
if(hrtc->Instance==RTC)
|
/* Peripheral clock disable */
|
||||||
{
|
__HAL_RCC_RTC_DISABLE();
|
||||||
/* USER CODE BEGIN RTC_MspDeInit 0 */
|
/* USER CODE BEGIN RTC_MspDeInit 1 */
|
||||||
|
|
||||||
/* USER CODE END RTC_MspDeInit 0 */
|
/* USER CODE END RTC_MspDeInit 1 */
|
||||||
/* Peripheral clock disable */
|
}
|
||||||
__HAL_RCC_RTC_DISABLE();
|
|
||||||
/* USER CODE BEGIN RTC_MspDeInit 1 */
|
}
|
||||||
|
|
||||||
/* USER CODE END RTC_MspDeInit 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
}
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
}
|
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
|
||||||
|
@ -1,135 +1,136 @@
|
|||||||
/* USER CODE BEGIN Header */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_timebase_TIM.c
|
* @file stm32l4xx_hal_timebase_TIM.c
|
||||||
* @brief HAL time base based on the hardware TIM.
|
* @brief HAL time base based on the hardware TIM.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2022 STMicroelectronics.
|
* Copyright (c) 2022 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END Header */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal.h"
|
#include "stm32l4xx_hal.h"
|
||||||
#include "stm32l4xx_hal_tim.h"
|
#include "stm32l4xx_hal_tim.h"
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
TIM_HandleTypeDef htim6;
|
TIM_HandleTypeDef htim6;
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function configures the TIM6 as a time base source.
|
* @brief This function configures the TIM6 as a time base source.
|
||||||
* The time source is configured to have 1ms time base with a dedicated
|
* The time source is configured to have 1ms time base with a dedicated
|
||||||
* Tick interrupt priority.
|
* Tick interrupt priority.
|
||||||
* @note This function is called automatically at the beginning of program after
|
* @note This function is called automatically at the beginning of program after
|
||||||
* reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
|
* reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
|
||||||
* @param TickPriority: Tick interrupt priority.
|
* @param TickPriority: Tick interrupt priority.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
||||||
{
|
{
|
||||||
RCC_ClkInitTypeDef clkconfig;
|
RCC_ClkInitTypeDef clkconfig;
|
||||||
uint32_t uwTimclock, uwAPB1Prescaler;
|
uint32_t uwTimclock, uwAPB1Prescaler;
|
||||||
|
|
||||||
uint32_t uwPrescalerValue;
|
uint32_t uwPrescalerValue;
|
||||||
uint32_t pFLatency;
|
uint32_t pFLatency;
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
|
|
||||||
/* Enable TIM6 clock */
|
/* Enable TIM6 clock */
|
||||||
__HAL_RCC_TIM6_CLK_ENABLE();
|
__HAL_RCC_TIM6_CLK_ENABLE();
|
||||||
/* Get clock configuration */
|
|
||||||
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
|
/* Get clock configuration */
|
||||||
/* Get APB1 prescaler */
|
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
|
||||||
uwAPB1Prescaler = clkconfig.APB1CLKDivider;
|
|
||||||
/* Compute TIM6 clock */
|
/* Get APB1 prescaler */
|
||||||
if (uwAPB1Prescaler == RCC_HCLK_DIV1)
|
uwAPB1Prescaler = clkconfig.APB1CLKDivider;
|
||||||
{
|
/* Compute TIM6 clock */
|
||||||
uwTimclock = HAL_RCC_GetPCLK1Freq();
|
if (uwAPB1Prescaler == RCC_HCLK_DIV1)
|
||||||
}
|
{
|
||||||
else
|
uwTimclock = HAL_RCC_GetPCLK1Freq();
|
||||||
{
|
}
|
||||||
uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
|
else
|
||||||
}
|
{
|
||||||
|
uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
|
||||||
/* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
|
}
|
||||||
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
|
|
||||||
|
/* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */
|
||||||
/* Initialize TIM6 */
|
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
|
||||||
htim6.Instance = TIM6;
|
|
||||||
|
/* Initialize TIM6 */
|
||||||
/* Initialize TIMx peripheral as follow:
|
htim6.Instance = TIM6;
|
||||||
|
|
||||||
+ Period = [(TIM6CLK/1000) - 1]. to have a (1/1000) s time base.
|
/* Initialize TIMx peripheral as follow:
|
||||||
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
+ Period = [(TIM6CLK/1000) - 1]. to have a (1/1000) s time base.
|
||||||
+ ClockDivision = 0
|
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
||||||
+ Counter direction = Up
|
+ ClockDivision = 0
|
||||||
*/
|
+ Counter direction = Up
|
||||||
htim6.Init.Period = (1000000U / 1000U) - 1U;
|
*/
|
||||||
htim6.Init.Prescaler = uwPrescalerValue;
|
htim6.Init.Period = (1000000U / 1000U) - 1U;
|
||||||
htim6.Init.ClockDivision = 0;
|
htim6.Init.Prescaler = uwPrescalerValue;
|
||||||
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim6.Init.ClockDivision = 0;
|
||||||
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
status = HAL_TIM_Base_Init(&htim6);
|
|
||||||
if (status == HAL_OK)
|
status = HAL_TIM_Base_Init(&htim6);
|
||||||
{
|
if (status == HAL_OK)
|
||||||
/* Start the TIM time Base generation in interrupt mode */
|
{
|
||||||
status = HAL_TIM_Base_Start_IT(&htim6);
|
/* Start the TIM time Base generation in interrupt mode */
|
||||||
if (status == HAL_OK)
|
status = HAL_TIM_Base_Start_IT(&htim6);
|
||||||
{
|
if (status == HAL_OK)
|
||||||
/* Enable the TIM6 global Interrupt */
|
{
|
||||||
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
|
/* Enable the TIM6 global Interrupt */
|
||||||
/* Configure the SysTick IRQ priority */
|
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
|
||||||
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
/* Configure the SysTick IRQ priority */
|
||||||
{
|
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
||||||
/* Configure the TIM IRQ priority */
|
{
|
||||||
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority, 0U);
|
/* Configure the TIM IRQ priority */
|
||||||
uwTickPrio = TickPriority;
|
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority, 0U);
|
||||||
}
|
uwTickPrio = TickPriority;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
status = HAL_ERROR;
|
{
|
||||||
}
|
status = HAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Return function status */
|
|
||||||
return status;
|
/* Return function status */
|
||||||
}
|
return status;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @brief Suspend Tick increment.
|
/**
|
||||||
* @note Disable the tick increment by disabling TIM6 update interrupt.
|
* @brief Suspend Tick increment.
|
||||||
* @param None
|
* @note Disable the tick increment by disabling TIM6 update interrupt.
|
||||||
* @retval None
|
* @param None
|
||||||
*/
|
* @retval None
|
||||||
void HAL_SuspendTick(void)
|
*/
|
||||||
{
|
void HAL_SuspendTick(void)
|
||||||
/* Disable TIM6 update Interrupt */
|
{
|
||||||
__HAL_TIM_DISABLE_IT(&htim6, TIM_IT_UPDATE);
|
/* Disable TIM6 update Interrupt */
|
||||||
}
|
__HAL_TIM_DISABLE_IT(&htim6, TIM_IT_UPDATE);
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @brief Resume Tick increment.
|
/**
|
||||||
* @note Enable the tick increment by Enabling TIM6 update interrupt.
|
* @brief Resume Tick increment.
|
||||||
* @param None
|
* @note Enable the tick increment by Enabling TIM6 update interrupt.
|
||||||
* @retval None
|
* @param None
|
||||||
*/
|
* @retval None
|
||||||
void HAL_ResumeTick(void)
|
*/
|
||||||
{
|
void HAL_ResumeTick(void)
|
||||||
/* Enable TIM6 Update interrupt */
|
{
|
||||||
__HAL_TIM_ENABLE_IT(&htim6, TIM_IT_UPDATE);
|
/* Enable TIM6 Update interrupt */
|
||||||
}
|
__HAL_TIM_ENABLE_IT(&htim6, TIM_IT_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,303 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file stm32l4xx.h
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @brief CMSIS STM32L4xx Device Peripheral Access Layer Header File.
|
|
||||||
*
|
|
||||||
* The file is the unique include file that the application programmer
|
|
||||||
* is using in the C source code, usually in main.c. This file contains:
|
|
||||||
* - Configuration section that allows to select:
|
|
||||||
* - The STM32L4xx device used in the target application
|
|
||||||
* - To use or not the peripheral's drivers in application code(i.e.
|
|
||||||
* code will be based on direct access to peripheral's registers
|
|
||||||
* rather than drivers API), this option is controlled by
|
|
||||||
* "#define USE_HAL_DRIVER"
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
|
||||||
* in the root directory of this software component.
|
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup CMSIS
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup stm32l4xx
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __STM32L4xx_H
|
|
||||||
#define __STM32L4xx_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
/** @addtogroup Library_configuration_section
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief STM32 Family
|
|
||||||
*/
|
|
||||||
#if !defined (STM32L4)
|
|
||||||
#define STM32L4
|
|
||||||
#endif /* STM32L4 */
|
|
||||||
|
|
||||||
/* Uncomment the line below according to the target STM32L4 device used in your
|
|
||||||
application
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined (STM32L412xx) && !defined (STM32L422xx) && \
|
|
||||||
!defined (STM32L431xx) && !defined (STM32L432xx) && !defined (STM32L433xx) && !defined (STM32L442xx) && !defined (STM32L443xx) && \
|
|
||||||
!defined (STM32L451xx) && !defined (STM32L452xx) && !defined (STM32L462xx) && \
|
|
||||||
!defined (STM32L471xx) && !defined (STM32L475xx) && !defined (STM32L476xx) && !defined (STM32L485xx) && !defined (STM32L486xx) && \
|
|
||||||
!defined (STM32L496xx) && !defined (STM32L4A6xx) && \
|
|
||||||
!defined (STM32L4P5xx) && !defined (STM32L4Q5xx) && \
|
|
||||||
!defined (STM32L4R5xx) && !defined (STM32L4R7xx) && !defined (STM32L4R9xx) && !defined (STM32L4S5xx) && !defined (STM32L4S7xx) && !defined (STM32L4S9xx)
|
|
||||||
/* #define STM32L412xx */ /*!< STM32L412xx Devices */
|
|
||||||
/* #define STM32L422xx */ /*!< STM32L422xx Devices */
|
|
||||||
/* #define STM32L431xx */ /*!< STM32L431xx Devices */
|
|
||||||
/* #define STM32L432xx */ /*!< STM32L432xx Devices */
|
|
||||||
/* #define STM32L433xx */ /*!< STM32L433xx Devices */
|
|
||||||
/* #define STM32L442xx */ /*!< STM32L442xx Devices */
|
|
||||||
/* #define STM32L443xx */ /*!< STM32L443xx Devices */
|
|
||||||
/* #define STM32L451xx */ /*!< STM32L451xx Devices */
|
|
||||||
/* #define STM32L452xx */ /*!< STM32L452xx Devices */
|
|
||||||
/* #define STM32L462xx */ /*!< STM32L462xx Devices */
|
|
||||||
/* #define STM32L471xx */ /*!< STM32L471xx Devices */
|
|
||||||
/* #define STM32L475xx */ /*!< STM32L475xx Devices */
|
|
||||||
/* #define STM32L476xx */ /*!< STM32L476xx Devices */
|
|
||||||
/* #define STM32L485xx */ /*!< STM32L485xx Devices */
|
|
||||||
/* #define STM32L486xx */ /*!< STM32L486xx Devices */
|
|
||||||
/* #define STM32L496xx */ /*!< STM32L496xx Devices */
|
|
||||||
/* #define STM32L4A6xx */ /*!< STM32L4A6xx Devices */
|
|
||||||
/* #define STM32L4P5xx */ /*!< STM32L4Q5xx Devices */
|
|
||||||
/* #define STM32L4R5xx */ /*!< STM32L4R5xx Devices */
|
|
||||||
/* #define STM32L4R7xx */ /*!< STM32L4R7xx Devices */
|
|
||||||
/* #define STM32L4R9xx */ /*!< STM32L4R9xx Devices */
|
|
||||||
/* #define STM32L4S5xx */ /*!< STM32L4S5xx Devices */
|
|
||||||
/* #define STM32L4S7xx */ /*!< STM32L4S7xx Devices */
|
|
||||||
/* #define STM32L4S9xx */ /*!< STM32L4S9xx Devices */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Tip: To avoid modifying this file each time you need to switch between these
|
|
||||||
devices, you can define the device in your toolchain compiler preprocessor.
|
|
||||||
*/
|
|
||||||
#if !defined (USE_HAL_DRIVER)
|
|
||||||
/**
|
|
||||||
* @brief Comment the line below if you will not use the peripherals drivers.
|
|
||||||
In this case, these drivers will not be included and the application code will
|
|
||||||
be based on direct access to peripherals registers
|
|
||||||
*/
|
|
||||||
/*#define USE_HAL_DRIVER */
|
|
||||||
#endif /* USE_HAL_DRIVER */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief CMSIS Device version number
|
|
||||||
*/
|
|
||||||
#define __STM32L4_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
|
|
||||||
#define __STM32L4_CMSIS_VERSION_SUB1 (0x07) /*!< [23:16] sub1 version */
|
|
||||||
#define __STM32L4_CMSIS_VERSION_SUB2 (0x04) /*!< [15:8] sub2 version */
|
|
||||||
#define __STM32L4_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
|
||||||
#define __STM32L4_CMSIS_VERSION ((__STM32L4_CMSIS_VERSION_MAIN << 24)\
|
|
||||||
|(__STM32L4_CMSIS_VERSION_SUB1 << 16)\
|
|
||||||
|(__STM32L4_CMSIS_VERSION_SUB2 << 8 )\
|
|
||||||
|(__STM32L4_CMSIS_VERSION_RC))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup Device_Included
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(STM32L412xx)
|
|
||||||
#include "stm32l412xx.h"
|
|
||||||
#elif defined(STM32L422xx)
|
|
||||||
#include "stm32l422xx.h"
|
|
||||||
#elif defined(STM32L431xx)
|
|
||||||
#include "stm32l431xx.h"
|
|
||||||
#elif defined(STM32L432xx)
|
|
||||||
#include "stm32l432xx.h"
|
|
||||||
#elif defined(STM32L433xx)
|
|
||||||
#include "stm32l433xx.h"
|
|
||||||
#elif defined(STM32L442xx)
|
|
||||||
#include "stm32l442xx.h"
|
|
||||||
#elif defined(STM32L443xx)
|
|
||||||
#include "stm32l443xx.h"
|
|
||||||
#elif defined(STM32L451xx)
|
|
||||||
#include "stm32l451xx.h"
|
|
||||||
#elif defined(STM32L452xx)
|
|
||||||
#include "stm32l452xx.h"
|
|
||||||
#elif defined(STM32L462xx)
|
|
||||||
#include "stm32l462xx.h"
|
|
||||||
#elif defined(STM32L471xx)
|
|
||||||
#include "stm32l471xx.h"
|
|
||||||
#elif defined(STM32L475xx)
|
|
||||||
#include "stm32l475xx.h"
|
|
||||||
#elif defined(STM32L476xx)
|
|
||||||
#include "stm32l476xx.h"
|
|
||||||
#elif defined(STM32L485xx)
|
|
||||||
#include "stm32l485xx.h"
|
|
||||||
#elif defined(STM32L486xx)
|
|
||||||
#include "stm32l486xx.h"
|
|
||||||
#elif defined(STM32L496xx)
|
|
||||||
#include "stm32l496xx.h"
|
|
||||||
#elif defined(STM32L4A6xx)
|
|
||||||
#include "stm32l4a6xx.h"
|
|
||||||
#elif defined(STM32L4P5xx)
|
|
||||||
#include "stm32l4p5xx.h"
|
|
||||||
#elif defined(STM32L4Q5xx)
|
|
||||||
#include "stm32l4q5xx.h"
|
|
||||||
#elif defined(STM32L4R5xx)
|
|
||||||
#include "stm32l4r5xx.h"
|
|
||||||
#elif defined(STM32L4R7xx)
|
|
||||||
#include "stm32l4r7xx.h"
|
|
||||||
#elif defined(STM32L4R9xx)
|
|
||||||
#include "stm32l4r9xx.h"
|
|
||||||
#elif defined(STM32L4S5xx)
|
|
||||||
#include "stm32l4s5xx.h"
|
|
||||||
#elif defined(STM32L4S7xx)
|
|
||||||
#include "stm32l4s7xx.h"
|
|
||||||
#elif defined(STM32L4S9xx)
|
|
||||||
#include "stm32l4s9xx.h"
|
|
||||||
#else
|
|
||||||
#error "Please select first the target STM32L4xx device used in your application (in stm32l4xx.h file)"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup Exported_types
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
RESET = 0,
|
|
||||||
SET = !RESET
|
|
||||||
} FlagStatus, ITStatus;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DISABLE = 0,
|
|
||||||
ENABLE = !DISABLE
|
|
||||||
} FunctionalState;
|
|
||||||
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
SUCCESS = 0,
|
|
||||||
ERROR = !SUCCESS
|
|
||||||
} ErrorStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/** @addtogroup Exported_macros
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
|
|
||||||
|
|
||||||
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
|
|
||||||
|
|
||||||
#define READ_BIT(REG, BIT) ((REG) & (BIT))
|
|
||||||
|
|
||||||
#define CLEAR_REG(REG) ((REG) = (0x0))
|
|
||||||
|
|
||||||
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
|
|
||||||
|
|
||||||
#define READ_REG(REG) ((REG))
|
|
||||||
|
|
||||||
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
|
|
||||||
|
|
||||||
/* Use of CMSIS compiler intrinsics for register exclusive access */
|
|
||||||
/* Atomic 32-bit register access macro to set one or several bits */
|
|
||||||
#define ATOMIC_SET_BIT(REG, BIT) \
|
|
||||||
do { \
|
|
||||||
uint32_t val; \
|
|
||||||
do { \
|
|
||||||
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
|
|
||||||
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
/* Atomic 32-bit register access macro to clear one or several bits */
|
|
||||||
#define ATOMIC_CLEAR_BIT(REG, BIT) \
|
|
||||||
do { \
|
|
||||||
uint32_t val; \
|
|
||||||
do { \
|
|
||||||
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
|
|
||||||
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
/* Atomic 32-bit register access macro to clear and set one or several bits */
|
|
||||||
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
|
|
||||||
do { \
|
|
||||||
uint32_t val; \
|
|
||||||
do { \
|
|
||||||
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
|
|
||||||
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
/* Atomic 16-bit register access macro to set one or several bits */
|
|
||||||
#define ATOMIC_SETH_BIT(REG, BIT) \
|
|
||||||
do { \
|
|
||||||
uint16_t val; \
|
|
||||||
do { \
|
|
||||||
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
|
|
||||||
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
/* Atomic 16-bit register access macro to clear one or several bits */
|
|
||||||
#define ATOMIC_CLEARH_BIT(REG, BIT) \
|
|
||||||
do { \
|
|
||||||
uint16_t val; \
|
|
||||||
do { \
|
|
||||||
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
|
|
||||||
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
/* Atomic 16-bit register access macro to clear and set one or several bits */
|
|
||||||
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
|
|
||||||
do { \
|
|
||||||
uint16_t val; \
|
|
||||||
do { \
|
|
||||||
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
|
|
||||||
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined (USE_HAL_DRIVER)
|
|
||||||
#include "stm32l4xx_hal.h"
|
|
||||||
#endif /* USE_HAL_DRIVER */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* __STM32L4xx_H */
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
@ -1,106 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file system_stm32l4xx.h
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @brief CMSIS Cortex-M4 Device System Source File for STM32L4xx devices.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
|
||||||
* in the root directory of this software component.
|
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup CMSIS
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup stm32l4xx_system
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Define to prevent recursive inclusion
|
|
||||||
*/
|
|
||||||
#ifndef __SYSTEM_STM32L4XX_H
|
|
||||||
#define __SYSTEM_STM32L4XX_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_System_Includes
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_System_Exported_Variables
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/* The SystemCoreClock variable is updated in three ways:
|
|
||||||
1) by calling CMSIS function SystemCoreClockUpdate()
|
|
||||||
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
|
|
||||||
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
|
|
||||||
Note: If you use this function to configure the system clock; then there
|
|
||||||
is no need to call the 2 first functions listed above, since SystemCoreClock
|
|
||||||
variable is updated automatically.
|
|
||||||
*/
|
|
||||||
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
|
|
||||||
|
|
||||||
extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
|
|
||||||
extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
|
|
||||||
extern const uint32_t MSIRangeTable[12]; /*!< MSI ranges table values */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_System_Exported_Constants
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_System_Exported_Macros
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_System_Exported_Functions
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern void SystemInit(void);
|
|
||||||
extern void SystemCoreClockUpdate(void);
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /*__SYSTEM_STM32L4XX_H */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
This software component is provided to you as part of a software package and
|
|
||||||
applicable license terms are in the Package_license file. If you received this
|
|
||||||
software component outside of a package or without applicable license terms,
|
|
||||||
the terms of the Apache-2.0 license shall apply.
|
|
||||||
You may obtain a copy of the Apache-2.0 at:
|
|
||||||
https://opensource.org/licenses/Apache-2.0
|
|
@ -1,83 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License.
|
|
||||||
|
|
||||||
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License.
|
|
||||||
|
|
||||||
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution.
|
|
||||||
|
|
||||||
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
||||||
1.You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
||||||
2.You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
||||||
3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
||||||
4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions.
|
|
||||||
|
|
||||||
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks.
|
|
||||||
|
|
||||||
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability.
|
|
||||||
|
|
||||||
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability.
|
|
||||||
|
|
||||||
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX:
|
|
||||||
|
|
||||||
Copyright [2019] [STMicroelectronics]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
411
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/cachel1_armv7.h
Normal file
411
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/cachel1_armv7.h
Normal file
@ -0,0 +1,411 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file cachel1_armv7.h
|
||||||
|
* @brief CMSIS Level 1 Cache API for Armv7-M and later
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 19. April 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARM_CACHEL1_ARMV7_H
|
||||||
|
#define ARM_CACHEL1_ARMV7_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_CacheFunctions Cache Functions
|
||||||
|
\brief Functions that configure Instruction and Data cache.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Cache Size ID Register Macros */
|
||||||
|
#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
|
||||||
|
#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
|
||||||
|
|
||||||
|
#ifndef __SCB_DCACHE_LINE_SIZE
|
||||||
|
#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SCB_ICACHE_LINE_SIZE
|
||||||
|
#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable I-Cache
|
||||||
|
\details Turns on I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_EnableICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable I-Cache
|
||||||
|
\details Turns off I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_DisableICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */
|
||||||
|
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Invalidate I-Cache
|
||||||
|
\details Invalidates I-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateICache (void)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
SCB->ICIALLU = 0UL;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief I-Cache Invalidate by address
|
||||||
|
\details Invalidates I-Cache for the given address.
|
||||||
|
I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
I-Cache memory blocks which are part of given address + given size are invalidated.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] isize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (volatile void *addr, int32_t isize)
|
||||||
|
{
|
||||||
|
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
||||||
|
if ( isize > 0 ) {
|
||||||
|
int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_ICACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_ICACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable D-Cache
|
||||||
|
\details Turns on D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_EnableDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable D-Cache
|
||||||
|
\details Turns off D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean & invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Invalidate D-Cache
|
||||||
|
\details Invalidates D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clean D-Cache
|
||||||
|
\details Cleans D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clean & Invalidate D-Cache
|
||||||
|
\details Cleans and Invalidates D-Cache
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
uint32_t ccsidr;
|
||||||
|
uint32_t sets;
|
||||||
|
uint32_t ways;
|
||||||
|
|
||||||
|
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
ccsidr = SCB->CCSIDR;
|
||||||
|
|
||||||
|
/* clean & invalidate D-Cache */
|
||||||
|
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
||||||
|
do {
|
||||||
|
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
||||||
|
do {
|
||||||
|
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
||||||
|
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
||||||
|
#if defined ( __CC_ARM )
|
||||||
|
__schedule_barrier();
|
||||||
|
#endif
|
||||||
|
} while (ways-- != 0U);
|
||||||
|
} while(sets-- != 0U);
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Invalidate by address
|
||||||
|
\details Invalidates D-Cache for the given address.
|
||||||
|
D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are invalidated.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Clean by address
|
||||||
|
\details Cleans D-Cache for the given address
|
||||||
|
D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are cleaned.
|
||||||
|
\param[in] addr address
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D-Cache Clean and Invalidate by address
|
||||||
|
\details Cleans and invalidates D_Cache for the given address
|
||||||
|
D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
||||||
|
D-Cache memory blocks which are part of given address + given size are cleaned and invalidated.
|
||||||
|
\param[in] addr address (aligned to 32-byte boundary)
|
||||||
|
\param[in] dsize size of memory block (in number of bytes)
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
|
||||||
|
{
|
||||||
|
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
||||||
|
if ( dsize > 0 ) {
|
||||||
|
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
||||||
|
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
|
||||||
|
do {
|
||||||
|
SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
||||||
|
op_addr += __SCB_DCACHE_LINE_SIZE;
|
||||||
|
op_size -= __SCB_DCACHE_LINE_SIZE;
|
||||||
|
} while ( op_size > 0 );
|
||||||
|
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_CacheFunctions */
|
||||||
|
|
||||||
|
#endif /* ARM_CACHEL1_ARMV7_H */
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_armcc.h
|
* @file cmsis_armcc.h
|
||||||
* @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
|
* @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
|
||||||
* @version V5.1.0
|
* @version V5.3.2
|
||||||
* @date 08. May 2019
|
* @date 27. May 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
/* __ARM_ARCH_8M_BASE__ not applicable */
|
/* __ARM_ARCH_8M_BASE__ not applicable */
|
||||||
/* __ARM_ARCH_8M_MAIN__ not applicable */
|
/* __ARM_ARCH_8M_MAIN__ not applicable */
|
||||||
|
/* __ARM_ARCH_8_1M_MAIN__ not applicable */
|
||||||
|
|
||||||
/* CMSIS compiler control DSP macros */
|
/* CMSIS compiler control DSP macros */
|
||||||
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
||||||
@ -62,9 +63,9 @@
|
|||||||
#ifndef __STATIC_INLINE
|
#ifndef __STATIC_INLINE
|
||||||
#define __STATIC_INLINE static __inline
|
#define __STATIC_INLINE static __inline
|
||||||
#endif
|
#endif
|
||||||
#ifndef __STATIC_FORCEINLINE
|
#ifndef __STATIC_FORCEINLINE
|
||||||
#define __STATIC_FORCEINLINE static __forceinline
|
#define __STATIC_FORCEINLINE static __forceinline
|
||||||
#endif
|
#endif
|
||||||
#ifndef __NO_RETURN
|
#ifndef __NO_RETURN
|
||||||
#define __NO_RETURN __declspec(noreturn)
|
#define __NO_RETURN __declspec(noreturn)
|
||||||
#endif
|
#endif
|
||||||
@ -127,282 +128,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __VECTOR_TABLE_ATTRIBUTE
|
#ifndef __VECTOR_TABLE_ATTRIBUTE
|
||||||
#define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section("RESET")))
|
#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ########################### Core Function Access ########################### */
|
|
||||||
/** \ingroup CMSIS_Core_FunctionInterface
|
|
||||||
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
|
|
||||||
@{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable IRQ Interrupts
|
|
||||||
\details Enables IRQ interrupts by clearing the I-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
/* intrinsic void __enable_irq(); */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable IRQ Interrupts
|
|
||||||
\details Disables IRQ interrupts by setting the I-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
/* intrinsic void __disable_irq(); */
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Control Register
|
|
||||||
\details Returns the content of the Control Register.
|
|
||||||
\return Control Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_CONTROL(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regControl __ASM("control");
|
|
||||||
return(__regControl);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Control Register
|
|
||||||
\details Writes the given value to the Control Register.
|
|
||||||
\param [in] control Control Register value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_CONTROL(uint32_t control)
|
|
||||||
{
|
|
||||||
register uint32_t __regControl __ASM("control");
|
|
||||||
__regControl = control;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get IPSR Register
|
|
||||||
\details Returns the content of the IPSR Register.
|
|
||||||
\return IPSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_IPSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regIPSR __ASM("ipsr");
|
|
||||||
return(__regIPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get APSR Register
|
|
||||||
\details Returns the content of the APSR Register.
|
|
||||||
\return APSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_APSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regAPSR __ASM("apsr");
|
|
||||||
return(__regAPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get xPSR Register
|
|
||||||
\details Returns the content of the xPSR Register.
|
|
||||||
\return xPSR Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_xPSR(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regXPSR __ASM("xpsr");
|
|
||||||
return(__regXPSR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Process Stack Pointer
|
|
||||||
\details Returns the current value of the Process Stack Pointer (PSP).
|
|
||||||
\return PSP Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_PSP(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regProcessStackPointer __ASM("psp");
|
|
||||||
return(__regProcessStackPointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Process Stack Pointer
|
|
||||||
\details Assigns the given value to the Process Stack Pointer (PSP).
|
|
||||||
\param [in] topOfProcStack Process Stack Pointer value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
|
|
||||||
{
|
|
||||||
register uint32_t __regProcessStackPointer __ASM("psp");
|
|
||||||
__regProcessStackPointer = topOfProcStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Main Stack Pointer
|
|
||||||
\details Returns the current value of the Main Stack Pointer (MSP).
|
|
||||||
\return MSP Register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_MSP(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regMainStackPointer __ASM("msp");
|
|
||||||
return(__regMainStackPointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Main Stack Pointer
|
|
||||||
\details Assigns the given value to the Main Stack Pointer (MSP).
|
|
||||||
\param [in] topOfMainStack Main Stack Pointer value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
|
|
||||||
{
|
|
||||||
register uint32_t __regMainStackPointer __ASM("msp");
|
|
||||||
__regMainStackPointer = topOfMainStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Priority Mask
|
|
||||||
\details Returns the current state of the priority mask bit from the Priority Mask Register.
|
|
||||||
\return Priority Mask value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_PRIMASK(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regPriMask __ASM("primask");
|
|
||||||
return(__regPriMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Priority Mask
|
|
||||||
\details Assigns the given value to the Priority Mask Register.
|
|
||||||
\param [in] priMask Priority Mask
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
|
|
||||||
{
|
|
||||||
register uint32_t __regPriMask __ASM("primask");
|
|
||||||
__regPriMask = (priMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
|
||||||
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable FIQ
|
|
||||||
\details Enables FIQ interrupts by clearing the F-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
#define __enable_fault_irq __enable_fiq
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable FIQ
|
|
||||||
\details Disables FIQ interrupts by setting the F-bit in the CPSR.
|
|
||||||
Can only be executed in Privileged modes.
|
|
||||||
*/
|
|
||||||
#define __disable_fault_irq __disable_fiq
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Base Priority
|
|
||||||
\details Returns the current value of the Base Priority register.
|
|
||||||
\return Base Priority register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_BASEPRI(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePri __ASM("basepri");
|
|
||||||
return(__regBasePri);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Base Priority
|
|
||||||
\details Assigns the given value to the Base Priority register.
|
|
||||||
\param [in] basePri Base Priority value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePri __ASM("basepri");
|
|
||||||
__regBasePri = (basePri & 0xFFU);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Base Priority with condition
|
|
||||||
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
|
|
||||||
or the new value increases the BASEPRI priority level.
|
|
||||||
\param [in] basePri Base Priority value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
|
|
||||||
{
|
|
||||||
register uint32_t __regBasePriMax __ASM("basepri_max");
|
|
||||||
__regBasePriMax = (basePri & 0xFFU);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get Fault Mask
|
|
||||||
\details Returns the current value of the Fault Mask register.
|
|
||||||
\return Fault Mask register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
|
|
||||||
{
|
|
||||||
register uint32_t __regFaultMask __ASM("faultmask");
|
|
||||||
return(__regFaultMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set Fault Mask
|
|
||||||
\details Assigns the given value to the Fault Mask register.
|
|
||||||
\param [in] faultMask Fault Mask value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
|
|
||||||
{
|
|
||||||
register uint32_t __regFaultMask __ASM("faultmask");
|
|
||||||
__regFaultMask = (faultMask & (uint32_t)1U);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
|
||||||
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Get FPSCR
|
|
||||||
\details Returns the current value of the Floating Point Status/Control register.
|
|
||||||
\return Floating Point Status/Control register value
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE uint32_t __get_FPSCR(void)
|
|
||||||
{
|
|
||||||
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
|
||||||
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
|
||||||
register uint32_t __regfpscr __ASM("fpscr");
|
|
||||||
return(__regfpscr);
|
|
||||||
#else
|
|
||||||
return(0U);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Set FPSCR
|
|
||||||
\details Assigns the given value to the Floating Point Status/Control register.
|
|
||||||
\param [in] fpscr Floating Point Status/Control value to set
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
|
||||||
{
|
|
||||||
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
|
||||||
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
|
||||||
register uint32_t __regfpscr __ASM("fpscr");
|
|
||||||
__regfpscr = (fpscr);
|
|
||||||
#else
|
|
||||||
(void)fpscr;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_RegAccFunctions */
|
|
||||||
|
|
||||||
|
|
||||||
/* ########################## Core Instruction Access ######################### */
|
/* ########################## Core Instruction Access ######################### */
|
||||||
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
|
/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
|
||||||
Access to dedicated instructions
|
Access to dedicated instructions
|
||||||
@ -444,35 +172,23 @@ __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
|||||||
so that all instructions following the ISB are fetched from cache or memory,
|
so that all instructions following the ISB are fetched from cache or memory,
|
||||||
after the instruction has been completed.
|
after the instruction has been completed.
|
||||||
*/
|
*/
|
||||||
#define __ISB() do {\
|
#define __ISB() __isb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__isb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Data Synchronization Barrier
|
\brief Data Synchronization Barrier
|
||||||
\details Acts as a special kind of Data Memory Barrier.
|
\details Acts as a special kind of Data Memory Barrier.
|
||||||
It completes when all explicit memory accesses before this instruction complete.
|
It completes when all explicit memory accesses before this instruction complete.
|
||||||
*/
|
*/
|
||||||
#define __DSB() do {\
|
#define __DSB() __dsb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__dsb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Data Memory Barrier
|
\brief Data Memory Barrier
|
||||||
\details Ensures the apparent order of the explicit memory operations before
|
\details Ensures the apparent order of the explicit memory operations before
|
||||||
and after the instruction, without ensuring their completion.
|
and after the instruction, without ensuring their completion.
|
||||||
*/
|
*/
|
||||||
#define __DMB() do {\
|
#define __DMB() __dmb(0xF)
|
||||||
__schedule_barrier();\
|
|
||||||
__dmb(0xF);\
|
|
||||||
__schedule_barrier();\
|
|
||||||
} while (0U)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Reverse byte order (32 bit)
|
\brief Reverse byte order (32 bit)
|
||||||
\details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.
|
\details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.
|
||||||
@ -810,6 +526,280 @@ __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint
|
|||||||
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
|
/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
|
||||||
|
|
||||||
|
|
||||||
|
/* ########################### Core Function Access ########################### */
|
||||||
|
/** \ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable IRQ Interrupts
|
||||||
|
\details Enables IRQ interrupts by clearing special-purpose register PRIMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
/* intrinsic void __enable_irq(); */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable IRQ Interrupts
|
||||||
|
\details Disables IRQ interrupts by setting special-purpose register PRIMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
/* intrinsic void __disable_irq(); */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Control Register
|
||||||
|
\details Returns the content of the Control Register.
|
||||||
|
\return Control Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_CONTROL(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regControl __ASM("control");
|
||||||
|
return(__regControl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Control Register
|
||||||
|
\details Writes the given value to the Control Register.
|
||||||
|
\param [in] control Control Register value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_CONTROL(uint32_t control)
|
||||||
|
{
|
||||||
|
register uint32_t __regControl __ASM("control");
|
||||||
|
__regControl = control;
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get IPSR Register
|
||||||
|
\details Returns the content of the IPSR Register.
|
||||||
|
\return IPSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_IPSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regIPSR __ASM("ipsr");
|
||||||
|
return(__regIPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get APSR Register
|
||||||
|
\details Returns the content of the APSR Register.
|
||||||
|
\return APSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_APSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regAPSR __ASM("apsr");
|
||||||
|
return(__regAPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get xPSR Register
|
||||||
|
\details Returns the content of the xPSR Register.
|
||||||
|
\return xPSR Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_xPSR(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regXPSR __ASM("xpsr");
|
||||||
|
return(__regXPSR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Process Stack Pointer
|
||||||
|
\details Returns the current value of the Process Stack Pointer (PSP).
|
||||||
|
\return PSP Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_PSP(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regProcessStackPointer __ASM("psp");
|
||||||
|
return(__regProcessStackPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Process Stack Pointer
|
||||||
|
\details Assigns the given value to the Process Stack Pointer (PSP).
|
||||||
|
\param [in] topOfProcStack Process Stack Pointer value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
|
||||||
|
{
|
||||||
|
register uint32_t __regProcessStackPointer __ASM("psp");
|
||||||
|
__regProcessStackPointer = topOfProcStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Main Stack Pointer
|
||||||
|
\details Returns the current value of the Main Stack Pointer (MSP).
|
||||||
|
\return MSP Register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_MSP(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regMainStackPointer __ASM("msp");
|
||||||
|
return(__regMainStackPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Main Stack Pointer
|
||||||
|
\details Assigns the given value to the Main Stack Pointer (MSP).
|
||||||
|
\param [in] topOfMainStack Main Stack Pointer value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
|
||||||
|
{
|
||||||
|
register uint32_t __regMainStackPointer __ASM("msp");
|
||||||
|
__regMainStackPointer = topOfMainStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Priority Mask
|
||||||
|
\details Returns the current state of the priority mask bit from the Priority Mask Register.
|
||||||
|
\return Priority Mask value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_PRIMASK(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regPriMask __ASM("primask");
|
||||||
|
return(__regPriMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Priority Mask
|
||||||
|
\details Assigns the given value to the Priority Mask Register.
|
||||||
|
\param [in] priMask Priority Mask
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
|
||||||
|
{
|
||||||
|
register uint32_t __regPriMask __ASM("primask");
|
||||||
|
__regPriMask = (priMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
||||||
|
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable FIQ
|
||||||
|
\details Enables FIQ interrupts by clearing special-purpose register FAULTMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
#define __enable_fault_irq __enable_fiq
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable FIQ
|
||||||
|
\details Disables FIQ interrupts by setting special-purpose register FAULTMASK.
|
||||||
|
Can only be executed in Privileged modes.
|
||||||
|
*/
|
||||||
|
#define __disable_fault_irq __disable_fiq
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Base Priority
|
||||||
|
\details Returns the current value of the Base Priority register.
|
||||||
|
\return Base Priority register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_BASEPRI(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePri __ASM("basepri");
|
||||||
|
return(__regBasePri);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Base Priority
|
||||||
|
\details Assigns the given value to the Base Priority register.
|
||||||
|
\param [in] basePri Base Priority value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePri __ASM("basepri");
|
||||||
|
__regBasePri = (basePri & 0xFFU);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Base Priority with condition
|
||||||
|
\details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
|
||||||
|
or the new value increases the BASEPRI priority level.
|
||||||
|
\param [in] basePri Base Priority value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
|
||||||
|
{
|
||||||
|
register uint32_t __regBasePriMax __ASM("basepri_max");
|
||||||
|
__regBasePriMax = (basePri & 0xFFU);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Fault Mask
|
||||||
|
\details Returns the current value of the Fault Mask register.
|
||||||
|
\return Fault Mask register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
|
||||||
|
{
|
||||||
|
register uint32_t __regFaultMask __ASM("faultmask");
|
||||||
|
return(__regFaultMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Fault Mask
|
||||||
|
\details Assigns the given value to the Fault Mask register.
|
||||||
|
\param [in] faultMask Fault Mask value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
|
||||||
|
{
|
||||||
|
register uint32_t __regFaultMask __ASM("faultmask");
|
||||||
|
__regFaultMask = (faultMask & (uint32_t)1U);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
|
||||||
|
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get FPSCR
|
||||||
|
\details Returns the current value of the Floating Point Status/Control register.
|
||||||
|
\return Floating Point Status/Control register value
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t __get_FPSCR(void)
|
||||||
|
{
|
||||||
|
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
||||||
|
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
||||||
|
register uint32_t __regfpscr __ASM("fpscr");
|
||||||
|
return(__regfpscr);
|
||||||
|
#else
|
||||||
|
return(0U);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set FPSCR
|
||||||
|
\details Assigns the given value to the Floating Point Status/Control register.
|
||||||
|
\param [in] fpscr Floating Point Status/Control value to set
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
|
||||||
|
{
|
||||||
|
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
|
||||||
|
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
|
||||||
|
register uint32_t __regfpscr __ASM("fpscr");
|
||||||
|
__regfpscr = (fpscr);
|
||||||
|
#else
|
||||||
|
(void)fpscr;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_RegAccFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ################### Compiler specific Intrinsics ########################### */
|
/* ################### Compiler specific Intrinsics ########################### */
|
||||||
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
|
/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
|
||||||
Access to dedicated SIMD instructions
|
Access to dedicated SIMD instructions
|
||||||
@ -887,6 +877,10 @@ __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint
|
|||||||
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
|
#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
|
||||||
((int64_t)(ARG3) << 32U) ) >> 32U))
|
((int64_t)(ARG3) << 32U) ) >> 32U))
|
||||||
|
|
||||||
|
#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
|
||||||
|
|
||||||
|
#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3))
|
||||||
|
|
||||||
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
|
||||||
/*@} end of group CMSIS_SIMD_intrinsics */
|
/*@} end of group CMSIS_SIMD_intrinsics */
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,16 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_iccarm.h
|
* @file cmsis_iccarm.h
|
||||||
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
|
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
|
||||||
* @version V5.1.0
|
* @version V5.3.0
|
||||||
* @date 08. May 2019
|
* @date 14. April 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2017-2019 IAR Systems
|
// Copyright (c) 2017-2021 IAR Systems
|
||||||
// Copyright (c) 2017-2019 Arm Limited. All rights reserved.
|
// Copyright (c) 2017-2021 Arm Limited. All rights reserved.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License")
|
// Licensed under the Apache License, Version 2.0 (the "License")
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -236,6 +238,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef __WEAK /* undo the definition from DLib_Defaults.h */
|
||||||
#ifndef __WEAK
|
#ifndef __WEAK
|
||||||
#if __ICCARM_V8
|
#if __ICCARM_V8
|
||||||
#define __WEAK __attribute__((weak))
|
#define __WEAK __attribute__((weak))
|
||||||
@ -264,6 +267,24 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
#define __VECTOR_TABLE_ATTRIBUTE @".intvec"
|
#define __VECTOR_TABLE_ATTRIBUTE @".intvec"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#ifndef __STACK_SEAL
|
||||||
|
#define __STACK_SEAL STACKSEAL$$Base
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TZ_STACK_SEAL_SIZE
|
||||||
|
#define __TZ_STACK_SEAL_SIZE 8U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TZ_STACK_SEAL_VALUE
|
||||||
|
#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) {
|
||||||
|
*((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ICCARM_INTRINSICS_VERSION__
|
#ifndef __ICCARM_INTRINSICS_VERSION__
|
||||||
#define __ICCARM_INTRINSICS_VERSION__ 0
|
#define __ICCARM_INTRINSICS_VERSION__ 0
|
||||||
#endif
|
#endif
|
||||||
@ -334,7 +355,13 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
|
|
||||||
#define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE)))
|
#define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE)))
|
||||||
#define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE)))
|
#define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE)))
|
||||||
#define __set_CONTROL(VALUE) (__arm_wsr("CONTROL", (VALUE)))
|
|
||||||
|
__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control)
|
||||||
|
{
|
||||||
|
__arm_wsr("CONTROL", control);
|
||||||
|
__iar_builtin_ISB();
|
||||||
|
}
|
||||||
|
|
||||||
#define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE)))
|
#define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE)))
|
||||||
#define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE)))
|
#define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE)))
|
||||||
|
|
||||||
@ -356,7 +383,13 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS"))
|
#define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS"))
|
||||||
#define __TZ_set_CONTROL_NS(VALUE) (__arm_wsr("CONTROL_NS", (VALUE)))
|
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control)
|
||||||
|
{
|
||||||
|
__arm_wsr("CONTROL_NS", control);
|
||||||
|
__iar_builtin_ISB();
|
||||||
|
}
|
||||||
|
|
||||||
#define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS"))
|
#define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS"))
|
||||||
#define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE)))
|
#define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE)))
|
||||||
#define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS"))
|
#define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS"))
|
||||||
@ -596,7 +629,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
__IAR_FT uint32_t __RRX(uint32_t value)
|
__IAR_FT uint32_t __RRX(uint32_t value)
|
||||||
{
|
{
|
||||||
uint32_t result;
|
uint32_t result;
|
||||||
__ASM("RRX %0, %1" : "=r"(result) : "r" (value) : "cc");
|
__ASM volatile("RRX %0, %1" : "=r"(result) : "r" (value));
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,6 +711,7 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
__IAR_FT void __TZ_set_CONTROL_NS(uint32_t value)
|
__IAR_FT void __TZ_set_CONTROL_NS(uint32_t value)
|
||||||
{
|
{
|
||||||
__asm volatile("MSR CONTROL_NS,%0" :: "r" (value));
|
__asm volatile("MSR CONTROL_NS,%0" :: "r" (value));
|
||||||
|
__iar_builtin_ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint32_t __TZ_get_PSP_NS(void)
|
__IAR_FT uint32_t __TZ_get_PSP_NS(void)
|
||||||
@ -835,37 +869,37 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
__IAR_FT uint8_t __LDRBT(volatile uint8_t *addr)
|
__IAR_FT uint8_t __LDRBT(volatile uint8_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return ((uint8_t)res);
|
return ((uint8_t)res);
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint16_t __LDRHT(volatile uint16_t *addr)
|
__IAR_FT uint16_t __LDRHT(volatile uint16_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return ((uint16_t)res);
|
return ((uint16_t)res);
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT uint32_t __LDRT(volatile uint32_t *addr)
|
__IAR_FT uint32_t __LDRT(volatile uint32_t *addr)
|
||||||
{
|
{
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
__ASM("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
__ASM volatile ("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr)
|
__IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
__ASM volatile ("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr)
|
__IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
__ASM volatile ("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
__IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr)
|
__IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr)
|
||||||
{
|
{
|
||||||
__ASM("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory");
|
__ASM volatile ("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* (__CORTEX_M >= 0x03) */
|
#endif /* (__CORTEX_M >= 0x03) */
|
||||||
@ -961,4 +995,8 @@ __packed struct __iar_u32 { uint32_t v; };
|
|||||||
#pragma diag_default=Pe940
|
#pragma diag_default=Pe940
|
||||||
#pragma diag_default=Pe177
|
#pragma diag_default=Pe177
|
||||||
|
|
||||||
|
#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2))
|
||||||
|
|
||||||
|
#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3))
|
||||||
|
|
||||||
#endif /* __CMSIS_ICCARM_H__ */
|
#endif /* __CMSIS_ICCARM_H__ */
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file cmsis_version.h
|
* @file cmsis_version.h
|
||||||
* @brief CMSIS Core(M) Version definitions
|
* @brief CMSIS Core(M) Version definitions
|
||||||
* @version V5.0.3
|
* @version V5.0.5
|
||||||
* @date 24. June 2019
|
* @date 02. February 2022
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 ARM Limited. All rights reserved.
|
* Copyright (c) 2009-2022 ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
/* CMSIS Version definitions */
|
/* CMSIS Version definitions */
|
||||||
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
|
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
|
||||||
#define __CM_CMSIS_VERSION_SUB ( 3U) /*!< [15:0] CMSIS Core(M) sub version */
|
#define __CM_CMSIS_VERSION_SUB ( 6U) /*!< [15:0] CMSIS Core(M) sub version */
|
||||||
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
|
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
|
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_armv8mbl.h
|
* @file core_armv8mbl.h
|
||||||
* @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File
|
* @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.1.0
|
||||||
* @date 12. November 2018
|
* @date 27. March 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __ICCARM__ )
|
#if defined ( __ICCARM__ )
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_ARMV8MBL_H_GENERIC
|
#ifndef __CORE_ARMV8MBL_H_GENERIC
|
||||||
@ -68,7 +70,7 @@
|
|||||||
#define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \
|
#define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
__ARMv8MBL_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
__ARMv8MBL_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
||||||
|
|
||||||
#define __CORTEX_M ( 2U) /*!< Cortex-M Core */
|
#define __CORTEX_M (2U) /*!< Cortex-M Core */
|
||||||
|
|
||||||
/** __FPU_USED indicates whether an FPU is used or not.
|
/** __FPU_USED indicates whether an FPU is used or not.
|
||||||
This core does not support an FPU at all
|
This core does not support an FPU at all
|
||||||
@ -975,6 +977,7 @@ typedef struct
|
|||||||
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
@ -983,7 +986,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -991,91 +994,276 @@ typedef struct
|
|||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */
|
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: DWTENA Position */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */
|
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< \deprecated CoreDebug DEMCR: DWTENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
@ -1113,7 +1301,9 @@ typedef struct
|
|||||||
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
@ -1124,7 +1314,9 @@ typedef struct
|
|||||||
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
@ -1138,7 +1330,9 @@ typedef struct
|
|||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
@ -1146,7 +1340,9 @@ typedef struct
|
|||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
@ -1163,6 +1359,7 @@ typedef struct
|
|||||||
Core Function Interface contains:
|
Core Function Interface contains:
|
||||||
- Core NVIC Functions
|
- Core NVIC Functions
|
||||||
- Core SysTick Functions
|
- Core SysTick Functions
|
||||||
|
- Core Debug Functions
|
||||||
- Core Register Access Functions
|
- Core Register Access Functions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/**
|
/**
|
||||||
@ -1838,6 +2035,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_armv8mml.h
|
* @file core_armv8mml.h
|
||||||
* @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File
|
* @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File
|
||||||
* @version V5.1.0
|
* @version V5.2.3
|
||||||
* @date 12. September 2018
|
* @date 13. October 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __ICCARM__ )
|
#if defined ( __ICCARM__ )
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_ARMV8MML_H_GENERIC
|
#ifndef __CORE_ARMV8MML_H_GENERIC
|
||||||
@ -68,7 +70,7 @@
|
|||||||
#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
|
#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
__ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
__ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */
|
||||||
|
|
||||||
#define __CORTEX_M (81U) /*!< Cortex-M Core */
|
#define __CORTEX_M (80U) /*!< Cortex-M Core */
|
||||||
|
|
||||||
/** __FPU_USED indicates whether an FPU is used or not.
|
/** __FPU_USED indicates whether an FPU is used or not.
|
||||||
For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
|
||||||
@ -248,6 +250,11 @@
|
|||||||
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -512,7 +519,7 @@ typedef struct
|
|||||||
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
||||||
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
||||||
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
||||||
__IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
__IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
||||||
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
||||||
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
||||||
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
||||||
@ -521,7 +528,10 @@ typedef struct
|
|||||||
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
||||||
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
||||||
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
||||||
uint32_t RESERVED3[92U];
|
uint32_t RESERVED7[21U];
|
||||||
|
__IOM uint32_t SFSR; /*!< Offset: 0x0E4 (R/W) Secure Fault Status Register */
|
||||||
|
__IOM uint32_t SFAR; /*!< Offset: 0x0E8 (R/W) Secure Fault Address Register */
|
||||||
|
uint32_t RESERVED3[69U];
|
||||||
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
||||||
uint32_t RESERVED4[15U];
|
uint32_t RESERVED4[15U];
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
||||||
@ -538,6 +548,7 @@ typedef struct
|
|||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
} SCB_Type;
|
} SCB_Type;
|
||||||
|
|
||||||
/* SCB CPUID Register Definitions */
|
/* SCB CPUID Register Definitions */
|
||||||
@ -738,22 +749,22 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1593,8 +1604,9 @@ typedef struct
|
|||||||
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
||||||
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and VFP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and VFP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and VFP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
@ -1666,7 +1678,7 @@ typedef struct
|
|||||||
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
||||||
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 0 Definitions */
|
/* Media and VFP Feature Register 0 Definitions */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
||||||
|
|
||||||
@ -1691,7 +1703,7 @@ typedef struct
|
|||||||
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 1 Definitions */
|
/* Media and VFP Feature Register 1 Definitions */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
||||||
|
|
||||||
@ -1704,9 +1716,13 @@ typedef struct
|
|||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and VFP Feature Register 2 Definitions */
|
||||||
|
#define FPU_MVFR2_FPMisc_Pos 4U /*!< MVFR2: FPMisc bits Position */
|
||||||
|
#define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos) /*!< MVFR2: FPMisc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
@ -1715,7 +1731,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1723,124 +1739,354 @@ typedef struct
|
|||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Position */
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register Definitions */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */
|
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: TRCENA Position */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
|
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< \deprecated CoreDebug DEMCR: TRCENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */
|
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< \deprecated CoreDebug DEMCR: MON_REQ Position */
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
|
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< \deprecated CoreDebug DEMCR: MON_REQ Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */
|
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< \deprecated CoreDebug DEMCR: MON_STEP Position */
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
|
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< \deprecated CoreDebug DEMCR: MON_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */
|
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< \deprecated CoreDebug DEMCR: MON_PEND Position */
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
|
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< \deprecated CoreDebug DEMCR: MON_PEND Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */
|
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< \deprecated CoreDebug DEMCR: MON_EN Position */
|
||||||
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
|
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< \deprecated CoreDebug DEMCR: MON_EN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */
|
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< \deprecated CoreDebug DEMCR: VC_INTERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
|
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_INTERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */
|
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
|
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */
|
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< \deprecated CoreDebug DEMCR: VC_STATERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
|
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_STATERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */
|
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
|
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */
|
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< \deprecated CoreDebug DEMCR: VC_MMERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
|
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_MMERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Pos 5U /*!< DCB DHCSR: Snap stall control Position */
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos) /*!< DCB DHCSR: Snap stall control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Pos 23U /*!< DCB DEMCR: Monitor pend req key Position */
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos) /*!< DCB DEMCR: Monitor pend req key Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_UMON_EN_Pos 21U /*!< DCB DEMCR: Unprivileged monitor enable Position */
|
||||||
|
#define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos) /*!< DCB DEMCR: Unprivileged monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_SDME_Pos 20U /*!< DCB DEMCR: Secure DebugMonitor enable Position */
|
||||||
|
#define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos) /*!< DCB DEMCR: Secure DebugMonitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_REQ_Pos 19U /*!< DCB DEMCR: Monitor request Position */
|
||||||
|
#define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos) /*!< DCB DEMCR: Monitor request Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_STEP_Pos 18U /*!< DCB DEMCR: Monitor step Position */
|
||||||
|
#define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos) /*!< DCB DEMCR: Monitor step Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_PEND_Pos 17U /*!< DCB DEMCR: Monitor pend Position */
|
||||||
|
#define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos) /*!< DCB DEMCR: Monitor pend Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_EN_Pos 16U /*!< DCB DEMCR: Monitor enable Position */
|
||||||
|
#define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos) /*!< DCB DEMCR: Monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Pos 11U /*!< DCB DEMCR: Vector Catch SecureFault Position */
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos) /*!< DCB DEMCR: Vector Catch SecureFault Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Pos 9U /*!< DCB DEMCR: Vector Catch interrupt errors Position */
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos) /*!< DCB DEMCR: Vector Catch interrupt errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Pos 8U /*!< DCB DEMCR: Vector Catch BusFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos) /*!< DCB DEMCR: Vector Catch BusFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Pos 7U /*!< DCB DEMCR: Vector Catch state errors Position */
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos) /*!< DCB DEMCR: Vector Catch state errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Pos 6U /*!< DCB DEMCR: Vector Catch check errors Position */
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos) /*!< DCB DEMCR: Vector Catch check errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Pos 5U /*!< DCB DEMCR: Vector Catch NOCP errors Position */
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos) /*!< DCB DEMCR: Vector Catch NOCP errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Pos 4U /*!< DCB DEMCR: Vector Catch MemManage errors Position */
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos) /*!< DCB DEMCR: Vector Catch MemManage errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
@ -1879,7 +2125,9 @@ typedef struct
|
|||||||
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
@ -1891,7 +2139,9 @@ typedef struct
|
|||||||
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
@ -1908,7 +2158,9 @@ typedef struct
|
|||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
@ -1917,7 +2169,9 @@ typedef struct
|
|||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
@ -1931,6 +2185,15 @@ typedef struct
|
|||||||
/*@} */
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_register_aliases Backwards Compatibility Aliases
|
||||||
|
\brief Register alias definitions for backwards compatibility.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
#define ID_ADR (ID_AFR) /*!< SCB Auxiliary Feature Register */
|
||||||
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Hardware Abstraction Layer
|
* Hardware Abstraction Layer
|
||||||
@ -2636,6 +2899,13 @@ __STATIC_INLINE uint32_t SCB_GetFPUType(void)
|
|||||||
/*@} end of CMSIS_Core_FpuFunctions */
|
/*@} end of CMSIS_Core_FpuFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
/* ########################## Cache functions #################################### */
|
||||||
|
|
||||||
|
#if ((defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)) || \
|
||||||
|
(defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)))
|
||||||
|
#include "cachel1_armv7.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ########################## SAU functions #################################### */
|
/* ########################## SAU functions #################################### */
|
||||||
/**
|
/**
|
||||||
@ -2674,6 +2944,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm0.h
|
* @file core_cm0.h
|
||||||
* @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.6
|
* @version V5.0.8
|
||||||
* @date 13. March 2019
|
* @date 21. August 2019
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
@ -831,8 +831,8 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t vectors = 0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
*(vectors + (int32_t)IRQn) = vector; /* use pointer arithmetic to access vector */
|
||||||
/* ARM Application Note 321 states that the M0 does not require the architectural barrier */
|
/* ARM Application Note 321 states that the M0 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,8 +847,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t vectors = 0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
return *(vectors + (int32_t)IRQn); /* use pointer arithmetic to access vector */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm0plus.h
|
* @file core_cm0plus.h
|
||||||
* @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.7
|
* @version V5.0.9
|
||||||
* @date 13. March 2019
|
* @date 21. August 2019
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
@ -950,11 +950,12 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
uint32_t vectors = SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
#else
|
#else
|
||||||
uint32_t vectors = 0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
|
*(vectors + (int32_t)IRQn) = vector; /* use pointer arithmetic to access vector */
|
||||||
#endif
|
#endif
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
|
||||||
/* ARM Application Note 321 states that the M0+ does not require the architectural barrier */
|
/* ARM Application Note 321 states that the M0+ does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -970,11 +971,12 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
uint32_t vectors = SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
#else
|
#else
|
||||||
uint32_t vectors = 0x0U;
|
uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */
|
||||||
|
return *(vectors + (int32_t)IRQn); /* use pointer arithmetic to access vector */
|
||||||
#endif
|
#endif
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm23.h
|
* @file core_cm23.h
|
||||||
* @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.1.0
|
||||||
* @date 12. November 2018
|
* @date 11. February 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __ICCARM__ )
|
#if defined ( __ICCARM__ )
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_CM23_H_GENERIC
|
#ifndef __CORE_CM23_H_GENERIC
|
||||||
@ -1050,6 +1052,7 @@ typedef struct
|
|||||||
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
@ -1058,7 +1061,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1066,91 +1069,276 @@ typedef struct
|
|||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register */
|
/* Debug Exception and Monitor Control Register */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */
|
#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: DWTENA Position */
|
||||||
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */
|
#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< \deprecated CoreDebug DEMCR: DWTENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
@ -1188,7 +1376,9 @@ typedef struct
|
|||||||
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
@ -1199,7 +1389,9 @@ typedef struct
|
|||||||
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
@ -1213,7 +1405,9 @@ typedef struct
|
|||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
@ -1221,7 +1415,9 @@ typedef struct
|
|||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
@ -1238,6 +1434,7 @@ typedef struct
|
|||||||
Core Function Interface contains:
|
Core Function Interface contains:
|
||||||
- Core NVIC Functions
|
- Core NVIC Functions
|
||||||
- Core SysTick Functions
|
- Core SysTick Functions
|
||||||
|
- Core Debug Functions
|
||||||
- Core Register Access Functions
|
- Core Register Access Functions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/**
|
/**
|
||||||
@ -1304,11 +1501,11 @@ typedef struct
|
|||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
||||||
#else
|
#else
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Interrupt Priorities are WORD accessible only under Armv6-M */
|
/* Interrupt Priorities are WORD accessible only under Armv6-M */
|
||||||
/* The following MACROS handle generation of the register offset and byte masks */
|
/* The following MACROS handle generation of the register offset and byte masks */
|
||||||
#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL)
|
#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL)
|
||||||
@ -1913,6 +2110,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm3.h
|
* @file core_cm3.h
|
||||||
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File
|
||||||
* @version V5.1.0
|
* @version V5.1.2
|
||||||
* @date 13. March 2019
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
#include "cmsis_version.h"
|
#include "cmsis_version.h"
|
||||||
|
|
||||||
/* CMSIS CM3 definitions */
|
/* CMSIS CM3 definitions */
|
||||||
#define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
#define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
||||||
#define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
#define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
||||||
#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \
|
#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
@ -142,6 +142,11 @@
|
|||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -560,19 +565,19 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1443,7 +1448,7 @@ typedef struct
|
|||||||
|
|
||||||
#ifdef CMSIS_VECTAB_VIRTUAL
|
#ifdef CMSIS_VECTAB_VIRTUAL
|
||||||
#ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
|
#ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
|
||||||
#define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
|
#define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
|
||||||
#endif
|
#endif
|
||||||
#include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
|
#include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
|
||||||
#else
|
#else
|
||||||
@ -1478,7 +1483,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
|||||||
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
|
||||||
reg_value = (reg_value |
|
reg_value = (reg_value |
|
||||||
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
|
||||||
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
(PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
|
||||||
SCB->AIRCR = reg_value;
|
SCB->AIRCR = reg_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1729,8 +1734,8 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1745,8 +1750,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1771,6 +1776,7 @@ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
|
|||||||
|
|
||||||
/*@} end of CMSIS_Core_NVICFunctions */
|
/*@} end of CMSIS_Core_NVICFunctions */
|
||||||
|
|
||||||
|
|
||||||
/* ########################## MPU functions #################################### */
|
/* ########################## MPU functions #################################### */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm33.h
|
* @file core_cm33.h
|
||||||
* @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File
|
||||||
* @version V5.1.0
|
* @version V5.2.3
|
||||||
* @date 12. November 2018
|
* @date 13. October 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __ICCARM__ )
|
#if defined ( __ICCARM__ )
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_CM33_H_GENERIC
|
#ifndef __CORE_CM33_H_GENERIC
|
||||||
@ -248,6 +250,11 @@
|
|||||||
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -512,7 +519,7 @@ typedef struct
|
|||||||
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
||||||
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
||||||
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
||||||
__IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
__IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
||||||
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
||||||
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
||||||
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
||||||
@ -521,7 +528,10 @@ typedef struct
|
|||||||
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
||||||
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
||||||
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
||||||
uint32_t RESERVED3[92U];
|
uint32_t RESERVED7[21U];
|
||||||
|
__IOM uint32_t SFSR; /*!< Offset: 0x0E4 (R/W) Secure Fault Status Register */
|
||||||
|
__IOM uint32_t SFAR; /*!< Offset: 0x0E8 (R/W) Secure Fault Address Register */
|
||||||
|
uint32_t RESERVED3[69U];
|
||||||
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
||||||
uint32_t RESERVED4[15U];
|
uint32_t RESERVED4[15U];
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
||||||
@ -538,6 +548,7 @@ typedef struct
|
|||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
} SCB_Type;
|
} SCB_Type;
|
||||||
|
|
||||||
/* SCB CPUID Register Definitions */
|
/* SCB CPUID Register Definitions */
|
||||||
@ -738,22 +749,22 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1668,8 +1679,9 @@ typedef struct
|
|||||||
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
||||||
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and VFP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and VFP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and VFP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
@ -1741,7 +1753,7 @@ typedef struct
|
|||||||
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
||||||
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 0 Definitions */
|
/* Media and VFP Feature Register 0 Definitions */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
||||||
|
|
||||||
@ -1766,7 +1778,7 @@ typedef struct
|
|||||||
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 1 Definitions */
|
/* Media and VFP Feature Register 1 Definitions */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
||||||
|
|
||||||
@ -1779,9 +1791,13 @@ typedef struct
|
|||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and VFP Feature Register 2 Definitions */
|
||||||
|
#define FPU_MVFR2_FPMisc_Pos 4U /*!< MVFR2: FPMisc bits Position */
|
||||||
|
#define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos) /*!< MVFR2: FPMisc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
@ -1790,7 +1806,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1798,124 +1814,354 @@ typedef struct
|
|||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Position */
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register Definitions */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */
|
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: TRCENA Position */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
|
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< \deprecated CoreDebug DEMCR: TRCENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */
|
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< \deprecated CoreDebug DEMCR: MON_REQ Position */
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
|
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< \deprecated CoreDebug DEMCR: MON_REQ Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */
|
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< \deprecated CoreDebug DEMCR: MON_STEP Position */
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
|
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< \deprecated CoreDebug DEMCR: MON_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */
|
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< \deprecated CoreDebug DEMCR: MON_PEND Position */
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
|
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< \deprecated CoreDebug DEMCR: MON_PEND Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */
|
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< \deprecated CoreDebug DEMCR: MON_EN Position */
|
||||||
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
|
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< \deprecated CoreDebug DEMCR: MON_EN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */
|
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< \deprecated CoreDebug DEMCR: VC_INTERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
|
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_INTERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */
|
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
|
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */
|
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< \deprecated CoreDebug DEMCR: VC_STATERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
|
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_STATERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */
|
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
|
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */
|
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< \deprecated CoreDebug DEMCR: VC_MMERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
|
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_MMERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Pos 5U /*!< DCB DHCSR: Snap stall control Position */
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos) /*!< DCB DHCSR: Snap stall control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Pos 23U /*!< DCB DEMCR: Monitor pend req key Position */
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos) /*!< DCB DEMCR: Monitor pend req key Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_UMON_EN_Pos 21U /*!< DCB DEMCR: Unprivileged monitor enable Position */
|
||||||
|
#define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos) /*!< DCB DEMCR: Unprivileged monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_SDME_Pos 20U /*!< DCB DEMCR: Secure DebugMonitor enable Position */
|
||||||
|
#define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos) /*!< DCB DEMCR: Secure DebugMonitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_REQ_Pos 19U /*!< DCB DEMCR: Monitor request Position */
|
||||||
|
#define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos) /*!< DCB DEMCR: Monitor request Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_STEP_Pos 18U /*!< DCB DEMCR: Monitor step Position */
|
||||||
|
#define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos) /*!< DCB DEMCR: Monitor step Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_PEND_Pos 17U /*!< DCB DEMCR: Monitor pend Position */
|
||||||
|
#define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos) /*!< DCB DEMCR: Monitor pend Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_EN_Pos 16U /*!< DCB DEMCR: Monitor enable Position */
|
||||||
|
#define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos) /*!< DCB DEMCR: Monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Pos 11U /*!< DCB DEMCR: Vector Catch SecureFault Position */
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos) /*!< DCB DEMCR: Vector Catch SecureFault Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Pos 9U /*!< DCB DEMCR: Vector Catch interrupt errors Position */
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos) /*!< DCB DEMCR: Vector Catch interrupt errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Pos 8U /*!< DCB DEMCR: Vector Catch BusFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos) /*!< DCB DEMCR: Vector Catch BusFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Pos 7U /*!< DCB DEMCR: Vector Catch state errors Position */
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos) /*!< DCB DEMCR: Vector Catch state errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Pos 6U /*!< DCB DEMCR: Vector Catch check errors Position */
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos) /*!< DCB DEMCR: Vector Catch check errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Pos 5U /*!< DCB DEMCR: Vector Catch NOCP errors Position */
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos) /*!< DCB DEMCR: Vector Catch NOCP errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Pos 4U /*!< DCB DEMCR: Vector Catch MemManage errors Position */
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos) /*!< DCB DEMCR: Vector Catch MemManage errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
@ -1954,7 +2200,9 @@ typedef struct
|
|||||||
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
@ -1966,7 +2214,9 @@ typedef struct
|
|||||||
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
@ -1983,7 +2233,9 @@ typedef struct
|
|||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
@ -1992,7 +2244,9 @@ typedef struct
|
|||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
@ -2006,6 +2260,15 @@ typedef struct
|
|||||||
/*@} */
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_register_aliases Backwards Compatibility Aliases
|
||||||
|
\brief Register alias definitions for backwards compatibility.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
#define ID_ADR (ID_AFR) /*!< SCB Auxiliary Feature Register */
|
||||||
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Hardware Abstraction Layer
|
* Hardware Abstraction Layer
|
||||||
@ -2064,7 +2327,7 @@ typedef struct
|
|||||||
|
|
||||||
/* Special LR values for Secure/Non-Secure call handling and exception handling */
|
/* Special LR values for Secure/Non-Secure call handling and exception handling */
|
||||||
|
|
||||||
/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */
|
/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */
|
||||||
#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */
|
#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */
|
||||||
|
|
||||||
/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */
|
/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */
|
||||||
@ -2079,7 +2342,7 @@ typedef struct
|
|||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
||||||
#else
|
#else
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2749,6 +3012,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm35p.h
|
* @file core_cm35p.h
|
||||||
* @brief CMSIS Cortex-M35P Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M35P Core Peripheral Access Layer Header File
|
||||||
* @version V1.0.0
|
* @version V1.1.3
|
||||||
* @date 12. November 2018
|
* @date 13. October 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2018-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -23,9 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __ICCARM__ )
|
#if defined ( __ICCARM__ )
|
||||||
#pragma system_include /* treat file as system include file for MISRA check */
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
#elif defined (__clang__)
|
#elif defined (__clang__)
|
||||||
#pragma clang system_header /* treat file as system include file */
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#elif defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic" /* disable pedantic warning due to unnamed structs/unions */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CORE_CM35P_H_GENERIC
|
#ifndef __CORE_CM35P_H_GENERIC
|
||||||
@ -248,6 +250,11 @@
|
|||||||
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
#warning "__DSP_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -512,7 +519,7 @@ typedef struct
|
|||||||
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
__IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
||||||
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
__IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
||||||
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
__IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
||||||
__IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
__IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
||||||
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
__IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
||||||
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
__IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
||||||
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
__IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */
|
||||||
@ -521,7 +528,10 @@ typedef struct
|
|||||||
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
__IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */
|
||||||
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
__IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
||||||
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
__IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */
|
||||||
uint32_t RESERVED3[92U];
|
uint32_t RESERVED7[21U];
|
||||||
|
__IOM uint32_t SFSR; /*!< Offset: 0x0E4 (R/W) Secure Fault Status Register */
|
||||||
|
__IOM uint32_t SFAR; /*!< Offset: 0x0E8 (R/W) Secure Fault Address Register */
|
||||||
|
uint32_t RESERVED3[69U];
|
||||||
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
__OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */
|
||||||
uint32_t RESERVED4[15U];
|
uint32_t RESERVED4[15U];
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */
|
||||||
@ -538,6 +548,7 @@ typedef struct
|
|||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
} SCB_Type;
|
} SCB_Type;
|
||||||
|
|
||||||
/* SCB CPUID Register Definitions */
|
/* SCB CPUID Register Definitions */
|
||||||
@ -738,22 +749,22 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1668,8 +1679,9 @@ typedef struct
|
|||||||
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
__IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */
|
||||||
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
__IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */
|
||||||
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
__IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */
|
||||||
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */
|
__IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and VFP Feature Register 0 */
|
||||||
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */
|
__IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and VFP Feature Register 1 */
|
||||||
|
__IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and VFP Feature Register 2 */
|
||||||
} FPU_Type;
|
} FPU_Type;
|
||||||
|
|
||||||
/* Floating-Point Context Control Register Definitions */
|
/* Floating-Point Context Control Register Definitions */
|
||||||
@ -1741,7 +1753,7 @@ typedef struct
|
|||||||
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */
|
||||||
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 0 Definitions */
|
/* Media and VFP Feature Register 0 Definitions */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */
|
||||||
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */
|
||||||
|
|
||||||
@ -1766,7 +1778,7 @@ typedef struct
|
|||||||
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */
|
||||||
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */
|
||||||
|
|
||||||
/* Media and FP Feature Register 1 Definitions */
|
/* Media and VFP Feature Register 1 Definitions */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */
|
||||||
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */
|
||||||
|
|
||||||
@ -1779,9 +1791,13 @@ typedef struct
|
|||||||
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */
|
||||||
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */
|
||||||
|
|
||||||
|
/* Media and VFP Feature Register 2 Definitions */
|
||||||
|
#define FPU_MVFR2_FPMisc_Pos 4U /*!< MVFR2: FPMisc bits Position */
|
||||||
|
#define FPU_MVFR2_FPMisc_Msk (0xFUL << FPU_MVFR2_FPMisc_Pos) /*!< MVFR2: FPMisc bits Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_FPU */
|
/*@} end of group CMSIS_FPU */
|
||||||
|
|
||||||
|
/* CoreDebug is deprecated. replaced by DCB (Debug Control Block) */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
\defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug)
|
||||||
@ -1790,7 +1806,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Structure type to access the Core Debug Register (CoreDebug).
|
\brief \deprecated Structure type to access the Core Debug Register (CoreDebug).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1798,124 +1814,354 @@ typedef struct
|
|||||||
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
uint32_t RESERVED4[1U];
|
uint32_t RESERVED0[1U];
|
||||||
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
} CoreDebug_Type;
|
} CoreDebug_Type;
|
||||||
|
|
||||||
/* Debug Halting Control and Status Register Definitions */
|
/* Debug Halting Control and Status Register Definitions */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */
|
#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< \deprecated CoreDebug DHCSR: DBGKEY Position */
|
||||||
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */
|
#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< \deprecated CoreDebug DHCSR: DBGKEY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */
|
#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESTART_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */
|
#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */
|
#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RESET_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Position */
|
||||||
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
|
#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< \deprecated CoreDebug DHCSR: S_RETIRE_ST Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */
|
#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Position */
|
||||||
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */
|
#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< \deprecated CoreDebug DHCSR: S_LOCKUP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */
|
#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< \deprecated CoreDebug DHCSR: S_SLEEP Position */
|
||||||
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */
|
#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< \deprecated CoreDebug DHCSR: S_SLEEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */
|
#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< \deprecated CoreDebug DHCSR: S_HALT Position */
|
||||||
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */
|
#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: S_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */
|
#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< \deprecated CoreDebug DHCSR: S_REGRDY Position */
|
||||||
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */
|
#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< \deprecated CoreDebug DHCSR: S_REGRDY Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Position */
|
||||||
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
|
#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< \deprecated CoreDebug DHCSR: C_SNAPSTALL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */
|
#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Position */
|
||||||
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */
|
#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< \deprecated CoreDebug DHCSR: C_MASKINTS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */
|
#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< \deprecated CoreDebug DHCSR: C_STEP Position */
|
||||||
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */
|
#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< \deprecated CoreDebug DHCSR: C_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */
|
#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< \deprecated CoreDebug DHCSR: C_HALT Position */
|
||||||
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */
|
#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< \deprecated CoreDebug DHCSR: C_HALT Mask */
|
||||||
|
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Position */
|
||||||
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
|
#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< \deprecated CoreDebug DHCSR: C_DEBUGEN Mask */
|
||||||
|
|
||||||
/* Debug Core Register Selector Register Definitions */
|
/* Debug Core Register Selector Register Definitions */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */
|
#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< \deprecated CoreDebug DCRSR: REGWnR Position */
|
||||||
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */
|
#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< \deprecated CoreDebug DCRSR: REGWnR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */
|
#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< \deprecated CoreDebug DCRSR: REGSEL Position */
|
||||||
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */
|
#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< \deprecated CoreDebug DCRSR: REGSEL Mask */
|
||||||
|
|
||||||
/* Debug Exception and Monitor Control Register Definitions */
|
/* Debug Exception and Monitor Control Register Definitions */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */
|
#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< \deprecated CoreDebug DEMCR: TRCENA Position */
|
||||||
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */
|
#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< \deprecated CoreDebug DEMCR: TRCENA Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */
|
#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< \deprecated CoreDebug DEMCR: MON_REQ Position */
|
||||||
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */
|
#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< \deprecated CoreDebug DEMCR: MON_REQ Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */
|
#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< \deprecated CoreDebug DEMCR: MON_STEP Position */
|
||||||
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */
|
#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< \deprecated CoreDebug DEMCR: MON_STEP Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */
|
#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< \deprecated CoreDebug DEMCR: MON_PEND Position */
|
||||||
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */
|
#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< \deprecated CoreDebug DEMCR: MON_PEND Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */
|
#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< \deprecated CoreDebug DEMCR: MON_EN Position */
|
||||||
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */
|
#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< \deprecated CoreDebug DEMCR: MON_EN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */
|
#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */
|
#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_HARDERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */
|
#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< \deprecated CoreDebug DEMCR: VC_INTERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */
|
#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_INTERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */
|
#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */
|
#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_BUSERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */
|
#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< \deprecated CoreDebug DEMCR: VC_STATERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */
|
#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_STATERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */
|
#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */
|
#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_CHKERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
|
#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_NOCPERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */
|
#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< \deprecated CoreDebug DEMCR: VC_MMERR Position */
|
||||||
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */
|
#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< \deprecated CoreDebug DEMCR: VC_MMERR Mask */
|
||||||
|
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */
|
#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Position */
|
||||||
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */
|
#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< \deprecated CoreDebug DEMCR: VC_CORERESET Mask */
|
||||||
|
|
||||||
/* Debug Authentication Control Register Definitions */
|
/* Debug Authentication Control Register Definitions */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: SPNIDENSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Position */
|
||||||
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< \deprecated CoreDebug DAUTHCTRL: INTSPIDEN Mask */
|
||||||
|
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Position */
|
||||||
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< \deprecated CoreDebug DAUTHCTRL: SPIDENSEL Mask */
|
||||||
|
|
||||||
/* Debug Security Control and Status Register Definitions */
|
/* Debug Security Control and Status Register Definitions */
|
||||||
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */
|
#define CoreDebug_DSCSR_CDS_Pos 16U /*!< \deprecated CoreDebug DSCSR: CDS Position */
|
||||||
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */
|
#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< \deprecated CoreDebug DSCSR: CDS Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */
|
#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< \deprecated CoreDebug DSCSR: SBRSEL Position */
|
||||||
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */
|
#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< \deprecated CoreDebug DSCSR: SBRSEL Mask */
|
||||||
|
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */
|
#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< \deprecated CoreDebug DSCSR: SBRSELEN Position */
|
||||||
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */
|
#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< \deprecated CoreDebug DSCSR: SBRSELEN Mask */
|
||||||
|
|
||||||
/*@} end of group CMSIS_CoreDebug */
|
/*@} end of group CMSIS_CoreDebug */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DCB Debug Control Block
|
||||||
|
\brief Type definitions for the Debug Control Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Control Block Registers (DCB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
||||||
|
__OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
||||||
|
__IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
||||||
|
__IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
||||||
|
uint32_t RESERVED0[1U];
|
||||||
|
__IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */
|
||||||
|
__IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */
|
||||||
|
} DCB_Type;
|
||||||
|
|
||||||
|
/* DHCSR, Debug Halting Control and Status Register Definitions */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Pos 16U /*!< DCB DHCSR: Debug key Position */
|
||||||
|
#define DCB_DHCSR_DBGKEY_Msk (0xFFFFUL << DCB_DHCSR_DBGKEY_Pos) /*!< DCB DHCSR: Debug key Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Pos 26U /*!< DCB DHCSR: Restart sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESTART_ST_Msk (0x1UL << DCB_DHCSR_S_RESTART_ST_Pos) /*!< DCB DHCSR: Restart sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Pos 25U /*!< DCB DHCSR: Reset sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RESET_ST_Msk (0x1UL << DCB_DHCSR_S_RESET_ST_Pos) /*!< DCB DHCSR: Reset sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Pos 24U /*!< DCB DHCSR: Retire sticky status Position */
|
||||||
|
#define DCB_DHCSR_S_RETIRE_ST_Msk (0x1UL << DCB_DHCSR_S_RETIRE_ST_Pos) /*!< DCB DHCSR: Retire sticky status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SDE_Pos 20U /*!< DCB DHCSR: Secure debug enabled Position */
|
||||||
|
#define DCB_DHCSR_S_SDE_Msk (0x1UL << DCB_DHCSR_S_SDE_Pos) /*!< DCB DHCSR: Secure debug enabled Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Pos 19U /*!< DCB DHCSR: Lockup status Position */
|
||||||
|
#define DCB_DHCSR_S_LOCKUP_Msk (0x1UL << DCB_DHCSR_S_LOCKUP_Pos) /*!< DCB DHCSR: Lockup status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Pos 18U /*!< DCB DHCSR: Sleeping status Position */
|
||||||
|
#define DCB_DHCSR_S_SLEEP_Msk (0x1UL << DCB_DHCSR_S_SLEEP_Pos) /*!< DCB DHCSR: Sleeping status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_HALT_Pos 17U /*!< DCB DHCSR: Halted status Position */
|
||||||
|
#define DCB_DHCSR_S_HALT_Msk (0x1UL << DCB_DHCSR_S_HALT_Pos) /*!< DCB DHCSR: Halted status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Pos 16U /*!< DCB DHCSR: Register ready status Position */
|
||||||
|
#define DCB_DHCSR_S_REGRDY_Msk (0x1UL << DCB_DHCSR_S_REGRDY_Pos) /*!< DCB DHCSR: Register ready status Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Pos 5U /*!< DCB DHCSR: Snap stall control Position */
|
||||||
|
#define DCB_DHCSR_C_SNAPSTALL_Msk (0x1UL << DCB_DHCSR_C_SNAPSTALL_Pos) /*!< DCB DHCSR: Snap stall control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Pos 3U /*!< DCB DHCSR: Mask interrupts control Position */
|
||||||
|
#define DCB_DHCSR_C_MASKINTS_Msk (0x1UL << DCB_DHCSR_C_MASKINTS_Pos) /*!< DCB DHCSR: Mask interrupts control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_STEP_Pos 2U /*!< DCB DHCSR: Step control Position */
|
||||||
|
#define DCB_DHCSR_C_STEP_Msk (0x1UL << DCB_DHCSR_C_STEP_Pos) /*!< DCB DHCSR: Step control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_HALT_Pos 1U /*!< DCB DHCSR: Halt control Position */
|
||||||
|
#define DCB_DHCSR_C_HALT_Msk (0x1UL << DCB_DHCSR_C_HALT_Pos) /*!< DCB DHCSR: Halt control Mask */
|
||||||
|
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Pos 0U /*!< DCB DHCSR: Debug enable control Position */
|
||||||
|
#define DCB_DHCSR_C_DEBUGEN_Msk (0x1UL /*<< DCB_DHCSR_C_DEBUGEN_Pos*/) /*!< DCB DHCSR: Debug enable control Mask */
|
||||||
|
|
||||||
|
/* DCRSR, Debug Core Register Select Register Definitions */
|
||||||
|
#define DCB_DCRSR_REGWnR_Pos 16U /*!< DCB DCRSR: Register write/not-read Position */
|
||||||
|
#define DCB_DCRSR_REGWnR_Msk (0x1UL << DCB_DCRSR_REGWnR_Pos) /*!< DCB DCRSR: Register write/not-read Mask */
|
||||||
|
|
||||||
|
#define DCB_DCRSR_REGSEL_Pos 0U /*!< DCB DCRSR: Register selector Position */
|
||||||
|
#define DCB_DCRSR_REGSEL_Msk (0x7FUL /*<< DCB_DCRSR_REGSEL_Pos*/) /*!< DCB DCRSR: Register selector Mask */
|
||||||
|
|
||||||
|
/* DCRDR, Debug Core Register Data Register Definitions */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Pos 0U /*!< DCB DCRDR: Data temporary buffer Position */
|
||||||
|
#define DCB_DCRDR_DBGTMP_Msk (0xFFFFFFFFUL /*<< DCB_DCRDR_DBGTMP_Pos*/) /*!< DCB DCRDR: Data temporary buffer Mask */
|
||||||
|
|
||||||
|
/* DEMCR, Debug Exception and Monitor Control Register Definitions */
|
||||||
|
#define DCB_DEMCR_TRCENA_Pos 24U /*!< DCB DEMCR: Trace enable Position */
|
||||||
|
#define DCB_DEMCR_TRCENA_Msk (0x1UL << DCB_DEMCR_TRCENA_Pos) /*!< DCB DEMCR: Trace enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Pos 23U /*!< DCB DEMCR: Monitor pend req key Position */
|
||||||
|
#define DCB_DEMCR_MONPRKEY_Msk (0x1UL << DCB_DEMCR_MONPRKEY_Pos) /*!< DCB DEMCR: Monitor pend req key Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_UMON_EN_Pos 21U /*!< DCB DEMCR: Unprivileged monitor enable Position */
|
||||||
|
#define DCB_DEMCR_UMON_EN_Msk (0x1UL << DCB_DEMCR_UMON_EN_Pos) /*!< DCB DEMCR: Unprivileged monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_SDME_Pos 20U /*!< DCB DEMCR: Secure DebugMonitor enable Position */
|
||||||
|
#define DCB_DEMCR_SDME_Msk (0x1UL << DCB_DEMCR_SDME_Pos) /*!< DCB DEMCR: Secure DebugMonitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_REQ_Pos 19U /*!< DCB DEMCR: Monitor request Position */
|
||||||
|
#define DCB_DEMCR_MON_REQ_Msk (0x1UL << DCB_DEMCR_MON_REQ_Pos) /*!< DCB DEMCR: Monitor request Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_STEP_Pos 18U /*!< DCB DEMCR: Monitor step Position */
|
||||||
|
#define DCB_DEMCR_MON_STEP_Msk (0x1UL << DCB_DEMCR_MON_STEP_Pos) /*!< DCB DEMCR: Monitor step Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_PEND_Pos 17U /*!< DCB DEMCR: Monitor pend Position */
|
||||||
|
#define DCB_DEMCR_MON_PEND_Msk (0x1UL << DCB_DEMCR_MON_PEND_Pos) /*!< DCB DEMCR: Monitor pend Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_MON_EN_Pos 16U /*!< DCB DEMCR: Monitor enable Position */
|
||||||
|
#define DCB_DEMCR_MON_EN_Msk (0x1UL << DCB_DEMCR_MON_EN_Pos) /*!< DCB DEMCR: Monitor enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Pos 11U /*!< DCB DEMCR: Vector Catch SecureFault Position */
|
||||||
|
#define DCB_DEMCR_VC_SFERR_Msk (0x1UL << DCB_DEMCR_VC_SFERR_Pos) /*!< DCB DEMCR: Vector Catch SecureFault Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Pos 10U /*!< DCB DEMCR: Vector Catch HardFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_HARDERR_Msk (0x1UL << DCB_DEMCR_VC_HARDERR_Pos) /*!< DCB DEMCR: Vector Catch HardFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Pos 9U /*!< DCB DEMCR: Vector Catch interrupt errors Position */
|
||||||
|
#define DCB_DEMCR_VC_INTERR_Msk (0x1UL << DCB_DEMCR_VC_INTERR_Pos) /*!< DCB DEMCR: Vector Catch interrupt errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Pos 8U /*!< DCB DEMCR: Vector Catch BusFault errors Position */
|
||||||
|
#define DCB_DEMCR_VC_BUSERR_Msk (0x1UL << DCB_DEMCR_VC_BUSERR_Pos) /*!< DCB DEMCR: Vector Catch BusFault errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Pos 7U /*!< DCB DEMCR: Vector Catch state errors Position */
|
||||||
|
#define DCB_DEMCR_VC_STATERR_Msk (0x1UL << DCB_DEMCR_VC_STATERR_Pos) /*!< DCB DEMCR: Vector Catch state errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Pos 6U /*!< DCB DEMCR: Vector Catch check errors Position */
|
||||||
|
#define DCB_DEMCR_VC_CHKERR_Msk (0x1UL << DCB_DEMCR_VC_CHKERR_Pos) /*!< DCB DEMCR: Vector Catch check errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Pos 5U /*!< DCB DEMCR: Vector Catch NOCP errors Position */
|
||||||
|
#define DCB_DEMCR_VC_NOCPERR_Msk (0x1UL << DCB_DEMCR_VC_NOCPERR_Pos) /*!< DCB DEMCR: Vector Catch NOCP errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Pos 4U /*!< DCB DEMCR: Vector Catch MemManage errors Position */
|
||||||
|
#define DCB_DEMCR_VC_MMERR_Msk (0x1UL << DCB_DEMCR_VC_MMERR_Pos) /*!< DCB DEMCR: Vector Catch MemManage errors Mask */
|
||||||
|
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Pos 0U /*!< DCB DEMCR: Vector Catch Core reset Position */
|
||||||
|
#define DCB_DEMCR_VC_CORERESET_Msk (0x1UL /*<< DCB_DEMCR_VC_CORERESET_Pos*/) /*!< DCB DEMCR: Vector Catch Core reset Mask */
|
||||||
|
|
||||||
|
/* DAUTHCTRL, Debug Authentication Control Register Definitions */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPNIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPNIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure non-invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPNIDENSEL_Msk (0x1UL << DCB_DAUTHCTRL_SPNIDENSEL_Pos) /*!< DCB DAUTHCTRL: Secure non-invasive debug enable select Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Position */
|
||||||
|
#define DCB_DAUTHCTRL_INTSPIDEN_Msk (0x1UL << DCB_DAUTHCTRL_INTSPIDEN_Pos) /*!< DCB DAUTHCTRL: Internal Secure invasive debug enable Mask */
|
||||||
|
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< DCB DAUTHCTRL: Secure invasive debug enable select Position */
|
||||||
|
#define DCB_DAUTHCTRL_SPIDENSEL_Msk (0x1UL /*<< DCB_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< DCB DAUTHCTRL: Secure invasive debug enable select Mask */
|
||||||
|
|
||||||
|
/* DSCSR, Debug Security Control and Status Register Definitions */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Pos 17U /*!< DCB DSCSR: CDS write-enable key Position */
|
||||||
|
#define DCB_DSCSR_CDSKEY_Msk (0x1UL << DCB_DSCSR_CDSKEY_Pos) /*!< DCB DSCSR: CDS write-enable key Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_CDS_Pos 16U /*!< DCB DSCSR: Current domain Secure Position */
|
||||||
|
#define DCB_DSCSR_CDS_Msk (0x1UL << DCB_DSCSR_CDS_Pos) /*!< DCB DSCSR: Current domain Secure Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSEL_Pos 1U /*!< DCB DSCSR: Secure banked register select Position */
|
||||||
|
#define DCB_DSCSR_SBRSEL_Msk (0x1UL << DCB_DSCSR_SBRSEL_Pos) /*!< DCB DSCSR: Secure banked register select Mask */
|
||||||
|
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Pos 0U /*!< DCB DSCSR: Secure banked register select enable Position */
|
||||||
|
#define DCB_DSCSR_SBRSELEN_Msk (0x1UL /*<< DCB_DSCSR_SBRSELEN_Pos*/) /*!< DCB DSCSR: Secure banked register select enable Mask */
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DCB */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_DIB Debug Identification Block
|
||||||
|
\brief Type definitions for the Debug Identification Block Registers
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Structure type to access the Debug Identification Block Registers (DIB).
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__OM uint32_t DLAR; /*!< Offset: 0x000 ( /W) SCS Software Lock Access Register */
|
||||||
|
__IM uint32_t DLSR; /*!< Offset: 0x004 (R/ ) SCS Software Lock Status Register */
|
||||||
|
__IM uint32_t DAUTHSTATUS; /*!< Offset: 0x008 (R/ ) Debug Authentication Status Register */
|
||||||
|
__IM uint32_t DDEVARCH; /*!< Offset: 0x00C (R/ ) SCS Device Architecture Register */
|
||||||
|
__IM uint32_t DDEVTYPE; /*!< Offset: 0x010 (R/ ) SCS Device Type Register */
|
||||||
|
} DIB_Type;
|
||||||
|
|
||||||
|
/* DLAR, SCS Software Lock Access Register Definitions */
|
||||||
|
#define DIB_DLAR_KEY_Pos 0U /*!< DIB DLAR: KEY Position */
|
||||||
|
#define DIB_DLAR_KEY_Msk (0xFFFFFFFFUL /*<< DIB_DLAR_KEY_Pos */) /*!< DIB DLAR: KEY Mask */
|
||||||
|
|
||||||
|
/* DLSR, SCS Software Lock Status Register Definitions */
|
||||||
|
#define DIB_DLSR_nTT_Pos 2U /*!< DIB DLSR: Not thirty-two bit Position */
|
||||||
|
#define DIB_DLSR_nTT_Msk (0x1UL << DIB_DLSR_nTT_Pos ) /*!< DIB DLSR: Not thirty-two bit Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLK_Pos 1U /*!< DIB DLSR: Software Lock status Position */
|
||||||
|
#define DIB_DLSR_SLK_Msk (0x1UL << DIB_DLSR_SLK_Pos ) /*!< DIB DLSR: Software Lock status Mask */
|
||||||
|
|
||||||
|
#define DIB_DLSR_SLI_Pos 0U /*!< DIB DLSR: Software Lock implemented Position */
|
||||||
|
#define DIB_DLSR_SLI_Msk (0x1UL /*<< DIB_DLSR_SLI_Pos*/) /*!< DIB DLSR: Software Lock implemented Mask */
|
||||||
|
|
||||||
|
/* DAUTHSTATUS, Debug Authentication Status Register Definitions */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Pos 6U /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SNID_Msk (0x3UL << DIB_DAUTHSTATUS_SNID_Pos ) /*!< DIB DAUTHSTATUS: Secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Pos 4U /*!< DIB DAUTHSTATUS: Secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_SID_Msk (0x3UL << DIB_DAUTHSTATUS_SID_Pos ) /*!< DIB DAUTHSTATUS: Secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Pos 2U /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSNID_Msk (0x3UL << DIB_DAUTHSTATUS_NSNID_Pos ) /*!< DIB DAUTHSTATUS: Non-secure Non-invasive Debug Mask */
|
||||||
|
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Pos 0U /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Position */
|
||||||
|
#define DIB_DAUTHSTATUS_NSID_Msk (0x3UL /*<< DIB_DAUTHSTATUS_NSID_Pos*/) /*!< DIB DAUTHSTATUS: Non-secure Invasive Debug Mask */
|
||||||
|
|
||||||
|
/* DDEVARCH, SCS Device Architecture Register Definitions */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Pos 21U /*!< DIB DDEVARCH: Architect Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHITECT_Msk (0x7FFUL << DIB_DDEVARCH_ARCHITECT_Pos ) /*!< DIB DDEVARCH: Architect Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Pos 20U /*!< DIB DDEVARCH: DEVARCH Present Position */
|
||||||
|
#define DIB_DDEVARCH_PRESENT_Msk (0x1FUL << DIB_DDEVARCH_PRESENT_Pos ) /*!< DIB DDEVARCH: DEVARCH Present Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_REVISION_Pos 16U /*!< DIB DDEVARCH: Revision Position */
|
||||||
|
#define DIB_DDEVARCH_REVISION_Msk (0xFUL << DIB_DDEVARCH_REVISION_Pos ) /*!< DIB DDEVARCH: Revision Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Pos 12U /*!< DIB DDEVARCH: Architecture Version Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHVER_Msk (0xFUL << DIB_DDEVARCH_ARCHVER_Pos ) /*!< DIB DDEVARCH: Architecture Version Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Pos 0U /*!< DIB DDEVARCH: Architecture Part Position */
|
||||||
|
#define DIB_DDEVARCH_ARCHPART_Msk (0xFFFUL /*<< DIB_DDEVARCH_ARCHPART_Pos*/) /*!< DIB DDEVARCH: Architecture Part Mask */
|
||||||
|
|
||||||
|
/* DDEVTYPE, SCS Device Type Register Definitions */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Pos 4U /*!< DIB DDEVTYPE: Sub-type Position */
|
||||||
|
#define DIB_DDEVTYPE_SUB_Msk (0xFUL << DIB_DDEVTYPE_SUB_Pos ) /*!< DIB DDEVTYPE: Sub-type Mask */
|
||||||
|
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Pos 0U /*!< DIB DDEVTYPE: Major type Position */
|
||||||
|
#define DIB_DDEVTYPE_MAJOR_Msk (0xFUL /*<< DIB_DDEVTYPE_MAJOR_Pos*/) /*!< DIB DDEVTYPE: Major type Mask */
|
||||||
|
|
||||||
|
|
||||||
|
/*@} end of group CMSIS_DIB */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_core_register
|
\ingroup CMSIS_core_register
|
||||||
\defgroup CMSIS_core_bitfield Core register bit field macros
|
\defgroup CMSIS_core_bitfield Core register bit field macros
|
||||||
@ -1954,7 +2200,9 @@ typedef struct
|
|||||||
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
||||||
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
||||||
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
||||||
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
#define CoreDebug_BASE (0xE000EDF0UL) /*!< \deprecated Core Debug Base Address */
|
||||||
|
#define DCB_BASE (0xE000EDF0UL) /*!< DCB Base Address */
|
||||||
|
#define DIB_BASE (0xE000EFB0UL) /*!< DIB Base Address */
|
||||||
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
||||||
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
||||||
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
||||||
@ -1966,7 +2214,9 @@ typedef struct
|
|||||||
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
||||||
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
||||||
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
||||||
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */
|
#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< \deprecated Core Debug configuration struct */
|
||||||
|
#define DCB ((DCB_Type *) DCB_BASE ) /*!< DCB configuration struct */
|
||||||
|
#define DIB ((DIB_Type *) DIB_BASE ) /*!< DIB configuration struct */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
#define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */
|
||||||
@ -1983,7 +2233,9 @@ typedef struct
|
|||||||
|
|
||||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
#define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */
|
||||||
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */
|
#define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< \deprecated Core Debug Base Address (non-secure address space) */
|
||||||
|
#define DCB_BASE_NS (0xE002EDF0UL) /*!< DCB Base Address (non-secure address space) */
|
||||||
|
#define DIB_BASE_NS (0xE002EFB0UL) /*!< DIB Base Address (non-secure address space) */
|
||||||
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
#define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */
|
||||||
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
#define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */
|
||||||
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
#define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */
|
||||||
@ -1992,7 +2244,9 @@ typedef struct
|
|||||||
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
#define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */
|
||||||
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
#define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */
|
||||||
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
#define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */
|
||||||
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */
|
#define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< \deprecated Core Debug configuration struct (non-secure address space) */
|
||||||
|
#define DCB_NS ((DCB_Type *) DCB_BASE_NS ) /*!< DCB configuration struct (non-secure address space) */
|
||||||
|
#define DIB_NS ((DIB_Type *) DIB_BASE_NS ) /*!< DIB configuration struct (non-secure address space) */
|
||||||
|
|
||||||
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U)
|
||||||
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
#define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */
|
||||||
@ -2006,6 +2260,15 @@ typedef struct
|
|||||||
/*@} */
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_core_register
|
||||||
|
\defgroup CMSIS_register_aliases Backwards Compatibility Aliases
|
||||||
|
\brief Register alias definitions for backwards compatibility.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
#define ID_ADR (ID_AFR) /*!< SCB Auxiliary Feature Register */
|
||||||
|
/*@} */
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Hardware Abstraction Layer
|
* Hardware Abstraction Layer
|
||||||
@ -2064,7 +2327,7 @@ typedef struct
|
|||||||
|
|
||||||
/* Special LR values for Secure/Non-Secure call handling and exception handling */
|
/* Special LR values for Secure/Non-Secure call handling and exception handling */
|
||||||
|
|
||||||
/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */
|
/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */
|
||||||
#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */
|
#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */
|
||||||
|
|
||||||
/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */
|
/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */
|
||||||
@ -2079,7 +2342,7 @@ typedef struct
|
|||||||
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */
|
||||||
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */
|
||||||
#else
|
#else
|
||||||
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2749,6 +3012,110 @@ __STATIC_INLINE void TZ_SAU_Disable(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Control function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DCBFunctions Debug Control Functions
|
||||||
|
\brief Functions that access the Debug Control Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register
|
||||||
|
\details writes to Debug Authentication Control register.
|
||||||
|
\param [in] value value to be writen.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void DCB_SetAuthCtrl(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register
|
||||||
|
\details Reads Debug Authentication Control register.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DCB_GetAuthCtrl(void)
|
||||||
|
{
|
||||||
|
return (DCB->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Set Debug Authentication Control Register (non-secure)
|
||||||
|
\details writes to non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\param [in] value value to be writen
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_DCB_SetAuthCtrl_NS(uint32_t value)
|
||||||
|
{
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
DCB_NS->DAUTHCTRL = value;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Control Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Control register when in secure state.
|
||||||
|
\return Debug Authentication Control Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DCB_GetAuthCtrl_NS(void)
|
||||||
|
{
|
||||||
|
return (DCB_NS->DAUTHCTRL);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ################################## Debug Identification function ############################################ */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_DIBFunctions Debug Identification Functions
|
||||||
|
\brief Functions that access the Debug Identification Block.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register
|
||||||
|
\details Reads Debug Authentication Status register.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t DIB_GetAuthStatus(void)
|
||||||
|
{
|
||||||
|
return (DIB->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
/**
|
||||||
|
\brief Get Debug Authentication Status Register (non-secure)
|
||||||
|
\details Reads non-secure Debug Authentication Status register when in secure state.
|
||||||
|
\return Debug Authentication Status Register.
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t TZ_DIB_GetAuthStatus_NS(void)
|
||||||
|
{
|
||||||
|
return (DIB_NS->DAUTHSTATUS);
|
||||||
|
}
|
||||||
|
#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_DCBFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
/**
|
/**
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm4.h
|
* @file core_cm4.h
|
||||||
* @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File
|
||||||
* @version V5.1.0
|
* @version V5.1.2
|
||||||
* @date 13. March 2019
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -194,6 +194,11 @@
|
|||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -618,22 +623,22 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1905,8 +1910,8 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
/* ARM Application Note 321 states that the M4 does not require the architectural barrier */
|
/* ARM Application Note 321 states that the M4 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1921,8 +1926,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
4817
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_cm55.h
Normal file
4817
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_cm55.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_cm7.h
|
* @file core_cm7.h
|
||||||
* @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File
|
* @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File
|
||||||
* @version V5.1.1
|
* @version V5.1.6
|
||||||
* @date 28. March 2019
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -209,6 +209,11 @@
|
|||||||
#warning "__DTCM_PRESENT not defined in device header file; using default!"
|
#warning "__DTCM_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -496,7 +501,8 @@ typedef struct
|
|||||||
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
__OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */
|
||||||
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
__OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */
|
||||||
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
__OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */
|
||||||
uint32_t RESERVED7[6U];
|
__OM uint32_t BPIALL; /*!< Offset: 0x278 ( /W) Branch Predictor Invalidate All */
|
||||||
|
uint32_t RESERVED7[5U];
|
||||||
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
__IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */
|
||||||
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
__IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */
|
||||||
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
__IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */
|
||||||
@ -671,22 +677,22 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
#define SCB_CFSR_MLSPERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */
|
||||||
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -870,21 +876,24 @@ typedef struct
|
|||||||
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */
|
||||||
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */
|
||||||
|
|
||||||
#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */
|
#define SCB_CACR_ECCEN_Pos 1U /*!< \deprecated SCB CACR: ECCEN Position */
|
||||||
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */
|
#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< \deprecated SCB CACR: ECCEN Mask */
|
||||||
|
|
||||||
|
#define SCB_CACR_ECCDIS_Pos 1U /*!< SCB CACR: ECCDIS Position */
|
||||||
|
#define SCB_CACR_ECCDIS_Msk (1UL << SCB_CACR_ECCDIS_Pos) /*!< SCB CACR: ECCDIS Mask */
|
||||||
|
|
||||||
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */
|
||||||
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */
|
||||||
|
|
||||||
/* AHBS Control Register Definitions */
|
/* AHBS Control Register Definitions */
|
||||||
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */
|
||||||
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBSCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */
|
||||||
|
|
||||||
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */
|
||||||
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBSCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */
|
||||||
|
|
||||||
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/
|
||||||
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBSCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */
|
||||||
|
|
||||||
/* Auxiliary Bus Fault Status Register Definitions */
|
/* Auxiliary Bus Fault Status Register Definitions */
|
||||||
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/
|
||||||
@ -2128,8 +2137,8 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
__DSB();
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2144,8 +2153,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2218,380 +2227,12 @@ __STATIC_INLINE uint32_t SCB_GetFPUType(void)
|
|||||||
/*@} end of CMSIS_Core_FpuFunctions */
|
/*@} end of CMSIS_Core_FpuFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ########################## Cache functions #################################### */
|
/* ########################## Cache functions #################################### */
|
||||||
/**
|
|
||||||
\ingroup CMSIS_Core_FunctionInterface
|
|
||||||
\defgroup CMSIS_Core_CacheFunctions Cache Functions
|
|
||||||
\brief Functions that configure Instruction and Data cache.
|
|
||||||
@{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Cache Size ID Register Macros */
|
|
||||||
#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
|
|
||||||
#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos )
|
|
||||||
|
|
||||||
#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
|
||||||
#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable I-Cache
|
|
||||||
\details Turns on I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_EnableICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable I-Cache
|
|
||||||
\details Turns off I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_DisableICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */
|
|
||||||
SCB->ICIALLU = 0UL; /* invalidate I-Cache */
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Invalidate I-Cache
|
|
||||||
\details Invalidates I-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_InvalidateICache (void)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
SCB->ICIALLU = 0UL;
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief I-Cache Invalidate by address
|
|
||||||
\details Invalidates I-Cache for the given address.
|
|
||||||
I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
|
||||||
I-Cache memory blocks which are part of given address + given size are invalidated.
|
|
||||||
\param[in] addr address
|
|
||||||
\param[in] isize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (void *addr, int32_t isize)
|
|
||||||
{
|
|
||||||
#if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
|
|
||||||
if ( isize > 0 ) {
|
|
||||||
int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U));
|
|
||||||
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */;
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
do {
|
|
||||||
SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
|
||||||
op_addr += __SCB_ICACHE_LINE_SIZE;
|
|
||||||
op_size -= __SCB_ICACHE_LINE_SIZE;
|
|
||||||
} while ( op_size > 0 );
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Enable D-Cache
|
|
||||||
\details Turns on D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_EnableDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Disable D-Cache
|
|
||||||
\details Turns off D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_DisableDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean & invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Invalidate D-Cache
|
|
||||||
\details Invalidates D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_InvalidateDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Clean D-Cache
|
|
||||||
\details Cleans D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_CleanDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Clean & Invalidate D-Cache
|
|
||||||
\details Cleans and Invalidates D-Cache
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
uint32_t ccsidr;
|
|
||||||
uint32_t sets;
|
|
||||||
uint32_t ways;
|
|
||||||
|
|
||||||
SCB->CSSELR = 0U; /* select Level 1 data cache */
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
ccsidr = SCB->CCSIDR;
|
|
||||||
|
|
||||||
/* clean & invalidate D-Cache */
|
|
||||||
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
|
|
||||||
do {
|
|
||||||
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
|
|
||||||
do {
|
|
||||||
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
|
|
||||||
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
|
|
||||||
#if defined ( __CC_ARM )
|
|
||||||
__schedule_barrier();
|
|
||||||
#endif
|
|
||||||
} while (ways-- != 0U);
|
|
||||||
} while(sets-- != 0U);
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Invalidate by address
|
|
||||||
\details Invalidates D-Cache for the given address.
|
|
||||||
D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
|
||||||
D-Cache memory blocks which are part of given address + given size are invalidated.
|
|
||||||
\param[in] addr address
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (void *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
if ( dsize > 0 ) {
|
|
||||||
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
|
||||||
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
do {
|
|
||||||
SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
|
||||||
op_addr += __SCB_DCACHE_LINE_SIZE;
|
|
||||||
op_size -= __SCB_DCACHE_LINE_SIZE;
|
|
||||||
} while ( op_size > 0 );
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Clean by address
|
|
||||||
\details Cleans D-Cache for the given address
|
|
||||||
D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity.
|
|
||||||
D-Cache memory blocks which are part of given address + given size are cleaned.
|
|
||||||
\param[in] addr address
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
if ( dsize > 0 ) {
|
|
||||||
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
|
||||||
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
do {
|
|
||||||
SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
|
||||||
op_addr += __SCB_DCACHE_LINE_SIZE;
|
|
||||||
op_size -= __SCB_DCACHE_LINE_SIZE;
|
|
||||||
} while ( op_size > 0 );
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\brief D-Cache Clean and Invalidate by address
|
|
||||||
\details Cleans and invalidates D_Cache for the given address
|
|
||||||
D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity.
|
|
||||||
D-Cache memory blocks which are part of given address + given size are cleaned and invalidated.
|
|
||||||
\param[in] addr address (aligned to 32-byte boundary)
|
|
||||||
\param[in] dsize size of memory block (in number of bytes)
|
|
||||||
*/
|
|
||||||
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
|
|
||||||
{
|
|
||||||
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
|
|
||||||
if ( dsize > 0 ) {
|
|
||||||
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
|
|
||||||
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
|
|
||||||
do {
|
|
||||||
SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
|
|
||||||
op_addr += __SCB_DCACHE_LINE_SIZE;
|
|
||||||
op_size -= __SCB_DCACHE_LINE_SIZE;
|
|
||||||
} while ( op_size > 0 );
|
|
||||||
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@} end of CMSIS_Core_CacheFunctions */
|
|
||||||
|
|
||||||
|
#if ((defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)) || \
|
||||||
|
(defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)))
|
||||||
|
#include "cachel1_armv7.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ################################## SysTick function ############################################ */
|
/* ################################## SysTick function ############################################ */
|
||||||
|
4672
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_cm85.h
Normal file
4672
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_cm85.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_sc000.h
|
* @file core_sc000.h
|
||||||
* @brief CMSIS SC000 Core Peripheral Access Layer Header File
|
* @brief CMSIS SC000 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.6
|
* @version V5.0.7
|
||||||
* @date 12. November 2018
|
* @date 27. March 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
#include "cmsis_version.h"
|
#include "cmsis_version.h"
|
||||||
|
|
||||||
/* CMSIS SC000 definitions */
|
/* CMSIS SC000 definitions */
|
||||||
#define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
#define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
||||||
#define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
#define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
||||||
#define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \
|
#define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
@ -142,6 +142,11 @@
|
|||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 0U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 2U
|
#define __NVIC_PRIO_BITS 2U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file core_sc300.h
|
* @file core_sc300.h
|
||||||
* @brief CMSIS SC300 Core Peripheral Access Layer Header File
|
* @brief CMSIS SC300 Core Peripheral Access Layer Header File
|
||||||
* @version V5.0.8
|
* @version V5.0.10
|
||||||
* @date 31. May 2019
|
* @date 04. June 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
#include "cmsis_version.h"
|
#include "cmsis_version.h"
|
||||||
|
|
||||||
/* CMSIS SC300 definitions */
|
/* CMSIS SC300 definitions */
|
||||||
#define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
#define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */
|
||||||
#define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
#define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */
|
||||||
#define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \
|
#define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \
|
||||||
@ -142,6 +142,11 @@
|
|||||||
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
#warning "__MPU_PRESENT not defined in device header file; using default!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VTOR_PRESENT
|
||||||
|
#define __VTOR_PRESENT 1U
|
||||||
|
#warning "__VTOR_PRESENT not defined in device header file; using default!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NVIC_PRIO_BITS
|
#ifndef __NVIC_PRIO_BITS
|
||||||
#define __NVIC_PRIO_BITS 3U
|
#define __NVIC_PRIO_BITS 3U
|
||||||
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
#warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
|
||||||
@ -557,19 +562,19 @@ typedef struct
|
|||||||
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
|
||||||
|
|
||||||
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
#define SCB_CFSR_MMARVALID_Pos (SCB_CFSR_MEMFAULTSR_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */
|
||||||
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
#define SCB_CFSR_MSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */
|
||||||
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
#define SCB_CFSR_MUNSTKERR_Pos (SCB_CFSR_MEMFAULTSR_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */
|
||||||
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
#define SCB_CFSR_DACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */
|
||||||
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */
|
||||||
|
|
||||||
#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
#define SCB_CFSR_IACCVIOL_Pos (SCB_CFSR_MEMFAULTSR_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */
|
||||||
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */
|
||||||
|
|
||||||
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
/* BusFault Status Register (part of SCB Configurable Fault Status Register) */
|
||||||
@ -1712,8 +1717,8 @@ __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGr
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector;
|
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
|
||||||
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
/* ARM Application Note 321 states that the M3 does not require the architectural barrier */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1728,8 +1733,8 @@ __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn)
|
||||||
{
|
{
|
||||||
uint32_t vectors = (uint32_t )SCB->VTOR;
|
uint32_t *vectors = (uint32_t *)SCB->VTOR;
|
||||||
return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4));
|
return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
3592
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_starmc1.h
Normal file
3592
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/core_starmc1.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* @file mpu_armv7.h
|
* @file mpu_armv7.h
|
||||||
* @brief CMSIS MPU API for Armv7-M MPU
|
* @brief CMSIS MPU API for Armv7-M MPU
|
||||||
* @version V5.1.0
|
* @version V5.1.2
|
||||||
* @date 08. March 2019
|
* @date 25. May 2020
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2017-2020 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -154,7 +154,7 @@
|
|||||||
* \param InnerCp Configures the inner cache policy.
|
* \param InnerCp Configures the inner cache policy.
|
||||||
* \param IsShareable Configures the memory as shareable or non-shareable.
|
* \param IsShareable Configures the memory as shareable or non-shareable.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) & 2U), ((InnerCp) & 1U))
|
#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) >> 1U), ((InnerCp) & 1U))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU Memory Access Attribute non-cacheable policy.
|
* MPU Memory Access Attribute non-cacheable policy.
|
||||||
@ -190,6 +190,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
|
__DMB();
|
||||||
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
@ -207,6 +208,8 @@ __STATIC_INLINE void ARM_MPU_Disable(void)
|
|||||||
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Clear and disable the given MPU region.
|
/** Clear and disable the given MPU region.
|
||||||
@ -220,7 +223,7 @@ __STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr)
|
|||||||
|
|
||||||
/** Configure an MPU region.
|
/** Configure an MPU region.
|
||||||
* \param rbar Value for RBAR register.
|
* \param rbar Value for RBAR register.
|
||||||
* \param rsar Value for RSAR register.
|
* \param rasr Value for RASR register.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
||||||
{
|
{
|
||||||
@ -231,7 +234,7 @@ __STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)
|
|||||||
/** Configure the given MPU region.
|
/** Configure the given MPU region.
|
||||||
* \param rnr Region number to be configured.
|
* \param rnr Region number to be configured.
|
||||||
* \param rbar Value for RBAR register.
|
* \param rbar Value for RBAR register.
|
||||||
* \param rsar Value for RSAR register.
|
* \param rasr Value for RASR register.
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr)
|
__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr)
|
||||||
{
|
{
|
||||||
@ -240,7 +243,7 @@ __STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t r
|
|||||||
MPU->RASR = rasr;
|
MPU->RASR = rasr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Memcopy with strictly ordered memory access, e.g. for register targets.
|
/** Memcpy with strictly ordered memory access, e.g. used by code in ARM_MPU_Load().
|
||||||
* \param dst Destination data is copied to.
|
* \param dst Destination data is copied to.
|
||||||
* \param src Source data is copied from.
|
* \param src Source data is copied from.
|
||||||
* \param len Amount of data words to be copied.
|
* \param len Amount of data words to be copied.
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* @file mpu_armv8.h
|
* @file mpu_armv8.h
|
||||||
* @brief CMSIS MPU API for Armv8-M and Armv8.1-M MPU
|
* @brief CMSIS MPU API for Armv8-M and Armv8.1-M MPU
|
||||||
* @version V5.1.0
|
* @version V5.1.3
|
||||||
* @date 08. March 2019
|
* @date 03. February 2021
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 Arm Limited. All rights reserved.
|
* Copyright (c) 2017-2021 Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@ -44,7 +44,7 @@
|
|||||||
* \param WA Write Allocation: Set to 1 to use cache allocation on write miss.
|
* \param WA Write Allocation: Set to 1 to use cache allocation on write miss.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \
|
#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \
|
||||||
(((NT & 1U) << 3U) | ((WB & 1U) << 2U) | ((RA & 1U) << 1U) | (WA & 1U))
|
((((NT) & 1U) << 3U) | (((WB) & 1U) << 2U) | (((RA) & 1U) << 1U) | ((WA) & 1U))
|
||||||
|
|
||||||
/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */
|
/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */
|
||||||
#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U)
|
#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U)
|
||||||
@ -62,7 +62,7 @@
|
|||||||
* \param O Outer memory attributes
|
* \param O Outer memory attributes
|
||||||
* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes
|
* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_ATTR(O, I) (((O & 0xFU) << 4U) | (((O & 0xFU) != 0U) ? (I & 0xFU) : ((I & 0x3U) << 2U)))
|
#define ARM_MPU_ATTR(O, I) ((((O) & 0xFU) << 4U) | ((((O) & 0xFU) != 0U) ? ((I) & 0xFU) : (((I) & 0x3U) << 2U)))
|
||||||
|
|
||||||
/** \brief Normal memory non-shareable */
|
/** \brief Normal memory non-shareable */
|
||||||
#define ARM_MPU_SH_NON (0U)
|
#define ARM_MPU_SH_NON (0U)
|
||||||
@ -77,7 +77,7 @@
|
|||||||
* \param RO Read-Only: Set to 1 for read-only memory.
|
* \param RO Read-Only: Set to 1 for read-only memory.
|
||||||
* \param NP Non-Privileged: Set to 1 for non-privileged memory.
|
* \param NP Non-Privileged: Set to 1 for non-privileged memory.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_AP_(RO, NP) (((RO & 1U) << 1U) | (NP & 1U))
|
#define ARM_MPU_AP_(RO, NP) ((((RO) & 1U) << 1U) | ((NP) & 1U))
|
||||||
|
|
||||||
/** \brief Region Base Address Register value
|
/** \brief Region Base Address Register value
|
||||||
* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned.
|
* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned.
|
||||||
@ -87,18 +87,18 @@
|
|||||||
* \oaram XN eXecute Never: Set to 1 for a non-executable memory region.
|
* \oaram XN eXecute Never: Set to 1 for a non-executable memory region.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
|
#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
|
||||||
((BASE & MPU_RBAR_BASE_Msk) | \
|
(((BASE) & MPU_RBAR_BASE_Msk) | \
|
||||||
((SH << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \
|
(((SH) << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \
|
||||||
((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \
|
((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \
|
||||||
((XN << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk))
|
(((XN) << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk))
|
||||||
|
|
||||||
/** \brief Region Limit Address Register value
|
/** \brief Region Limit Address Register value
|
||||||
* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended.
|
* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended.
|
||||||
* \param IDX The attribute index to be associated with this memory region.
|
* \param IDX The attribute index to be associated with this memory region.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_RLAR(LIMIT, IDX) \
|
#define ARM_MPU_RLAR(LIMIT, IDX) \
|
||||||
((LIMIT & MPU_RLAR_LIMIT_Msk) | \
|
(((LIMIT) & MPU_RLAR_LIMIT_Msk) | \
|
||||||
((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
(((IDX) << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
||||||
(MPU_RLAR_EN_Msk))
|
(MPU_RLAR_EN_Msk))
|
||||||
|
|
||||||
#if defined(MPU_RLAR_PXN_Pos)
|
#if defined(MPU_RLAR_PXN_Pos)
|
||||||
@ -109,9 +109,9 @@
|
|||||||
* \param IDX The attribute index to be associated with this memory region.
|
* \param IDX The attribute index to be associated with this memory region.
|
||||||
*/
|
*/
|
||||||
#define ARM_MPU_RLAR_PXN(LIMIT, PXN, IDX) \
|
#define ARM_MPU_RLAR_PXN(LIMIT, PXN, IDX) \
|
||||||
((LIMIT & MPU_RLAR_LIMIT_Msk) | \
|
(((LIMIT) & MPU_RLAR_LIMIT_Msk) | \
|
||||||
((PXN << MPU_RLAR_PXN_Pos) & MPU_RLAR_PXN_Msk) | \
|
(((PXN) << MPU_RLAR_PXN_Pos) & MPU_RLAR_PXN_Msk) | \
|
||||||
((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
(((IDX) << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \
|
||||||
(MPU_RLAR_EN_Msk))
|
(MPU_RLAR_EN_Msk))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -129,6 +129,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
|
__DMB();
|
||||||
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
@ -146,6 +147,8 @@ __STATIC_INLINE void ARM_MPU_Disable(void)
|
|||||||
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MPU_NS
|
#ifdef MPU_NS
|
||||||
@ -154,6 +157,7 @@ __STATIC_INLINE void ARM_MPU_Disable(void)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control)
|
__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control)
|
||||||
{
|
{
|
||||||
|
__DMB();
|
||||||
MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
|
||||||
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
|
||||||
SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
@ -171,6 +175,8 @@ __STATIC_INLINE void ARM_MPU_Disable_NS(void)
|
|||||||
SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
|
||||||
#endif
|
#endif
|
||||||
MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk;
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -275,7 +281,7 @@ __STATIC_INLINE void ARM_MPU_SetRegion_NS(uint32_t rnr, uint32_t rbar, uint32_t
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Memcopy with strictly ordered memory access, e.g. for register targets.
|
/** Memcpy with strictly ordered memory access, e.g. used by code in ARM_MPU_LoadEx()
|
||||||
* \param dst Destination data is copied to.
|
* \param dst Destination data is copied to.
|
||||||
* \param src Source data is copied from.
|
* \param src Source data is copied from.
|
||||||
* \param len Amount of data words to be copied.
|
* \param len Amount of data words to be copied.
|
||||||
|
206
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/pac_armv81.h
Normal file
206
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/pac_armv81.h
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file pac_armv81.h
|
||||||
|
* @brief CMSIS PAC key functions for Armv8.1-M PAC extension
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 23. March 2022
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PAC_ARMV81_H
|
||||||
|
#define PAC_ARMV81_H
|
||||||
|
|
||||||
|
|
||||||
|
/* ################### PAC Key functions ########################### */
|
||||||
|
/**
|
||||||
|
\ingroup CMSIS_Core_FunctionInterface
|
||||||
|
\defgroup CMSIS_Core_PacKeyFunctions PAC Key functions
|
||||||
|
\brief Functions that access the PAC keys.
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if (defined (__ARM_FEATURE_PAUTH) && (__ARM_FEATURE_PAUTH == 1))
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for privileged mode
|
||||||
|
\details Reads the PAC key stored in the PAC_KEY_P registers.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __get_PAC_KEY_P (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_p_0\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_p_1\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_p_2\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_p_3\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for privileged mode
|
||||||
|
\details writes the given PAC key to the PAC_KEY_P registers.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __set_PAC_KEY_P (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_p_0, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_p_1, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_p_2, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_p_3, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for unprivileged mode
|
||||||
|
\details Reads the PAC key stored in the PAC_KEY_U registers.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __get_PAC_KEY_U (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_u_0\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_u_1\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_u_2\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_u_3\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for unprivileged mode
|
||||||
|
\details writes the given PAC key to the PAC_KEY_U registers.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __set_PAC_KEY_U (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_u_0, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_u_1, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_u_2, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_u_3, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for privileged mode (non-secure)
|
||||||
|
\details Reads the PAC key stored in the non-secure PAC_KEY_P registers when in secure mode.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_get_PAC_KEY_P_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_p_0_ns\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_p_1_ns\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_p_2_ns\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_p_3_ns\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for privileged mode (non-secure)
|
||||||
|
\details writes the given PAC key to the non-secure PAC_KEY_P registers when in secure mode.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_PAC_KEY_P_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_p_0_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_p_1_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_p_2_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_p_3_ns, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief read the PAC key used for unprivileged mode (non-secure)
|
||||||
|
\details Reads the PAC key stored in the non-secure PAC_KEY_U registers when in secure mode.
|
||||||
|
\param [out] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_get_PAC_KEY_U_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"mrs r1, pac_key_u_0_ns\n"
|
||||||
|
"str r1,[%0,#0]\n"
|
||||||
|
"mrs r1, pac_key_u_1_ns\n"
|
||||||
|
"str r1,[%0,#4]\n"
|
||||||
|
"mrs r1, pac_key_u_2_ns\n"
|
||||||
|
"str r1,[%0,#8]\n"
|
||||||
|
"mrs r1, pac_key_u_3_ns\n"
|
||||||
|
"str r1,[%0,#12]\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief write the PAC key used for unprivileged mode (non-secure)
|
||||||
|
\details writes the given PAC key to the non-secure PAC_KEY_U registers when in secure mode.
|
||||||
|
\param [in] pPacKey 128bit PAC key
|
||||||
|
*/
|
||||||
|
__STATIC_FORCEINLINE void __TZ_set_PAC_KEY_U_NS (uint32_t* pPacKey) {
|
||||||
|
__ASM volatile (
|
||||||
|
"ldr r1,[%0,#0]\n"
|
||||||
|
"msr pac_key_u_0_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#4]\n"
|
||||||
|
"msr pac_key_u_1_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#8]\n"
|
||||||
|
"msr pac_key_u_2_ns, r1\n"
|
||||||
|
"ldr r1,[%0,#12]\n"
|
||||||
|
"msr pac_key_u_3_ns, r1\n"
|
||||||
|
: : "r" (pPacKey) : "memory", "r1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) */
|
||||||
|
|
||||||
|
#endif /* (defined (__ARM_FEATURE_PAUTH) && (__ARM_FEATURE_PAUTH == 1)) */
|
||||||
|
|
||||||
|
/*@} end of CMSIS_Core_PacKeyFunctions */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* PAC_ARMV81_H */
|
337
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/pmu_armv8.h
Normal file
337
stm32l4a6zg-f0x.at1/Drivers/CMSIS/Include/pmu_armv8.h
Normal file
@ -0,0 +1,337 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file pmu_armv8.h
|
||||||
|
* @brief CMSIS PMU API for Armv8.1-M PMU
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 15. April 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined ( __ICCARM__ )
|
||||||
|
#pragma system_include /* treat file as system include file for MISRA check */
|
||||||
|
#elif defined (__clang__)
|
||||||
|
#pragma clang system_header /* treat file as system include file */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARM_PMU_ARMV8_H
|
||||||
|
#define ARM_PMU_ARMV8_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief PMU Events
|
||||||
|
* \note See the Armv8.1-M Architecture Reference Manual for full details on these PMU events.
|
||||||
|
* */
|
||||||
|
|
||||||
|
#define ARM_PMU_SW_INCR 0x0000 /*!< Software update to the PMU_SWINC register, architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_L1I_CACHE_REFILL 0x0001 /*!< L1 I-Cache refill */
|
||||||
|
#define ARM_PMU_L1D_CACHE_REFILL 0x0003 /*!< L1 D-Cache refill */
|
||||||
|
#define ARM_PMU_L1D_CACHE 0x0004 /*!< L1 D-Cache access */
|
||||||
|
#define ARM_PMU_LD_RETIRED 0x0006 /*!< Memory-reading instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_ST_RETIRED 0x0007 /*!< Memory-writing instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_INST_RETIRED 0x0008 /*!< Instruction architecturally executed */
|
||||||
|
#define ARM_PMU_EXC_TAKEN 0x0009 /*!< Exception entry */
|
||||||
|
#define ARM_PMU_EXC_RETURN 0x000A /*!< Exception return instruction architecturally executed and the condition code check pass */
|
||||||
|
#define ARM_PMU_PC_WRITE_RETIRED 0x000C /*!< Software change to the Program Counter (PC). Instruction is architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BR_IMMED_RETIRED 0x000D /*!< Immediate branch architecturally executed */
|
||||||
|
#define ARM_PMU_BR_RETURN_RETIRED 0x000E /*!< Function return instruction architecturally executed and the condition code check pass */
|
||||||
|
#define ARM_PMU_UNALIGNED_LDST_RETIRED 0x000F /*!< Unaligned memory memory-reading or memory-writing instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BR_MIS_PRED 0x0010 /*!< Mispredicted or not predicted branch speculatively executed */
|
||||||
|
#define ARM_PMU_CPU_CYCLES 0x0011 /*!< Cycle */
|
||||||
|
#define ARM_PMU_BR_PRED 0x0012 /*!< Predictable branch speculatively executed */
|
||||||
|
#define ARM_PMU_MEM_ACCESS 0x0013 /*!< Data memory access */
|
||||||
|
#define ARM_PMU_L1I_CACHE 0x0014 /*!< Level 1 instruction cache access */
|
||||||
|
#define ARM_PMU_L1D_CACHE_WB 0x0015 /*!< Level 1 data cache write-back */
|
||||||
|
#define ARM_PMU_L2D_CACHE 0x0016 /*!< Level 2 data cache access */
|
||||||
|
#define ARM_PMU_L2D_CACHE_REFILL 0x0017 /*!< Level 2 data cache refill */
|
||||||
|
#define ARM_PMU_L2D_CACHE_WB 0x0018 /*!< Level 2 data cache write-back */
|
||||||
|
#define ARM_PMU_BUS_ACCESS 0x0019 /*!< Bus access */
|
||||||
|
#define ARM_PMU_MEMORY_ERROR 0x001A /*!< Local memory error */
|
||||||
|
#define ARM_PMU_INST_SPEC 0x001B /*!< Instruction speculatively executed */
|
||||||
|
#define ARM_PMU_BUS_CYCLES 0x001D /*!< Bus cycles */
|
||||||
|
#define ARM_PMU_CHAIN 0x001E /*!< For an odd numbered counter, increment when an overflow occurs on the preceding even-numbered counter on the same PE */
|
||||||
|
#define ARM_PMU_L1D_CACHE_ALLOCATE 0x001F /*!< Level 1 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_L2D_CACHE_ALLOCATE 0x0020 /*!< Level 2 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_BR_RETIRED 0x0021 /*!< Branch instruction architecturally executed */
|
||||||
|
#define ARM_PMU_BR_MIS_PRED_RETIRED 0x0022 /*!< Mispredicted branch instruction architecturally executed */
|
||||||
|
#define ARM_PMU_STALL_FRONTEND 0x0023 /*!< No operation issued because of the frontend */
|
||||||
|
#define ARM_PMU_STALL_BACKEND 0x0024 /*!< No operation issued because of the backend */
|
||||||
|
#define ARM_PMU_L2I_CACHE 0x0027 /*!< Level 2 instruction cache access */
|
||||||
|
#define ARM_PMU_L2I_CACHE_REFILL 0x0028 /*!< Level 2 instruction cache refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE_ALLOCATE 0x0029 /*!< Level 3 data cache allocation without refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE_REFILL 0x002A /*!< Level 3 data cache refill */
|
||||||
|
#define ARM_PMU_L3D_CACHE 0x002B /*!< Level 3 data cache access */
|
||||||
|
#define ARM_PMU_L3D_CACHE_WB 0x002C /*!< Level 3 data cache write-back */
|
||||||
|
#define ARM_PMU_LL_CACHE_RD 0x0036 /*!< Last level data cache read */
|
||||||
|
#define ARM_PMU_LL_CACHE_MISS_RD 0x0037 /*!< Last level data cache read miss */
|
||||||
|
#define ARM_PMU_L1D_CACHE_MISS_RD 0x0039 /*!< Level 1 data cache read miss */
|
||||||
|
#define ARM_PMU_OP_COMPLETE 0x003A /*!< Operation retired */
|
||||||
|
#define ARM_PMU_OP_SPEC 0x003B /*!< Operation speculatively executed */
|
||||||
|
#define ARM_PMU_STALL 0x003C /*!< Stall cycle for instruction or operation not sent for execution */
|
||||||
|
#define ARM_PMU_STALL_OP_BACKEND 0x003D /*!< Stall cycle for instruction or operation not sent for execution due to pipeline backend */
|
||||||
|
#define ARM_PMU_STALL_OP_FRONTEND 0x003E /*!< Stall cycle for instruction or operation not sent for execution due to pipeline frontend */
|
||||||
|
#define ARM_PMU_STALL_OP 0x003F /*!< Instruction or operation slots not occupied each cycle */
|
||||||
|
#define ARM_PMU_L1D_CACHE_RD 0x0040 /*!< Level 1 data cache read */
|
||||||
|
#define ARM_PMU_LE_RETIRED 0x0100 /*!< Loop end instruction executed */
|
||||||
|
#define ARM_PMU_LE_SPEC 0x0101 /*!< Loop end instruction speculatively executed */
|
||||||
|
#define ARM_PMU_BF_RETIRED 0x0104 /*!< Branch future instruction architecturally executed and condition code check pass */
|
||||||
|
#define ARM_PMU_BF_SPEC 0x0105 /*!< Branch future instruction speculatively executed and condition code check pass */
|
||||||
|
#define ARM_PMU_LE_CANCEL 0x0108 /*!< Loop end instruction not taken */
|
||||||
|
#define ARM_PMU_BF_CANCEL 0x0109 /*!< Branch future instruction not taken */
|
||||||
|
#define ARM_PMU_SE_CALL_S 0x0114 /*!< Call to secure function, resulting in Security state change */
|
||||||
|
#define ARM_PMU_SE_CALL_NS 0x0115 /*!< Call to non-secure function, resulting in Security state change */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH0 0x0118 /*!< DWT comparator 0 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH1 0x0119 /*!< DWT comparator 1 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH2 0x011A /*!< DWT comparator 2 match */
|
||||||
|
#define ARM_PMU_DWT_CMPMATCH3 0x011B /*!< DWT comparator 3 match */
|
||||||
|
#define ARM_PMU_MVE_INST_RETIRED 0x0200 /*!< MVE instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INST_SPEC 0x0201 /*!< MVE instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_RETIRED 0x0204 /*!< MVE floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SPEC 0x0205 /*!< MVE floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_HP_RETIRED 0x0208 /*!< MVE half-precision floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_HP_SPEC 0x0209 /*!< MVE half-precision floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SP_RETIRED 0x020C /*!< MVE single-precision floating-point instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_SP_SPEC 0x020D /*!< MVE single-precision floating-point instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_FP_MAC_RETIRED 0x0214 /*!< MVE floating-point multiply or multiply-accumulate instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_FP_MAC_SPEC 0x0215 /*!< MVE floating-point multiply or multiply-accumulate instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_INT_RETIRED 0x0224 /*!< MVE integer instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INT_SPEC 0x0225 /*!< MVE integer instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_INT_MAC_RETIRED 0x0228 /*!< MVE multiply or multiply-accumulate instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_INT_MAC_SPEC 0x0229 /*!< MVE multiply or multiply-accumulate instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_RETIRED 0x0238 /*!< MVE load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_SPEC 0x0239 /*!< MVE load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_RETIRED 0x023C /*!< MVE load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_SPEC 0x023D /*!< MVE load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_RETIRED 0x0240 /*!< MVE store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_SPEC 0x0241 /*!< MVE store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_CONTIG_RETIRED 0x0244 /*!< MVE contiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_CONTIG_SPEC 0x0245 /*!< MVE contiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_CONTIG_RETIRED 0x0248 /*!< MVE contiguous load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_CONTIG_SPEC 0x0249 /*!< MVE contiguous load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_CONTIG_RETIRED 0x024C /*!< MVE contiguous store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_CONTIG_SPEC 0x024D /*!< MVE contiguous store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_NONCONTIG_RETIRED 0x0250 /*!< MVE non-contiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_NONCONTIG_SPEC 0x0251 /*!< MVE non-contiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_NONCONTIG_RETIRED 0x0254 /*!< MVE non-contiguous load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_NONCONTIG_SPEC 0x0255 /*!< MVE non-contiguous load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_NONCONTIG_RETIRED 0x0258 /*!< MVE non-contiguous store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_NONCONTIG_SPEC 0x0259 /*!< MVE non-contiguous store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_MULTI_RETIRED 0x025C /*!< MVE memory instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_MULTI_SPEC 0x025D /*!< MVE memory instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_MULTI_RETIRED 0x0260 /*!< MVE memory load instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_MULTI_SPEC 0x0261 /*!< MVE memory load instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_MULTI_RETIRED 0x0261 /*!< MVE memory store instruction targeting multiple registers architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_MULTI_SPEC 0x0265 /*!< MVE memory store instruction targeting multiple registers speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_RETIRED 0x028C /*!< MVE unaligned memory load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_SPEC 0x028D /*!< MVE unaligned memory load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LD_UNALIGNED_RETIRED 0x0290 /*!< MVE unaligned load instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LD_UNALIGNED_SPEC 0x0291 /*!< MVE unaligned load instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_ST_UNALIGNED_RETIRED 0x0294 /*!< MVE unaligned store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_ST_UNALIGNED_SPEC 0x0295 /*!< MVE unaligned store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_RETIRED 0x0298 /*!< MVE unaligned noncontiguous load or store instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_LDST_UNALIGNED_NONCONTIG_SPEC 0x0299 /*!< MVE unaligned noncontiguous load or store instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_RETIRED 0x02A0 /*!< MVE vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_SPEC 0x02A1 /*!< MVE vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_FP_RETIRED 0x02A4 /*!< MVE floating-point vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_FP_SPEC 0x02A5 /*!< MVE floating-point vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_INT_RETIRED 0x02A8 /*!< MVE integer vector reduction instruction architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_VREDUCE_INT_SPEC 0x02A9 /*!< MVE integer vector reduction instruction speculatively executed */
|
||||||
|
#define ARM_PMU_MVE_PRED 0x02B8 /*!< Cycles where one or more predicated beats architecturally executed */
|
||||||
|
#define ARM_PMU_MVE_STALL 0x02CC /*!< Stall cycles caused by an MVE instruction */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE 0x02CD /*!< Stall cycles caused by an MVE instruction because of resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_MEM 0x02CE /*!< Stall cycles caused by an MVE instruction because of memory resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_FP 0x02CF /*!< Stall cycles caused by an MVE instruction because of floating-point resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_RESOURCE_INT 0x02D0 /*!< Stall cycles caused by an MVE instruction because of integer resource conflicts */
|
||||||
|
#define ARM_PMU_MVE_STALL_BREAK 0x02D3 /*!< Stall cycles caused by an MVE chain break */
|
||||||
|
#define ARM_PMU_MVE_STALL_DEPENDENCY 0x02D4 /*!< Stall cycles caused by MVE register dependency */
|
||||||
|
#define ARM_PMU_ITCM_ACCESS 0x4007 /*!< Instruction TCM access */
|
||||||
|
#define ARM_PMU_DTCM_ACCESS 0x4008 /*!< Data TCM access */
|
||||||
|
#define ARM_PMU_TRCEXTOUT0 0x4010 /*!< ETM external output 0 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT1 0x4011 /*!< ETM external output 1 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT2 0x4012 /*!< ETM external output 2 */
|
||||||
|
#define ARM_PMU_TRCEXTOUT3 0x4013 /*!< ETM external output 3 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT4 0x4018 /*!< Cross-trigger Interface output trigger 4 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT5 0x4019 /*!< Cross-trigger Interface output trigger 5 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT6 0x401A /*!< Cross-trigger Interface output trigger 6 */
|
||||||
|
#define ARM_PMU_CTI_TRIGOUT7 0x401B /*!< Cross-trigger Interface output trigger 7 */
|
||||||
|
|
||||||
|
/** \brief PMU Functions */
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Enable(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Disable(void);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_EVTYPER(uint32_t num, uint32_t type);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CYCCNT_Reset(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_EVCNTR_ALL_Reset(void);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Enable(uint32_t mask);
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Disable(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void);
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num);
|
||||||
|
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask);
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask);
|
||||||
|
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable the PMU
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Enable(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_ENABLE_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable the PMU
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Disable(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL &= ~PMU_CTRL_ENABLE_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set event to count for PMU eventer counter
|
||||||
|
\param [in] num Event counter (0-30) to configure
|
||||||
|
\param [in] type Event to count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_EVTYPER(uint32_t num, uint32_t type)
|
||||||
|
{
|
||||||
|
PMU->EVTYPER[num] = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Reset cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CYCCNT_Reset(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_CYCCNT_RESET_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Reset all event counters
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_EVCNTR_ALL_Reset(void)
|
||||||
|
{
|
||||||
|
PMU->CTRL |= PMU_CTRL_EVENTCNT_RESET_Msk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable counters
|
||||||
|
\param [in] mask Counters to enable
|
||||||
|
\note Enables one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Enable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->CNTENSET = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable counters
|
||||||
|
\param [in] mask Counters to enable
|
||||||
|
\note Disables one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Disable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->CNTENCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read cycle counter
|
||||||
|
\return Cycle count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void)
|
||||||
|
{
|
||||||
|
return PMU->CCNTR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read event counter
|
||||||
|
\param [in] num Event counter (0-30) to read
|
||||||
|
\return Event count
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num)
|
||||||
|
{
|
||||||
|
return PMU_EVCNTR_CNT_Msk & PMU->EVCNTR[num];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Read counter overflow status
|
||||||
|
\return Counter overflow status bits for the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void)
|
||||||
|
{
|
||||||
|
return PMU->OVSSET;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Clear counter overflow status
|
||||||
|
\param [in] mask Counter overflow status bits to clear
|
||||||
|
\note Clears overflow status bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->OVSCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Enable counter overflow interrupt request
|
||||||
|
\param [in] mask Counter overflow interrupt request bits to set
|
||||||
|
\note Sets overflow interrupt request bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->INTENSET = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Disable counter overflow interrupt request
|
||||||
|
\param [in] mask Counter overflow interrupt request bits to clear
|
||||||
|
\note Clears overflow interrupt request bits for one or more of the following:
|
||||||
|
- event counters (0-30)
|
||||||
|
- cycle counter
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->INTENCLR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Software increment event counter
|
||||||
|
\param [in] mask Counters to increment
|
||||||
|
\note Software increment bits for one or more event counters (0-30)
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask)
|
||||||
|
{
|
||||||
|
PMU->SWINC = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,422 +1,420 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_cortex.h
|
* @file stm32l4xx_hal_cortex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of CORTEX HAL module.
|
* @brief Header file of CORTEX HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file in
|
* This software is licensed under terms that can be found in the LICENSE file in
|
||||||
* the root directory of this software component.
|
* the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_CORTEX_H
|
#ifndef STM32L4xx_HAL_CORTEX_H
|
||||||
#define STM32L4xx_HAL_CORTEX_H
|
#define STM32L4xx_HAL_CORTEX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX CORTEX
|
/** @defgroup CORTEX CORTEX
|
||||||
* @brief CORTEX HAL module driver
|
* @brief CORTEX HAL module driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/** @defgroup CORTEX_Exported_Types CORTEX Exported Types
|
/** @defgroup CORTEX_Exported_Types CORTEX Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (__MPU_PRESENT == 1)
|
#if (__MPU_PRESENT == 1)
|
||||||
/** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition
|
/** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition
|
||||||
* @brief MPU Region initialization structure
|
* @brief MPU Region initialization structure
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint8_t Enable; /*!< Specifies the status of the region.
|
uint8_t Enable; /*!< Specifies the status of the region.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Region_Enable */
|
This parameter can be a value of @ref CORTEX_MPU_Region_Enable */
|
||||||
uint8_t Number; /*!< Specifies the number of the region to protect.
|
uint8_t Number; /*!< Specifies the number of the region to protect.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Region_Number */
|
This parameter can be a value of @ref CORTEX_MPU_Region_Number */
|
||||||
uint32_t BaseAddress; /*!< Specifies the base address of the region to protect. */
|
uint32_t BaseAddress; /*!< Specifies the base address of the region to protect. */
|
||||||
uint8_t Size; /*!< Specifies the size of the region to protect.
|
uint8_t Size; /*!< Specifies the size of the region to protect.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Region_Size */
|
This parameter can be a value of @ref CORTEX_MPU_Region_Size */
|
||||||
uint8_t SubRegionDisable; /*!< Specifies the number of the subregion protection to disable.
|
uint8_t SubRegionDisable; /*!< Specifies the number of the subregion protection to disable.
|
||||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */
|
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */
|
||||||
uint8_t TypeExtField; /*!< Specifies the TEX field level.
|
uint8_t TypeExtField; /*!< Specifies the TEX field level.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_TEX_Levels */
|
This parameter can be a value of @ref CORTEX_MPU_TEX_Levels */
|
||||||
uint8_t AccessPermission; /*!< Specifies the region access permission type.
|
uint8_t AccessPermission; /*!< Specifies the region access permission type.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes */
|
This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes */
|
||||||
uint8_t DisableExec; /*!< Specifies the instruction access status.
|
uint8_t DisableExec; /*!< Specifies the instruction access status.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Instruction_Access */
|
This parameter can be a value of @ref CORTEX_MPU_Instruction_Access */
|
||||||
uint8_t IsShareable; /*!< Specifies the shareability status of the protected region.
|
uint8_t IsShareable; /*!< Specifies the shareability status of the protected region.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Access_Shareable */
|
This parameter can be a value of @ref CORTEX_MPU_Access_Shareable */
|
||||||
uint8_t IsCacheable; /*!< Specifies the cacheable status of the region protected.
|
uint8_t IsCacheable; /*!< Specifies the cacheable status of the region protected.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable */
|
This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable */
|
||||||
uint8_t IsBufferable; /*!< Specifies the bufferable status of the protected region.
|
uint8_t IsBufferable; /*!< Specifies the bufferable status of the protected region.
|
||||||
This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable */
|
This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable */
|
||||||
}MPU_Region_InitTypeDef;
|
}MPU_Region_InitTypeDef;
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* __MPU_PRESENT */
|
#endif /* __MPU_PRESENT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants
|
/** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group
|
/** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bit for pre-emption priority,
|
#define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bit for pre-emption priority,
|
||||||
4 bits for subpriority */
|
4 bits for subpriority */
|
||||||
#define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bit for pre-emption priority,
|
#define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bit for pre-emption priority,
|
||||||
3 bits for subpriority */
|
3 bits for subpriority */
|
||||||
#define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority,
|
#define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority,
|
||||||
2 bits for subpriority */
|
2 bits for subpriority */
|
||||||
#define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority,
|
#define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority,
|
||||||
1 bit for subpriority */
|
1 bit for subpriority */
|
||||||
#define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority,
|
#define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority,
|
||||||
0 bit for subpriority */
|
0 bit for subpriority */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source
|
/** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U
|
#define SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U
|
||||||
#define SYSTICK_CLKSOURCE_HCLK 0x00000004U
|
#define SYSTICK_CLKSOURCE_HCLK 0x00000004U
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (__MPU_PRESENT == 1)
|
#if (__MPU_PRESENT == 1)
|
||||||
/** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control CORTEX MPU HFNMI and PRIVILEGED Access control
|
/** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control CORTEX MPU HFNMI and PRIVILEGED Access control
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_HFNMI_PRIVDEF_NONE 0x00000000U
|
#define MPU_HFNMI_PRIVDEF_NONE 0x00000000U
|
||||||
#define MPU_HARDFAULT_NMI (MPU_CTRL_HFNMIENA_Msk)
|
#define MPU_HARDFAULT_NMI (MPU_CTRL_HFNMIENA_Msk)
|
||||||
#define MPU_PRIVILEGED_DEFAULT (MPU_CTRL_PRIVDEFENA_Msk)
|
#define MPU_PRIVILEGED_DEFAULT (MPU_CTRL_PRIVDEFENA_Msk)
|
||||||
#define MPU_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk)
|
#define MPU_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable
|
/** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_REGION_ENABLE ((uint8_t)0x01)
|
#define MPU_REGION_ENABLE ((uint8_t)0x01)
|
||||||
#define MPU_REGION_DISABLE ((uint8_t)0x00)
|
#define MPU_REGION_DISABLE ((uint8_t)0x00)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access
|
/** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_INSTRUCTION_ACCESS_ENABLE ((uint8_t)0x00)
|
#define MPU_INSTRUCTION_ACCESS_ENABLE ((uint8_t)0x00)
|
||||||
#define MPU_INSTRUCTION_ACCESS_DISABLE ((uint8_t)0x01)
|
#define MPU_INSTRUCTION_ACCESS_DISABLE ((uint8_t)0x01)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable
|
/** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_ACCESS_SHAREABLE ((uint8_t)0x01)
|
#define MPU_ACCESS_SHAREABLE ((uint8_t)0x01)
|
||||||
#define MPU_ACCESS_NOT_SHAREABLE ((uint8_t)0x00)
|
#define MPU_ACCESS_NOT_SHAREABLE ((uint8_t)0x00)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable
|
/** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_ACCESS_CACHEABLE ((uint8_t)0x01)
|
#define MPU_ACCESS_CACHEABLE ((uint8_t)0x01)
|
||||||
#define MPU_ACCESS_NOT_CACHEABLE ((uint8_t)0x00)
|
#define MPU_ACCESS_NOT_CACHEABLE ((uint8_t)0x00)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable
|
/** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_ACCESS_BUFFERABLE ((uint8_t)0x01)
|
#define MPU_ACCESS_BUFFERABLE ((uint8_t)0x01)
|
||||||
#define MPU_ACCESS_NOT_BUFFERABLE ((uint8_t)0x00)
|
#define MPU_ACCESS_NOT_BUFFERABLE ((uint8_t)0x00)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_TEX_Levels CORTEX MPU TEX Levels
|
/** @defgroup CORTEX_MPU_TEX_Levels CORTEX MPU TEX Levels
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_TEX_LEVEL0 ((uint8_t)0x00)
|
#define MPU_TEX_LEVEL0 ((uint8_t)0x00)
|
||||||
#define MPU_TEX_LEVEL1 ((uint8_t)0x01)
|
#define MPU_TEX_LEVEL1 ((uint8_t)0x01)
|
||||||
#define MPU_TEX_LEVEL2 ((uint8_t)0x02)
|
#define MPU_TEX_LEVEL2 ((uint8_t)0x02)
|
||||||
#define MPU_TEX_LEVEL4 ((uint8_t)0x04)
|
#define MPU_TEX_LEVEL4 ((uint8_t)0x04)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size
|
/** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_REGION_SIZE_32B ((uint8_t)0x04)
|
#define MPU_REGION_SIZE_32B ((uint8_t)0x04)
|
||||||
#define MPU_REGION_SIZE_64B ((uint8_t)0x05)
|
#define MPU_REGION_SIZE_64B ((uint8_t)0x05)
|
||||||
#define MPU_REGION_SIZE_128B ((uint8_t)0x06)
|
#define MPU_REGION_SIZE_128B ((uint8_t)0x06)
|
||||||
#define MPU_REGION_SIZE_256B ((uint8_t)0x07)
|
#define MPU_REGION_SIZE_256B ((uint8_t)0x07)
|
||||||
#define MPU_REGION_SIZE_512B ((uint8_t)0x08)
|
#define MPU_REGION_SIZE_512B ((uint8_t)0x08)
|
||||||
#define MPU_REGION_SIZE_1KB ((uint8_t)0x09)
|
#define MPU_REGION_SIZE_1KB ((uint8_t)0x09)
|
||||||
#define MPU_REGION_SIZE_2KB ((uint8_t)0x0A)
|
#define MPU_REGION_SIZE_2KB ((uint8_t)0x0A)
|
||||||
#define MPU_REGION_SIZE_4KB ((uint8_t)0x0B)
|
#define MPU_REGION_SIZE_4KB ((uint8_t)0x0B)
|
||||||
#define MPU_REGION_SIZE_8KB ((uint8_t)0x0C)
|
#define MPU_REGION_SIZE_8KB ((uint8_t)0x0C)
|
||||||
#define MPU_REGION_SIZE_16KB ((uint8_t)0x0D)
|
#define MPU_REGION_SIZE_16KB ((uint8_t)0x0D)
|
||||||
#define MPU_REGION_SIZE_32KB ((uint8_t)0x0E)
|
#define MPU_REGION_SIZE_32KB ((uint8_t)0x0E)
|
||||||
#define MPU_REGION_SIZE_64KB ((uint8_t)0x0F)
|
#define MPU_REGION_SIZE_64KB ((uint8_t)0x0F)
|
||||||
#define MPU_REGION_SIZE_128KB ((uint8_t)0x10)
|
#define MPU_REGION_SIZE_128KB ((uint8_t)0x10)
|
||||||
#define MPU_REGION_SIZE_256KB ((uint8_t)0x11)
|
#define MPU_REGION_SIZE_256KB ((uint8_t)0x11)
|
||||||
#define MPU_REGION_SIZE_512KB ((uint8_t)0x12)
|
#define MPU_REGION_SIZE_512KB ((uint8_t)0x12)
|
||||||
#define MPU_REGION_SIZE_1MB ((uint8_t)0x13)
|
#define MPU_REGION_SIZE_1MB ((uint8_t)0x13)
|
||||||
#define MPU_REGION_SIZE_2MB ((uint8_t)0x14)
|
#define MPU_REGION_SIZE_2MB ((uint8_t)0x14)
|
||||||
#define MPU_REGION_SIZE_4MB ((uint8_t)0x15)
|
#define MPU_REGION_SIZE_4MB ((uint8_t)0x15)
|
||||||
#define MPU_REGION_SIZE_8MB ((uint8_t)0x16)
|
#define MPU_REGION_SIZE_8MB ((uint8_t)0x16)
|
||||||
#define MPU_REGION_SIZE_16MB ((uint8_t)0x17)
|
#define MPU_REGION_SIZE_16MB ((uint8_t)0x17)
|
||||||
#define MPU_REGION_SIZE_32MB ((uint8_t)0x18)
|
#define MPU_REGION_SIZE_32MB ((uint8_t)0x18)
|
||||||
#define MPU_REGION_SIZE_64MB ((uint8_t)0x19)
|
#define MPU_REGION_SIZE_64MB ((uint8_t)0x19)
|
||||||
#define MPU_REGION_SIZE_128MB ((uint8_t)0x1A)
|
#define MPU_REGION_SIZE_128MB ((uint8_t)0x1A)
|
||||||
#define MPU_REGION_SIZE_256MB ((uint8_t)0x1B)
|
#define MPU_REGION_SIZE_256MB ((uint8_t)0x1B)
|
||||||
#define MPU_REGION_SIZE_512MB ((uint8_t)0x1C)
|
#define MPU_REGION_SIZE_512MB ((uint8_t)0x1C)
|
||||||
#define MPU_REGION_SIZE_1GB ((uint8_t)0x1D)
|
#define MPU_REGION_SIZE_1GB ((uint8_t)0x1D)
|
||||||
#define MPU_REGION_SIZE_2GB ((uint8_t)0x1E)
|
#define MPU_REGION_SIZE_2GB ((uint8_t)0x1E)
|
||||||
#define MPU_REGION_SIZE_4GB ((uint8_t)0x1F)
|
#define MPU_REGION_SIZE_4GB ((uint8_t)0x1F)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes
|
/** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_REGION_NO_ACCESS ((uint8_t)0x00)
|
#define MPU_REGION_NO_ACCESS ((uint8_t)0x00)
|
||||||
#define MPU_REGION_PRIV_RW ((uint8_t)0x01)
|
#define MPU_REGION_PRIV_RW ((uint8_t)0x01)
|
||||||
#define MPU_REGION_PRIV_RW_URO ((uint8_t)0x02)
|
#define MPU_REGION_PRIV_RW_URO ((uint8_t)0x02)
|
||||||
#define MPU_REGION_FULL_ACCESS ((uint8_t)0x03)
|
#define MPU_REGION_FULL_ACCESS ((uint8_t)0x03)
|
||||||
#define MPU_REGION_PRIV_RO ((uint8_t)0x05)
|
#define MPU_REGION_PRIV_RO ((uint8_t)0x05)
|
||||||
#define MPU_REGION_PRIV_RO_URO ((uint8_t)0x06)
|
#define MPU_REGION_PRIV_RO_URO ((uint8_t)0x06)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number
|
/** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define MPU_REGION_NUMBER0 ((uint8_t)0x00)
|
#define MPU_REGION_NUMBER0 ((uint8_t)0x00)
|
||||||
#define MPU_REGION_NUMBER1 ((uint8_t)0x01)
|
#define MPU_REGION_NUMBER1 ((uint8_t)0x01)
|
||||||
#define MPU_REGION_NUMBER2 ((uint8_t)0x02)
|
#define MPU_REGION_NUMBER2 ((uint8_t)0x02)
|
||||||
#define MPU_REGION_NUMBER3 ((uint8_t)0x03)
|
#define MPU_REGION_NUMBER3 ((uint8_t)0x03)
|
||||||
#define MPU_REGION_NUMBER4 ((uint8_t)0x04)
|
#define MPU_REGION_NUMBER4 ((uint8_t)0x04)
|
||||||
#define MPU_REGION_NUMBER5 ((uint8_t)0x05)
|
#define MPU_REGION_NUMBER5 ((uint8_t)0x05)
|
||||||
#define MPU_REGION_NUMBER6 ((uint8_t)0x06)
|
#define MPU_REGION_NUMBER6 ((uint8_t)0x06)
|
||||||
#define MPU_REGION_NUMBER7 ((uint8_t)0x07)
|
#define MPU_REGION_NUMBER7 ((uint8_t)0x07)
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* __MPU_PRESENT */
|
#endif /* __MPU_PRESENT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported macros -----------------------------------------------------------*/
|
/* Exported macros -----------------------------------------------------------*/
|
||||||
/** @defgroup CORTEX_Exported_Macros CORTEX Exported Macros
|
/** @defgroup CORTEX_Exported_Macros CORTEX Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @defgroup CORTEX_Exported_Functions CORTEX Exported Functions
|
/** @defgroup CORTEX_Exported_Functions CORTEX Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_Exported_Functions_Group1 Initialization and Configuration functions
|
/** @defgroup CORTEX_Exported_Functions_Group1 Initialization and Configuration functions
|
||||||
* @brief Initialization and Configuration functions
|
* @brief Initialization and Configuration functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Initialization and Configuration functions *****************************/
|
/* Initialization and Configuration functions *****************************/
|
||||||
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
|
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
|
||||||
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);
|
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);
|
||||||
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
|
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
|
||||||
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
|
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
|
||||||
void HAL_NVIC_SystemReset(void);
|
void HAL_NVIC_SystemReset(void);
|
||||||
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
|
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
|
/** @defgroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
|
||||||
* @brief Cortex control functions
|
* @brief Cortex control functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral Control functions ***********************************************/
|
/* Peripheral Control functions ***********************************************/
|
||||||
uint32_t HAL_NVIC_GetPriorityGrouping(void);
|
uint32_t HAL_NVIC_GetPriorityGrouping(void);
|
||||||
void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
|
void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
|
||||||
uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
|
uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
|
||||||
void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
|
void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
|
||||||
void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
|
void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
|
||||||
uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);
|
uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);
|
||||||
void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);
|
void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);
|
||||||
void HAL_SYSTICK_IRQHandler(void);
|
void HAL_SYSTICK_IRQHandler(void);
|
||||||
void HAL_SYSTICK_Callback(void);
|
void HAL_SYSTICK_Callback(void);
|
||||||
|
|
||||||
#if (__MPU_PRESENT == 1)
|
#if (__MPU_PRESENT == 1)
|
||||||
void HAL_MPU_Enable(uint32_t MPU_Control);
|
void HAL_MPU_Enable(uint32_t MPU_Control);
|
||||||
void HAL_MPU_Disable(void);
|
void HAL_MPU_Disable(void);
|
||||||
void HAL_MPU_EnableRegion(uint32_t RegionNumber);
|
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
|
||||||
void HAL_MPU_DisableRegion(uint32_t RegionNumber);
|
#endif /* __MPU_PRESENT */
|
||||||
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
|
/**
|
||||||
#endif /* __MPU_PRESENT */
|
* @}
|
||||||
/**
|
*/
|
||||||
* @}
|
|
||||||
*/
|
/**
|
||||||
|
* @}
|
||||||
/**
|
*/
|
||||||
* @}
|
|
||||||
*/
|
/* Private types -------------------------------------------------------------*/
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private types -------------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/** @defgroup CORTEX_Private_Macros CORTEX Private Macros
|
||||||
/* Private macros ------------------------------------------------------------*/
|
* @{
|
||||||
/** @defgroup CORTEX_Private_Macros CORTEX Private Macros
|
*/
|
||||||
* @{
|
#define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \
|
||||||
*/
|
((GROUP) == NVIC_PRIORITYGROUP_1) || \
|
||||||
#define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \
|
((GROUP) == NVIC_PRIORITYGROUP_2) || \
|
||||||
((GROUP) == NVIC_PRIORITYGROUP_1) || \
|
((GROUP) == NVIC_PRIORITYGROUP_3) || \
|
||||||
((GROUP) == NVIC_PRIORITYGROUP_2) || \
|
((GROUP) == NVIC_PRIORITYGROUP_4))
|
||||||
((GROUP) == NVIC_PRIORITYGROUP_3) || \
|
|
||||||
((GROUP) == NVIC_PRIORITYGROUP_4))
|
#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
|
||||||
|
|
||||||
#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
|
#define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
|
||||||
|
|
||||||
#define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
|
#define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) >= 0x00)
|
||||||
|
|
||||||
#define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) >= 0x00)
|
#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
|
||||||
|
((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
|
||||||
#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
|
|
||||||
((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
|
#if (__MPU_PRESENT == 1)
|
||||||
|
#define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \
|
||||||
#if (__MPU_PRESENT == 1)
|
((STATE) == MPU_REGION_DISABLE))
|
||||||
#define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \
|
|
||||||
((STATE) == MPU_REGION_DISABLE))
|
#define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \
|
||||||
|
((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE))
|
||||||
#define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \
|
|
||||||
((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE))
|
#define IS_MPU_ACCESS_SHAREABLE(STATE) (((STATE) == MPU_ACCESS_SHAREABLE) || \
|
||||||
|
((STATE) == MPU_ACCESS_NOT_SHAREABLE))
|
||||||
#define IS_MPU_ACCESS_SHAREABLE(STATE) (((STATE) == MPU_ACCESS_SHAREABLE) || \
|
|
||||||
((STATE) == MPU_ACCESS_NOT_SHAREABLE))
|
#define IS_MPU_ACCESS_CACHEABLE(STATE) (((STATE) == MPU_ACCESS_CACHEABLE) || \
|
||||||
|
((STATE) == MPU_ACCESS_NOT_CACHEABLE))
|
||||||
#define IS_MPU_ACCESS_CACHEABLE(STATE) (((STATE) == MPU_ACCESS_CACHEABLE) || \
|
|
||||||
((STATE) == MPU_ACCESS_NOT_CACHEABLE))
|
#define IS_MPU_ACCESS_BUFFERABLE(STATE) (((STATE) == MPU_ACCESS_BUFFERABLE) || \
|
||||||
|
((STATE) == MPU_ACCESS_NOT_BUFFERABLE))
|
||||||
#define IS_MPU_ACCESS_BUFFERABLE(STATE) (((STATE) == MPU_ACCESS_BUFFERABLE) || \
|
|
||||||
((STATE) == MPU_ACCESS_NOT_BUFFERABLE))
|
#define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0) || \
|
||||||
|
((TYPE) == MPU_TEX_LEVEL1) || \
|
||||||
#define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0) || \
|
((TYPE) == MPU_TEX_LEVEL2) || \
|
||||||
((TYPE) == MPU_TEX_LEVEL1) || \
|
((TYPE) == MPU_TEX_LEVEL4))
|
||||||
((TYPE) == MPU_TEX_LEVEL2) || \
|
|
||||||
((TYPE) == MPU_TEX_LEVEL4))
|
#define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS) || \
|
||||||
|
((TYPE) == MPU_REGION_PRIV_RW) || \
|
||||||
#define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS) || \
|
((TYPE) == MPU_REGION_PRIV_RW_URO) || \
|
||||||
((TYPE) == MPU_REGION_PRIV_RW) || \
|
((TYPE) == MPU_REGION_FULL_ACCESS) || \
|
||||||
((TYPE) == MPU_REGION_PRIV_RW_URO) || \
|
((TYPE) == MPU_REGION_PRIV_RO) || \
|
||||||
((TYPE) == MPU_REGION_FULL_ACCESS) || \
|
((TYPE) == MPU_REGION_PRIV_RO_URO))
|
||||||
((TYPE) == MPU_REGION_PRIV_RO) || \
|
|
||||||
((TYPE) == MPU_REGION_PRIV_RO_URO))
|
#define IS_MPU_REGION_NUMBER(NUMBER) (((NUMBER) == MPU_REGION_NUMBER0) || \
|
||||||
|
((NUMBER) == MPU_REGION_NUMBER1) || \
|
||||||
#define IS_MPU_REGION_NUMBER(NUMBER) (((NUMBER) == MPU_REGION_NUMBER0) || \
|
((NUMBER) == MPU_REGION_NUMBER2) || \
|
||||||
((NUMBER) == MPU_REGION_NUMBER1) || \
|
((NUMBER) == MPU_REGION_NUMBER3) || \
|
||||||
((NUMBER) == MPU_REGION_NUMBER2) || \
|
((NUMBER) == MPU_REGION_NUMBER4) || \
|
||||||
((NUMBER) == MPU_REGION_NUMBER3) || \
|
((NUMBER) == MPU_REGION_NUMBER5) || \
|
||||||
((NUMBER) == MPU_REGION_NUMBER4) || \
|
((NUMBER) == MPU_REGION_NUMBER6) || \
|
||||||
((NUMBER) == MPU_REGION_NUMBER5) || \
|
((NUMBER) == MPU_REGION_NUMBER7))
|
||||||
((NUMBER) == MPU_REGION_NUMBER6) || \
|
|
||||||
((NUMBER) == MPU_REGION_NUMBER7))
|
#define IS_MPU_REGION_SIZE(SIZE) (((SIZE) == MPU_REGION_SIZE_32B) || \
|
||||||
|
((SIZE) == MPU_REGION_SIZE_64B) || \
|
||||||
#define IS_MPU_REGION_SIZE(SIZE) (((SIZE) == MPU_REGION_SIZE_32B) || \
|
((SIZE) == MPU_REGION_SIZE_128B) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_64B) || \
|
((SIZE) == MPU_REGION_SIZE_256B) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_128B) || \
|
((SIZE) == MPU_REGION_SIZE_512B) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_256B) || \
|
((SIZE) == MPU_REGION_SIZE_1KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_512B) || \
|
((SIZE) == MPU_REGION_SIZE_2KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_1KB) || \
|
((SIZE) == MPU_REGION_SIZE_4KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_2KB) || \
|
((SIZE) == MPU_REGION_SIZE_8KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_4KB) || \
|
((SIZE) == MPU_REGION_SIZE_16KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_8KB) || \
|
((SIZE) == MPU_REGION_SIZE_32KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_16KB) || \
|
((SIZE) == MPU_REGION_SIZE_64KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_32KB) || \
|
((SIZE) == MPU_REGION_SIZE_128KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_64KB) || \
|
((SIZE) == MPU_REGION_SIZE_256KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_128KB) || \
|
((SIZE) == MPU_REGION_SIZE_512KB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_256KB) || \
|
((SIZE) == MPU_REGION_SIZE_1MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_512KB) || \
|
((SIZE) == MPU_REGION_SIZE_2MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_1MB) || \
|
((SIZE) == MPU_REGION_SIZE_4MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_2MB) || \
|
((SIZE) == MPU_REGION_SIZE_8MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_4MB) || \
|
((SIZE) == MPU_REGION_SIZE_16MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_8MB) || \
|
((SIZE) == MPU_REGION_SIZE_32MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_16MB) || \
|
((SIZE) == MPU_REGION_SIZE_64MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_32MB) || \
|
((SIZE) == MPU_REGION_SIZE_128MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_64MB) || \
|
((SIZE) == MPU_REGION_SIZE_256MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_128MB) || \
|
((SIZE) == MPU_REGION_SIZE_512MB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_256MB) || \
|
((SIZE) == MPU_REGION_SIZE_1GB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_512MB) || \
|
((SIZE) == MPU_REGION_SIZE_2GB) || \
|
||||||
((SIZE) == MPU_REGION_SIZE_1GB) || \
|
((SIZE) == MPU_REGION_SIZE_4GB))
|
||||||
((SIZE) == MPU_REGION_SIZE_2GB) || \
|
|
||||||
((SIZE) == MPU_REGION_SIZE_4GB))
|
#define IS_MPU_SUB_REGION_DISABLE(SUBREGION) ((SUBREGION) < (uint16_t)0x00FF)
|
||||||
|
#endif /* __MPU_PRESENT */
|
||||||
#define IS_MPU_SUB_REGION_DISABLE(SUBREGION) ((SUBREGION) < (uint16_t)0x00FF)
|
|
||||||
#endif /* __MPU_PRESENT */
|
/**
|
||||||
|
* @}
|
||||||
/**
|
*/
|
||||||
* @}
|
|
||||||
*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/**
|
||||||
|
* @}
|
||||||
/**
|
*/
|
||||||
* @}
|
|
||||||
*/
|
/**
|
||||||
|
* @}
|
||||||
/**
|
*/
|
||||||
* @}
|
|
||||||
*/
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
#ifdef __cplusplus
|
#endif
|
||||||
}
|
|
||||||
#endif
|
#endif /* STM32L4xx_HAL_CORTEX_H */
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_CORTEX_H */
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,211 +1,209 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_def.h
|
* @file stm32l4xx_hal_def.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief This file contains HAL common defines, enumeration, macros and
|
* @brief This file contains HAL common defines, enumeration, macros and
|
||||||
* structures definitions.
|
* structures definitions.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_DEF_H
|
#ifndef STM32L4xx_HAL_DEF_H
|
||||||
#define STM32L4xx_HAL_DEF_H
|
#define STM32L4xx_HAL_DEF_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx.h"
|
#include "stm32l4xx.h"
|
||||||
#include "Legacy/stm32_hal_legacy.h" /* Aliases file for old names compatibility */
|
#include "Legacy/stm32_hal_legacy.h" /* Aliases file for old names compatibility */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL Status structures definition
|
* @brief HAL Status structures definition
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
HAL_OK = 0x00,
|
HAL_OK = 0x00,
|
||||||
HAL_ERROR = 0x01,
|
HAL_ERROR = 0x01,
|
||||||
HAL_BUSY = 0x02,
|
HAL_BUSY = 0x02,
|
||||||
HAL_TIMEOUT = 0x03
|
HAL_TIMEOUT = 0x03
|
||||||
} HAL_StatusTypeDef;
|
} HAL_StatusTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL Lock structures definition
|
* @brief HAL Lock structures definition
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
HAL_UNLOCKED = 0x00,
|
HAL_UNLOCKED = 0x00,
|
||||||
HAL_LOCKED = 0x01
|
HAL_LOCKED = 0x01
|
||||||
} HAL_LockTypeDef;
|
} HAL_LockTypeDef;
|
||||||
|
|
||||||
/* Exported macros -----------------------------------------------------------*/
|
/* Exported macros -----------------------------------------------------------*/
|
||||||
|
|
||||||
#if !defined(UNUSED)
|
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
|
||||||
#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
|
|
||||||
#endif /* UNUSED */
|
#define HAL_MAX_DELAY 0xFFFFFFFFU
|
||||||
|
|
||||||
#define HAL_MAX_DELAY 0xFFFFFFFFU
|
#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
|
||||||
|
#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
|
||||||
#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
|
|
||||||
#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
|
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
|
||||||
|
do{ \
|
||||||
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
|
(__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
|
||||||
do{ \
|
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
||||||
(__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
|
} while(0)
|
||||||
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
|
||||||
} while(0)
|
/** @brief Reset the Handle's State field.
|
||||||
|
* @param __HANDLE__: specifies the Peripheral Handle.
|
||||||
/** @brief Reset the Handle's State field.
|
* @note This macro can be used for the following purpose:
|
||||||
* @param __HANDLE__: specifies the Peripheral Handle.
|
* - When the Handle is declared as local variable; before passing it as parameter
|
||||||
* @note This macro can be used for the following purpose:
|
* to HAL_PPP_Init() for the first time, it is mandatory to use this macro
|
||||||
* - When the Handle is declared as local variable; before passing it as parameter
|
* to set to 0 the Handle's "State" field.
|
||||||
* to HAL_PPP_Init() for the first time, it is mandatory to use this macro
|
* Otherwise, "State" field may have any random value and the first time the function
|
||||||
* to set to 0 the Handle's "State" field.
|
* HAL_PPP_Init() is called, the low level hardware initialization will be missed
|
||||||
* Otherwise, "State" field may have any random value and the first time the function
|
* (i.e. HAL_PPP_MspInit() will not be executed).
|
||||||
* HAL_PPP_Init() is called, the low level hardware initialization will be missed
|
* - When there is a need to reconfigure the low level hardware: instead of calling
|
||||||
* (i.e. HAL_PPP_MspInit() will not be executed).
|
* HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init().
|
||||||
* - When there is a need to reconfigure the low level hardware: instead of calling
|
* In this later function, when the Handle's "State" field is set to 0, it will execute the function
|
||||||
* HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init().
|
* HAL_PPP_MspInit() which will reconfigure the low level hardware.
|
||||||
* In this later function, when the Handle's "State" field is set to 0, it will execute the function
|
* @retval None
|
||||||
* HAL_PPP_MspInit() which will reconfigure the low level hardware.
|
*/
|
||||||
* @retval None
|
#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
|
||||||
*/
|
|
||||||
#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
|
#if (USE_RTOS == 1)
|
||||||
|
/* Reserved for future use */
|
||||||
#if (USE_RTOS == 1)
|
#error " USE_RTOS should be 0 in the current HAL release "
|
||||||
/* Reserved for future use */
|
#else
|
||||||
#error " USE_RTOS should be 0 in the current HAL release "
|
#define __HAL_LOCK(__HANDLE__) \
|
||||||
#else
|
do{ \
|
||||||
#define __HAL_LOCK(__HANDLE__) \
|
if((__HANDLE__)->Lock == HAL_LOCKED) \
|
||||||
do{ \
|
{ \
|
||||||
if((__HANDLE__)->Lock == HAL_LOCKED) \
|
return HAL_BUSY; \
|
||||||
{ \
|
} \
|
||||||
return HAL_BUSY; \
|
else \
|
||||||
} \
|
{ \
|
||||||
else \
|
(__HANDLE__)->Lock = HAL_LOCKED; \
|
||||||
{ \
|
} \
|
||||||
(__HANDLE__)->Lock = HAL_LOCKED; \
|
}while (0)
|
||||||
} \
|
|
||||||
}while (0)
|
#define __HAL_UNLOCK(__HANDLE__) \
|
||||||
|
do{ \
|
||||||
#define __HAL_UNLOCK(__HANDLE__) \
|
(__HANDLE__)->Lock = HAL_UNLOCKED; \
|
||||||
do{ \
|
}while (0)
|
||||||
(__HANDLE__)->Lock = HAL_UNLOCKED; \
|
#endif /* USE_RTOS */
|
||||||
}while (0)
|
|
||||||
#endif /* USE_RTOS */
|
|
||||||
|
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
||||||
|
#ifndef __weak
|
||||||
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
#define __weak __attribute__((weak))
|
||||||
#ifndef __weak
|
#endif
|
||||||
#define __weak __attribute__((weak))
|
#ifndef __packed
|
||||||
#endif
|
#define __packed __attribute__((packed))
|
||||||
#ifndef __packed
|
#endif
|
||||||
#define __packed __attribute__((packed))
|
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||||
#endif
|
#ifndef __weak
|
||||||
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
#define __weak __attribute__((weak))
|
||||||
#ifndef __weak
|
#endif /* __weak */
|
||||||
#define __weak __attribute__((weak))
|
#ifndef __packed
|
||||||
#endif /* __weak */
|
#define __packed __attribute__((__packed__))
|
||||||
#ifndef __packed
|
#endif /* __packed */
|
||||||
#define __packed __attribute__((__packed__))
|
#endif /* __GNUC__ */
|
||||||
#endif /* __packed */
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
|
||||||
|
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
||||||
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
|
#ifndef __ALIGN_BEGIN
|
||||||
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
|
#define __ALIGN_BEGIN
|
||||||
#ifndef __ALIGN_BEGIN
|
#endif
|
||||||
#define __ALIGN_BEGIN
|
#ifndef __ALIGN_END
|
||||||
#endif
|
#define __ALIGN_END __attribute__ ((aligned (4)))
|
||||||
#ifndef __ALIGN_END
|
#endif
|
||||||
#define __ALIGN_END __attribute__ ((aligned (4)))
|
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
||||||
#endif
|
#ifndef __ALIGN_END
|
||||||
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
|
#define __ALIGN_END __attribute__ ((aligned (4)))
|
||||||
#ifndef __ALIGN_END
|
#endif /* __ALIGN_END */
|
||||||
#define __ALIGN_END __attribute__ ((aligned (4)))
|
#ifndef __ALIGN_BEGIN
|
||||||
#endif /* __ALIGN_END */
|
#define __ALIGN_BEGIN
|
||||||
#ifndef __ALIGN_BEGIN
|
#endif /* __ALIGN_BEGIN */
|
||||||
#define __ALIGN_BEGIN
|
#else
|
||||||
#endif /* __ALIGN_BEGIN */
|
#ifndef __ALIGN_END
|
||||||
#else
|
#define __ALIGN_END
|
||||||
#ifndef __ALIGN_END
|
#endif /* __ALIGN_END */
|
||||||
#define __ALIGN_END
|
#ifndef __ALIGN_BEGIN
|
||||||
#endif /* __ALIGN_END */
|
#if defined (__CC_ARM) /* ARM Compiler V5 */
|
||||||
#ifndef __ALIGN_BEGIN
|
#define __ALIGN_BEGIN __align(4)
|
||||||
#if defined (__CC_ARM) /* ARM Compiler V5 */
|
#elif defined (__ICCARM__) /* IAR Compiler */
|
||||||
#define __ALIGN_BEGIN __align(4)
|
#define __ALIGN_BEGIN
|
||||||
#elif defined (__ICCARM__) /* IAR Compiler */
|
#endif /* __CC_ARM */
|
||||||
#define __ALIGN_BEGIN
|
#endif /* __ALIGN_BEGIN */
|
||||||
#endif /* __CC_ARM */
|
#endif /* __GNUC__ */
|
||||||
#endif /* __ALIGN_BEGIN */
|
|
||||||
#endif /* __GNUC__ */
|
/**
|
||||||
|
* @brief __RAM_FUNC definition
|
||||||
/**
|
*/
|
||||||
* @brief __RAM_FUNC definition
|
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
*/
|
/* ARM Compiler V4/V5 and V6
|
||||||
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
--------------------------
|
||||||
/* ARM Compiler V4/V5 and V6
|
RAM functions are defined using the toolchain options.
|
||||||
--------------------------
|
Functions that are executed in RAM should reside in a separate source module.
|
||||||
RAM functions are defined using the toolchain options.
|
Using the 'Options for File' dialog you can simply change the 'Code / Const'
|
||||||
Functions that are executed in RAM should reside in a separate source module.
|
area of a module to a memory space in physical RAM.
|
||||||
Using the 'Options for File' dialog you can simply change the 'Code / Const'
|
Available memory areas are declared in the 'Target' tab of the 'Options for Target'
|
||||||
area of a module to a memory space in physical RAM.
|
dialog.
|
||||||
Available memory areas are declared in the 'Target' tab of the 'Options for Target'
|
*/
|
||||||
dialog.
|
#define __RAM_FUNC
|
||||||
*/
|
|
||||||
#define __RAM_FUNC
|
#elif defined ( __ICCARM__ )
|
||||||
|
/* ICCARM Compiler
|
||||||
#elif defined ( __ICCARM__ )
|
---------------
|
||||||
/* ICCARM Compiler
|
RAM functions are defined using a specific toolchain keyword "__ramfunc".
|
||||||
---------------
|
*/
|
||||||
RAM functions are defined using a specific toolchain keyword "__ramfunc".
|
#define __RAM_FUNC __ramfunc
|
||||||
*/
|
|
||||||
#define __RAM_FUNC __ramfunc
|
#elif defined ( __GNUC__ )
|
||||||
|
/* GNU Compiler
|
||||||
#elif defined ( __GNUC__ )
|
------------
|
||||||
/* GNU Compiler
|
RAM functions are defined using a specific toolchain attribute
|
||||||
------------
|
"__attribute__((section(".RamFunc")))".
|
||||||
RAM functions are defined using a specific toolchain attribute
|
*/
|
||||||
"__attribute__((section(".RamFunc")))".
|
#define __RAM_FUNC __attribute__((section(".RamFunc")))
|
||||||
*/
|
|
||||||
#define __RAM_FUNC __attribute__((section(".RamFunc")))
|
#endif
|
||||||
|
|
||||||
#endif
|
/**
|
||||||
|
* @brief __NOINLINE definition
|
||||||
/**
|
*/
|
||||||
* @brief __NOINLINE definition
|
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
|
||||||
*/
|
/* ARM V4/V5 and V6 & GNU Compiler
|
||||||
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
|
-------------------------------
|
||||||
/* ARM V4/V5 and V6 & GNU Compiler
|
*/
|
||||||
-------------------------------
|
#define __NOINLINE __attribute__ ( (noinline) )
|
||||||
*/
|
|
||||||
#define __NOINLINE __attribute__ ( (noinline) )
|
#elif defined ( __ICCARM__ )
|
||||||
|
/* ICCARM Compiler
|
||||||
#elif defined ( __ICCARM__ )
|
---------------
|
||||||
/* ICCARM Compiler
|
*/
|
||||||
---------------
|
#define __NOINLINE _Pragma("optimize = no_inline")
|
||||||
*/
|
|
||||||
#define __NOINLINE _Pragma("optimize = no_inline")
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
#ifdef __cplusplus
|
#endif
|
||||||
}
|
|
||||||
#endif
|
#endif /* STM32L4xx_HAL_DEF_H */
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_DEF_H */
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,284 +1,284 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_dma_ex.h
|
* @file stm32l4xx_hal_dma_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of DMA HAL extension module.
|
* @brief Header file of DMA HAL extension module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_DMA_EX_H
|
#ifndef STM32L4xx_HAL_DMA_EX_H
|
||||||
#define STM32L4xx_HAL_DMA_EX_H
|
#define STM32L4xx_HAL_DMA_EX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DMAMUX1)
|
#if defined(DMAMUX1)
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup DMAEx
|
/** @addtogroup DMAEx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/** @defgroup DMAEx_Exported_Types DMAEx Exported Types
|
/** @defgroup DMAEx_Exported_Types DMAEx Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL DMA Synchro definition
|
* @brief HAL DMA Synchro definition
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL DMAMUX Synchronization configuration structure definition
|
* @brief HAL DMAMUX Synchronization configuration structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t SyncSignalID; /*!< Specifies the synchronization signal gating the DMA request in periodic mode.
|
uint32_t SyncSignalID; /*!< Specifies the synchronization signal gating the DMA request in periodic mode.
|
||||||
This parameter can be a value of @ref DMAEx_DMAMUX_SyncSignalID_selection */
|
This parameter can be a value of @ref DMAEx_DMAMUX_SyncSignalID_selection */
|
||||||
|
|
||||||
uint32_t SyncPolarity; /*!< Specifies the polarity of the signal on which the DMA request is synchronized.
|
uint32_t SyncPolarity; /*!< Specifies the polarity of the signal on which the DMA request is synchronized.
|
||||||
This parameter can be a value of @ref DMAEx_DMAMUX_SyncPolarity_selection */
|
This parameter can be a value of @ref DMAEx_DMAMUX_SyncPolarity_selection */
|
||||||
|
|
||||||
FunctionalState SyncEnable; /*!< Specifies if the synchronization shall be enabled or disabled
|
FunctionalState SyncEnable; /*!< Specifies if the synchronization shall be enabled or disabled
|
||||||
This parameter can take the value ENABLE or DISABLE*/
|
This parameter can take the value ENABLE or DISABLE*/
|
||||||
|
|
||||||
|
|
||||||
FunctionalState EventEnable; /*!< Specifies if an event shall be generated once the RequestNumber is reached.
|
FunctionalState EventEnable; /*!< Specifies if an event shall be generated once the RequestNumber is reached.
|
||||||
This parameter can take the value ENABLE or DISABLE */
|
This parameter can take the value ENABLE or DISABLE */
|
||||||
|
|
||||||
uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be authorized after a sync event
|
uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be authorized after a sync event
|
||||||
This parameter must be a number between Min_Data = 1 and Max_Data = 32 */
|
This parameter must be a number between Min_Data = 1 and Max_Data = 32 */
|
||||||
|
|
||||||
|
|
||||||
} HAL_DMA_MuxSyncConfigTypeDef;
|
}HAL_DMA_MuxSyncConfigTypeDef;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief HAL DMAMUX request generator parameters structure definition
|
* @brief HAL DMAMUX request generator parameters structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t SignalID; /*!< Specifies the ID of the signal used for DMAMUX request generator
|
uint32_t SignalID; /*!< Specifies the ID of the signal used for DMAMUX request generator
|
||||||
This parameter can be a value of @ref DMAEx_DMAMUX_SignalGeneratorID_selection */
|
This parameter can be a value of @ref DMAEx_DMAMUX_SignalGeneratorID_selection */
|
||||||
|
|
||||||
uint32_t Polarity; /*!< Specifies the polarity of the signal on which the request is generated.
|
uint32_t Polarity; /*!< Specifies the polarity of the signal on which the request is generated.
|
||||||
This parameter can be a value of @ref DMAEx_DMAMUX_RequestGeneneratorPolarity_selection */
|
This parameter can be a value of @ref DMAEx_DMAMUX_RequestGeneneratorPolarity_selection */
|
||||||
|
|
||||||
uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be generated after a signal event
|
uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be generated after a signal event
|
||||||
This parameter must be a number between Min_Data = 1 and Max_Data = 32 */
|
This parameter must be a number between Min_Data = 1 and Max_Data = 32 */
|
||||||
|
|
||||||
} HAL_DMA_MuxRequestGeneratorConfigTypeDef;
|
}HAL_DMA_MuxRequestGeneratorConfigTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/** @defgroup DMAEx_Exported_Constants DMAEx Exported Constants
|
/** @defgroup DMAEx_Exported_Constants DMAEx Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx_DMAMUX_SyncSignalID_selection DMAMUX SyncSignalID selection
|
/** @defgroup DMAEx_DMAMUX_SyncSignalID_selection DMAMUX SyncSignalID selection
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI0 0U /*!< Synchronization Signal is EXTI0 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI0 0U /*!< Synchronization Signal is EXTI0 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI1 1U /*!< Synchronization Signal is EXTI1 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI1 1U /*!< Synchronization Signal is EXTI1 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI2 2U /*!< Synchronization Signal is EXTI2 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI2 2U /*!< Synchronization Signal is EXTI2 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI3 3U /*!< Synchronization Signal is EXTI3 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI3 3U /*!< Synchronization Signal is EXTI3 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI4 4U /*!< Synchronization Signal is EXTI4 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI4 4U /*!< Synchronization Signal is EXTI4 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI5 5U /*!< Synchronization Signal is EXTI5 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI5 5U /*!< Synchronization Signal is EXTI5 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI6 6U /*!< Synchronization Signal is EXTI6 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI6 6U /*!< Synchronization Signal is EXTI6 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI7 7U /*!< Synchronization Signal is EXTI7 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI7 7U /*!< Synchronization Signal is EXTI7 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI8 8U /*!< Synchronization Signal is EXTI8 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI8 8U /*!< Synchronization Signal is EXTI8 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI9 9U /*!< Synchronization Signal is EXTI9 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI9 9U /*!< Synchronization Signal is EXTI9 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI10 10U /*!< Synchronization Signal is EXTI10 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI10 10U /*!< Synchronization Signal is EXTI10 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI11 11U /*!< Synchronization Signal is EXTI11 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI11 11U /*!< Synchronization Signal is EXTI11 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI12 12U /*!< Synchronization Signal is EXTI12 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI12 12U /*!< Synchronization Signal is EXTI12 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI13 13U /*!< Synchronization Signal is EXTI13 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI13 13U /*!< Synchronization Signal is EXTI13 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI14 14U /*!< Synchronization Signal is EXTI14 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI14 14U /*!< Synchronization Signal is EXTI14 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_EXTI15 15U /*!< Synchronization Signal is EXTI15 IT */
|
#define HAL_DMAMUX1_SYNC_EXTI15 15U /*!< Synchronization Signal is EXTI15 IT */
|
||||||
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH0_EVT 16U /*!< Synchronization Signal is DMAMUX1 Channel0 Event */
|
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH0_EVT 16U /*!< Synchronization Signal is DMAMUX1 Channel0 Event */
|
||||||
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH1_EVT 17U /*!< Synchronization Signal is DMAMUX1 Channel1 Event */
|
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH1_EVT 17U /*!< Synchronization Signal is DMAMUX1 Channel1 Event */
|
||||||
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH2_EVT 18U /*!< Synchronization Signal is DMAMUX1 Channel2 Event */
|
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH2_EVT 18U /*!< Synchronization Signal is DMAMUX1 Channel2 Event */
|
||||||
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH3_EVT 19U /*!< Synchronization Signal is DMAMUX1 Channel3 Event */
|
#define HAL_DMAMUX1_SYNC_DMAMUX1_CH3_EVT 19U /*!< Synchronization Signal is DMAMUX1 Channel3 Event */
|
||||||
#define HAL_DMAMUX1_SYNC_LPTIM1_OUT 20U /*!< Synchronization Signal is LPTIM1 OUT */
|
#define HAL_DMAMUX1_SYNC_LPTIM1_OUT 20U /*!< Synchronization Signal is LPTIM1 OUT */
|
||||||
#define HAL_DMAMUX1_SYNC_LPTIM2_OUT 21U /*!< Synchronization Signal is LPTIM2 OUT */
|
#define HAL_DMAMUX1_SYNC_LPTIM2_OUT 21U /*!< Synchronization Signal is LPTIM2 OUT */
|
||||||
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
||||||
#define HAL_DMAMUX1_SYNC_DSI_TE 22U /*!< Synchronization Signal is DSI Tearing Effect */
|
#define HAL_DMAMUX1_SYNC_DSI_TE 22U /*!< Synchronization Signal is DSI Tearing Effect */
|
||||||
#define HAL_DMAMUX1_SYNC_DSI_EOT 23U /*!< Synchronization Signal is DSI End of refresh */
|
#define HAL_DMAMUX1_SYNC_DSI_EOT 23U /*!< Synchronization Signal is DSI End of refresh */
|
||||||
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
||||||
#define HAL_DMAMUX1_SYNC_DMA2D_EOT 24U /*!< Synchronization Signal is DMA2D End of Transfer */
|
#define HAL_DMAMUX1_SYNC_DMA2D_EOT 24U /*!< Synchronization Signal is DMA2D End of Transfer */
|
||||||
#define HAL_DMAMUX1_SYNC_LDTC_IT 25U /*!< Synchronization Signal is LDTC IT */
|
#define HAL_DMAMUX1_SYNC_LDTC_IT 25U /*!< Synchronization Signal is LDTC IT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx_DMAMUX_SyncPolarity_selection DMAMUX SyncPolarity selection
|
/** @defgroup DMAEx_DMAMUX_SyncPolarity_selection DMAMUX SyncPolarity selection
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DMAMUX_SYNC_NO_EVENT 0U /*!< block synchronization events */
|
#define HAL_DMAMUX_SYNC_NO_EVENT 0U /*!< block synchronization events */
|
||||||
#define HAL_DMAMUX_SYNC_RISING DMAMUX_CxCR_SPOL_0 /*!< synchronize with rising edge events */
|
#define HAL_DMAMUX_SYNC_RISING DMAMUX_CxCR_SPOL_0 /*!< synchronize with rising edge events */
|
||||||
#define HAL_DMAMUX_SYNC_FALLING DMAMUX_CxCR_SPOL_1 /*!< synchronize with falling edge events */
|
#define HAL_DMAMUX_SYNC_FALLING DMAMUX_CxCR_SPOL_1 /*!< synchronize with falling edge events */
|
||||||
#define HAL_DMAMUX_SYNC_RISING_FALLING DMAMUX_CxCR_SPOL /*!< synchronize with rising and falling edge events */
|
#define HAL_DMAMUX_SYNC_RISING_FALLING DMAMUX_CxCR_SPOL /*!< synchronize with rising and falling edge events */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx_DMAMUX_SignalGeneratorID_selection DMAMUX SignalGeneratorID selection
|
/** @defgroup DMAEx_DMAMUX_SignalGeneratorID_selection DMAMUX SignalGeneratorID selection
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI0 0U /*!< Request generator Signal is EXTI0 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI0 0U /*!< Request generator Signal is EXTI0 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI1 1U /*!< Request generator Signal is EXTI1 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI1 1U /*!< Request generator Signal is EXTI1 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI2 2U /*!< Request generator Signal is EXTI2 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI2 2U /*!< Request generator Signal is EXTI2 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI3 3U /*!< Request generator Signal is EXTI3 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI3 3U /*!< Request generator Signal is EXTI3 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI4 4U /*!< Request generator Signal is EXTI4 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI4 4U /*!< Request generator Signal is EXTI4 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI5 5U /*!< Request generator Signal is EXTI5 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI5 5U /*!< Request generator Signal is EXTI5 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI6 6U /*!< Request generator Signal is EXTI6 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI6 6U /*!< Request generator Signal is EXTI6 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI7 7U /*!< Request generator Signal is EXTI7 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI7 7U /*!< Request generator Signal is EXTI7 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI8 8U /*!< Request generator Signal is EXTI8 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI8 8U /*!< Request generator Signal is EXTI8 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI9 9U /*!< Request generator Signal is EXTI9 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI9 9U /*!< Request generator Signal is EXTI9 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI10 10U /*!< Request generator Signal is EXTI10 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI10 10U /*!< Request generator Signal is EXTI10 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI11 11U /*!< Request generator Signal is EXTI11 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI11 11U /*!< Request generator Signal is EXTI11 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI12 12U /*!< Request generator Signal is EXTI12 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI12 12U /*!< Request generator Signal is EXTI12 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI13 13U /*!< Request generator Signal is EXTI13 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI13 13U /*!< Request generator Signal is EXTI13 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI14 14U /*!< Request generator Signal is EXTI14 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI14 14U /*!< Request generator Signal is EXTI14 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_EXTI15 15U /*!< Request generator Signal is EXTI15 IT */
|
#define HAL_DMAMUX1_REQ_GEN_EXTI15 15U /*!< Request generator Signal is EXTI15 IT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT 16U /*!< Request generator Signal is DMAMUX1 Channel0 Event */
|
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT 16U /*!< Request generator Signal is DMAMUX1 Channel0 Event */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH1_EVT 17U /*!< Request generator Signal is DMAMUX1 Channel1 Event */
|
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH1_EVT 17U /*!< Request generator Signal is DMAMUX1 Channel1 Event */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH2_EVT 18U /*!< Request generator Signal is DMAMUX1 Channel2 Event */
|
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH2_EVT 18U /*!< Request generator Signal is DMAMUX1 Channel2 Event */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH3_EVT 19U /*!< Request generator Signal is DMAMUX1 Channel3 Event */
|
#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH3_EVT 19U /*!< Request generator Signal is DMAMUX1 Channel3 Event */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT 20U /*!< Request generator Signal is LPTIM1 OUT */
|
#define HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT 20U /*!< Request generator Signal is LPTIM1 OUT */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT 21U /*!< Request generator Signal is LPTIM2 OUT */
|
#define HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT 21U /*!< Request generator Signal is LPTIM2 OUT */
|
||||||
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DSI_TE 22U /*!< Request generator Signal is DSI Tearing Effect */
|
#define HAL_DMAMUX1_REQ_GEN_DSI_TE 22U /*!< Request generator Signal is DSI Tearing Effect */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DSI_EOT 23U /*!< Request generator Signal is DSI End of refresh */
|
#define HAL_DMAMUX1_REQ_GEN_DSI_EOT 23U /*!< Request generator Signal is DSI End of refresh */
|
||||||
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_DMA2D_EOT 24U /*!< Request generator Signal is DMA2D End of Transfer */
|
#define HAL_DMAMUX1_REQ_GEN_DMA2D_EOT 24U /*!< Request generator Signal is DMA2D End of Transfer */
|
||||||
#define HAL_DMAMUX1_REQ_GEN_LTDC_IT 25U /*!< Request generator Signal is LTDC IT */
|
#define HAL_DMAMUX1_REQ_GEN_LTDC_IT 25U /*!< Request generator Signal is LTDC IT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx_DMAMUX_RequestGeneneratorPolarity_selection DMAMUX RequestGeneneratorPolarity selection
|
/** @defgroup DMAEx_DMAMUX_RequestGeneneratorPolarity_selection DMAMUX RequestGeneneratorPolarity selection
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define HAL_DMAMUX_REQ_GEN_NO_EVENT 0U /*!< block request generator events */
|
#define HAL_DMAMUX_REQ_GEN_NO_EVENT 0U /*!< block request generator events */
|
||||||
#define HAL_DMAMUX_REQ_GEN_RISING DMAMUX_RGxCR_GPOL_0 /*!< generate request on rising edge events */
|
#define HAL_DMAMUX_REQ_GEN_RISING DMAMUX_RGxCR_GPOL_0 /*!< generate request on rising edge events */
|
||||||
#define HAL_DMAMUX_REQ_GEN_FALLING DMAMUX_RGxCR_GPOL_1 /*!< generate request on falling edge events */
|
#define HAL_DMAMUX_REQ_GEN_FALLING DMAMUX_RGxCR_GPOL_1 /*!< generate request on falling edge events */
|
||||||
#define HAL_DMAMUX_REQ_GEN_RISING_FALLING DMAMUX_RGxCR_GPOL /*!< generate request on rising and falling edge events */
|
#define HAL_DMAMUX_REQ_GEN_RISING_FALLING DMAMUX_RGxCR_GPOL /*!< generate request on rising and falling edge events */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup DMAEx_Exported_Functions
|
/** @addtogroup DMAEx_Exported_Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IO operation functions *****************************************************/
|
/* IO operation functions *****************************************************/
|
||||||
/** @addtogroup DMAEx_Exported_Functions_Group1
|
/** @addtogroup DMAEx_Exported_Functions_Group1
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ------------------------- REQUEST -----------------------------------------*/
|
/* ------------------------- REQUEST -----------------------------------------*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator(DMA_HandleTypeDef *hdma,
|
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator (DMA_HandleTypeDef *hdma,
|
||||||
HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig);
|
HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig);
|
||||||
HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator(DMA_HandleTypeDef *hdma);
|
HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator (DMA_HandleTypeDef *hdma);
|
||||||
HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator(DMA_HandleTypeDef *hdma);
|
HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator (DMA_HandleTypeDef *hdma);
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ------------------------- SYNCHRO -----------------------------------------*/
|
/* ------------------------- SYNCHRO -----------------------------------------*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig);
|
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig);
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma);
|
void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Private defines -----------------------------------------------------------*/
|
/* Private defines -----------------------------------------------------------*/
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @defgroup DMAEx_Private_Macros DMAEx Private Macros
|
/** @defgroup DMAEx_Private_Macros DMAEx Private Macros
|
||||||
* @brief DMAEx private macros
|
* @brief DMAEx private macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define IS_DMAMUX_SYNC_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_SYNC_LDTC_IT)
|
#define IS_DMAMUX_SYNC_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_SYNC_LDTC_IT)
|
||||||
|
|
||||||
#define IS_DMAMUX_SYNC_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U))
|
#define IS_DMAMUX_SYNC_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U))
|
||||||
|
|
||||||
#define IS_DMAMUX_SYNC_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_SYNC_NO_EVENT) || \
|
#define IS_DMAMUX_SYNC_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_SYNC_NO_EVENT) || \
|
||||||
((POLARITY) == HAL_DMAMUX_SYNC_RISING) || \
|
((POLARITY) == HAL_DMAMUX_SYNC_RISING) || \
|
||||||
((POLARITY) == HAL_DMAMUX_SYNC_FALLING) || \
|
((POLARITY) == HAL_DMAMUX_SYNC_FALLING) || \
|
||||||
((POLARITY) == HAL_DMAMUX_SYNC_RISING_FALLING))
|
((POLARITY) == HAL_DMAMUX_SYNC_RISING_FALLING))
|
||||||
|
|
||||||
#define IS_DMAMUX_SYNC_STATE(SYNC) (((SYNC) == DISABLE) || ((SYNC) == ENABLE))
|
#define IS_DMAMUX_SYNC_STATE(SYNC) (((SYNC) == DISABLE) || ((SYNC) == ENABLE))
|
||||||
|
|
||||||
#define IS_DMAMUX_SYNC_EVENT(EVENT) (((EVENT) == DISABLE) || \
|
#define IS_DMAMUX_SYNC_EVENT(EVENT) (((EVENT) == DISABLE) || \
|
||||||
((EVENT) == ENABLE))
|
((EVENT) == ENABLE))
|
||||||
|
|
||||||
#define IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_REQ_GEN_LTDC_IT)
|
#define IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_REQ_GEN_LTDC_IT)
|
||||||
|
|
||||||
#define IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U))
|
#define IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U))
|
||||||
|
|
||||||
#define IS_DMAMUX_REQUEST_GEN_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_REQ_GEN_NO_EVENT) || \
|
#define IS_DMAMUX_REQUEST_GEN_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_REQ_GEN_NO_EVENT) || \
|
||||||
((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING) || \
|
((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING) || \
|
||||||
((POLARITY) == HAL_DMAMUX_REQ_GEN_FALLING) || \
|
((POLARITY) == HAL_DMAMUX_REQ_GEN_FALLING) || \
|
||||||
((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING_FALLING))
|
((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING_FALLING))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* DMAMUX1 */
|
#endif /* DMAMUX1 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_DMA_H */
|
#endif /* STM32L4xx_HAL_DMA_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,125 +1,125 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_flash_ex.h
|
* @file stm32l4xx_hal_flash_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of FLASH HAL Extended module.
|
* @brief Header file of FLASH HAL Extended module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file in
|
* This software is licensed under terms that can be found in the LICENSE file in
|
||||||
* the root directory of this software component.
|
* the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_FLASH_EX_H
|
#ifndef STM32L4xx_HAL_FLASH_EX_H
|
||||||
#define STM32L4xx_HAL_FLASH_EX_H
|
#define STM32L4xx_HAL_FLASH_EX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup FLASHEx
|
/** @addtogroup FLASHEx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
#if defined (FLASH_CFGR_LVEN)
|
#if defined (FLASH_CFGR_LVEN)
|
||||||
/** @addtogroup FLASHEx_Exported_Constants
|
/** @addtogroup FLASHEx_Exported_Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/** @defgroup FLASHEx_LVE_PIN_CFG FLASHEx LVE pin configuration
|
/** @defgroup FLASHEx_LVE_PIN_CFG FLASHEx LVE pin configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define FLASH_LVE_PIN_CTRL 0x00000000U /*!< LVE FLASH pin controlled by power controller */
|
#define FLASH_LVE_PIN_CTRL 0x00000000U /*!< LVE FLASH pin controlled by power controller */
|
||||||
#define FLASH_LVE_PIN_FORCED FLASH_CFGR_LVEN /*!< LVE FLASH pin enforced to low (external SMPS used) */
|
#define FLASH_LVE_PIN_FORCED FLASH_CFGR_LVEN /*!< LVE FLASH pin enforced to low (external SMPS used) */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* FLASH_CFGR_LVEN */
|
#endif /* FLASH_CFGR_LVEN */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup FLASHEx_Exported_Functions
|
/** @addtogroup FLASHEx_Exported_Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Extended Program operation functions *************************************/
|
/* Extended Program operation functions *************************************/
|
||||||
/** @addtogroup FLASHEx_Exported_Functions_Group1
|
/** @addtogroup FLASHEx_Exported_Functions_Group1
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
|
HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
|
||||||
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
|
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
|
||||||
HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
|
HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
|
||||||
void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
|
void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined (FLASH_CFGR_LVEN)
|
#if defined (FLASH_CFGR_LVEN)
|
||||||
/** @addtogroup FLASHEx_Exported_Functions_Group2
|
/** @addtogroup FLASHEx_Exported_Functions_Group2
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin(uint32_t ConfigLVE);
|
HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin(uint32_t ConfigLVE);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* FLASH_CFGR_LVEN */
|
#endif /* FLASH_CFGR_LVEN */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private function ----------------------------------------------------------*/
|
/* Private function ----------------------------------------------------------*/
|
||||||
/** @addtogroup FLASHEx_Private_Functions FLASHEx Private Functions
|
/** @addtogroup FLASHEx_Private_Functions FLASHEx Private Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
void FLASH_PageErase(uint32_t Page, uint32_t Banks);
|
void FLASH_PageErase(uint32_t Page, uint32_t Banks);
|
||||||
void FLASH_FlushCaches(void);
|
void FLASH_FlushCaches(void);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
@cond 0
|
@cond 0
|
||||||
*/
|
*/
|
||||||
#if defined (FLASH_CFGR_LVEN)
|
#if defined (FLASH_CFGR_LVEN)
|
||||||
#define IS_FLASH_LVE_PIN(CFG) (((CFG) == FLASH_LVE_PIN_CTRL) || ((CFG) == FLASH_LVE_PIN_FORCED))
|
#define IS_FLASH_LVE_PIN(CFG) (((CFG) == FLASH_LVE_PIN_CTRL) || ((CFG) == FLASH_LVE_PIN_FORCED))
|
||||||
#endif /* FLASH_CFGR_LVEN */
|
#endif /* FLASH_CFGR_LVEN */
|
||||||
/**
|
/**
|
||||||
@endcond
|
@endcond
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_FLASH_EX_H */
|
#endif /* STM32L4xx_HAL_FLASH_EX_H */
|
||||||
|
|
||||||
|
@ -1,74 +1,74 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_flash_ramfunc.h
|
* @file stm32l4xx_hal_flash_ramfunc.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of FLASH RAMFUNC driver.
|
* @brief Header file of FLASH RAMFUNC driver.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file in
|
* This software is licensed under terms that can be found in the LICENSE file in
|
||||||
* the root directory of this software component.
|
* the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_FLASH_RAMFUNC_H
|
#ifndef STM32L4xx_FLASH_RAMFUNC_H
|
||||||
#define STM32L4xx_FLASH_RAMFUNC_H
|
#define STM32L4xx_FLASH_RAMFUNC_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup FLASH_RAMFUNC
|
/** @addtogroup FLASH_RAMFUNC
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup FLASH_RAMFUNC_Exported_Functions
|
/** @addtogroup FLASH_RAMFUNC_Exported_Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1
|
/** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral Control functions ************************************************/
|
/* Peripheral Control functions ************************************************/
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableRunPowerDown(void);
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableRunPowerDown(void);
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableRunPowerDown(void);
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableRunPowerDown(void);
|
||||||
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig);
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* STM32L4xx_FLASH_RAMFUNC_H */
|
#endif /* STM32L4xx_FLASH_RAMFUNC_H */
|
||||||
|
|
||||||
|
@ -1,323 +1,323 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_gpio.h
|
* @file stm32l4xx_hal_gpio.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of GPIO HAL module.
|
* @brief Header file of GPIO HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_GPIO_H
|
#ifndef STM32L4xx_HAL_GPIO_H
|
||||||
#define STM32L4xx_HAL_GPIO_H
|
#define STM32L4xx_HAL_GPIO_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup GPIO
|
/** @addtogroup GPIO
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup GPIO_Exported_Types GPIO Exported Types
|
/** @defgroup GPIO_Exported_Types GPIO Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief GPIO Init structure definition
|
* @brief GPIO Init structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t Pin; /*!< Specifies the GPIO pins to be configured.
|
uint32_t Pin; /*!< Specifies the GPIO pins to be configured.
|
||||||
This parameter can be any value of @ref GPIO_pins */
|
This parameter can be any value of @ref GPIO_pins */
|
||||||
|
|
||||||
uint32_t Mode; /*!< Specifies the operating mode for the selected pins.
|
uint32_t Mode; /*!< Specifies the operating mode for the selected pins.
|
||||||
This parameter can be a value of @ref GPIO_mode */
|
This parameter can be a value of @ref GPIO_mode */
|
||||||
|
|
||||||
uint32_t Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins.
|
uint32_t Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins.
|
||||||
This parameter can be a value of @ref GPIO_pull */
|
This parameter can be a value of @ref GPIO_pull */
|
||||||
|
|
||||||
uint32_t Speed; /*!< Specifies the speed for the selected pins.
|
uint32_t Speed; /*!< Specifies the speed for the selected pins.
|
||||||
This parameter can be a value of @ref GPIO_speed */
|
This parameter can be a value of @ref GPIO_speed */
|
||||||
|
|
||||||
uint32_t Alternate; /*!< Peripheral to be connected to the selected pins
|
uint32_t Alternate; /*!< Peripheral to be connected to the selected pins
|
||||||
This parameter can be a value of @ref GPIOEx_Alternate_function_selection */
|
This parameter can be a value of @ref GPIOEx_Alternate_function_selection */
|
||||||
} GPIO_InitTypeDef;
|
} GPIO_InitTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GPIO Bit SET and Bit RESET enumeration
|
* @brief GPIO Bit SET and Bit RESET enumeration
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GPIO_PIN_RESET = 0U,
|
GPIO_PIN_RESET = 0U,
|
||||||
GPIO_PIN_SET
|
GPIO_PIN_SET
|
||||||
} GPIO_PinState;
|
} GPIO_PinState;
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/** @defgroup GPIO_Exported_Constants GPIO Exported Constants
|
/** @defgroup GPIO_Exported_Constants GPIO Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/** @defgroup GPIO_pins GPIO pins
|
/** @defgroup GPIO_pins GPIO pins
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */
|
#define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */
|
||||||
#define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */
|
#define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */
|
||||||
#define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */
|
#define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */
|
||||||
#define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */
|
#define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */
|
||||||
#define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */
|
#define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */
|
||||||
#define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */
|
#define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */
|
||||||
#define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */
|
#define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */
|
||||||
#define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */
|
#define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */
|
||||||
#define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */
|
#define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */
|
||||||
#define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */
|
#define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */
|
||||||
#define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */
|
#define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */
|
||||||
#define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */
|
#define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */
|
||||||
#define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */
|
#define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */
|
||||||
#define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */
|
#define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */
|
||||||
#define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */
|
#define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */
|
||||||
#define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */
|
#define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */
|
||||||
#define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */
|
#define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */
|
||||||
|
|
||||||
#define GPIO_PIN_MASK ((uint32_t)0x0000FFFF) /* PIN mask for assert test */
|
#define GPIO_PIN_MASK ((uint32_t)0x0000FFFF) /* PIN mask for assert test */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup GPIO_mode GPIO mode
|
/** @defgroup GPIO_mode GPIO mode
|
||||||
* @brief GPIO Configuration Mode
|
* @brief GPIO Configuration Mode
|
||||||
* Elements values convention: 0x00WX00YZ
|
* Elements values convention: 0x00WX00YZ
|
||||||
* - W : EXTI trigger detection on 3 bits
|
* - W : EXTI trigger detection on 3 bits
|
||||||
* - X : EXTI mode (IT or Event) on 2 bits
|
* - X : EXTI mode (IT or Event) on 2 bits
|
||||||
* - Y : Output type (Push Pull or Open Drain) on 1 bit
|
* - Y : Output type (Push Pull or Open Drain) on 1 bit
|
||||||
* - Z : GPIO mode (Input, Output, Alternate or Analog) on 2 bits
|
* - Z : GPIO mode (Input, Output, Alternate or Analog) on 2 bits
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GPIO_MODE_INPUT MODE_INPUT /*!< Input Floating Mode */
|
#define GPIO_MODE_INPUT MODE_INPUT /*!< Input Floating Mode */
|
||||||
#define GPIO_MODE_OUTPUT_PP (MODE_OUTPUT | OUTPUT_PP) /*!< Output Push Pull Mode */
|
#define GPIO_MODE_OUTPUT_PP (MODE_OUTPUT | OUTPUT_PP) /*!< Output Push Pull Mode */
|
||||||
#define GPIO_MODE_OUTPUT_OD (MODE_OUTPUT | OUTPUT_OD) /*!< Output Open Drain Mode */
|
#define GPIO_MODE_OUTPUT_OD (MODE_OUTPUT | OUTPUT_OD) /*!< Output Open Drain Mode */
|
||||||
#define GPIO_MODE_AF_PP (MODE_AF | OUTPUT_PP) /*!< Alternate Function Push Pull Mode */
|
#define GPIO_MODE_AF_PP (MODE_AF | OUTPUT_PP) /*!< Alternate Function Push Pull Mode */
|
||||||
#define GPIO_MODE_AF_OD (MODE_AF | OUTPUT_OD) /*!< Alternate Function Open Drain Mode */
|
#define GPIO_MODE_AF_OD (MODE_AF | OUTPUT_OD) /*!< Alternate Function Open Drain Mode */
|
||||||
#define GPIO_MODE_ANALOG MODE_ANALOG /*!< Analog Mode */
|
#define GPIO_MODE_ANALOG MODE_ANALOG /*!< Analog Mode */
|
||||||
#define GPIO_MODE_ANALOG_ADC_CONTROL (MODE_ANALOG | 0x8uL) /*!< Analog Mode for ADC conversion (0x0000000Bu)*/
|
#define GPIO_MODE_ANALOG_ADC_CONTROL (MODE_ANALOG | 0x8uL) /*!< Analog Mode for ADC conversion (0x0000000Bu)*/
|
||||||
#define GPIO_MODE_IT_RISING (MODE_INPUT | EXTI_IT | TRIGGER_RISING) /*!< External Interrupt Mode with Rising edge trigger detection */
|
#define GPIO_MODE_IT_RISING (MODE_INPUT | EXTI_IT | TRIGGER_RISING) /*!< External Interrupt Mode with Rising edge trigger detection */
|
||||||
#define GPIO_MODE_IT_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_FALLING) /*!< External Interrupt Mode with Falling edge trigger detection */
|
#define GPIO_MODE_IT_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_FALLING) /*!< External Interrupt Mode with Falling edge trigger detection */
|
||||||
#define GPIO_MODE_IT_RISING_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
|
#define GPIO_MODE_IT_RISING_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
|
||||||
#define GPIO_MODE_EVT_RISING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING) /*!< External Event Mode with Rising edge trigger detection */
|
#define GPIO_MODE_EVT_RISING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING) /*!< External Event Mode with Rising edge trigger detection */
|
||||||
#define GPIO_MODE_EVT_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_FALLING) /*!< External Event Mode with Falling edge trigger detection */
|
#define GPIO_MODE_EVT_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_FALLING) /*!< External Event Mode with Falling edge trigger detection */
|
||||||
#define GPIO_MODE_EVT_RISING_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Event Mode with Rising/Falling edge trigger detection */
|
#define GPIO_MODE_EVT_RISING_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Event Mode with Rising/Falling edge trigger detection */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup GPIO_speed GPIO speed
|
/** @defgroup GPIO_speed GPIO speed
|
||||||
* @brief GPIO Output Maximum frequency
|
* @brief GPIO Output Maximum frequency
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GPIO_SPEED_FREQ_LOW 0x00000000u /*!< Low speed */
|
#define GPIO_SPEED_FREQ_LOW 0x00000000u /*!< Low speed */
|
||||||
#define GPIO_SPEED_FREQ_MEDIUM 0x00000001u /*!< Medium speed */
|
#define GPIO_SPEED_FREQ_MEDIUM 0x00000001u /*!< Medium speed */
|
||||||
#define GPIO_SPEED_FREQ_HIGH 0x00000002u /*!< High speed */
|
#define GPIO_SPEED_FREQ_HIGH 0x00000002u /*!< High speed */
|
||||||
#define GPIO_SPEED_FREQ_VERY_HIGH 0x00000003u /*!< Very high speed */
|
#define GPIO_SPEED_FREQ_VERY_HIGH 0x00000003u /*!< Very high speed */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup GPIO_pull GPIO pull
|
/** @defgroup GPIO_pull GPIO pull
|
||||||
* @brief GPIO Pull-Up or Pull-Down Activation
|
* @brief GPIO Pull-Up or Pull-Down Activation
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GPIO_NOPULL 0x00000000u /*!< No Pull-up or Pull-down activation */
|
#define GPIO_NOPULL 0x00000000u /*!< No Pull-up or Pull-down activation */
|
||||||
#define GPIO_PULLUP 0x00000001u /*!< Pull-up activation */
|
#define GPIO_PULLUP 0x00000001u /*!< Pull-up activation */
|
||||||
#define GPIO_PULLDOWN 0x00000002u /*!< Pull-down activation */
|
#define GPIO_PULLDOWN 0x00000002u /*!< Pull-down activation */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/** @defgroup GPIO_Exported_Macros GPIO Exported Macros
|
/** @defgroup GPIO_Exported_Macros GPIO Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check whether the specified EXTI line flag is set or not.
|
* @brief Check whether the specified EXTI line flag is set or not.
|
||||||
* @param __EXTI_LINE__ specifies the EXTI line flag to check.
|
* @param __EXTI_LINE__ specifies the EXTI line flag to check.
|
||||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||||
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
||||||
*/
|
*/
|
||||||
#define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
|
#define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the EXTI's line pending flags.
|
* @brief Clear the EXTI's line pending flags.
|
||||||
* @param __EXTI_LINE__ specifies the EXTI lines flags to clear.
|
* @param __EXTI_LINE__ specifies the EXTI lines flags to clear.
|
||||||
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
|
#define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check whether the specified EXTI line is asserted or not.
|
* @brief Check whether the specified EXTI line is asserted or not.
|
||||||
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
||||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||||
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
||||||
*/
|
*/
|
||||||
#define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
|
#define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the EXTI's line pending bits.
|
* @brief Clear the EXTI's line pending bits.
|
||||||
* @param __EXTI_LINE__ specifies the EXTI lines to clear.
|
* @param __EXTI_LINE__ specifies the EXTI lines to clear.
|
||||||
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
|
#define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Generate a Software interrupt on selected EXTI line.
|
* @brief Generate a Software interrupt on selected EXTI line.
|
||||||
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
||||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER1 |= (__EXTI_LINE__))
|
#define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER1 |= (__EXTI_LINE__))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @defgroup GPIO_Private_Constants GPIO Private Constants
|
/** @defgroup GPIO_Private_Constants GPIO Private Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define GPIO_MODE_Pos 0u
|
#define GPIO_MODE_Pos 0u
|
||||||
#define GPIO_MODE (0x3uL << GPIO_MODE_Pos)
|
#define GPIO_MODE (0x3uL << GPIO_MODE_Pos)
|
||||||
#define MODE_INPUT (0x0uL << GPIO_MODE_Pos)
|
#define MODE_INPUT (0x0uL << GPIO_MODE_Pos)
|
||||||
#define MODE_OUTPUT (0x1uL << GPIO_MODE_Pos)
|
#define MODE_OUTPUT (0x1uL << GPIO_MODE_Pos)
|
||||||
#define MODE_AF (0x2uL << GPIO_MODE_Pos)
|
#define MODE_AF (0x2uL << GPIO_MODE_Pos)
|
||||||
#define MODE_ANALOG (0x3uL << GPIO_MODE_Pos)
|
#define MODE_ANALOG (0x3uL << GPIO_MODE_Pos)
|
||||||
#define OUTPUT_TYPE_Pos 4u
|
#define OUTPUT_TYPE_Pos 4u
|
||||||
#define OUTPUT_TYPE (0x1uL << OUTPUT_TYPE_Pos)
|
#define OUTPUT_TYPE (0x1uL << OUTPUT_TYPE_Pos)
|
||||||
#define OUTPUT_PP (0x0uL << OUTPUT_TYPE_Pos)
|
#define OUTPUT_PP (0x0uL << OUTPUT_TYPE_Pos)
|
||||||
#define OUTPUT_OD (0x1uL << OUTPUT_TYPE_Pos)
|
#define OUTPUT_OD (0x1uL << OUTPUT_TYPE_Pos)
|
||||||
#define EXTI_MODE_Pos 16u
|
#define EXTI_MODE_Pos 16u
|
||||||
#define EXTI_MODE (0x3uL << EXTI_MODE_Pos)
|
#define EXTI_MODE (0x3uL << EXTI_MODE_Pos)
|
||||||
#define EXTI_IT (0x1uL << EXTI_MODE_Pos)
|
#define EXTI_IT (0x1uL << EXTI_MODE_Pos)
|
||||||
#define EXTI_EVT (0x2uL << EXTI_MODE_Pos)
|
#define EXTI_EVT (0x2uL << EXTI_MODE_Pos)
|
||||||
#define TRIGGER_MODE_Pos 20u
|
#define TRIGGER_MODE_Pos 20u
|
||||||
#define TRIGGER_MODE (0x7uL << TRIGGER_MODE_Pos)
|
#define TRIGGER_MODE (0x7uL << TRIGGER_MODE_Pos)
|
||||||
#define TRIGGER_RISING (0x1uL << TRIGGER_MODE_Pos)
|
#define TRIGGER_RISING (0x1uL << TRIGGER_MODE_Pos)
|
||||||
#define TRIGGER_FALLING (0x2uL << TRIGGER_MODE_Pos)
|
#define TRIGGER_FALLING (0x2uL << TRIGGER_MODE_Pos)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup GPIO_Private_Macros GPIO Private Macros
|
/** @addtogroup GPIO_Private_Macros GPIO Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))
|
#define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))
|
||||||
|
|
||||||
#define IS_GPIO_PIN(__PIN__) ((((uint32_t)(__PIN__) & GPIO_PIN_MASK) != 0x00U) &&\
|
#define IS_GPIO_PIN(__PIN__) ((((uint32_t)(__PIN__) & GPIO_PIN_MASK) != 0x00U) &&\
|
||||||
(((uint32_t)(__PIN__) & ~GPIO_PIN_MASK) == 0x00U))
|
(((uint32_t)(__PIN__) & ~GPIO_PIN_MASK) == 0x00U))
|
||||||
|
|
||||||
#define IS_GPIO_MODE(__MODE__) (((__MODE__) == GPIO_MODE_INPUT) ||\
|
#define IS_GPIO_MODE(__MODE__) (((__MODE__) == GPIO_MODE_INPUT) ||\
|
||||||
((__MODE__) == GPIO_MODE_OUTPUT_PP) ||\
|
((__MODE__) == GPIO_MODE_OUTPUT_PP) ||\
|
||||||
((__MODE__) == GPIO_MODE_OUTPUT_OD) ||\
|
((__MODE__) == GPIO_MODE_OUTPUT_OD) ||\
|
||||||
((__MODE__) == GPIO_MODE_AF_PP) ||\
|
((__MODE__) == GPIO_MODE_AF_PP) ||\
|
||||||
((__MODE__) == GPIO_MODE_AF_OD) ||\
|
((__MODE__) == GPIO_MODE_AF_OD) ||\
|
||||||
((__MODE__) == GPIO_MODE_IT_RISING) ||\
|
((__MODE__) == GPIO_MODE_IT_RISING) ||\
|
||||||
((__MODE__) == GPIO_MODE_IT_FALLING) ||\
|
((__MODE__) == GPIO_MODE_IT_FALLING) ||\
|
||||||
((__MODE__) == GPIO_MODE_IT_RISING_FALLING) ||\
|
((__MODE__) == GPIO_MODE_IT_RISING_FALLING) ||\
|
||||||
((__MODE__) == GPIO_MODE_EVT_RISING) ||\
|
((__MODE__) == GPIO_MODE_EVT_RISING) ||\
|
||||||
((__MODE__) == GPIO_MODE_EVT_FALLING) ||\
|
((__MODE__) == GPIO_MODE_EVT_FALLING) ||\
|
||||||
((__MODE__) == GPIO_MODE_EVT_RISING_FALLING) ||\
|
((__MODE__) == GPIO_MODE_EVT_RISING_FALLING) ||\
|
||||||
((__MODE__) == GPIO_MODE_ANALOG) ||\
|
((__MODE__) == GPIO_MODE_ANALOG) ||\
|
||||||
((__MODE__) == GPIO_MODE_ANALOG_ADC_CONTROL))
|
((__MODE__) == GPIO_MODE_ANALOG_ADC_CONTROL))
|
||||||
|
|
||||||
#define IS_GPIO_SPEED(__SPEED__) (((__SPEED__) == GPIO_SPEED_FREQ_LOW) ||\
|
#define IS_GPIO_SPEED(__SPEED__) (((__SPEED__) == GPIO_SPEED_FREQ_LOW) ||\
|
||||||
((__SPEED__) == GPIO_SPEED_FREQ_MEDIUM) ||\
|
((__SPEED__) == GPIO_SPEED_FREQ_MEDIUM) ||\
|
||||||
((__SPEED__) == GPIO_SPEED_FREQ_HIGH) ||\
|
((__SPEED__) == GPIO_SPEED_FREQ_HIGH) ||\
|
||||||
((__SPEED__) == GPIO_SPEED_FREQ_VERY_HIGH))
|
((__SPEED__) == GPIO_SPEED_FREQ_VERY_HIGH))
|
||||||
|
|
||||||
#define IS_GPIO_PULL(__PULL__) (((__PULL__) == GPIO_NOPULL) ||\
|
#define IS_GPIO_PULL(__PULL__) (((__PULL__) == GPIO_NOPULL) ||\
|
||||||
((__PULL__) == GPIO_PULLUP) || \
|
((__PULL__) == GPIO_PULLUP) || \
|
||||||
((__PULL__) == GPIO_PULLDOWN))
|
((__PULL__) == GPIO_PULLDOWN))
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Include GPIO HAL Extended module */
|
/* Include GPIO HAL Extended module */
|
||||||
#include "stm32l4xx_hal_gpio_ex.h"
|
#include "stm32l4xx_hal_gpio_ex.h"
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup GPIO_Exported_Functions GPIO Exported Functions
|
/** @addtogroup GPIO_Exported_Functions GPIO Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup GPIO_Exported_Functions_Group1 Initialization/de-initialization functions
|
/** @addtogroup GPIO_Exported_Functions_Group1 Initialization/de-initialization functions
|
||||||
* @brief Initialization and Configuration functions
|
* @brief Initialization and Configuration functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Initialization and de-initialization functions *****************************/
|
/* Initialization and de-initialization functions *****************************/
|
||||||
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
|
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
|
||||||
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
|
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup GPIO_Exported_Functions_Group2 IO operation functions
|
/** @addtogroup GPIO_Exported_Functions_Group2 IO operation functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IO operation functions *****************************************************/
|
/* IO operation functions *****************************************************/
|
||||||
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
||||||
void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
|
void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
|
||||||
void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
||||||
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
|
||||||
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
|
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
|
||||||
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_GPIO_H */
|
#endif /* STM32L4xx_HAL_GPIO_H */
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,184 +1,184 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_i2c_ex.h
|
* @file stm32l4xx_hal_i2c_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of I2C HAL Extended module.
|
* @brief Header file of I2C HAL Extended module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_I2C_EX_H
|
#ifndef STM32L4xx_HAL_I2C_EX_H
|
||||||
#define STM32L4xx_HAL_I2C_EX_H
|
#define STM32L4xx_HAL_I2C_EX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup I2CEx
|
/** @addtogroup I2CEx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/** @defgroup I2CEx_Exported_Constants I2C Extended Exported Constants
|
/** @defgroup I2CEx_Exported_Constants I2C Extended Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_Analog_Filter I2C Extended Analog Filter
|
/** @defgroup I2CEx_Analog_Filter I2C Extended Analog Filter
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_ANALOGFILTER_ENABLE 0x00000000U
|
#define I2C_ANALOGFILTER_ENABLE 0x00000000U
|
||||||
#define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
|
#define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_FastModePlus I2C Extended Fast Mode Plus
|
/** @defgroup I2CEx_FastModePlus I2C Extended Fast Mode Plus
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U /*!< Fast Mode Plus not supported */
|
#define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U /*!< Fast Mode Plus not supported */
|
||||||
#define I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */
|
#define I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */
|
||||||
#define I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */
|
#define I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */
|
||||||
#if defined(SYSCFG_CFGR1_I2C_PB8_FMP)
|
#if defined(SYSCFG_CFGR1_I2C_PB8_FMP)
|
||||||
#define I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */
|
#define I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */
|
||||||
#define I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast Mode Plus on PB9 */
|
#define I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast Mode Plus on PB9 */
|
||||||
#else
|
#else
|
||||||
#define I2C_FASTMODEPLUS_PB8 (uint32_t)(0x00000010U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PB8 not supported */
|
#define I2C_FASTMODEPLUS_PB8 (uint32_t)(0x00000010U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PB8 not supported */
|
||||||
#define I2C_FASTMODEPLUS_PB9 (uint32_t)(0x00000012U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PB9 not supported */
|
#define I2C_FASTMODEPLUS_PB9 (uint32_t)(0x00000012U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus PB9 not supported */
|
||||||
#endif /* SYSCFG_CFGR1_I2C_PB8_FMP */
|
#endif /* SYSCFG_CFGR1_I2C_PB8_FMP */
|
||||||
#define I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable Fast Mode Plus on I2C1 pins */
|
#define I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable Fast Mode Plus on I2C1 pins */
|
||||||
#if defined(SYSCFG_CFGR1_I2C2_FMP)
|
#if defined(SYSCFG_CFGR1_I2C2_FMP)
|
||||||
#define I2C_FASTMODEPLUS_I2C2 SYSCFG_CFGR1_I2C2_FMP /*!< Enable Fast Mode Plus on I2C2 pins */
|
#define I2C_FASTMODEPLUS_I2C2 SYSCFG_CFGR1_I2C2_FMP /*!< Enable Fast Mode Plus on I2C2 pins */
|
||||||
#else
|
#else
|
||||||
#define I2C_FASTMODEPLUS_I2C2 (uint32_t)(0x00000200U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C2 not supported */
|
#define I2C_FASTMODEPLUS_I2C2 (uint32_t)(0x00000200U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C2 not supported */
|
||||||
#endif /* SYSCFG_CFGR1_I2C2_FMP */
|
#endif /* SYSCFG_CFGR1_I2C2_FMP */
|
||||||
#define I2C_FASTMODEPLUS_I2C3 SYSCFG_CFGR1_I2C3_FMP /*!< Enable Fast Mode Plus on I2C3 pins */
|
#define I2C_FASTMODEPLUS_I2C3 SYSCFG_CFGR1_I2C3_FMP /*!< Enable Fast Mode Plus on I2C3 pins */
|
||||||
#if defined(SYSCFG_CFGR1_I2C4_FMP)
|
#if defined(SYSCFG_CFGR1_I2C4_FMP)
|
||||||
#define I2C_FASTMODEPLUS_I2C4 SYSCFG_CFGR1_I2C4_FMP /*!< Enable Fast Mode Plus on I2C4 pins */
|
#define I2C_FASTMODEPLUS_I2C4 SYSCFG_CFGR1_I2C4_FMP /*!< Enable Fast Mode Plus on I2C4 pins */
|
||||||
#else
|
#else
|
||||||
#define I2C_FASTMODEPLUS_I2C4 (uint32_t)(0x00000800U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C4 not supported */
|
#define I2C_FASTMODEPLUS_I2C4 (uint32_t)(0x00000800U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C4 not supported */
|
||||||
#endif /* SYSCFG_CFGR1_I2C4_FMP */
|
#endif /* SYSCFG_CFGR1_I2C4_FMP */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/** @defgroup I2CEx_Exported_Macros I2C Extended Exported Macros
|
/** @defgroup I2CEx_Exported_Macros I2C Extended Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup I2CEx_Exported_Functions I2C Extended Exported Functions
|
/** @addtogroup I2CEx_Exported_Functions I2C Extended Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup I2CEx_Exported_Functions_Group1 Filter Mode Functions
|
/** @addtogroup I2CEx_Exported_Functions_Group1 Filter Mode Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Peripheral Control functions ************************************************/
|
/* Peripheral Control functions ************************************************/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
|
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
|
||||||
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
|
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions
|
/** @addtogroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c);
|
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c);
|
||||||
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c);
|
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
|
/** @addtogroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
|
void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
|
||||||
void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
|
void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
/** @defgroup I2CEx_Private_Constants I2C Extended Private Constants
|
/** @defgroup I2CEx_Private_Constants I2C Extended Private Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @defgroup I2CEx_Private_Macro I2C Extended Private Macros
|
/** @defgroup I2CEx_Private_Macro I2C Extended Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
|
#define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
|
||||||
((FILTER) == I2C_ANALOGFILTER_DISABLE))
|
((FILTER) == I2C_ANALOGFILTER_DISABLE))
|
||||||
|
|
||||||
#define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
|
#define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
|
||||||
|
|
||||||
#define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FMP_NOT_SUPPORTED) != I2C_FMP_NOT_SUPPORTED) && \
|
#define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & I2C_FMP_NOT_SUPPORTED) != I2C_FMP_NOT_SUPPORTED) && \
|
||||||
((((__CONFIG__) & (I2C_FASTMODEPLUS_PB6)) == I2C_FASTMODEPLUS_PB6) || \
|
((((__CONFIG__) & (I2C_FASTMODEPLUS_PB6)) == I2C_FASTMODEPLUS_PB6) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB7)) == I2C_FASTMODEPLUS_PB7) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB7)) == I2C_FASTMODEPLUS_PB7) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB8)) == I2C_FASTMODEPLUS_PB8) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB8)) == I2C_FASTMODEPLUS_PB8) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB9)) == I2C_FASTMODEPLUS_PB9) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_PB9)) == I2C_FASTMODEPLUS_PB9) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C1)) == I2C_FASTMODEPLUS_I2C1) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C1)) == I2C_FASTMODEPLUS_I2C1) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C2)) == I2C_FASTMODEPLUS_I2C2) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C2)) == I2C_FASTMODEPLUS_I2C2) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C3)) == I2C_FASTMODEPLUS_I2C3) || \
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C3)) == I2C_FASTMODEPLUS_I2C3) || \
|
||||||
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C4)) == I2C_FASTMODEPLUS_I2C4)))
|
(((__CONFIG__) & (I2C_FASTMODEPLUS_I2C4)) == I2C_FASTMODEPLUS_I2C4)))
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Private Functions ---------------------------------------------------------*/
|
/* Private Functions ---------------------------------------------------------*/
|
||||||
/** @defgroup I2CEx_Private_Functions I2C Extended Private Functions
|
/** @defgroup I2CEx_Private_Functions I2C Extended Private Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Private functions are defined in stm32l4xx_hal_i2c_ex.c file */
|
/* Private functions are defined in stm32l4xx_hal_i2c_ex.c file */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_I2C_EX_H */
|
#endif /* STM32L4xx_HAL_I2C_EX_H */
|
||||||
|
@ -1,411 +1,411 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_pwr.h
|
* @file stm32l4xx_hal_pwr.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of PWR HAL module.
|
* @brief Header file of PWR HAL module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_PWR_H
|
#ifndef STM32L4xx_HAL_PWR_H
|
||||||
#define STM32L4xx_HAL_PWR_H
|
#define STM32L4xx_HAL_PWR_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup PWR
|
/** @addtogroup PWR
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup PWR_Exported_Types PWR Exported Types
|
/** @defgroup PWR_Exported_Types PWR Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief PWR PVD configuration structure definition
|
* @brief PWR PVD configuration structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t PVDLevel; /*!< PVDLevel: Specifies the PVD detection level.
|
uint32_t PVDLevel; /*!< PVDLevel: Specifies the PVD detection level.
|
||||||
This parameter can be a value of @ref PWR_PVD_detection_level. */
|
This parameter can be a value of @ref PWR_PVD_detection_level. */
|
||||||
|
|
||||||
uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins.
|
uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins.
|
||||||
This parameter can be a value of @ref PWR_PVD_Mode. */
|
This parameter can be a value of @ref PWR_PVD_Mode. */
|
||||||
}PWR_PVDTypeDef;
|
}PWR_PVDTypeDef;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup PWR_Exported_Constants PWR Exported Constants
|
/** @defgroup PWR_Exported_Constants PWR Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup PWR_PVD_detection_level Programmable Voltage Detection levels
|
/** @defgroup PWR_PVD_detection_level Programmable Voltage Detection levels
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_PVDLEVEL_0 PWR_CR2_PLS_LEV0 /*!< PVD threshold around 2.0 V */
|
#define PWR_PVDLEVEL_0 PWR_CR2_PLS_LEV0 /*!< PVD threshold around 2.0 V */
|
||||||
#define PWR_PVDLEVEL_1 PWR_CR2_PLS_LEV1 /*!< PVD threshold around 2.2 V */
|
#define PWR_PVDLEVEL_1 PWR_CR2_PLS_LEV1 /*!< PVD threshold around 2.2 V */
|
||||||
#define PWR_PVDLEVEL_2 PWR_CR2_PLS_LEV2 /*!< PVD threshold around 2.4 V */
|
#define PWR_PVDLEVEL_2 PWR_CR2_PLS_LEV2 /*!< PVD threshold around 2.4 V */
|
||||||
#define PWR_PVDLEVEL_3 PWR_CR2_PLS_LEV3 /*!< PVD threshold around 2.5 V */
|
#define PWR_PVDLEVEL_3 PWR_CR2_PLS_LEV3 /*!< PVD threshold around 2.5 V */
|
||||||
#define PWR_PVDLEVEL_4 PWR_CR2_PLS_LEV4 /*!< PVD threshold around 2.6 V */
|
#define PWR_PVDLEVEL_4 PWR_CR2_PLS_LEV4 /*!< PVD threshold around 2.6 V */
|
||||||
#define PWR_PVDLEVEL_5 PWR_CR2_PLS_LEV5 /*!< PVD threshold around 2.8 V */
|
#define PWR_PVDLEVEL_5 PWR_CR2_PLS_LEV5 /*!< PVD threshold around 2.8 V */
|
||||||
#define PWR_PVDLEVEL_6 PWR_CR2_PLS_LEV6 /*!< PVD threshold around 2.9 V */
|
#define PWR_PVDLEVEL_6 PWR_CR2_PLS_LEV6 /*!< PVD threshold around 2.9 V */
|
||||||
#define PWR_PVDLEVEL_7 PWR_CR2_PLS_LEV7 /*!< External input analog voltage (compared internally to VREFINT) */
|
#define PWR_PVDLEVEL_7 PWR_CR2_PLS_LEV7 /*!< External input analog voltage (compared internally to VREFINT) */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup PWR_PVD_Mode PWR PVD interrupt and event mode
|
/** @defgroup PWR_PVD_Mode PWR PVD interrupt and event mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_PVD_MODE_NORMAL ((uint32_t)0x00000000) /*!< Basic mode is used */
|
#define PWR_PVD_MODE_NORMAL ((uint32_t)0x00000000) /*!< Basic mode is used */
|
||||||
#define PWR_PVD_MODE_IT_RISING ((uint32_t)0x00010001) /*!< External Interrupt Mode with Rising edge trigger detection */
|
#define PWR_PVD_MODE_IT_RISING ((uint32_t)0x00010001) /*!< External Interrupt Mode with Rising edge trigger detection */
|
||||||
#define PWR_PVD_MODE_IT_FALLING ((uint32_t)0x00010002) /*!< External Interrupt Mode with Falling edge trigger detection */
|
#define PWR_PVD_MODE_IT_FALLING ((uint32_t)0x00010002) /*!< External Interrupt Mode with Falling edge trigger detection */
|
||||||
#define PWR_PVD_MODE_IT_RISING_FALLING ((uint32_t)0x00010003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
|
#define PWR_PVD_MODE_IT_RISING_FALLING ((uint32_t)0x00010003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
|
||||||
#define PWR_PVD_MODE_EVENT_RISING ((uint32_t)0x00020001) /*!< Event Mode with Rising edge trigger detection */
|
#define PWR_PVD_MODE_EVENT_RISING ((uint32_t)0x00020001) /*!< Event Mode with Rising edge trigger detection */
|
||||||
#define PWR_PVD_MODE_EVENT_FALLING ((uint32_t)0x00020002) /*!< Event Mode with Falling edge trigger detection */
|
#define PWR_PVD_MODE_EVENT_FALLING ((uint32_t)0x00020002) /*!< Event Mode with Falling edge trigger detection */
|
||||||
#define PWR_PVD_MODE_EVENT_RISING_FALLING ((uint32_t)0x00020003) /*!< Event Mode with Rising/Falling edge trigger detection */
|
#define PWR_PVD_MODE_EVENT_RISING_FALLING ((uint32_t)0x00020003) /*!< Event Mode with Rising/Falling edge trigger detection */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup PWR_Regulator_state_in_SLEEP_STOP_mode PWR regulator mode
|
/** @defgroup PWR_Regulator_state_in_SLEEP_STOP_mode PWR regulator mode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_MAINREGULATOR_ON ((uint32_t)0x00000000) /*!< Regulator in main mode */
|
#define PWR_MAINREGULATOR_ON ((uint32_t)0x00000000) /*!< Regulator in main mode */
|
||||||
#define PWR_LOWPOWERREGULATOR_ON PWR_CR1_LPR /*!< Regulator in low-power mode */
|
#define PWR_LOWPOWERREGULATOR_ON PWR_CR1_LPR /*!< Regulator in low-power mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup PWR_SLEEP_mode_entry PWR SLEEP mode entry
|
/** @defgroup PWR_SLEEP_mode_entry PWR SLEEP mode entry
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Sleep mode */
|
#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Sleep mode */
|
||||||
#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Sleep mode */
|
#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Sleep mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup PWR_STOP_mode_entry PWR STOP mode entry
|
/** @defgroup PWR_STOP_mode_entry PWR STOP mode entry
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_STOPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Stop mode */
|
#define PWR_STOPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Stop mode */
|
||||||
#define PWR_STOPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Stop mode */
|
#define PWR_STOPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Stop mode */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup PWR_PVD_EXTI_LINE PWR PVD external interrupt line
|
/** @defgroup PWR_PVD_EXTI_LINE PWR PVD external interrupt line
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_EXTI_LINE_PVD ((uint32_t)0x00010000) /*!< External interrupt line 16 Connected to the PVD EXTI Line */
|
#define PWR_EXTI_LINE_PVD ((uint32_t)0x00010000) /*!< External interrupt line 16 Connected to the PVD EXTI Line */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup PWR_PVD_EVENT_LINE PWR PVD event line
|
/** @defgroup PWR_PVD_EVENT_LINE PWR PVD event line
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define PWR_EVENT_LINE_PVD ((uint32_t)0x00010000) /*!< Event line 16 Connected to the PVD Event Line */
|
#define PWR_EVENT_LINE_PVD ((uint32_t)0x00010000) /*!< Event line 16 Connected to the PVD Event Line */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported macros -----------------------------------------------------------*/
|
/* Exported macros -----------------------------------------------------------*/
|
||||||
/** @defgroup PWR_Exported_Macros PWR Exported Macros
|
/** @defgroup PWR_Exported_Macros PWR Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief Check whether or not a specific PWR flag is set.
|
/** @brief Check whether or not a specific PWR flag is set.
|
||||||
* @param __FLAG__ specifies the flag to check.
|
* @param __FLAG__ specifies the flag to check.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 1.
|
* was received from the WKUP pin 1.
|
||||||
* @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 2.
|
* was received from the WKUP pin 2.
|
||||||
* @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 3.
|
* was received from the WKUP pin 3.
|
||||||
* @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 4.
|
* was received from the WKUP pin 4.
|
||||||
* @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 5.
|
* was received from the WKUP pin 5.
|
||||||
* @arg @ref PWR_FLAG_SB StandBy Flag. Indicates that the system
|
* @arg @ref PWR_FLAG_SB StandBy Flag. Indicates that the system
|
||||||
* entered StandBy mode.
|
* entered StandBy mode.
|
||||||
* @arg @ref PWR_FLAG_EXT_SMPS External SMPS Ready Flag. When available on device, indicates
|
* @arg @ref PWR_FLAG_EXT_SMPS External SMPS Ready Flag. When available on device, indicates
|
||||||
* that external switch can be closed to connect to the external SMPS, when the Range 2
|
* that external switch can be closed to connect to the external SMPS, when the Range 2
|
||||||
* of internal regulator is ready.
|
* of internal regulator is ready.
|
||||||
* @arg @ref PWR_FLAG_WUFI Wake-Up Flag Internal. Set when a wakeup is detected on
|
* @arg @ref PWR_FLAG_WUFI Wake-Up Flag Internal. Set when a wakeup is detected on
|
||||||
* the internal wakeup line.
|
* the internal wakeup line.
|
||||||
* @arg @ref PWR_FLAG_REGLPS Low Power Regulator Started. Indicates whether or not the
|
* @arg @ref PWR_FLAG_REGLPS Low Power Regulator Started. Indicates whether or not the
|
||||||
* low-power regulator is ready.
|
* low-power regulator is ready.
|
||||||
* @arg @ref PWR_FLAG_REGLPF Low Power Regulator Flag. Indicates whether the
|
* @arg @ref PWR_FLAG_REGLPF Low Power Regulator Flag. Indicates whether the
|
||||||
* regulator is ready in main mode or is in low-power mode.
|
* regulator is ready in main mode or is in low-power mode.
|
||||||
* @arg @ref PWR_FLAG_VOSF Voltage Scaling Flag. Indicates whether the regulator is ready
|
* @arg @ref PWR_FLAG_VOSF Voltage Scaling Flag. Indicates whether the regulator is ready
|
||||||
* in the selected voltage range or is still changing to the required voltage level.
|
* in the selected voltage range or is still changing to the required voltage level.
|
||||||
* @arg @ref PWR_FLAG_PVDO Power Voltage Detector Output. Indicates whether VDD voltage is
|
* @arg @ref PWR_FLAG_PVDO Power Voltage Detector Output. Indicates whether VDD voltage is
|
||||||
* below or above the selected PVD threshold.
|
* below or above the selected PVD threshold.
|
||||||
* @arg @ref PWR_FLAG_PVMO1 Peripheral Voltage Monitoring Output 1. Indicates whether VDDUSB voltage is
|
* @arg @ref PWR_FLAG_PVMO1 Peripheral Voltage Monitoring Output 1. Indicates whether VDDUSB voltage is
|
||||||
* is below or above PVM1 threshold (applicable when USB feature is supported).
|
* is below or above PVM1 threshold (applicable when USB feature is supported).
|
||||||
@if STM32L486xx
|
@if STM32L486xx
|
||||||
* @arg @ref PWR_FLAG_PVMO2 Peripheral Voltage Monitoring Output 2. Indicates whether VDDIO2 voltage is
|
* @arg @ref PWR_FLAG_PVMO2 Peripheral Voltage Monitoring Output 2. Indicates whether VDDIO2 voltage is
|
||||||
* is below or above PVM2 threshold (applicable when VDDIO2 is present on device).
|
* is below or above PVM2 threshold (applicable when VDDIO2 is present on device).
|
||||||
@endif
|
@endif
|
||||||
* @arg @ref PWR_FLAG_PVMO3 Peripheral Voltage Monitoring Output 3. Indicates whether VDDA voltage is
|
* @arg @ref PWR_FLAG_PVMO3 Peripheral Voltage Monitoring Output 3. Indicates whether VDDA voltage is
|
||||||
* is below or above PVM3 threshold.
|
* is below or above PVM3 threshold.
|
||||||
* @arg @ref PWR_FLAG_PVMO4 Peripheral Voltage Monitoring Output 4. Indicates whether VDDA voltage is
|
* @arg @ref PWR_FLAG_PVMO4 Peripheral Voltage Monitoring Output 4. Indicates whether VDDA voltage is
|
||||||
* is below or above PVM4 threshold.
|
* is below or above PVM4 threshold.
|
||||||
*
|
*
|
||||||
* @retval The new state of __FLAG__ (TRUE or FALSE).
|
* @retval The new state of __FLAG__ (TRUE or FALSE).
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_GET_FLAG(__FLAG__) ( ((((uint8_t)(__FLAG__)) >> 5U) == 1) ?\
|
#define __HAL_PWR_GET_FLAG(__FLAG__) ( ((((uint8_t)(__FLAG__)) >> 5U) == 1) ?\
|
||||||
(PWR->SR1 & (1U << ((__FLAG__) & 31U))) :\
|
(PWR->SR1 & (1U << ((__FLAG__) & 31U))) :\
|
||||||
(PWR->SR2 & (1U << ((__FLAG__) & 31U))) )
|
(PWR->SR2 & (1U << ((__FLAG__) & 31U))) )
|
||||||
|
|
||||||
/** @brief Clear a specific PWR flag.
|
/** @brief Clear a specific PWR flag.
|
||||||
* @param __FLAG__ specifies the flag to clear.
|
* @param __FLAG__ specifies the flag to clear.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 1.
|
* was received from the WKUP pin 1.
|
||||||
* @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 2.
|
* was received from the WKUP pin 2.
|
||||||
* @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 3.
|
* was received from the WKUP pin 3.
|
||||||
* @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 4.
|
* was received from the WKUP pin 4.
|
||||||
* @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event
|
* @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event
|
||||||
* was received from the WKUP pin 5.
|
* was received from the WKUP pin 5.
|
||||||
* @arg @ref PWR_FLAG_WU Encompasses all five Wake Up Flags.
|
* @arg @ref PWR_FLAG_WU Encompasses all five Wake Up Flags.
|
||||||
* @arg @ref PWR_FLAG_SB Standby Flag. Indicates that the system
|
* @arg @ref PWR_FLAG_SB Standby Flag. Indicates that the system
|
||||||
* entered Standby mode.
|
* entered Standby mode.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_CLEAR_FLAG(__FLAG__) ( (((uint8_t)(__FLAG__)) == PWR_FLAG_WU) ?\
|
#define __HAL_PWR_CLEAR_FLAG(__FLAG__) ( (((uint8_t)(__FLAG__)) == PWR_FLAG_WU) ?\
|
||||||
(PWR->SCR = (__FLAG__)) :\
|
(PWR->SCR = (__FLAG__)) :\
|
||||||
(PWR->SCR = (1U << ((__FLAG__) & 31U))) )
|
(PWR->SCR = (1U << ((__FLAG__) & 31U))) )
|
||||||
/**
|
/**
|
||||||
* @brief Enable the PVD Extended Interrupt Line.
|
* @brief Enable the PVD Extended Interrupt Line.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the PVD Extended Interrupt Line.
|
* @brief Disable the PVD Extended Interrupt Line.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the PVD Event Line.
|
* @brief Enable the PVD Event Line.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the PVD Event Line.
|
* @brief Disable the PVD Event Line.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the PVD Extended Interrupt Rising Trigger.
|
* @brief Enable the PVD Extended Interrupt Rising Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the PVD Extended Interrupt Rising Trigger.
|
* @brief Disable the PVD Extended Interrupt Rising Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the PVD Extended Interrupt Falling Trigger.
|
* @brief Enable the PVD Extended Interrupt Falling Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the PVD Extended Interrupt Falling Trigger.
|
* @brief Disable the PVD Extended Interrupt Falling Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the PVD Extended Interrupt Rising & Falling Trigger.
|
* @brief Enable the PVD Extended Interrupt Rising & Falling Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE() \
|
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE() \
|
||||||
do { \
|
do { \
|
||||||
__HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE(); \
|
__HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE(); \
|
||||||
__HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE(); \
|
__HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the PVD Extended Interrupt Rising & Falling Trigger.
|
* @brief Disable the PVD Extended Interrupt Rising & Falling Trigger.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE() \
|
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE() \
|
||||||
do { \
|
do { \
|
||||||
__HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); \
|
__HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); \
|
||||||
__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); \
|
__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Generate a Software interrupt on selected EXTI line.
|
* @brief Generate a Software interrupt on selected EXTI line.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check whether or not the PVD EXTI interrupt flag is set.
|
* @brief Check whether or not the PVD EXTI interrupt flag is set.
|
||||||
* @retval EXTI PVD Line Status.
|
* @retval EXTI PVD Line Status.
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_GET_FLAG() (EXTI->PR1 & PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_GET_FLAG() (EXTI->PR1 & PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the PVD EXTI interrupt flag.
|
* @brief Clear the PVD EXTI interrupt flag.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR1, PWR_EXTI_LINE_PVD)
|
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR1, PWR_EXTI_LINE_PVD)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Private macros --------------------------------------------------------*/
|
/* Private macros --------------------------------------------------------*/
|
||||||
/** @addtogroup PWR_Private_Macros PWR Private Macros
|
/** @addtogroup PWR_Private_Macros PWR Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \
|
#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \
|
||||||
((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \
|
((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \
|
||||||
((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \
|
((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \
|
||||||
((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))
|
((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))
|
||||||
|
|
||||||
#define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_NORMAL) ||\
|
#define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_NORMAL) ||\
|
||||||
((MODE) == PWR_PVD_MODE_IT_RISING) ||\
|
((MODE) == PWR_PVD_MODE_IT_RISING) ||\
|
||||||
((MODE) == PWR_PVD_MODE_IT_FALLING) ||\
|
((MODE) == PWR_PVD_MODE_IT_FALLING) ||\
|
||||||
((MODE) == PWR_PVD_MODE_IT_RISING_FALLING) ||\
|
((MODE) == PWR_PVD_MODE_IT_RISING_FALLING) ||\
|
||||||
((MODE) == PWR_PVD_MODE_EVENT_RISING) ||\
|
((MODE) == PWR_PVD_MODE_EVENT_RISING) ||\
|
||||||
((MODE) == PWR_PVD_MODE_EVENT_FALLING) ||\
|
((MODE) == PWR_PVD_MODE_EVENT_FALLING) ||\
|
||||||
((MODE) == PWR_PVD_MODE_EVENT_RISING_FALLING))
|
((MODE) == PWR_PVD_MODE_EVENT_RISING_FALLING))
|
||||||
|
|
||||||
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
|
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
|
||||||
((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
|
((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
|
||||||
|
|
||||||
#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
|
#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
|
||||||
|
|
||||||
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE) )
|
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Include PWR HAL Extended module */
|
/* Include PWR HAL Extended module */
|
||||||
#include "stm32l4xx_hal_pwr_ex.h"
|
#include "stm32l4xx_hal_pwr_ex.h"
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
|
|
||||||
/** @addtogroup PWR_Exported_Functions PWR Exported Functions
|
/** @addtogroup PWR_Exported_Functions PWR Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions
|
/** @addtogroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Initialization and de-initialization functions *******************************/
|
/* Initialization and de-initialization functions *******************************/
|
||||||
void HAL_PWR_DeInit(void);
|
void HAL_PWR_DeInit(void);
|
||||||
void HAL_PWR_EnableBkUpAccess(void);
|
void HAL_PWR_EnableBkUpAccess(void);
|
||||||
void HAL_PWR_DisableBkUpAccess(void);
|
void HAL_PWR_DisableBkUpAccess(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions
|
/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Peripheral Control functions ************************************************/
|
/* Peripheral Control functions ************************************************/
|
||||||
HAL_StatusTypeDef HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD);
|
HAL_StatusTypeDef HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD);
|
||||||
void HAL_PWR_EnablePVD(void);
|
void HAL_PWR_EnablePVD(void);
|
||||||
void HAL_PWR_DisablePVD(void);
|
void HAL_PWR_DisablePVD(void);
|
||||||
|
|
||||||
|
|
||||||
/* WakeUp pins configuration functions ****************************************/
|
/* WakeUp pins configuration functions ****************************************/
|
||||||
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity);
|
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity);
|
||||||
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx);
|
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx);
|
||||||
|
|
||||||
/* Low Power modes configuration functions ************************************/
|
/* Low Power modes configuration functions ************************************/
|
||||||
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry);
|
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry);
|
||||||
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry);
|
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry);
|
||||||
void HAL_PWR_EnterSTANDBYMode(void);
|
void HAL_PWR_EnterSTANDBYMode(void);
|
||||||
|
|
||||||
void HAL_PWR_EnableSleepOnExit(void);
|
void HAL_PWR_EnableSleepOnExit(void);
|
||||||
void HAL_PWR_DisableSleepOnExit(void);
|
void HAL_PWR_DisableSleepOnExit(void);
|
||||||
void HAL_PWR_EnableSEVOnPend(void);
|
void HAL_PWR_EnableSEVOnPend(void);
|
||||||
void HAL_PWR_DisableSEVOnPend(void);
|
void HAL_PWR_DisableSEVOnPend(void);
|
||||||
|
|
||||||
void HAL_PWR_PVDCallback(void);
|
void HAL_PWR_PVDCallback(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_PWR_H */
|
#endif /* STM32L4xx_HAL_PWR_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,439 +1,439 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_tim_ex.h
|
* @file stm32l4xx_hal_tim_ex.h
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief Header file of TIM HAL Extended module.
|
* @brief Header file of TIM HAL Extended module.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef STM32L4xx_HAL_TIM_EX_H
|
#ifndef STM32L4xx_HAL_TIM_EX_H
|
||||||
#define STM32L4xx_HAL_TIM_EX_H
|
#define STM32L4xx_HAL_TIM_EX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal_def.h"
|
#include "stm32l4xx_hal_def.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx
|
/** @addtogroup TIMEx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/** @defgroup TIMEx_Exported_Types TIM Extended Exported Types
|
/** @defgroup TIMEx_Exported_Types TIM Extended Exported Types
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TIM Hall sensor Configuration Structure definition
|
* @brief TIM Hall sensor Configuration Structure definition
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
|
uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
|
||||||
This parameter can be a value of @ref TIM_Input_Capture_Polarity */
|
This parameter can be a value of @ref TIM_Input_Capture_Polarity */
|
||||||
|
|
||||||
uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler.
|
uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler.
|
||||||
This parameter can be a value of @ref TIM_Input_Capture_Prescaler */
|
This parameter can be a value of @ref TIM_Input_Capture_Prescaler */
|
||||||
|
|
||||||
uint32_t IC1Filter; /*!< Specifies the input capture filter.
|
uint32_t IC1Filter; /*!< Specifies the input capture filter.
|
||||||
This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
|
This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
|
||||||
|
|
||||||
uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
|
uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
|
||||||
This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
|
This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
|
||||||
} TIM_HallSensor_InitTypeDef;
|
} TIM_HallSensor_InitTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TIM Break/Break2 input configuration
|
* @brief TIM Break/Break2 input configuration
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t Source; /*!< Specifies the source of the timer break input.
|
uint32_t Source; /*!< Specifies the source of the timer break input.
|
||||||
This parameter can be a value of @ref TIMEx_Break_Input_Source */
|
This parameter can be a value of @ref TIMEx_Break_Input_Source */
|
||||||
uint32_t Enable; /*!< Specifies whether or not the break input source is enabled.
|
uint32_t Enable; /*!< Specifies whether or not the break input source is enabled.
|
||||||
This parameter can be a value of @ref TIMEx_Break_Input_Source_Enable */
|
This parameter can be a value of @ref TIMEx_Break_Input_Source_Enable */
|
||||||
uint32_t Polarity; /*!< Specifies the break input source polarity.
|
uint32_t Polarity; /*!< Specifies the break input source polarity.
|
||||||
This parameter can be a value of @ref TIMEx_Break_Input_Source_Polarity
|
This parameter can be a value of @ref TIMEx_Break_Input_Source_Polarity
|
||||||
Not relevant when analog watchdog output of the DFSDM1 used as break input source */
|
Not relevant when analog watchdog output of the DFSDM1 used as break input source */
|
||||||
} TIMEx_BreakInputConfigTypeDef;
|
} TIMEx_BreakInputConfigTypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of exported types -----------------------------------------------------*/
|
/* End of exported types -----------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants
|
/** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup TIMEx_Remap TIM Extended Remapping
|
/** @defgroup TIMEx_Remap TIM Extended Remapping
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TIM_TIM1_ETR_ADC1_NONE 0x00000000U /*!< TIM1_ETR is not connected to any AWD (analog watchdog)*/
|
#define TIM_TIM1_ETR_ADC1_NONE 0x00000000U /* !< TIM1_ETR is not connected to any AWD (analog watchdog)*/
|
||||||
#define TIM_TIM1_ETR_ADC1_AWD1 TIM1_OR1_ETR_ADC1_RMP_0 /*!< TIM1_ETR is connected to ADC1 AWD1 */
|
#define TIM_TIM1_ETR_ADC1_AWD1 TIM1_OR1_ETR_ADC1_RMP_0 /* !< TIM1_ETR is connected to ADC1 AWD1 */
|
||||||
#define TIM_TIM1_ETR_ADC1_AWD2 TIM1_OR1_ETR_ADC1_RMP_1 /*!< TIM1_ETR is connected to ADC1 AWD2 */
|
#define TIM_TIM1_ETR_ADC1_AWD2 TIM1_OR1_ETR_ADC1_RMP_1 /* !< TIM1_ETR is connected to ADC1 AWD2 */
|
||||||
#define TIM_TIM1_ETR_ADC1_AWD3 (TIM1_OR1_ETR_ADC1_RMP_1 | TIM1_OR1_ETR_ADC1_RMP_0) /*!< TIM1_ETR is connected to ADC1 AWD3 */
|
#define TIM_TIM1_ETR_ADC1_AWD3 (TIM1_OR1_ETR_ADC1_RMP_1 | TIM1_OR1_ETR_ADC1_RMP_0) /* !< TIM1_ETR is connected to ADC1 AWD3 */
|
||||||
#if defined (ADC3)
|
#if defined (ADC3)
|
||||||
#define TIM_TIM1_ETR_ADC3_NONE 0x00000000U /*!< TIM1_ETR is not connected to any AWD (analog watchdog)*/
|
#define TIM_TIM1_ETR_ADC3_NONE 0x00000000U /* !< TIM1_ETR is not connected to any AWD (analog watchdog)*/
|
||||||
#define TIM_TIM1_ETR_ADC3_AWD1 TIM1_OR1_ETR_ADC3_RMP_0 /*!< TIM1_ETR is connected to ADC3 AWD1 */
|
#define TIM_TIM1_ETR_ADC3_AWD1 TIM1_OR1_ETR_ADC3_RMP_0 /* !< TIM1_ETR is connected to ADC3 AWD1 */
|
||||||
#define TIM_TIM1_ETR_ADC3_AWD2 TIM1_OR1_ETR_ADC3_RMP_1 /*!< TIM1_ETR is connected to ADC3 AWD2 */
|
#define TIM_TIM1_ETR_ADC3_AWD2 TIM1_OR1_ETR_ADC3_RMP_1 /* !< TIM1_ETR is connected to ADC3 AWD2 */
|
||||||
#define TIM_TIM1_ETR_ADC3_AWD3 (TIM1_OR1_ETR_ADC3_RMP_1 | TIM1_OR1_ETR_ADC3_RMP_0) /*!< TIM1_ETR is connected to ADC3 AWD3 */
|
#define TIM_TIM1_ETR_ADC3_AWD3 (TIM1_OR1_ETR_ADC3_RMP_1 | TIM1_OR1_ETR_ADC3_RMP_0) /* !< TIM1_ETR is connected to ADC3 AWD3 */
|
||||||
#endif /* ADC3 */
|
#endif /* ADC3 */
|
||||||
#define TIM_TIM1_TI1_GPIO 0x00000000U /*!< TIM1 TI1 is connected to GPIO */
|
#define TIM_TIM1_TI1_GPIO 0x00000000U /* !< TIM1 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM1_TI1_COMP1 TIM1_OR1_TI1_RMP /*!< TIM1 TI1 is connected to COMP1 */
|
#define TIM_TIM1_TI1_COMP1 TIM1_OR1_TI1_RMP /* !< TIM1 TI1 is connected to COMP1 */
|
||||||
#define TIM_TIM1_ETR_GPIO 0x00000000U /*!< TIM1_ETR is connected to GPIO */
|
#define TIM_TIM1_ETR_GPIO 0x00000000U /* !< TIM1_ETR is connected to GPIO */
|
||||||
#define TIM_TIM1_ETR_COMP1 TIM1_OR2_ETRSEL_0 /*!< TIM1_ETR is connected to COMP1 output */
|
#define TIM_TIM1_ETR_COMP1 TIM1_OR2_ETRSEL_0 /* !< TIM1_ETR is connected to COMP1 output */
|
||||||
#if defined(COMP2)
|
#if defined(COMP2)
|
||||||
#define TIM_TIM1_ETR_COMP2 TIM1_OR2_ETRSEL_1 /*!< TIM1_ETR is connected to COMP2 output */
|
#define TIM_TIM1_ETR_COMP2 TIM1_OR2_ETRSEL_1 /* !< TIM1_ETR is connected to COMP2 output */
|
||||||
#endif /* COMP2 */
|
#endif /* COMP2 */
|
||||||
|
|
||||||
#if defined (USB_OTG_FS)
|
#if defined (USB_OTG_FS)
|
||||||
#define TIM_TIM2_ITR1_TIM8_TRGO 0x00000000U /*!< TIM2_ITR1 is connected to TIM8_TRGO */
|
#define TIM_TIM2_ITR1_TIM8_TRGO 0x00000000U /* !< TIM2_ITR1 is connected to TIM8_TRGO */
|
||||||
#define TIM_TIM2_ITR1_OTG_FS_SOF TIM2_OR1_ITR1_RMP /*!< TIM2_ITR1 is connected to OTG_FS SOF */
|
#define TIM_TIM2_ITR1_OTG_FS_SOF TIM2_OR1_ITR1_RMP /* !< TIM2_ITR1 is connected to OTG_FS SOF */
|
||||||
#else
|
#else
|
||||||
#if defined(STM32L471xx)
|
#if defined(STM32L471xx)
|
||||||
#define TIM_TIM2_ITR1_TIM8_TRGO 0x00000000U /*!< TIM2_ITR1 is connected to TIM8_TRGO */
|
#define TIM_TIM2_ITR1_TIM8_TRGO 0x00000000U /* !< TIM2_ITR1 is connected to TIM8_TRGO */
|
||||||
#define TIM_TIM2_ITR1_NONE TIM2_OR1_ITR1_RMP /*!< No internal trigger on TIM2_ITR1 */
|
#define TIM_TIM2_ITR1_NONE TIM2_OR1_ITR1_RMP /* !< No internal trigger on TIM2_ITR1 */
|
||||||
#else
|
#else
|
||||||
#define TIM_TIM2_ITR1_NONE 0x00000000U /*!< No internal trigger on TIM2_ITR1 */
|
#define TIM_TIM2_ITR1_NONE 0x00000000U /* !< No internal trigger on TIM2_ITR1 */
|
||||||
#define TIM_TIM2_ITR1_USB_SOF TIM2_OR1_ITR1_RMP /*!< TIM2_ITR1 is connected to USB SOF */
|
#define TIM_TIM2_ITR1_USB_SOF TIM2_OR1_ITR1_RMP /* !< TIM2_ITR1 is connected to USB SOF */
|
||||||
#endif /* STM32L471xx */
|
#endif /* STM32L471xx */
|
||||||
#endif /* USB_OTG_FS */
|
#endif /* USB_OTG_FS */
|
||||||
#define TIM_TIM2_ETR_GPIO 0x00000000U /*!< TIM2_ETR is connected to GPIO */
|
#define TIM_TIM2_ETR_GPIO 0x00000000U /* !< TIM2_ETR is connected to GPIO */
|
||||||
#define TIM_TIM2_ETR_LSE TIM2_OR1_ETR1_RMP /*!< TIM2_ETR is connected to LSE */
|
#define TIM_TIM2_ETR_LSE TIM2_OR1_ETR1_RMP /* !< TIM2_ETR is connected to LSE */
|
||||||
#define TIM_TIM2_ETR_COMP1 TIM2_OR2_ETRSEL_0 /*!< TIM2_ETR is connected to COMP1 output */
|
#define TIM_TIM2_ETR_COMP1 TIM2_OR2_ETRSEL_0 /* !< TIM2_ETR is connected to COMP1 output */
|
||||||
#if defined(COMP2)
|
#if defined(COMP2)
|
||||||
#define TIM_TIM2_ETR_COMP2 TIM2_OR2_ETRSEL_1 /*!< TIM2_ETR is connected to COMP2 output */
|
#define TIM_TIM2_ETR_COMP2 TIM2_OR2_ETRSEL_1 /* !< TIM2_ETR is connected to COMP2 output */
|
||||||
#endif /* COMP2 */
|
#endif /* COMP2 */
|
||||||
#define TIM_TIM2_TI4_GPIO 0x00000000U /*!< TIM2 TI4 is connected to GPIO */
|
#define TIM_TIM2_TI4_GPIO 0x00000000U /* !< TIM2 TI4 is connected to GPIO */
|
||||||
#define TIM_TIM2_TI4_COMP1 TIM2_OR1_TI4_RMP_0 /*!< TIM2 TI4 is connected to COMP1 output */
|
#define TIM_TIM2_TI4_COMP1 TIM2_OR1_TI4_RMP_0 /* !< TIM2 TI4 is connected to COMP1 output */
|
||||||
#if defined(COMP2)
|
#if defined(COMP2)
|
||||||
#define TIM_TIM2_TI4_COMP2 TIM2_OR1_TI4_RMP_1 /*!< TIM2 TI4 is connected to COMP2 output */
|
#define TIM_TIM2_TI4_COMP2 TIM2_OR1_TI4_RMP_1 /* !< TIM2 TI4 is connected to COMP2 output */
|
||||||
#define TIM_TIM2_TI4_COMP1_COMP2 (TIM2_OR1_TI4_RMP_1| TIM2_OR1_TI4_RMP_0) /*!< TIM2 TI4 is connected to logical OR between COMP1 and COMP2 output2 */
|
#define TIM_TIM2_TI4_COMP1_COMP2 (TIM2_OR1_TI4_RMP_1| TIM2_OR1_TI4_RMP_0) /* !< TIM2 TI4 is connected to logical OR between COMP1 and COMP2 output2 */
|
||||||
#endif /* COMP2 */
|
#endif /* COMP2 */
|
||||||
|
|
||||||
#if defined (TIM3)
|
#if defined (TIM3)
|
||||||
#define TIM_TIM3_TI1_GPIO 0x00000000U /*!< TIM3 TI1 is connected to GPIO */
|
#define TIM_TIM3_TI1_GPIO 0x00000000U /* !< TIM3 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM3_TI1_COMP1 TIM3_OR1_TI1_RMP_0 /*!< TIM3 TI1 is connected to COMP1 output */
|
#define TIM_TIM3_TI1_COMP1 TIM3_OR1_TI1_RMP_0 /* !< TIM3 TI1 is connected to COMP1 output */
|
||||||
#define TIM_TIM3_TI1_COMP2 TIM3_OR1_TI1_RMP_1 /*!< TIM3 TI1 is connected to COMP2 output */
|
#define TIM_TIM3_TI1_COMP2 TIM3_OR1_TI1_RMP_1 /* !< TIM3 TI1 is connected to COMP2 output */
|
||||||
#define TIM_TIM3_TI1_COMP1_COMP2 (TIM3_OR1_TI1_RMP_1 | TIM3_OR1_TI1_RMP_0) /*!< TIM3 TI1 is connected to logical OR between COMP1 and COMP2 output2 */
|
#define TIM_TIM3_TI1_COMP1_COMP2 (TIM3_OR1_TI1_RMP_1 | TIM3_OR1_TI1_RMP_0) /* !< TIM3 TI1 is connected to logical OR between COMP1 and COMP2 output2 */
|
||||||
#define TIM_TIM3_ETR_GPIO 0x00000000U /*!< TIM3_ETR is connected to GPIO */
|
#define TIM_TIM3_ETR_GPIO 0x00000000U /* !< TIM3_ETR is connected to GPIO */
|
||||||
#define TIM_TIM3_ETR_COMP1 TIM3_OR2_ETRSEL_0 /*!< TIM3_ETR is connected to COMP1 output */
|
#define TIM_TIM3_ETR_COMP1 TIM3_OR2_ETRSEL_0 /* !< TIM3_ETR is connected to COMP1 output */
|
||||||
#endif /* TIM3 */
|
#endif /* TIM3 */
|
||||||
|
|
||||||
#if defined (TIM8)
|
#if defined (TIM8)
|
||||||
#if defined(ADC2) && defined(ADC3)
|
#if defined(ADC2) && defined(ADC3)
|
||||||
#define TIM_TIM8_ETR_ADC2_NONE 0x00000000U /*!< TIM8_ETR is not connected to any AWD (analog watchdog)*/
|
#define TIM_TIM8_ETR_ADC2_NONE 0x00000000U /* !< TIM8_ETR is not connected to any AWD (analog watchdog)*/
|
||||||
#define TIM_TIM8_ETR_ADC2_AWD1 TIM8_OR1_ETR_ADC2_RMP_0 /*!< TIM8_ETR is connected to ADC2 AWD1 */
|
#define TIM_TIM8_ETR_ADC2_AWD1 TIM8_OR1_ETR_ADC2_RMP_0 /* !< TIM8_ETR is connected to ADC2 AWD1 */
|
||||||
#define TIM_TIM8_ETR_ADC2_AWD2 TIM8_OR1_ETR_ADC2_RMP_1 /*!< TIM8_ETR is connected to ADC2 AWD2 */
|
#define TIM_TIM8_ETR_ADC2_AWD2 TIM8_OR1_ETR_ADC2_RMP_1 /* !< TIM8_ETR is connected to ADC2 AWD2 */
|
||||||
#define TIM_TIM8_ETR_ADC2_AWD3 (TIM8_OR1_ETR_ADC2_RMP_1 | TIM8_OR1_ETR_ADC2_RMP_0) /*!< TIM8_ETR is connected to ADC2 AWD3 */
|
#define TIM_TIM8_ETR_ADC2_AWD3 (TIM8_OR1_ETR_ADC2_RMP_1 | TIM8_OR1_ETR_ADC2_RMP_0) /* !< TIM8_ETR is connected to ADC2 AWD3 */
|
||||||
#define TIM_TIM8_ETR_ADC3_NONE 0x00000000U /*!< TIM8_ETR is not connected to any AWD (analog watchdog)*/
|
#define TIM_TIM8_ETR_ADC3_NONE 0x00000000U /* !< TIM8_ETR is not connected to any AWD (analog watchdog)*/
|
||||||
#define TIM_TIM8_ETR_ADC3_AWD1 TIM8_OR1_ETR_ADC3_RMP_0 /*!< TIM8_ETR is connected to ADC3 AWD1 */
|
#define TIM_TIM8_ETR_ADC3_AWD1 TIM8_OR1_ETR_ADC3_RMP_0 /* !< TIM8_ETR is connected to ADC3 AWD1 */
|
||||||
#define TIM_TIM8_ETR_ADC3_AWD2 TIM8_OR1_ETR_ADC3_RMP_1 /*!< TIM8_ETR is connected to ADC3 AWD2 */
|
#define TIM_TIM8_ETR_ADC3_AWD2 TIM8_OR1_ETR_ADC3_RMP_1 /* !< TIM8_ETR is connected to ADC3 AWD2 */
|
||||||
#define TIM_TIM8_ETR_ADC3_AWD3 (TIM8_OR1_ETR_ADC3_RMP_1 | TIM8_OR1_ETR_ADC3_RMP_0) /*!< TIM8_ETR is connected to ADC3 AWD3 */
|
#define TIM_TIM8_ETR_ADC3_AWD3 (TIM8_OR1_ETR_ADC3_RMP_1 | TIM8_OR1_ETR_ADC3_RMP_0) /* !< TIM8_ETR is connected to ADC3 AWD3 */
|
||||||
#endif /* ADC2 && ADC3 */
|
#endif /* ADC2 && ADC3 */
|
||||||
|
|
||||||
#define TIM_TIM8_TI1_GPIO 0x00000000U /*!< TIM8 TI1 is connected to GPIO */
|
#define TIM_TIM8_TI1_GPIO 0x00000000U /* !< TIM8 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM8_TI1_COMP2 TIM8_OR1_TI1_RMP /*!< TIM8 TI1 is connected to COMP1 */
|
#define TIM_TIM8_TI1_COMP2 TIM8_OR1_TI1_RMP /* !< TIM8 TI1 is connected to COMP1 */
|
||||||
#define TIM_TIM8_ETR_GPIO 0x00000000U /*!< TIM8_ETR is connected to GPIO */
|
#define TIM_TIM8_ETR_GPIO 0x00000000U /* !< TIM8_ETR is connected to GPIO */
|
||||||
#define TIM_TIM8_ETR_COMP1 TIM8_OR2_ETRSEL_0 /*!< TIM8_ETR is connected to COMP1 output */
|
#define TIM_TIM8_ETR_COMP1 TIM8_OR2_ETRSEL_0 /* !< TIM8_ETR is connected to COMP1 output */
|
||||||
#define TIM_TIM8_ETR_COMP2 TIM8_OR2_ETRSEL_1 /*!< TIM8_ETR is connected to COMP2 output */
|
#define TIM_TIM8_ETR_COMP2 TIM8_OR2_ETRSEL_1 /* !< TIM8_ETR is connected to COMP2 output */
|
||||||
#endif /* TIM8 */
|
#endif /* TIM8 */
|
||||||
|
|
||||||
#define TIM_TIM15_TI1_GPIO 0x00000000U /*!< TIM15 TI1 is connected to GPIO */
|
#define TIM_TIM15_TI1_GPIO 0x00000000U /* !< TIM15 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM15_TI1_LSE TIM15_OR1_TI1_RMP /*!< TIM15 TI1 is connected to LSE */
|
#define TIM_TIM15_TI1_LSE TIM15_OR1_TI1_RMP /* !< TIM15 TI1 is connected to LSE */
|
||||||
#define TIM_TIM15_ENCODERMODE_NONE 0x00000000U /*!< No redirection */
|
#define TIM_TIM15_ENCODERMODE_NONE 0x00000000U /* !< No redirection */
|
||||||
#define TIM_TIM15_ENCODERMODE_TIM2 TIM15_OR1_ENCODER_MODE_0 /*!< TIM2 IC1 and TIM2 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
#define TIM_TIM15_ENCODERMODE_TIM2 TIM15_OR1_ENCODER_MODE_0 /* !< TIM2 IC1 and TIM2 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
||||||
#if defined (TIM3)
|
#if defined (TIM3)
|
||||||
#define TIM_TIM15_ENCODERMODE_TIM3 TIM15_OR1_ENCODER_MODE_1 /*!< TIM3 IC1 and TIM3 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
#define TIM_TIM15_ENCODERMODE_TIM3 TIM15_OR1_ENCODER_MODE_1 /* !< TIM3 IC1 and TIM3 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
||||||
#endif /* TIM3 */
|
#endif /* TIM3 */
|
||||||
#if defined (TIM4)
|
#if defined (TIM4)
|
||||||
#define TIM_TIM15_ENCODERMODE_TIM4 (TIM15_OR1_ENCODER_MODE_1 | TIM15_OR1_ENCODER_MODE_0) /*!< TIM4 IC1 and TIM4 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
#define TIM_TIM15_ENCODERMODE_TIM4 (TIM15_OR1_ENCODER_MODE_1 | TIM15_OR1_ENCODER_MODE_0) /* !< TIM4 IC1 and TIM4 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */
|
||||||
#endif /* TIM4 */
|
#endif /* TIM4 */
|
||||||
|
|
||||||
#define TIM_TIM16_TI1_GPIO 0x00000000U /*!< TIM16 TI1 is connected to GPIO */
|
#define TIM_TIM16_TI1_GPIO 0x00000000U /* !< TIM16 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM16_TI1_LSI TIM16_OR1_TI1_RMP_0 /*!< TIM16 TI1 is connected to LSI */
|
#define TIM_TIM16_TI1_LSI TIM16_OR1_TI1_RMP_0 /* !< TIM16 TI1 is connected to LSI */
|
||||||
#define TIM_TIM16_TI1_LSE TIM16_OR1_TI1_RMP_1 /*!< TIM16 TI1 is connected to LSE */
|
#define TIM_TIM16_TI1_LSE TIM16_OR1_TI1_RMP_1 /* !< TIM16 TI1 is connected to LSE */
|
||||||
#define TIM_TIM16_TI1_RTC (TIM16_OR1_TI1_RMP_1 | TIM16_OR1_TI1_RMP_0) /*!< TIM16 TI1 is connected to RTC wakeup interrupt */
|
#define TIM_TIM16_TI1_RTC (TIM16_OR1_TI1_RMP_1 | TIM16_OR1_TI1_RMP_0) /* !< TIM16 TI1 is connected to RTC wakeup interrupt */
|
||||||
#if defined (TIM16_OR1_TI1_RMP_2)
|
#if defined (TIM16_OR1_TI1_RMP_2)
|
||||||
#define TIM_TIM16_TI1_MSI TIM16_OR1_TI1_RMP_2 /*!< TIM16 TI1 is connected to MSI */
|
#define TIM_TIM16_TI1_MSI TIM16_OR1_TI1_RMP_2 /* !< TIM16 TI1 is connected to MSI */
|
||||||
#define TIM_TIM16_TI1_HSE_32 (TIM16_OR1_TI1_RMP_2 | TIM16_OR1_TI1_RMP_0) /*!< TIM16 TI1 is connected to HSE div 32 */
|
#define TIM_TIM16_TI1_HSE_32 (TIM16_OR1_TI1_RMP_2 | TIM16_OR1_TI1_RMP_0) /* !< TIM16 TI1 is connected to HSE div 32 */
|
||||||
#define TIM_TIM16_TI1_MCO (TIM16_OR1_TI1_RMP_2 | TIM16_OR1_TI1_RMP_1) /*!< TIM16 TI1 is connected to MCO */
|
#define TIM_TIM16_TI1_MCO (TIM16_OR1_TI1_RMP_2 | TIM16_OR1_TI1_RMP_1) /* !< TIM16 TI1 is connected to MCO */
|
||||||
#endif /* TIM16_OR1_TI1_RMP_2 */
|
#endif /* TIM16_OR1_TI1_RMP_2 */
|
||||||
|
|
||||||
#if defined (TIM17)
|
#if defined (TIM17)
|
||||||
#define TIM_TIM17_TI1_GPIO 0x00000000U /*!< TIM17 TI1 is connected to GPIO */
|
#define TIM_TIM17_TI1_GPIO 0x00000000U /* !< TIM17 TI1 is connected to GPIO */
|
||||||
#define TIM_TIM17_TI1_MSI TIM17_OR1_TI1_RMP_0 /*!< TIM17 TI1 is connected to MSI */
|
#define TIM_TIM17_TI1_MSI TIM17_OR1_TI1_RMP_0 /* !< TIM17 TI1 is connected to MSI */
|
||||||
#define TIM_TIM17_TI1_HSE_32 TIM17_OR1_TI1_RMP_1 /*!< TIM17 TI1 is connected to HSE div 32 */
|
#define TIM_TIM17_TI1_HSE_32 TIM17_OR1_TI1_RMP_1 /* !< TIM17 TI1 is connected to HSE div 32 */
|
||||||
#define TIM_TIM17_TI1_MCO (TIM17_OR1_TI1_RMP_1 | TIM17_OR1_TI1_RMP_0) /*!< TIM17 TI1 is connected to MCO */
|
#define TIM_TIM17_TI1_MCO (TIM17_OR1_TI1_RMP_1 | TIM17_OR1_TI1_RMP_0) /* !< TIM17 TI1 is connected to MCO */
|
||||||
#endif /* TIM17 */
|
#endif /* TIM17 */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup TIMEx_Break_Input TIM Extended Break input
|
/** @defgroup TIMEx_Break_Input TIM Extended Break input
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TIM_BREAKINPUT_BRK 0x00000001U /*!< Timer break input */
|
#define TIM_BREAKINPUT_BRK 0x00000001U /*!< Timer break input */
|
||||||
#define TIM_BREAKINPUT_BRK2 0x00000002U /*!< Timer break2 input */
|
#define TIM_BREAKINPUT_BRK2 0x00000002U /*!< Timer break2 input */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup TIMEx_Break_Input_Source TIM Extended Break input source
|
/** @defgroup TIMEx_Break_Input_Source TIM Extended Break input source
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TIM_BREAKINPUTSOURCE_BKIN 0x00000001U /*!< An external source (GPIO) is connected to the BKIN pin */
|
#define TIM_BREAKINPUTSOURCE_BKIN 0x00000001U /* !< An external source (GPIO) is connected to the BKIN pin */
|
||||||
#define TIM_BREAKINPUTSOURCE_COMP1 0x00000002U /*!< The COMP1 output is connected to the break input */
|
#define TIM_BREAKINPUTSOURCE_COMP1 0x00000002U /* !< The COMP1 output is connected to the break input */
|
||||||
#define TIM_BREAKINPUTSOURCE_COMP2 0x00000004U /*!< The COMP2 output is connected to the break input */
|
#define TIM_BREAKINPUTSOURCE_COMP2 0x00000004U /* !< The COMP2 output is connected to the break input */
|
||||||
#if defined (DFSDM1_Channel0)
|
#if defined (DFSDM1_Channel0)
|
||||||
#define TIM_BREAKINPUTSOURCE_DFSDM1 0x00000008U /*!< The analog watchdog output of the DFSDM1 peripheral is connected to the break input */
|
#define TIM_BREAKINPUTSOURCE_DFSDM1 0x00000008U /* !< The analog watchdog output of the DFSDM1 peripheral is connected to the break input */
|
||||||
#endif /* DFSDM1_Channel0 */
|
#endif /* DFSDM1_Channel0 */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup TIMEx_Break_Input_Source_Enable TIM Extended Break input source enabling
|
/** @defgroup TIMEx_Break_Input_Source_Enable TIM Extended Break input source enabling
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TIM_BREAKINPUTSOURCE_DISABLE 0x00000000U /*!< Break input source is disabled */
|
#define TIM_BREAKINPUTSOURCE_DISABLE 0x00000000U /*!< Break input source is disabled */
|
||||||
#define TIM_BREAKINPUTSOURCE_ENABLE 0x00000001U /*!< Break input source is enabled */
|
#define TIM_BREAKINPUTSOURCE_ENABLE 0x00000001U /*!< Break input source is enabled */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup TIMEx_Break_Input_Source_Polarity TIM Extended Break input polarity
|
/** @defgroup TIMEx_Break_Input_Source_Polarity TIM Extended Break input polarity
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TIM_BREAKINPUTSOURCE_POLARITY_LOW 0x00000001U /*!< Break input source is active low */
|
#define TIM_BREAKINPUTSOURCE_POLARITY_LOW 0x00000001U /*!< Break input source is active low */
|
||||||
#define TIM_BREAKINPUTSOURCE_POLARITY_HIGH 0x00000000U /*!< Break input source is active_high */
|
#define TIM_BREAKINPUTSOURCE_POLARITY_HIGH 0x00000000U /*!< Break input source is active_high */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of exported constants -------------------------------------------------*/
|
/* End of exported constants -------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros
|
/** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of exported macro -----------------------------------------------------*/
|
/* End of exported macro -----------------------------------------------------*/
|
||||||
|
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/** @defgroup TIMEx_Private_Macros TIM Extended Private Macros
|
/** @defgroup TIMEx_Private_Macros TIM Extended Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define IS_TIM_REMAP(__REMAP__) (((__REMAP__) <= (uint32_t)0x0001C01F))
|
#define IS_TIM_REMAP(__REMAP__) (((__REMAP__) <= (uint32_t)0x0001C01F))
|
||||||
|
|
||||||
#define IS_TIM_BREAKINPUT(__BREAKINPUT__) (((__BREAKINPUT__) == TIM_BREAKINPUT_BRK) || \
|
#define IS_TIM_BREAKINPUT(__BREAKINPUT__) (((__BREAKINPUT__) == TIM_BREAKINPUT_BRK) || \
|
||||||
((__BREAKINPUT__) == TIM_BREAKINPUT_BRK2))
|
((__BREAKINPUT__) == TIM_BREAKINPUT_BRK2))
|
||||||
|
|
||||||
#if defined (DFSDM1_Channel0)
|
#if defined (DFSDM1_Channel0)
|
||||||
#define IS_TIM_BREAKINPUTSOURCE(__SOURCE__) (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN) || \
|
#define IS_TIM_BREAKINPUTSOURCE(__SOURCE__) (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN) || \
|
||||||
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \
|
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \
|
||||||
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2) || \
|
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2) || \
|
||||||
((__SOURCE__) == TIM_BREAKINPUTSOURCE_DFSDM1))
|
((__SOURCE__) == TIM_BREAKINPUTSOURCE_DFSDM1))
|
||||||
#else
|
#else
|
||||||
#define IS_TIM_BREAKINPUTSOURCE(__SOURCE__) (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN) || \
|
#define IS_TIM_BREAKINPUTSOURCE(__SOURCE__) (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN) || \
|
||||||
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \
|
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \
|
||||||
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2))
|
((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2))
|
||||||
#endif /* DFSDM1_Channel0 */
|
#endif /* DFSDM1_Channel0 */
|
||||||
|
|
||||||
#define IS_TIM_BREAKINPUTSOURCE_STATE(__STATE__) (((__STATE__) == TIM_BREAKINPUTSOURCE_DISABLE) || \
|
#define IS_TIM_BREAKINPUTSOURCE_STATE(__STATE__) (((__STATE__) == TIM_BREAKINPUTSOURCE_DISABLE) || \
|
||||||
((__STATE__) == TIM_BREAKINPUTSOURCE_ENABLE))
|
((__STATE__) == TIM_BREAKINPUTSOURCE_ENABLE))
|
||||||
|
|
||||||
#define IS_TIM_BREAKINPUTSOURCE_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_LOW) || \
|
#define IS_TIM_BREAKINPUTSOURCE_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_LOW) || \
|
||||||
((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_HIGH))
|
((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_HIGH))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of private macro ------------------------------------------------------*/
|
/* End of private macro ------------------------------------------------------*/
|
||||||
|
|
||||||
/* Exported functions --------------------------------------------------------*/
|
/* Exported functions --------------------------------------------------------*/
|
||||||
/** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions
|
/** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions
|
/** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions
|
||||||
* @brief Timer Hall Sensor functions
|
* @brief Timer Hall Sensor functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Hall Sensor functions **********************************************/
|
/* Timer Hall Sensor functions **********************************************/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, const TIM_HallSensor_InitTypeDef *sConfig);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, const TIM_HallSensor_InitTypeDef *sConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
/* Blocking mode: Polling */
|
/* Blocking mode: Polling */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim);
|
||||||
/* Non-Blocking mode: Interrupt */
|
/* Non-Blocking mode: Interrupt */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim);
|
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions
|
/** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions
|
||||||
* @brief Timer Complementary Output Compare functions
|
* @brief Timer Complementary Output Compare functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Complementary Output Compare functions *****************************/
|
/* Timer Complementary Output Compare functions *****************************/
|
||||||
/* Blocking mode: Polling */
|
/* Blocking mode: Polling */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
|
|
||||||
/* Non-Blocking mode: Interrupt */
|
/* Non-Blocking mode: Interrupt */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
|
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
uint16_t Length);
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions
|
/** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions
|
||||||
* @brief Timer Complementary PWM functions
|
* @brief Timer Complementary PWM functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Complementary PWM functions ****************************************/
|
/* Timer Complementary PWM functions ****************************************/
|
||||||
/* Blocking mode: Polling */
|
/* Blocking mode: Polling */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
|
|
||||||
/* Non-Blocking mode: Interrupt */
|
/* Non-Blocking mode: Interrupt */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/* Non-Blocking mode: DMA */
|
/* Non-Blocking mode: DMA */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData,
|
||||||
uint16_t Length);
|
uint16_t Length);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions
|
/** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions
|
||||||
* @brief Timer Complementary One Pulse functions
|
* @brief Timer Complementary One Pulse functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Timer Complementary One Pulse functions **********************************/
|
/* Timer Complementary One Pulse functions **********************************/
|
||||||
/* Blocking mode: Polling */
|
/* Blocking mode: Polling */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
||||||
|
|
||||||
/* Non-Blocking mode: Interrupt */
|
/* Non-Blocking mode: Interrupt */
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions
|
/** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions
|
||||||
* @brief Peripheral Control functions
|
* @brief Peripheral Control functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Extended Control functions ************************************************/
|
/* Extended Control functions ************************************************/
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
||||||
uint32_t CommutationSource);
|
uint32_t CommutationSource);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
||||||
uint32_t CommutationSource);
|
uint32_t CommutationSource);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger,
|
||||||
uint32_t CommutationSource);
|
uint32_t CommutationSource);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
|
||||||
const TIM_MasterConfigTypeDef *sMasterConfig);
|
const TIM_MasterConfigTypeDef *sMasterConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
|
||||||
const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
|
const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakInput(TIM_HandleTypeDef *htim, uint32_t BreakInput,
|
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakInput(TIM_HandleTypeDef *htim, uint32_t BreakInput,
|
||||||
const TIMEx_BreakInputConfigTypeDef *sBreakInputConfig);
|
const TIMEx_BreakInputConfigTypeDef *sBreakInputConfig);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_GroupChannel5(TIM_HandleTypeDef *htim, uint32_t Channels);
|
HAL_StatusTypeDef HAL_TIMEx_GroupChannel5(TIM_HandleTypeDef *htim, uint32_t Channels);
|
||||||
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap);
|
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions
|
/** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions
|
||||||
* @brief Extended Callbacks functions
|
* @brief Extended Callbacks functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Extended Callback **********************************************************/
|
/* Extended Callback **********************************************************/
|
||||||
void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
|
||||||
void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim);
|
void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions
|
/** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions
|
||||||
* @brief Extended Peripheral State functions
|
* @brief Extended Peripheral State functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/* Extended Peripheral State functions ***************************************/
|
/* Extended Peripheral State functions ***************************************/
|
||||||
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(const TIM_HandleTypeDef *htim);
|
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(const TIM_HandleTypeDef *htim);
|
||||||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(const TIM_HandleTypeDef *htim, uint32_t ChannelN);
|
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(const TIM_HandleTypeDef *htim, uint32_t ChannelN);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of exported functions -------------------------------------------------*/
|
/* End of exported functions -------------------------------------------------*/
|
||||||
|
|
||||||
/* Private functions----------------------------------------------------------*/
|
/* Private functions----------------------------------------------------------*/
|
||||||
/** @addtogroup TIMEx_Private_Functions TIM Extended Private Functions
|
/** @addtogroup TIMEx_Private_Functions TIM Extended Private Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
|
void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
|
||||||
void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma);
|
void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma);
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/* End of private functions --------------------------------------------------*/
|
/* End of private functions --------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* STM32L4xx_HAL_TIM_EX_H */
|
#endif /* STM32L4xx_HAL_TIM_EX_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -586,7 +586,7 @@ __STATIC_INLINE void LL_MPU_ConfigRegion(uint32_t Region, uint32_t SubRegionDisa
|
|||||||
/* Set base address */
|
/* Set base address */
|
||||||
WRITE_REG(MPU->RBAR, (Address & 0xFFFFFFE0U));
|
WRITE_REG(MPU->RBAR, (Address & 0xFFFFFFE0U));
|
||||||
/* Configure MPU */
|
/* Configure MPU */
|
||||||
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | (SubRegionDisable << MPU_RASR_SRD_Pos)));
|
WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | SubRegionDisable << MPU_RASR_SRD_Pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -454,7 +454,7 @@ __STATIC_INLINE uint32_t LL_CRS_GetSyncPolarity(void)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_CRS_ConfigSynchronization(uint32_t HSI48CalibrationValue, uint32_t ErrorLimitValue, uint32_t ReloadValue, uint32_t Settings)
|
__STATIC_INLINE void LL_CRS_ConfigSynchronization(uint32_t HSI48CalibrationValue, uint32_t ErrorLimitValue, uint32_t ReloadValue, uint32_t Settings)
|
||||||
{
|
{
|
||||||
MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue << CRS_CR_TRIM_Pos);
|
MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue);
|
||||||
MODIFY_REG(CRS->CFGR,
|
MODIFY_REG(CRS->CFGR,
|
||||||
CRS_CFGR_RELOAD | CRS_CFGR_FELIM | CRS_CFGR_SYNCDIV | CRS_CFGR_SYNCSRC | CRS_CFGR_SYNCPOL,
|
CRS_CFGR_RELOAD | CRS_CFGR_FELIM | CRS_CFGR_SYNCDIV | CRS_CFGR_SYNCSRC | CRS_CFGR_SYNCPOL,
|
||||||
ReloadValue | (ErrorLimitValue << CRS_CFGR_FELIM_Pos) | Settings);
|
ReloadValue | (ErrorLimitValue << CRS_CFGR_FELIM_Pos) | Settings);
|
||||||
|
@ -70,7 +70,7 @@ static const uint8_t CHANNEL_OFFSET_TAB[] =
|
|||||||
#define DMA_CSELR_OFFSET (uint32_t)(DMA1_CSELR_BASE - DMA1_BASE)
|
#define DMA_CSELR_OFFSET (uint32_t)(DMA1_CSELR_BASE - DMA1_BASE)
|
||||||
|
|
||||||
/* Defines used for the bit position in the register and perform offsets */
|
/* Defines used for the bit position in the register and perform offsets */
|
||||||
#define DMA_POSITION_CSELR_CXS(Channel) POSITION_VAL(DMA_CSELR_C1S << (((Channel)*4U) & 0x1FU))
|
#define DMA_POSITION_CSELR_CXS POSITION_VAL(DMA_CSELR_C1S << (Channel*4U))
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@ -593,7 +593,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledChannel(DMA_TypeDef *DMAx, uint32_t Cha
|
|||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
||||||
DMA_CCR_EN) == (DMA_CCR_EN)) ? 1UL : 0UL);
|
DMA_CCR_EN) == (DMA_CCR_EN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -752,8 +752,8 @@ __STATIC_INLINE uint32_t LL_DMA_GetMode(DMA_TypeDef *DMAx, uint32_t Channel)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_DMA_SetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcIncMode)
|
__STATIC_INLINE void LL_DMA_SetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcIncMode)
|
||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
MODIFY_REG(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_PINC,
|
MODIFY_REG(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_PINC,
|
||||||
PeriphOrM2MSrcIncMode);
|
PeriphOrM2MSrcIncMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -848,7 +848,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Cha
|
|||||||
__STATIC_INLINE void LL_DMA_SetPeriphSize(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcDataSize)
|
__STATIC_INLINE void LL_DMA_SetPeriphSize(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcDataSize)
|
||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
MODIFY_REG(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_PSIZE,
|
MODIFY_REG(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_PSIZE,
|
||||||
PeriphOrM2MSrcDataSize);
|
PeriphOrM2MSrcDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1512,7 +1512,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Cha
|
|||||||
__STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphRequest)
|
__STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphRequest)
|
||||||
{
|
{
|
||||||
MODIFY_REG(((DMA_Request_TypeDef *)((uint32_t)((uint32_t)DMAx + DMA_CSELR_OFFSET)))->CSELR,
|
MODIFY_REG(((DMA_Request_TypeDef *)((uint32_t)((uint32_t)DMAx + DMA_CSELR_OFFSET)))->CSELR,
|
||||||
DMA_CSELR_C1S << (((Channel) * 4U) & 0x1FU), PeriphRequest << DMA_POSITION_CSELR_CXS(Channel));
|
DMA_CSELR_C1S << ((Channel) * 4U), PeriphRequest << DMA_POSITION_CSELR_CXS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1546,7 +1546,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel
|
|||||||
__STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel)
|
__STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||||
{
|
{
|
||||||
return (READ_BIT(((DMA_Request_TypeDef *)((uint32_t)((uint32_t)DMAx + DMA_CSELR_OFFSET)))->CSELR,
|
return (READ_BIT(((DMA_Request_TypeDef *)((uint32_t)((uint32_t)DMAx + DMA_CSELR_OFFSET)))->CSELR,
|
||||||
DMA_CSELR_C1S << ((Channel) * 4U)) >> DMA_POSITION_CSELR_CXS(Channel));
|
DMA_CSELR_C1S << ((Channel) * 4U)) >> DMA_POSITION_CSELR_CXS);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* DMAMUX1 */
|
#endif /* DMAMUX1 */
|
||||||
@ -2225,7 +2225,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE7(DMA_TypeDef *DMAx)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_DMA_EnableIT_TC(DMA_TypeDef *DMAx, uint32_t Channel)
|
__STATIC_INLINE void LL_DMA_EnableIT_TC(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
SET_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_TCIE);
|
SET_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR, DMA_CCR_TCIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2347,7 +2347,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TC(DMA_TypeDef *DMAx, uint32_t Chann
|
|||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
||||||
DMA_CCR_TCIE) == (DMA_CCR_TCIE)) ? 1UL : 0UL);
|
DMA_CCR_TCIE) == (DMA_CCR_TCIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2368,7 +2368,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_HT(DMA_TypeDef *DMAx, uint32_t Chann
|
|||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
||||||
DMA_CCR_HTIE) == (DMA_CCR_HTIE)) ? 1UL : 0UL);
|
DMA_CCR_HTIE) == (DMA_CCR_HTIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2389,7 +2389,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef *DMAx, uint32_t Chann
|
|||||||
{
|
{
|
||||||
uint32_t dma_base_addr = (uint32_t)DMAx;
|
uint32_t dma_base_addr = (uint32_t)DMAx;
|
||||||
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
return ((READ_BIT(((DMA_Channel_TypeDef *)(dma_base_addr + CHANNEL_OFFSET_TAB[Channel]))->CCR,
|
||||||
DMA_CCR_TEIE) == (DMA_CCR_TEIE)) ? 1UL : 0UL);
|
DMA_CCR_TEIE) == (DMA_CCR_TEIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -968,7 +968,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef *DM
|
|||||||
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE) == (DMAMUX_CxCR_EGE)) ? 1UL : 0UL);
|
return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE) == (DMAMUX_CxCR_EGE))? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1049,7 +1049,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint
|
|||||||
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE) == (DMAMUX_CxCR_SE)) ? 1UL : 0UL);
|
return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE) == (DMAMUX_CxCR_SE))? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1207,7 +1207,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx
|
|||||||
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
|
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE) == (DMAMUX_RGxCR_GE)) ? 1UL : 0UL);
|
return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE) == (DMAMUX_RGxCR_GE))? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1606,7 +1606,7 @@ __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef *DMA
|
|||||||
* @param DMAMUXx DMAMUXx DMAMUXx Instance
|
* @param DMAMUXx DMAMUXx DMAMUXx Instance
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx)
|
__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef * DMAMUXx)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF0);
|
SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF0);
|
||||||
@ -1902,7 +1902,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uin
|
|||||||
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
return (((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE)) == (DMAMUX_CxCR_SOIE)) ? 1UL : 0UL);
|
return (((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE)) == (DMAMUX_CxCR_SOIE))? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1953,7 +1953,7 @@ __STATIC_INLINE void LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, ui
|
|||||||
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
|
__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
|
||||||
{
|
{
|
||||||
(void)(DMAMUXx);
|
(void)(DMAMUXx);
|
||||||
return ((READ_BIT((DMAMUX1_RequestGenerator0 + RequestGenChannel)->RGCR, DMAMUX_RGxCR_OIE) == (DMAMUX_RGxCR_OIE)) ? 1UL : 0UL);
|
return ((READ_BIT((DMAMUX1_RequestGenerator0 + RequestGenChannel)->RGCR, DMAMUX_RGxCR_OIE) == (DMAMUX_RGxCR_OIE))? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -451,7 +451,7 @@ __STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabled(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabled(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_PE) == (I2C_CR1_PE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_PE) == (I2C_CR1_PE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ __STATIC_INLINE void LL_I2C_SetDigitalFilter(I2C_TypeDef *I2Cx, uint32_t Digital
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_DNF) >> I2C_CR1_DNF_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_DNF) >> I2C_CR1_DNF_Pos);
|
||||||
}
|
}
|
||||||
@ -535,7 +535,7 @@ __STATIC_INLINE void LL_I2C_DisableAnalogFilter(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ANFOFF) != (I2C_CR1_ANFOFF)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ANFOFF) != (I2C_CR1_ANFOFF)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -568,7 +568,7 @@ __STATIC_INLINE void LL_I2C_DisableDMAReq_TX(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN) == (I2C_CR1_TXDMAEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN) == (I2C_CR1_TXDMAEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -601,7 +601,7 @@ __STATIC_INLINE void LL_I2C_DisableDMAReq_RX(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN) == (I2C_CR1_RXDMAEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN) == (I2C_CR1_RXDMAEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -616,7 +616,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(const I2C_TypeDef *I2Cx)
|
|||||||
* @arg @ref LL_I2C_DMA_REG_DATA_RECEIVE
|
* @arg @ref LL_I2C_DMA_REG_DATA_RECEIVE
|
||||||
* @retval Address of data register
|
* @retval Address of data register
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(const I2C_TypeDef *I2Cx, uint32_t Direction)
|
__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(I2C_TypeDef *I2Cx, uint32_t Direction)
|
||||||
{
|
{
|
||||||
uint32_t data_reg_addr;
|
uint32_t data_reg_addr;
|
||||||
|
|
||||||
@ -664,7 +664,7 @@ __STATIC_INLINE void LL_I2C_DisableClockStretching(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH) != (I2C_CR1_NOSTRETCH)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH) != (I2C_CR1_NOSTRETCH)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -697,7 +697,7 @@ __STATIC_INLINE void LL_I2C_DisableSlaveByteControl(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_SBC) == (I2C_CR1_SBC)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_SBC) == (I2C_CR1_SBC)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -737,7 +737,7 @@ __STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_WUPEN) == (I2C_CR1_WUPEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_WUPEN) == (I2C_CR1_WUPEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ __STATIC_INLINE void LL_I2C_DisableGeneralCall(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_GCEN) == (I2C_CR1_GCEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_GCEN) == (I2C_CR1_GCEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -800,7 +800,7 @@ __STATIC_INLINE void LL_I2C_SetMasterAddressingMode(I2C_TypeDef *I2Cx, uint32_t
|
|||||||
* @arg @ref LL_I2C_ADDRESSING_MODE_7BIT
|
* @arg @ref LL_I2C_ADDRESSING_MODE_7BIT
|
||||||
* @arg @ref LL_I2C_ADDRESSING_MODE_10BIT
|
* @arg @ref LL_I2C_ADDRESSING_MODE_10BIT
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_ADD10));
|
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_ADD10));
|
||||||
}
|
}
|
||||||
@ -849,7 +849,7 @@ __STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN) == (I2C_OAR1_OA1EN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN) == (I2C_OAR1_OA1EN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -905,7 +905,7 @@ __STATIC_INLINE void LL_I2C_DisableOwnAddress2(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN) == (I2C_OAR2_OA2EN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN) == (I2C_OAR2_OA2EN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -930,7 +930,7 @@ __STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_PRESC) >> I2C_TIMINGR_PRESC_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_PRESC) >> I2C_TIMINGR_PRESC_Pos);
|
||||||
}
|
}
|
||||||
@ -941,7 +941,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLL) >> I2C_TIMINGR_SCLL_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLL) >> I2C_TIMINGR_SCLL_Pos);
|
||||||
}
|
}
|
||||||
@ -952,7 +952,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLH) >> I2C_TIMINGR_SCLH_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLH) >> I2C_TIMINGR_SCLH_Pos);
|
||||||
}
|
}
|
||||||
@ -963,7 +963,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SDADEL) >> I2C_TIMINGR_SDADEL_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SDADEL) >> I2C_TIMINGR_SDADEL_Pos);
|
||||||
}
|
}
|
||||||
@ -974,7 +974,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
* @retval Value between Min_Data=0x0 and Max_Data=0xF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLDEL) >> I2C_TIMINGR_SCLDEL_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLDEL) >> I2C_TIMINGR_SCLDEL_Pos);
|
||||||
}
|
}
|
||||||
@ -1011,7 +1011,7 @@ __STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
|
|||||||
* @arg @ref LL_I2C_MODE_SMBUS_DEVICE
|
* @arg @ref LL_I2C_MODE_SMBUS_DEVICE
|
||||||
* @arg @ref LL_I2C_MODE_SMBUS_DEVICE_ARP
|
* @arg @ref LL_I2C_MODE_SMBUS_DEVICE_ARP
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetMode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetMode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN));
|
return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN));
|
||||||
}
|
}
|
||||||
@ -1060,7 +1060,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ALERTEN) == (I2C_CR1_ALERTEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ALERTEN) == (I2C_CR1_ALERTEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1099,7 +1099,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_PECEN) == (I2C_CR1_PECEN)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_PECEN) == (I2C_CR1_PECEN)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1150,7 +1150,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t Timeout
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0 and Max_Data=0xFFF
|
* @retval Value between Min_Data=0 and Max_Data=0xFFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA));
|
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA));
|
||||||
}
|
}
|
||||||
@ -1182,7 +1182,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t Tim
|
|||||||
* @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
|
* @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW
|
||||||
* @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
|
* @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIDLE));
|
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIDLE));
|
||||||
}
|
}
|
||||||
@ -1210,7 +1210,7 @@ __STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t Timeout
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0 and Max_Data=0xFFF
|
* @retval Value between Min_Data=0 and Max_Data=0xFFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTB) >> I2C_TIMEOUTR_TIMEOUTB_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTB) >> I2C_TIMEOUTR_TIMEOUTB_Pos);
|
||||||
}
|
}
|
||||||
@ -1264,7 +1264,7 @@ __STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t Cloc
|
|||||||
* @arg @ref LL_I2C_SMBUS_ALL_TIMEOUT
|
* @arg @ref LL_I2C_SMBUS_ALL_TIMEOUT
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(const I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->TIMEOUTR, (I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)) == \
|
return ((READ_BIT(I2Cx->TIMEOUTR, (I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)) == \
|
||||||
(ClockTimeout)) ? 1UL : 0UL);
|
(ClockTimeout)) ? 1UL : 0UL);
|
||||||
@ -1306,7 +1306,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_TX(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXIE) == (I2C_CR1_TXIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXIE) == (I2C_CR1_TXIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1339,7 +1339,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_RX(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXIE) == (I2C_CR1_RXIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXIE) == (I2C_CR1_RXIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1372,7 +1372,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_ADDR(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ADDRIE) == (I2C_CR1_ADDRIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ADDRIE) == (I2C_CR1_ADDRIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1405,7 +1405,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_NACK(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_NACKIE) == (I2C_CR1_NACKIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_NACKIE) == (I2C_CR1_NACKIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1438,7 +1438,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_STOP(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_STOPIE) == (I2C_CR1_STOPIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_STOPIE) == (I2C_CR1_STOPIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1477,7 +1477,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_TC(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TCIE) == (I2C_CR1_TCIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_TCIE) == (I2C_CR1_TCIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1528,7 +1528,7 @@ __STATIC_INLINE void LL_I2C_DisableIT_ERR(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ERRIE) == (I2C_CR1_ERRIE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR1, I2C_CR1_ERRIE) == (I2C_CR1_ERRIE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1549,7 +1549,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1562,7 +1562,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1575,7 +1575,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1588,7 +1588,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1601,7 +1601,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1614,7 +1614,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1627,7 +1627,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1640,7 +1640,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1653,7 +1653,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1666,7 +1666,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1679,7 +1679,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1694,7 +1694,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1709,7 +1709,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(const I2C_TypeDef *I2Cx
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1725,7 +1725,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(const I2C_TypeDef *I2C
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1738,7 +1738,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1899,7 +1899,7 @@ __STATIC_INLINE void LL_I2C_DisableAutoEndMode(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR2, I2C_CR2_AUTOEND) == (I2C_CR2_AUTOEND)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR2, I2C_CR2_AUTOEND) == (I2C_CR2_AUTOEND)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1934,7 +1934,7 @@ __STATIC_INLINE void LL_I2C_DisableReloadMode(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR2, I2C_CR2_RELOAD) == (I2C_CR2_RELOAD)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR2, I2C_CR2_RELOAD) == (I2C_CR2_RELOAD)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -1958,7 +1958,7 @@ __STATIC_INLINE void LL_I2C_SetTransferSize(I2C_TypeDef *I2Cx, uint32_t Transfer
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0xFF
|
* @retval Value between Min_Data=0x0 and Max_Data=0xFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetTransferSize(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetTransferSize(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_NBYTES) >> I2C_CR2_NBYTES_Pos);
|
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_NBYTES) >> I2C_CR2_NBYTES_Pos);
|
||||||
}
|
}
|
||||||
@ -2035,7 +2035,7 @@ __STATIC_INLINE void LL_I2C_DisableAuto10BitRead(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR2, I2C_CR2_HEAD10R) != (I2C_CR2_HEAD10R)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR2, I2C_CR2_HEAD10R) != (I2C_CR2_HEAD10R)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -2063,7 +2063,7 @@ __STATIC_INLINE void LL_I2C_SetTransferRequest(I2C_TypeDef *I2Cx, uint32_t Trans
|
|||||||
* @arg @ref LL_I2C_REQUEST_WRITE
|
* @arg @ref LL_I2C_REQUEST_WRITE
|
||||||
* @arg @ref LL_I2C_REQUEST_READ
|
* @arg @ref LL_I2C_REQUEST_READ
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_RD_WRN));
|
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_RD_WRN));
|
||||||
}
|
}
|
||||||
@ -2087,7 +2087,7 @@ __STATIC_INLINE void LL_I2C_SetSlaveAddr(I2C_TypeDef *I2Cx, uint32_t SlaveAddr)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x0 and Max_Data=0x3F
|
* @retval Value between Min_Data=0x0 and Max_Data=0x3F
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_SADD));
|
return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_SADD));
|
||||||
}
|
}
|
||||||
@ -2133,18 +2133,11 @@ __STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(const I2C_TypeDef *I2Cx)
|
|||||||
__STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize,
|
__STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize,
|
||||||
uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
|
uint32_t TransferSize, uint32_t EndMode, uint32_t Request)
|
||||||
{
|
{
|
||||||
/* Declaration of tmp to prevent undefined behavior of volatile usage */
|
|
||||||
uint32_t tmp = ((uint32_t)(((uint32_t)SlaveAddr & I2C_CR2_SADD) | \
|
|
||||||
((uint32_t)SlaveAddrSize & I2C_CR2_ADD10) | \
|
|
||||||
(((uint32_t)TransferSize << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
|
|
||||||
(uint32_t)EndMode | (uint32_t)Request) & (~0x80000000U));
|
|
||||||
|
|
||||||
/* update CR2 register */
|
|
||||||
MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD | I2C_CR2_ADD10 |
|
MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD | I2C_CR2_ADD10 |
|
||||||
(I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) |
|
(I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) |
|
||||||
I2C_CR2_START | I2C_CR2_STOP | I2C_CR2_RELOAD |
|
I2C_CR2_START | I2C_CR2_STOP | I2C_CR2_RELOAD |
|
||||||
I2C_CR2_NBYTES | I2C_CR2_AUTOEND | I2C_CR2_HEAD10R,
|
I2C_CR2_NBYTES | I2C_CR2_AUTOEND | I2C_CR2_HEAD10R,
|
||||||
tmp);
|
SlaveAddr | SlaveAddrSize | (TransferSize << I2C_CR2_NBYTES_Pos) | EndMode | Request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2157,7 +2150,7 @@ __STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr
|
|||||||
* @arg @ref LL_I2C_DIRECTION_WRITE
|
* @arg @ref LL_I2C_DIRECTION_WRITE
|
||||||
* @arg @ref LL_I2C_DIRECTION_READ
|
* @arg @ref LL_I2C_DIRECTION_READ
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_DIR));
|
return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_DIR));
|
||||||
}
|
}
|
||||||
@ -2168,7 +2161,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x00 and Max_Data=0x3F
|
* @retval Value between Min_Data=0x00 and Max_Data=0x3F
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_ADDCODE) >> I2C_ISR_ADDCODE_Pos << 1);
|
return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_ADDCODE) >> I2C_ISR_ADDCODE_Pos << 1);
|
||||||
}
|
}
|
||||||
@ -2198,7 +2191,7 @@ __STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval State of bit (1 or 0).
|
* @retval State of bit (1 or 0).
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return ((READ_BIT(I2Cx->CR2, I2C_CR2_PECBYTE) == (I2C_CR2_PECBYTE)) ? 1UL : 0UL);
|
return ((READ_BIT(I2Cx->CR2, I2C_CR2_PECBYTE) == (I2C_CR2_PECBYTE)) ? 1UL : 0UL);
|
||||||
}
|
}
|
||||||
@ -2211,7 +2204,7 @@ __STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(const I2C_TypeDef *I2Cx
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(I2Cx->PECR, I2C_PECR_PEC));
|
return (uint32_t)(READ_BIT(I2Cx->PECR, I2C_PECR_PEC));
|
||||||
}
|
}
|
||||||
@ -2222,7 +2215,7 @@ __STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(const I2C_TypeDef *I2Cx)
|
|||||||
* @param I2Cx I2C Instance.
|
* @param I2Cx I2C Instance.
|
||||||
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
* @retval Value between Min_Data=0x00 and Max_Data=0xFF
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8(const I2C_TypeDef *I2Cx)
|
__STATIC_INLINE uint8_t LL_I2C_ReceiveData8(I2C_TypeDef *I2Cx)
|
||||||
{
|
{
|
||||||
return (uint8_t)(READ_BIT(I2Cx->RXDR, I2C_RXDR_RXDATA));
|
return (uint8_t)(READ_BIT(I2Cx->RXDR, I2C_RXDR_RXDATA));
|
||||||
}
|
}
|
||||||
@ -2248,8 +2241,8 @@ __STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data)
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, const LL_I2C_InitTypeDef *I2C_InitStruct);
|
ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, LL_I2C_InitTypeDef *I2C_InitStruct);
|
||||||
ErrorStatus LL_I2C_DeInit(const I2C_TypeDef *I2Cx);
|
ErrorStatus LL_I2C_DeInit(I2C_TypeDef *I2Cx);
|
||||||
void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct);
|
void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct);
|
||||||
|
|
||||||
|
|
||||||
|
@ -502,9 +502,8 @@ typedef struct
|
|||||||
((((((uint64_t)(__PERIPHCLK__)/(uint64_t)(LPUART_PRESCALER_TAB[(uint16_t)(__PRESCALER__)]))\
|
((((((uint64_t)(__PERIPHCLK__)/(uint64_t)(LPUART_PRESCALER_TAB[(uint16_t)(__PRESCALER__)]))\
|
||||||
* LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__)) & LPUART_BRR_MASK)
|
* LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__)) & LPUART_BRR_MASK)
|
||||||
#else
|
#else
|
||||||
#define __LL_LPUART_DIV(__PERIPHCLK__, __BAUDRATE__) (uint32_t)\
|
#define __LL_LPUART_DIV(__PERIPHCLK__, __BAUDRATE__) (uint32_t)(((((uint64_t)(__PERIPHCLK__)*LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__))\
|
||||||
(((((uint64_t)(__PERIPHCLK__)*LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__)) \
|
& LPUART_BRR_MASK)
|
||||||
& LPUART_BRR_MASK)
|
|
||||||
#endif /* USART_PRESC_PRESCALER */
|
#endif /* USART_PRESC_PRESCALER */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1493,8 +1492,7 @@ __STATIC_INLINE void LL_LPUART_SetBaudRate(USART_TypeDef *LPUARTx, uint32_t Peri
|
|||||||
* @retval Baud Rate
|
* @retval Baud Rate
|
||||||
*/
|
*/
|
||||||
#if defined(USART_PRESC_PRESCALER)
|
#if defined(USART_PRESC_PRESCALER)
|
||||||
__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(const USART_TypeDef *LPUARTx, uint32_t PeriphClk,
|
__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(const USART_TypeDef *LPUARTx, uint32_t PeriphClk, uint32_t PrescalerValue)
|
||||||
uint32_t PrescalerValue)
|
|
||||||
#else
|
#else
|
||||||
__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(const USART_TypeDef *LPUARTx, uint32_t PeriphClk)
|
__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(const USART_TypeDef *LPUARTx, uint32_t PeriphClk)
|
||||||
#endif /* USART_PRESC_PRESCALER */
|
#endif /* USART_PRESC_PRESCALER */
|
||||||
@ -1742,7 +1740,8 @@ __STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_IDLE(const USART_TypeDef *LPUART
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_IsActiveFlag_RXNE LL_LPUART_IsActiveFlag_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_IsActiveFlag_RXNE LL_LPUART_IsActiveFlag_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the LPUART Read Data Register or LPUART RX FIFO Not Empty Flag is set or not
|
* @brief Check if the LPUART Read Data Register or LPUART RX FIFO Not Empty Flag is set or not
|
||||||
@ -1779,7 +1778,8 @@ __STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TC(const USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_IsActiveFlag_TXE LL_LPUART_IsActiveFlag_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_IsActiveFlag_TXE LL_LPUART_IsActiveFlag_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the LPUART Transmit Data Register Empty or LPUART TX FIFO Not Full Flag is set or not
|
* @brief Check if the LPUART Transmit Data Register Empty or LPUART TX FIFO Not Full Flag is set or not
|
||||||
@ -2068,7 +2068,8 @@ __STATIC_INLINE void LL_LPUART_EnableIT_IDLE(USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_EnableIT_RXNE LL_LPUART_EnableIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_EnableIT_RXNE LL_LPUART_EnableIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable RX Not Empty and RX FIFO Not Empty Interrupt
|
* @brief Enable RX Not Empty and RX FIFO Not Empty Interrupt
|
||||||
@ -2106,7 +2107,8 @@ __STATIC_INLINE void LL_LPUART_EnableIT_TC(USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_EnableIT_TXE LL_LPUART_EnableIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_EnableIT_TXE LL_LPUART_EnableIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable TX Empty and TX FIFO Not Full Interrupt
|
* @brief Enable TX Empty and TX FIFO Not Full Interrupt
|
||||||
@ -2251,7 +2253,8 @@ __STATIC_INLINE void LL_LPUART_DisableIT_IDLE(USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_DisableIT_RXNE LL_LPUART_DisableIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_DisableIT_RXNE LL_LPUART_DisableIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable RX Not Empty and RX FIFO Not Empty Interrupt
|
* @brief Disable RX Not Empty and RX FIFO Not Empty Interrupt
|
||||||
@ -2289,7 +2292,8 @@ __STATIC_INLINE void LL_LPUART_DisableIT_TC(USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_DisableIT_TXE LL_LPUART_DisableIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_DisableIT_TXE LL_LPUART_DisableIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable TX Empty and TX FIFO Not Full Interrupt
|
* @brief Disable TX Empty and TX FIFO Not Full Interrupt
|
||||||
@ -2434,7 +2438,8 @@ __STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_IDLE(const USART_TypeDef *LPUARTx
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_IsEnabledIT_RXNE LL_LPUART_IsEnabledIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_IsEnabledIT_RXNE LL_LPUART_IsEnabledIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the LPUART RX Not Empty and LPUART RX FIFO Not Empty Interrupt is enabled or disabled.
|
* @brief Check if the LPUART RX Not Empty and LPUART RX FIFO Not Empty Interrupt is enabled or disabled.
|
||||||
@ -2472,7 +2477,8 @@ __STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_TC(const USART_TypeDef *LPUARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_LPUART_IsEnabledIT_TXE LL_LPUART_IsEnabledIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_LPUART_IsEnabledIT_TXE LL_LPUART_IsEnabledIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the LPUART TX Empty and LPUART TX FIFO Not Full Interrupt is enabled or disabled
|
* @brief Check if the LPUART TX Empty and LPUART TX FIFO Not Full Interrupt is enabled or disabled
|
||||||
@ -2837,23 +2843,6 @@ __STATIC_INLINE void LL_LPUART_RequestRxDataFlush(USART_TypeDef *LPUARTx)
|
|||||||
SET_BIT(LPUARTx->RQR, (uint16_t)USART_RQR_RXFRQ);
|
SET_BIT(LPUARTx->RQR, (uint16_t)USART_RQR_RXFRQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
|
||||||
/**
|
|
||||||
* @brief Request a Transmit data FIFO flush
|
|
||||||
* @note TXFRQ bit is set to flush the whole FIFO when FIFO mode is enabled. This
|
|
||||||
* also sets the flag TXFE (TXFIFO empty bit in the LPUART_ISR register).
|
|
||||||
* @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not
|
|
||||||
* FIFO mode feature is supported by the USARTx instance.
|
|
||||||
* @rmtoll RQR TXFRQ LL_LPUART_RequestTxDataFlush
|
|
||||||
* @param LPUARTx LPUART Instance
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
__STATIC_INLINE void LL_LPUART_RequestTxDataFlush(USART_TypeDef *LPUARTx)
|
|
||||||
{
|
|
||||||
SET_BIT(LPUARTx->RQR, (uint16_t)USART_RQR_TXFRQ);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* USART_CR1_FIFOEN */
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -435,21 +435,21 @@ typedef struct
|
|||||||
/** @defgroup RCC_LL_EC_I2C1_CLKSOURCE Peripheral I2C clock source selection
|
/** @defgroup RCC_LL_EC_I2C1_CLKSOURCE Peripheral I2C clock source selection
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define LL_RCC_I2C1_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C1 clock source */
|
#define LL_RCC_I2C1_CLKSOURCE_PCLK1 ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C1SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C1 clock source */
|
||||||
#define LL_RCC_I2C1_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_0 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< SYSCLK clock used as I2C1 clock source */
|
#define LL_RCC_I2C1_CLKSOURCE_SYSCLK ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_0 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< SYSCLK clock used as I2C1 clock source */
|
||||||
#define LL_RCC_I2C1_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_1 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< HSI clock used as I2C1 clock source */
|
#define LL_RCC_I2C1_CLKSOURCE_HSI ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_1 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< HSI clock used as I2C1 clock source */
|
||||||
#if defined(RCC_CCIPR_I2C2SEL)
|
#if defined(RCC_CCIPR_I2C2SEL)
|
||||||
#define LL_RCC_I2C2_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C2 clock source */
|
#define LL_RCC_I2C2_CLKSOURCE_PCLK1 ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C2SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C2 clock source */
|
||||||
#define LL_RCC_I2C2_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_0 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< SYSCLK clock used as I2C2 clock source */
|
#define LL_RCC_I2C2_CLKSOURCE_SYSCLK ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_0 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< SYSCLK clock used as I2C2 clock source */
|
||||||
#define LL_RCC_I2C2_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_1 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< HSI clock used as I2C2 clock source */
|
#define LL_RCC_I2C2_CLKSOURCE_HSI ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_1 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< HSI clock used as I2C2 clock source */
|
||||||
#endif /* RCC_CCIPR_I2C2SEL */
|
#endif /* RCC_CCIPR_I2C2SEL */
|
||||||
#define LL_RCC_I2C3_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C3 clock source */
|
#define LL_RCC_I2C3_CLKSOURCE_PCLK1 ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C3SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C3 clock source */
|
||||||
#define LL_RCC_I2C3_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_0 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< SYSCLK clock used as I2C3 clock source */
|
#define LL_RCC_I2C3_CLKSOURCE_SYSCLK ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_0 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< SYSCLK clock used as I2C3 clock source */
|
||||||
#define LL_RCC_I2C3_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_1 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< HSI clock used as I2C3 clock source */
|
#define LL_RCC_I2C3_CLKSOURCE_HSI ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_1 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< HSI clock used as I2C3 clock source */
|
||||||
#if defined(RCC_CCIPR2_I2C4SEL)
|
#if defined(RCC_CCIPR2_I2C4SEL)
|
||||||
#define LL_RCC_I2C4_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C4 clock source */
|
#define LL_RCC_I2C4_CLKSOURCE_PCLK1 ((RCC_OFFSET_CCIPR2 << 24U) | (RCC_CCIPR2_I2C4SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C4 clock source */
|
||||||
#define LL_RCC_I2C4_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_0 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< SYSCLK clock used as I2C4 clock source */
|
#define LL_RCC_I2C4_CLKSOURCE_SYSCLK ((RCC_OFFSET_CCIPR2 << 24U) | (RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_0 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< SYSCLK clock used as I2C4 clock source */
|
||||||
#define LL_RCC_I2C4_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_1 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< HSI clock used as I2C4 clock source */
|
#define LL_RCC_I2C4_CLKSOURCE_HSI ((RCC_OFFSET_CCIPR2 << 24U) | (RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_1 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< HSI clock used as I2C4 clock source */
|
||||||
#endif /* RCC_CCIPR2_I2C4SEL */
|
#endif /* RCC_CCIPR2_I2C4SEL */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
@ -705,13 +705,13 @@ typedef struct
|
|||||||
/** @defgroup RCC_LL_EC_I2C1 Peripheral I2C get clock source
|
/** @defgroup RCC_LL_EC_I2C1 Peripheral I2C get clock source
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define LL_RCC_I2C1_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL >> RCC_CCIPR_I2C1SEL_Pos)) /*!< I2C1 Clock source selection */
|
#define LL_RCC_I2C1_CLKSOURCE ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL >> RCC_CCIPR_I2C1SEL_Pos)) /*!< I2C1 Clock source selection */
|
||||||
#if defined(RCC_CCIPR_I2C2SEL)
|
#if defined(RCC_CCIPR_I2C2SEL)
|
||||||
#define LL_RCC_I2C2_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL >> RCC_CCIPR_I2C2SEL_Pos)) /*!< I2C2 Clock source selection */
|
#define LL_RCC_I2C2_CLKSOURCE ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL >> RCC_CCIPR_I2C2SEL_Pos)) /*!< I2C2 Clock source selection */
|
||||||
#endif /* RCC_CCIPR_I2C2SEL */
|
#endif /* RCC_CCIPR_I2C2SEL */
|
||||||
#define LL_RCC_I2C3_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL >> RCC_CCIPR_I2C3SEL_Pos)) /*!< I2C3 Clock source selection */
|
#define LL_RCC_I2C3_CLKSOURCE ((RCC_OFFSET_CCIPR << 24U) | (RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL >> RCC_CCIPR_I2C3SEL_Pos)) /*!< I2C3 Clock source selection */
|
||||||
#if defined(RCC_CCIPR2_I2C4SEL)
|
#if defined(RCC_CCIPR2_I2C4SEL)
|
||||||
#define LL_RCC_I2C4_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< I2C4 Clock source selection */
|
#define LL_RCC_I2C4_CLKSOURCE ((RCC_OFFSET_CCIPR2 << 24U) | (RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< I2C4 Clock source selection */
|
||||||
#endif /* RCC_CCIPR2_I2C4SEL */
|
#endif /* RCC_CCIPR2_I2C4SEL */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -1524,7 +1524,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeForma
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get time format (AM or PM notation)
|
* @brief Get time format (AM or PM notation)
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
@ -1558,7 +1558,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Hours in BCD format
|
* @brief Get Hours in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
@ -1593,7 +1593,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Minutes in BCD format
|
* @brief Get Minutes in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
@ -1628,7 +1628,7 @@ __STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Seconds in BCD format
|
* @brief Get Seconds in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
@ -1678,7 +1678,7 @@ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get time (hour, minute and second) in BCD format
|
* @brief Get time (hour, minute and second) in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
* @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
|
||||||
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
* shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
|
||||||
@ -1825,7 +1825,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Year in BCD format
|
* @brief Get Year in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
|
||||||
* @rmtoll RTC_DR YT LL_RTC_DATE_GetYear\n
|
* @rmtoll RTC_DR YT LL_RTC_DATE_GetYear\n
|
||||||
@ -1859,7 +1859,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Week day
|
* @brief Get Week day
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @rmtoll RTC_DR WDU LL_RTC_DATE_GetWeekDay
|
* @rmtoll RTC_DR WDU LL_RTC_DATE_GetWeekDay
|
||||||
* @param RTCx RTC Instance
|
* @param RTCx RTC Instance
|
||||||
@ -1906,7 +1906,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Month in BCD format
|
* @brief Get Month in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
|
||||||
* @rmtoll RTC_DR MT LL_RTC_DATE_GetMonth\n
|
* @rmtoll RTC_DR MT LL_RTC_DATE_GetMonth\n
|
||||||
@ -1948,7 +1948,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get Day in BCD format
|
* @brief Get Day in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
|
* @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
|
||||||
* @rmtoll RTC_DR DT LL_RTC_DATE_GetDay\n
|
* @rmtoll RTC_DR DT LL_RTC_DATE_GetDay\n
|
||||||
@ -2010,7 +2010,7 @@ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get date (WeekDay, Day, Month and Year) in BCD format
|
* @brief Get date (WeekDay, Day, Month and Year) in BCD format
|
||||||
* @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set
|
* @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
|
||||||
* before reading this bit
|
* before reading this bit
|
||||||
* @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
|
* @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
|
||||||
* and __LL_RTC_GET_DAY are available to get independently each parameter.
|
* and __LL_RTC_GET_DAY are available to get independently each parameter.
|
||||||
|
@ -60,8 +60,6 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LL_EXTI_REGISTER_PINPOS_SHFT 16U /*!< Define used to shift pin position in EXTICR register */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Power-down in Run mode Flash key
|
* @brief Power-down in Run mode Flash key
|
||||||
*/
|
*/
|
||||||
@ -156,22 +154,22 @@ extern "C" {
|
|||||||
/** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE
|
/** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define LL_SYSCFG_EXTI_LINE0 (uint32_t)((0x000FU << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /* !< EXTI_POSITION_0 | EXTICR[0] */
|
#define LL_SYSCFG_EXTI_LINE0 (uint32_t)(0x000FU << 16U | 0U) /* !< EXTI_POSITION_0 | EXTICR[0] */
|
||||||
#define LL_SYSCFG_EXTI_LINE1 (uint32_t)((0x00F0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /* !< EXTI_POSITION_4 | EXTICR[0] */
|
#define LL_SYSCFG_EXTI_LINE1 (uint32_t)(0x00F0U << 16U | 0U) /* !< EXTI_POSITION_4 | EXTICR[0] */
|
||||||
#define LL_SYSCFG_EXTI_LINE2 (uint32_t)((0x0F00U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /* !< EXTI_POSITION_8 | EXTICR[0] */
|
#define LL_SYSCFG_EXTI_LINE2 (uint32_t)(0x0F00U << 16U | 0U) /* !< EXTI_POSITION_8 | EXTICR[0] */
|
||||||
#define LL_SYSCFG_EXTI_LINE3 (uint32_t)((0xF000U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /* !< EXTI_POSITION_12 | EXTICR[0] */
|
#define LL_SYSCFG_EXTI_LINE3 (uint32_t)(0xF000U << 16U | 0U) /* !< EXTI_POSITION_12 | EXTICR[0] */
|
||||||
#define LL_SYSCFG_EXTI_LINE4 (uint32_t)((0x000FU << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /* !< EXTI_POSITION_0 | EXTICR[1] */
|
#define LL_SYSCFG_EXTI_LINE4 (uint32_t)(0x000FU << 16U | 1U) /* !< EXTI_POSITION_0 | EXTICR[1] */
|
||||||
#define LL_SYSCFG_EXTI_LINE5 (uint32_t)((0x00F0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /* !< EXTI_POSITION_4 | EXTICR[1] */
|
#define LL_SYSCFG_EXTI_LINE5 (uint32_t)(0x00F0U << 16U | 1U) /* !< EXTI_POSITION_4 | EXTICR[1] */
|
||||||
#define LL_SYSCFG_EXTI_LINE6 (uint32_t)((0x0F00U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /* !< EXTI_POSITION_8 | EXTICR[1] */
|
#define LL_SYSCFG_EXTI_LINE6 (uint32_t)(0x0F00U << 16U | 1U) /* !< EXTI_POSITION_8 | EXTICR[1] */
|
||||||
#define LL_SYSCFG_EXTI_LINE7 (uint32_t)((0xF000U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /* !< EXTI_POSITION_12 | EXTICR[1] */
|
#define LL_SYSCFG_EXTI_LINE7 (uint32_t)(0xF000U << 16U | 1U) /* !< EXTI_POSITION_12 | EXTICR[1] */
|
||||||
#define LL_SYSCFG_EXTI_LINE8 (uint32_t)((0x000FU << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /* !< EXTI_POSITION_0 | EXTICR[2] */
|
#define LL_SYSCFG_EXTI_LINE8 (uint32_t)(0x000FU << 16U | 2U) /* !< EXTI_POSITION_0 | EXTICR[2] */
|
||||||
#define LL_SYSCFG_EXTI_LINE9 (uint32_t)((0x00F0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /* !< EXTI_POSITION_4 | EXTICR[2] */
|
#define LL_SYSCFG_EXTI_LINE9 (uint32_t)(0x00F0U << 16U | 2U) /* !< EXTI_POSITION_4 | EXTICR[2] */
|
||||||
#define LL_SYSCFG_EXTI_LINE10 (uint32_t)((0x0F00U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /* !< EXTI_POSITION_8 | EXTICR[2] */
|
#define LL_SYSCFG_EXTI_LINE10 (uint32_t)(0x0F00U << 16U | 2U) /* !< EXTI_POSITION_8 | EXTICR[2] */
|
||||||
#define LL_SYSCFG_EXTI_LINE11 (uint32_t)((0xF000U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /* !< EXTI_POSITION_12 | EXTICR[2] */
|
#define LL_SYSCFG_EXTI_LINE11 (uint32_t)(0xF000U << 16U | 2U) /* !< EXTI_POSITION_12 | EXTICR[2] */
|
||||||
#define LL_SYSCFG_EXTI_LINE12 (uint32_t)((0x000FU << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /* !< EXTI_POSITION_0 | EXTICR[3] */
|
#define LL_SYSCFG_EXTI_LINE12 (uint32_t)(0x000FU << 16U | 3U) /* !< EXTI_POSITION_0 | EXTICR[3] */
|
||||||
#define LL_SYSCFG_EXTI_LINE13 (uint32_t)((0x00F0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /* !< EXTI_POSITION_4 | EXTICR[3] */
|
#define LL_SYSCFG_EXTI_LINE13 (uint32_t)(0x00F0U << 16U | 3U) /* !< EXTI_POSITION_4 | EXTICR[3] */
|
||||||
#define LL_SYSCFG_EXTI_LINE14 (uint32_t)((0x0F00U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /* !< EXTI_POSITION_8 | EXTICR[3] */
|
#define LL_SYSCFG_EXTI_LINE14 (uint32_t)(0x0F00U << 16U | 3U) /* !< EXTI_POSITION_8 | EXTICR[3] */
|
||||||
#define LL_SYSCFG_EXTI_LINE15 (uint32_t)((0xF000U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /* !< EXTI_POSITION_12 | EXTICR[3] */
|
#define LL_SYSCFG_EXTI_LINE15 (uint32_t)(0xF000U << 16U | 3U) /* !< EXTI_POSITION_12 | EXTICR[3] */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@ -774,7 +772,7 @@ __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IXC(void)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line)
|
__STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line)
|
||||||
{
|
{
|
||||||
MODIFY_REG(SYSCFG->EXTICR[Line & 0x03U], (Line >> LL_EXTI_REGISTER_PINPOS_SHFT), Port << POSITION_VAL((Line >> LL_EXTI_REGISTER_PINPOS_SHFT)));
|
MODIFY_REG(SYSCFG->EXTICR[Line & 0xFFU], (Line >> 16U), Port << POSITION_VAL((Line >> 16U)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -815,7 +813,7 @@ __STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line)
|
__STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0x03U], (Line >> LL_EXTI_REGISTER_PINPOS_SHFT)) >> POSITION_VAL(Line >> LL_EXTI_REGISTER_PINPOS_SHFT));
|
return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0xFFU], (Line >> 16U)) >> POSITION_VAL(Line >> 16U));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,7 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USART1) || defined(USART2) || defined(USART3) || defined(UART4) || defined(UART5)
|
#if defined (USART1) || defined (USART2) || defined (USART3) || defined (UART4) || defined (UART5)
|
||||||
|
|
||||||
/** @defgroup USART_LL USART
|
/** @defgroup USART_LL USART
|
||||||
* @{
|
* @{
|
||||||
@ -65,12 +65,6 @@ static const uint32_t USART_PRESCALER_TAB[] =
|
|||||||
#endif /* USART_PRESC_PRESCALER */
|
#endif /* USART_PRESC_PRESCALER */
|
||||||
|
|
||||||
/* Private constants ---------------------------------------------------------*/
|
/* Private constants ---------------------------------------------------------*/
|
||||||
/** @defgroup USART_LL_Private_Constants USART Private Constants
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
#if defined(USE_FULL_LL_DRIVER)
|
#if defined(USE_FULL_LL_DRIVER)
|
||||||
/** @defgroup USART_LL_Private_Macros USART Private Macros
|
/** @defgroup USART_LL_Private_Macros USART Private Macros
|
||||||
@ -1666,7 +1660,7 @@ __STATIC_INLINE void LL_USART_SetAutoBaudRateMode(USART_TypeDef *USARTx, uint32_
|
|||||||
* @arg @ref LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME
|
* @arg @ref LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME
|
||||||
* @arg @ref LL_USART_AUTOBAUD_DETECT_ON_55_FRAME
|
* @arg @ref LL_USART_AUTOBAUD_DETECT_ON_55_FRAME
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t LL_USART_GetAutoBaudRateMode(const USART_TypeDef *USARTx)
|
__STATIC_INLINE uint32_t LL_USART_GetAutoBaudRateMode(USART_TypeDef *USARTx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_ABRMODE));
|
return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_ABRMODE));
|
||||||
}
|
}
|
||||||
@ -3122,7 +3116,8 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_IDLE(const USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_IsActiveFlag_RXNE LL_USART_IsActiveFlag_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_IsActiveFlag_RXNE LL_USART_IsActiveFlag_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the USART Read Data Register or USART RX FIFO Not Empty Flag is set or not
|
* @brief Check if the USART Read Data Register or USART RX FIFO Not Empty Flag is set or not
|
||||||
@ -3162,7 +3157,8 @@ __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TC(const USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_IsActiveFlag_TXE LL_USART_IsActiveFlag_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_IsActiveFlag_TXE LL_USART_IsActiveFlag_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the USART Transmit Data Register Empty or USART TX FIFO Not Full Flag is set or not
|
* @brief Check if the USART Transmit Data Register Empty or USART TX FIFO Not Full Flag is set or not
|
||||||
@ -3647,7 +3643,8 @@ __STATIC_INLINE void LL_USART_EnableIT_IDLE(USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_EnableIT_RXNE LL_USART_EnableIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_EnableIT_RXNE LL_USART_EnableIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable RX Not Empty and RX FIFO Not Empty Interrupt
|
* @brief Enable RX Not Empty and RX FIFO Not Empty Interrupt
|
||||||
@ -3687,7 +3684,8 @@ __STATIC_INLINE void LL_USART_EnableIT_TC(USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_EnableIT_TXE LL_USART_EnableIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_EnableIT_TXE LL_USART_EnableIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable TX Empty and TX FIFO Not Full Interrupt
|
* @brief Enable TX Empty and TX FIFO Not Full Interrupt
|
||||||
@ -3899,7 +3897,8 @@ __STATIC_INLINE void LL_USART_DisableIT_IDLE(USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_DisableIT_RXNE LL_USART_DisableIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_DisableIT_RXNE LL_USART_DisableIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable RX Not Empty and RX FIFO Not Empty Interrupt
|
* @brief Disable RX Not Empty and RX FIFO Not Empty Interrupt
|
||||||
@ -3939,7 +3938,8 @@ __STATIC_INLINE void LL_USART_DisableIT_TC(USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_DisableIT_TXE LL_USART_DisableIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_DisableIT_TXE LL_USART_DisableIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable TX Empty and TX FIFO Not Full Interrupt
|
* @brief Disable TX Empty and TX FIFO Not Full Interrupt
|
||||||
@ -4153,7 +4153,8 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_IDLE(const USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_IsEnabledIT_RXNE LL_USART_IsEnabledIT_RXNE_RXFNE /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_IsEnabledIT_RXNE LL_USART_IsEnabledIT_RXNE_RXFNE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the USART RX Not Empty and USART RX FIFO Not Empty Interrupt is enabled or disabled.
|
* @brief Check if the USART RX Not Empty and USART RX FIFO Not Empty Interrupt is enabled or disabled.
|
||||||
@ -4193,7 +4194,8 @@ __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TC(const USART_TypeDef *USARTx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USART_CR1_FIFOEN)
|
#if defined(USART_CR1_FIFOEN)
|
||||||
#define LL_USART_IsEnabledIT_TXE LL_USART_IsEnabledIT_TXE_TXFNF /* Redefinition for legacy purpose */
|
/* Legacy define */
|
||||||
|
#define LL_USART_IsEnabledIT_TXE LL_USART_IsEnabledIT_TXE_TXFNF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the USART TX Empty and USART TX FIFO Not Full Interrupt is enabled or disabled
|
* @brief Check if the USART TX Empty and USART TX FIFO Not Full Interrupt is enabled or disabled
|
||||||
|
@ -274,7 +274,7 @@ __STATIC_INLINE uint32_t LL_GetPackageType(void)
|
|||||||
* @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro)
|
* @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro)
|
||||||
* @note When a RTOS is used, it is recommended to avoid changing the SysTick
|
* @note When a RTOS is used, it is recommended to avoid changing the SysTick
|
||||||
* configuration by calling this function, for a delay use rather osDelay RTOS service.
|
* configuration by calling this function, for a delay use rather osDelay RTOS service.
|
||||||
* @param Ticks Frequency of Ticks (Hz)
|
* @param Ticks Number of ticks
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)
|
__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
This software component is provided to you as part of a software package and
|
This software component is provided to you as part of a software package and
|
||||||
applicable license terms are in the Package_license file. If you received this
|
applicable license terms are in the Package_license file. If you received this
|
||||||
software component outside of a package or without applicable license terms,
|
software component outside of a package or without applicable license terms,
|
||||||
the terms of the BSD-3-Clause license shall apply.
|
the terms of the BSD-3-Clause license shall apply.
|
||||||
You may obtain a copy of the BSD-3-Clause at:
|
You may obtain a copy of the BSD-3-Clause at:
|
||||||
https://opensource.org/licenses/BSD-3-Clause
|
https://opensource.org/licenses/BSD-3-Clause
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,307 +1,307 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_dma_ex.c
|
* @file stm32l4xx_hal_dma_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief DMA Extension HAL module driver
|
* @brief DMA Extension HAL module driver
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of the DMA Extension peripheral:
|
* functionalities of the DMA Extension peripheral:
|
||||||
* + Extended features functions
|
* + Extended features functions
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
@verbatim
|
@verbatim
|
||||||
==============================================================================
|
==============================================================================
|
||||||
##### How to use this driver #####
|
##### How to use this driver #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
[..]
|
[..]
|
||||||
The DMA Extension HAL driver can be used as follows:
|
The DMA Extension HAL driver can be used as follows:
|
||||||
|
|
||||||
(+) Configure the DMA_MUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function.
|
(+) Configure the DMA_MUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function.
|
||||||
(+) Configure the DMA_MUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function.
|
(+) Configure the DMA_MUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function.
|
||||||
Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used
|
Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used
|
||||||
to respectively enable/disable the request generator.
|
to respectively enable/disable the request generator.
|
||||||
|
|
||||||
(+) To handle the DMAMUX Interrupts, the function HAL_DMAEx_MUX_IRQHandler should be called from
|
(+) To handle the DMAMUX Interrupts, the function HAL_DMAEx_MUX_IRQHandler should be called from
|
||||||
the DMAMUX IRQ handler i.e DMAMUX1_OVR_IRQHandler.
|
the DMAMUX IRQ handler i.e DMAMUX1_OVR_IRQHandler.
|
||||||
As only one interrupt line is available for all DMAMUX channels and request generators , HAL_DMAEx_MUX_IRQHandler should be
|
As only one interrupt line is available for all DMAMUX channels and request generators , HAL_DMAEx_MUX_IRQHandler should be
|
||||||
called with, as parameter, the appropriate DMA handle as many as used DMAs in the user project
|
called with, as parameter, the appropriate DMA handle as many as used DMAs in the user project
|
||||||
(exception done if a given DMA is not using the DMAMUX SYNC block neither a request generator)
|
(exception done if a given DMA is not using the DMAMUX SYNC block neither a request generator)
|
||||||
|
|
||||||
-@- In Memory-to-Memory transfer mode, Multi (Double) Buffer mode is not allowed.
|
-@- In Memory-to-Memory transfer mode, Multi (Double) Buffer mode is not allowed.
|
||||||
-@- When Multi (Double) Buffer mode is enabled, the transfer is circular by default.
|
-@- When Multi (Double) Buffer mode is enabled, the transfer is circular by default.
|
||||||
-@- In Multi (Double) buffer mode, it is possible to update the base address for
|
-@- In Multi (Double) buffer mode, it is possible to update the base address for
|
||||||
the AHB memory port on the fly (DMA_CM0ARx or DMA_CM1ARx) when the channel is enabled.
|
the AHB memory port on the fly (DMA_CM0ARx or DMA_CM1ARx) when the channel is enabled.
|
||||||
|
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal.h"
|
#include "stm32l4xx_hal.h"
|
||||||
|
|
||||||
#if defined(DMAMUX1)
|
#if defined(DMAMUX1)
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx DMAEx
|
/** @defgroup DMAEx DMAEx
|
||||||
* @brief DMA Extended HAL module driver
|
* @brief DMA Extended HAL module driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAL_DMA_MODULE_ENABLED
|
#ifdef HAL_DMA_MODULE_ENABLED
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private Constants ---------------------------------------------------------*/
|
/* Private Constants ---------------------------------------------------------*/
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions
|
/** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup DMAEx_Exported_Functions_Group1 DMAEx Extended features functions
|
/** @defgroup DMAEx_Exported_Functions_Group1 DMAEx Extended features functions
|
||||||
* @brief Extended features functions
|
* @brief Extended features functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Extended features functions #####
|
##### Extended features functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
|
|
||||||
(+) Configure the DMAMUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function.
|
(+) Configure the DMAMUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function.
|
||||||
(+) Configure the DMAMUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function.
|
(+) Configure the DMAMUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function.
|
||||||
Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used
|
Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used
|
||||||
to respectively enable/disable the request generator.
|
to respectively enable/disable the request generator.
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure the DMAMUX synchronization parameters for a given DMA channel (instance).
|
* @brief Configure the DMAMUX synchronization parameters for a given DMA channel (instance).
|
||||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA channel.
|
* the configuration information for the specified DMA channel.
|
||||||
* @param pSyncConfig : pointer to HAL_DMA_MuxSyncConfigTypeDef : contains the DMAMUX synchronization parameters
|
* @param pSyncConfig : pointer to HAL_DMA_MuxSyncConfigTypeDef : contains the DMAMUX synchronization parameters
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig)
|
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
||||||
|
|
||||||
assert_param(IS_DMAMUX_SYNC_SIGNAL_ID(pSyncConfig->SyncSignalID));
|
assert_param(IS_DMAMUX_SYNC_SIGNAL_ID(pSyncConfig->SyncSignalID));
|
||||||
|
|
||||||
assert_param(IS_DMAMUX_SYNC_POLARITY(pSyncConfig-> SyncPolarity));
|
assert_param(IS_DMAMUX_SYNC_POLARITY(pSyncConfig-> SyncPolarity));
|
||||||
assert_param(IS_DMAMUX_SYNC_STATE(pSyncConfig->SyncEnable));
|
assert_param(IS_DMAMUX_SYNC_STATE(pSyncConfig->SyncEnable));
|
||||||
assert_param(IS_DMAMUX_SYNC_EVENT(pSyncConfig->EventEnable));
|
assert_param(IS_DMAMUX_SYNC_EVENT(pSyncConfig->EventEnable));
|
||||||
assert_param(IS_DMAMUX_SYNC_REQUEST_NUMBER(pSyncConfig->RequestNumber));
|
assert_param(IS_DMAMUX_SYNC_REQUEST_NUMBER(pSyncConfig->RequestNumber));
|
||||||
|
|
||||||
/*Check if the DMA state is ready */
|
/*Check if the DMA state is ready */
|
||||||
if (hdma->State == HAL_DMA_STATE_READY)
|
if(hdma->State == HAL_DMA_STATE_READY)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdma);
|
__HAL_LOCK(hdma);
|
||||||
|
|
||||||
/* Set the new synchronization parameters (and keep the request ID filled during the Init)*/
|
/* Set the new synchronization parameters (and keep the request ID filled during the Init)*/
|
||||||
MODIFY_REG(hdma->DMAmuxChannel->CCR, \
|
MODIFY_REG( hdma->DMAmuxChannel->CCR, \
|
||||||
(~DMAMUX_CxCR_DMAREQ_ID), \
|
(~DMAMUX_CxCR_DMAREQ_ID) , \
|
||||||
((pSyncConfig->SyncSignalID) << DMAMUX_CxCR_SYNC_ID_Pos) | ((pSyncConfig->RequestNumber - 1U) << DMAMUX_CxCR_NBREQ_Pos) | \
|
((pSyncConfig->SyncSignalID) << DMAMUX_CxCR_SYNC_ID_Pos) | ((pSyncConfig->RequestNumber - 1U) << DMAMUX_CxCR_NBREQ_Pos) | \
|
||||||
pSyncConfig->SyncPolarity | ((uint32_t)pSyncConfig->SyncEnable << DMAMUX_CxCR_SE_Pos) | \
|
pSyncConfig->SyncPolarity | ((uint32_t)pSyncConfig->SyncEnable << DMAMUX_CxCR_SE_Pos) | \
|
||||||
((uint32_t)pSyncConfig->EventEnable << DMAMUX_CxCR_EGE_Pos));
|
((uint32_t)pSyncConfig->EventEnable << DMAMUX_CxCR_EGE_Pos));
|
||||||
|
|
||||||
/* Process UnLocked */
|
/* Process UnLocked */
|
||||||
__HAL_UNLOCK(hdma);
|
__HAL_UNLOCK(hdma);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*DMA State not Ready*/
|
/*DMA State not Ready*/
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure the DMAMUX request generator block used by the given DMA channel (instance).
|
* @brief Configure the DMAMUX request generator block used by the given DMA channel (instance).
|
||||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA channel.
|
* the configuration information for the specified DMA channel.
|
||||||
* @param pRequestGeneratorConfig : pointer to HAL_DMA_MuxRequestGeneratorConfigTypeDef :
|
* @param pRequestGeneratorConfig : pointer to HAL_DMA_MuxRequestGeneratorConfigTypeDef :
|
||||||
* contains the request generator parameters.
|
* contains the request generator parameters.
|
||||||
*
|
*
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator(DMA_HandleTypeDef *hdma, HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig)
|
HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator (DMA_HandleTypeDef *hdma, HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
||||||
|
|
||||||
assert_param(IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(pRequestGeneratorConfig->SignalID));
|
assert_param(IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(pRequestGeneratorConfig->SignalID));
|
||||||
|
|
||||||
assert_param(IS_DMAMUX_REQUEST_GEN_POLARITY(pRequestGeneratorConfig->Polarity));
|
assert_param(IS_DMAMUX_REQUEST_GEN_POLARITY(pRequestGeneratorConfig->Polarity));
|
||||||
assert_param(IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(pRequestGeneratorConfig->RequestNumber));
|
assert_param(IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(pRequestGeneratorConfig->RequestNumber));
|
||||||
|
|
||||||
/* check if the DMA state is ready
|
/* check if the DMA state is ready
|
||||||
and DMA is using a DMAMUX request generator block
|
and DMA is using a DMAMUX request generator block
|
||||||
*/
|
*/
|
||||||
if ((hdma->State == HAL_DMA_STATE_READY) && (hdma->DMAmuxRequestGen != 0U))
|
if((hdma->State == HAL_DMA_STATE_READY) && (hdma->DMAmuxRequestGen != 0U))
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hdma);
|
__HAL_LOCK(hdma);
|
||||||
|
|
||||||
/* Set the request generator new parameters */
|
/* Set the request generator new parameters */
|
||||||
hdma->DMAmuxRequestGen->RGCR = pRequestGeneratorConfig->SignalID | \
|
hdma->DMAmuxRequestGen->RGCR = pRequestGeneratorConfig->SignalID | \
|
||||||
((pRequestGeneratorConfig->RequestNumber - 1U) << DMAMUX_RGxCR_GNBREQ_Pos) | \
|
((pRequestGeneratorConfig->RequestNumber - 1U) << DMAMUX_RGxCR_GNBREQ_Pos)| \
|
||||||
pRequestGeneratorConfig->Polarity;
|
pRequestGeneratorConfig->Polarity;
|
||||||
/* Process UnLocked */
|
/* Process UnLocked */
|
||||||
__HAL_UNLOCK(hdma);
|
__HAL_UNLOCK(hdma);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the DMAMUX request generator block used by the given DMA channel (instance).
|
* @brief Enable the DMAMUX request generator block used by the given DMA channel (instance).
|
||||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA channel.
|
* the configuration information for the specified DMA channel.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator(DMA_HandleTypeDef *hdma)
|
HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator (DMA_HandleTypeDef *hdma)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
||||||
|
|
||||||
/* check if the DMA state is ready
|
/* check if the DMA state is ready
|
||||||
and DMA is using a DMAMUX request generator block
|
and DMA is using a DMAMUX request generator block
|
||||||
*/
|
*/
|
||||||
if ((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0))
|
if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Enable the request generator*/
|
/* Enable the request generator*/
|
||||||
hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_GE;
|
hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_GE;
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the DMAMUX request generator block used by the given DMA channel (instance).
|
* @brief Disable the DMAMUX request generator block used by the given DMA channel (instance).
|
||||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA channel.
|
* the configuration information for the specified DMA channel.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator(DMA_HandleTypeDef *hdma)
|
HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator (DMA_HandleTypeDef *hdma)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
||||||
|
|
||||||
/* check if the DMA state is ready
|
/* check if the DMA state is ready
|
||||||
and DMA is using a DMAMUX request generator block
|
and DMA is using a DMAMUX request generator block
|
||||||
*/
|
*/
|
||||||
if ((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0))
|
if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Disable the request generator*/
|
/* Disable the request generator*/
|
||||||
hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_GE;
|
hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_GE;
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_ERROR;
|
return HAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Handles DMAMUX interrupt request.
|
* @brief Handles DMAMUX interrupt request.
|
||||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified DMA channel.
|
* the configuration information for the specified DMA channel.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma)
|
void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma)
|
||||||
{
|
{
|
||||||
/* Check for DMAMUX Synchronization overrun */
|
/* Check for DMAMUX Synchronization overrun */
|
||||||
if ((hdma->DMAmuxChannelStatus->CSR & hdma->DMAmuxChannelStatusMask) != 0U)
|
if((hdma->DMAmuxChannelStatus->CSR & hdma->DMAmuxChannelStatusMask) != 0U)
|
||||||
{
|
{
|
||||||
/* Disable the synchro overrun interrupt */
|
/* Disable the synchro overrun interrupt */
|
||||||
hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE;
|
hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE;
|
||||||
|
|
||||||
/* Clear the DMAMUX synchro overrun flag */
|
/* Clear the DMAMUX synchro overrun flag */
|
||||||
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
|
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdma->ErrorCode |= HAL_DMA_ERROR_SYNC;
|
hdma->ErrorCode |= HAL_DMA_ERROR_SYNC;
|
||||||
|
|
||||||
if (hdma->XferErrorCallback != NULL)
|
if(hdma->XferErrorCallback != NULL)
|
||||||
{
|
{
|
||||||
/* Transfer error callback */
|
/* Transfer error callback */
|
||||||
hdma->XferErrorCallback(hdma);
|
hdma->XferErrorCallback(hdma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hdma->DMAmuxRequestGen != 0)
|
if(hdma->DMAmuxRequestGen != 0)
|
||||||
{
|
{
|
||||||
/* if using a DMAMUX request generator block Check for DMAMUX request generator overrun */
|
/* if using a DMAMUX request generator block Check for DMAMUX request generator overrun */
|
||||||
if ((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U)
|
if((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U)
|
||||||
{
|
{
|
||||||
/* Disable the request gen overrun interrupt */
|
/* Disable the request gen overrun interrupt */
|
||||||
hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE;
|
hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE;
|
||||||
|
|
||||||
/* Clear the DMAMUX request generator overrun flag */
|
/* Clear the DMAMUX request generator overrun flag */
|
||||||
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
|
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
|
||||||
|
|
||||||
/* Update error code */
|
/* Update error code */
|
||||||
hdma->ErrorCode |= HAL_DMA_ERROR_REQGEN;
|
hdma->ErrorCode |= HAL_DMA_ERROR_REQGEN;
|
||||||
|
|
||||||
if (hdma->XferErrorCallback != NULL)
|
if(hdma->XferErrorCallback != NULL)
|
||||||
{
|
{
|
||||||
/* Transfer error callback */
|
/* Transfer error callback */
|
||||||
hdma->XferErrorCallback(hdma);
|
hdma->XferErrorCallback(hdma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* HAL_DMA_MODULE_ENABLED */
|
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* DMAMUX1 */
|
#endif /* DMAMUX1 */
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,251 +1,251 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_flash_ramfunc.c
|
* @file stm32l4xx_hal_flash_ramfunc.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief FLASH RAMFUNC driver.
|
* @brief FLASH RAMFUNC driver.
|
||||||
* This file provides a Flash firmware functions which should be
|
* This file provides a Flash firmware functions which should be
|
||||||
* executed from internal SRAM
|
* executed from internal SRAM
|
||||||
* + FLASH HalfPage Programming
|
* + FLASH HalfPage Programming
|
||||||
* + FLASH Power Down in Run mode
|
* + FLASH Power Down in Run mode
|
||||||
*
|
*
|
||||||
* @verbatim
|
* @verbatim
|
||||||
==============================================================================
|
==============================================================================
|
||||||
##### Flash RAM functions #####
|
##### Flash RAM functions #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
*** ARM Compiler ***
|
*** ARM Compiler ***
|
||||||
--------------------
|
--------------------
|
||||||
[..] RAM functions are defined using the toolchain options.
|
[..] RAM functions are defined using the toolchain options.
|
||||||
Functions that are executed in RAM should reside in a separate
|
Functions that are executed in RAM should reside in a separate
|
||||||
source module. Using the 'Options for File' dialog you can simply change
|
source module. Using the 'Options for File' dialog you can simply change
|
||||||
the 'Code / Const' area of a module to a memory space in physical RAM.
|
the 'Code / Const' area of a module to a memory space in physical RAM.
|
||||||
Available memory areas are declared in the 'Target' tab of the
|
Available memory areas are declared in the 'Target' tab of the
|
||||||
Options for Target' dialog.
|
Options for Target' dialog.
|
||||||
|
|
||||||
*** ICCARM Compiler ***
|
*** ICCARM Compiler ***
|
||||||
-----------------------
|
-----------------------
|
||||||
[..] RAM functions are defined using a specific toolchain keyword "__ramfunc".
|
[..] RAM functions are defined using a specific toolchain keyword "__ramfunc".
|
||||||
|
|
||||||
*** GNU Compiler ***
|
*** GNU Compiler ***
|
||||||
--------------------
|
--------------------
|
||||||
[..] RAM functions are defined using a specific toolchain attribute
|
[..] RAM functions are defined using a specific toolchain attribute
|
||||||
"__attribute__((section(".RamFunc")))".
|
"__attribute__((section(".RamFunc")))".
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file in
|
* This software is licensed under terms that can be found in the LICENSE file in
|
||||||
* the root directory of this software component.
|
* the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal.h"
|
#include "stm32l4xx_hal.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup FLASH_RAMFUNC FLASH_RAMFUNC
|
/** @defgroup FLASH_RAMFUNC FLASH_RAMFUNC
|
||||||
* @brief FLASH functions executed from RAM
|
* @brief FLASH functions executed from RAM
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAL_FLASH_MODULE_ENABLED
|
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* Exported functions -------------------------------------------------------*/
|
/* Exported functions -------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup FLASH_RAMFUNC_Exported_Functions FLASH in RAM function Exported Functions
|
/** @defgroup FLASH_RAMFUNC_Exported_Functions FLASH in RAM function Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup FLASH_RAMFUNC_Exported_Functions_Group1 Peripheral features functions
|
/** @defgroup FLASH_RAMFUNC_Exported_Functions_Group1 Peripheral features functions
|
||||||
* @brief Data transfers functions
|
* @brief Data transfers functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### ramfunc functions #####
|
##### ramfunc functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..]
|
[..]
|
||||||
This subsection provides a set of functions that should be executed from RAM.
|
This subsection provides a set of functions that should be executed from RAM.
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the Power down in Run Mode
|
* @brief Enable the Power down in Run Mode
|
||||||
* @note This function should be called and executed from SRAM memory
|
* @note This function should be called and executed from SRAM memory
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableRunPowerDown(void)
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableRunPowerDown(void)
|
||||||
{
|
{
|
||||||
/* Enable the Power Down in Run mode*/
|
/* Enable the Power Down in Run mode*/
|
||||||
__HAL_FLASH_POWER_DOWN_ENABLE();
|
__HAL_FLASH_POWER_DOWN_ENABLE();
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the Power down in Run Mode
|
* @brief Disable the Power down in Run Mode
|
||||||
* @note This function should be called and executed from SRAM memory
|
* @note This function should be called and executed from SRAM memory
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableRunPowerDown(void)
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableRunPowerDown(void)
|
||||||
{
|
{
|
||||||
/* Disable the Power Down in Run mode*/
|
/* Disable the Power Down in Run mode*/
|
||||||
__HAL_FLASH_POWER_DOWN_DISABLE();
|
__HAL_FLASH_POWER_DOWN_DISABLE();
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
|
||||||
/**
|
/**
|
||||||
* @brief Program the FLASH DBANK User Option Byte.
|
* @brief Program the FLASH DBANK User Option Byte.
|
||||||
*
|
*
|
||||||
* @note To configure the user option bytes, the option lock bit OPTLOCK must
|
* @note To configure the user option bytes, the option lock bit OPTLOCK must
|
||||||
* be cleared with the call of the HAL_FLASH_OB_Unlock() function.
|
* be cleared with the call of the HAL_FLASH_OB_Unlock() function.
|
||||||
* @note To modify the DBANK option byte, no PCROP region should be defined.
|
* @note To modify the DBANK option byte, no PCROP region should be defined.
|
||||||
* To deactivate PCROP, user should perform RDP changing
|
* To deactivate PCROP, user should perform RDP changing
|
||||||
*
|
*
|
||||||
* @param DBankConfig The FLASH DBANK User Option Byte value.
|
* @param DBankConfig The FLASH DBANK User Option Byte value.
|
||||||
* This parameter can be one of the following values:
|
* This parameter can be one of the following values:
|
||||||
* @arg OB_DBANK_128_BITS: Single-bank with 128-bits data
|
* @arg OB_DBANK_128_BITS: Single-bank with 128-bits data
|
||||||
* @arg OB_DBANK_64_BITS: Dual-bank with 64-bits data
|
* @arg OB_DBANK_64_BITS: Dual-bank with 64-bits data
|
||||||
*
|
*
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig)
|
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig)
|
||||||
{
|
{
|
||||||
uint32_t count, reg;
|
uint32_t count, reg;
|
||||||
HAL_StatusTypeDef status = HAL_ERROR;
|
HAL_StatusTypeDef status = HAL_ERROR;
|
||||||
|
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(&pFlash);
|
__HAL_LOCK(&pFlash);
|
||||||
|
|
||||||
/* Check if the PCROP is disabled */
|
/* Check if the PCROP is disabled */
|
||||||
reg = FLASH->PCROP1SR;
|
reg = FLASH->PCROP1SR;
|
||||||
if (reg > FLASH->PCROP1ER)
|
if (reg > FLASH->PCROP1ER)
|
||||||
{
|
{
|
||||||
reg = FLASH->PCROP2SR;
|
reg = FLASH->PCROP2SR;
|
||||||
if (reg > FLASH->PCROP2ER)
|
if (reg > FLASH->PCROP2ER)
|
||||||
{
|
{
|
||||||
/* Disable Flash prefetch */
|
/* Disable Flash prefetch */
|
||||||
__HAL_FLASH_PREFETCH_BUFFER_DISABLE();
|
__HAL_FLASH_PREFETCH_BUFFER_DISABLE();
|
||||||
|
|
||||||
if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != 0U)
|
if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != 0U)
|
||||||
{
|
{
|
||||||
/* Disable Flash instruction cache */
|
/* Disable Flash instruction cache */
|
||||||
__HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
|
__HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
|
||||||
|
|
||||||
/* Flush Flash instruction cache */
|
/* Flush Flash instruction cache */
|
||||||
__HAL_FLASH_INSTRUCTION_CACHE_RESET();
|
__HAL_FLASH_INSTRUCTION_CACHE_RESET();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U)
|
if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U)
|
||||||
{
|
{
|
||||||
/* Disable Flash data cache */
|
/* Disable Flash data cache */
|
||||||
__HAL_FLASH_DATA_CACHE_DISABLE();
|
__HAL_FLASH_DATA_CACHE_DISABLE();
|
||||||
|
|
||||||
/* Flush Flash data cache */
|
/* Flush Flash data cache */
|
||||||
__HAL_FLASH_DATA_CACHE_RESET();
|
__HAL_FLASH_DATA_CACHE_RESET();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable WRP zone 1 of 1st bank if needed */
|
/* Disable WRP zone 1 of 1st bank if needed */
|
||||||
reg = FLASH->WRP1AR;
|
reg = FLASH->WRP1AR;
|
||||||
if (((reg & FLASH_WRP1AR_WRP1A_STRT) >> FLASH_WRP1AR_WRP1A_STRT_Pos) <=
|
if (((reg & FLASH_WRP1AR_WRP1A_STRT) >> FLASH_WRP1AR_WRP1A_STRT_Pos) <=
|
||||||
((reg & FLASH_WRP1AR_WRP1A_END) >> FLASH_WRP1AR_WRP1A_END_Pos))
|
((reg & FLASH_WRP1AR_WRP1A_END) >> FLASH_WRP1AR_WRP1A_END_Pos))
|
||||||
{
|
{
|
||||||
MODIFY_REG(FLASH->WRP1AR, (FLASH_WRP1AR_WRP1A_STRT | FLASH_WRP1AR_WRP1A_END), FLASH_WRP1AR_WRP1A_STRT);
|
MODIFY_REG(FLASH->WRP1AR, (FLASH_WRP1AR_WRP1A_STRT | FLASH_WRP1AR_WRP1A_END), FLASH_WRP1AR_WRP1A_STRT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable WRP zone 2 of 1st bank if needed */
|
/* Disable WRP zone 2 of 1st bank if needed */
|
||||||
reg = FLASH->WRP1BR;
|
reg = FLASH->WRP1BR;
|
||||||
if (((reg & FLASH_WRP1BR_WRP1B_STRT) >> FLASH_WRP1BR_WRP1B_STRT_Pos) <=
|
if (((reg & FLASH_WRP1BR_WRP1B_STRT) >> FLASH_WRP1BR_WRP1B_STRT_Pos) <=
|
||||||
((reg & FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos))
|
((reg & FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos))
|
||||||
{
|
{
|
||||||
MODIFY_REG(FLASH->WRP1BR, (FLASH_WRP1BR_WRP1B_STRT | FLASH_WRP1BR_WRP1B_END), FLASH_WRP1BR_WRP1B_STRT);
|
MODIFY_REG(FLASH->WRP1BR, (FLASH_WRP1BR_WRP1B_STRT | FLASH_WRP1BR_WRP1B_END), FLASH_WRP1BR_WRP1B_STRT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable WRP zone 1 of 2nd bank if needed */
|
/* Disable WRP zone 1 of 2nd bank if needed */
|
||||||
reg = FLASH->WRP2AR;
|
reg = FLASH->WRP2AR;
|
||||||
if (((reg & FLASH_WRP2AR_WRP2A_STRT) >> FLASH_WRP2AR_WRP2A_STRT_Pos) <=
|
if (((reg & FLASH_WRP2AR_WRP2A_STRT) >> FLASH_WRP2AR_WRP2A_STRT_Pos) <=
|
||||||
((reg & FLASH_WRP2AR_WRP2A_END) >> FLASH_WRP2AR_WRP2A_END_Pos))
|
((reg & FLASH_WRP2AR_WRP2A_END) >> FLASH_WRP2AR_WRP2A_END_Pos))
|
||||||
{
|
{
|
||||||
MODIFY_REG(FLASH->WRP2AR, (FLASH_WRP2AR_WRP2A_STRT | FLASH_WRP2AR_WRP2A_END), FLASH_WRP2AR_WRP2A_STRT);
|
MODIFY_REG(FLASH->WRP2AR, (FLASH_WRP2AR_WRP2A_STRT | FLASH_WRP2AR_WRP2A_END), FLASH_WRP2AR_WRP2A_STRT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable WRP zone 2 of 2nd bank if needed */
|
/* Disable WRP zone 2 of 2nd bank if needed */
|
||||||
reg = FLASH->WRP2BR;
|
reg = FLASH->WRP2BR;
|
||||||
if (((reg & FLASH_WRP2BR_WRP2B_STRT) >> FLASH_WRP2BR_WRP2B_STRT_Pos) <=
|
if (((reg & FLASH_WRP2BR_WRP2B_STRT) >> FLASH_WRP2BR_WRP2B_STRT_Pos) <=
|
||||||
((reg & FLASH_WRP2BR_WRP2B_END) >> FLASH_WRP2BR_WRP2B_END_Pos))
|
((reg & FLASH_WRP2BR_WRP2B_END) >> FLASH_WRP2BR_WRP2B_END_Pos))
|
||||||
{
|
{
|
||||||
MODIFY_REG(FLASH->WRP2BR, (FLASH_WRP2BR_WRP2B_STRT | FLASH_WRP2BR_WRP2B_END), FLASH_WRP2BR_WRP2B_STRT);
|
MODIFY_REG(FLASH->WRP2BR, (FLASH_WRP2BR_WRP2B_STRT | FLASH_WRP2BR_WRP2B_END), FLASH_WRP2BR_WRP2B_STRT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modify the DBANK user option byte */
|
/* Modify the DBANK user option byte */
|
||||||
MODIFY_REG(FLASH->OPTR, FLASH_OPTR_DBANK, DBankConfig);
|
MODIFY_REG(FLASH->OPTR, FLASH_OPTR_DBANK, DBankConfig);
|
||||||
|
|
||||||
/* Set OPTSTRT Bit */
|
/* Set OPTSTRT Bit */
|
||||||
SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT);
|
SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT);
|
||||||
|
|
||||||
/* Wait for last operation to be completed */
|
/* Wait for last operation to be completed */
|
||||||
/* 8 is the number of required instruction cycles for the below loop statement (timeout expressed in ms) */
|
/* 8 is the number of required instruction cycles for the below loop statement (timeout expressed in ms) */
|
||||||
count = FLASH_TIMEOUT_VALUE * (SystemCoreClock / 8U / 1000U);
|
count = FLASH_TIMEOUT_VALUE * (SystemCoreClock / 8U / 1000U);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (count == 0U)
|
if (count == 0U)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
count--;
|
count--;
|
||||||
} while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) != RESET);
|
} while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) != RESET);
|
||||||
|
|
||||||
/* If the option byte program operation is completed, disable the OPTSTRT Bit */
|
/* If the option byte program operation is completed, disable the OPTSTRT Bit */
|
||||||
CLEAR_BIT(FLASH->CR, FLASH_CR_OPTSTRT);
|
CLEAR_BIT(FLASH->CR, FLASH_CR_OPTSTRT);
|
||||||
|
|
||||||
/* Set the bit to force the option byte reloading */
|
/* Set the bit to force the option byte reloading */
|
||||||
SET_BIT(FLASH->CR, FLASH_CR_OBL_LAUNCH);
|
SET_BIT(FLASH->CR, FLASH_CR_OBL_LAUNCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(&pFlash);
|
__HAL_UNLOCK(&pFlash);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
#endif /* HAL_FLASH_MODULE_ENABLED */
|
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,368 +1,368 @@
|
|||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32l4xx_hal_i2c_ex.c
|
* @file stm32l4xx_hal_i2c_ex.c
|
||||||
* @author MCD Application Team
|
* @author MCD Application Team
|
||||||
* @brief I2C Extended HAL module driver.
|
* @brief I2C Extended HAL module driver.
|
||||||
* This file provides firmware functions to manage the following
|
* This file provides firmware functions to manage the following
|
||||||
* functionalities of I2C Extended peripheral:
|
* functionalities of I2C Extended peripheral:
|
||||||
* + Filter Mode Functions
|
* + Filter Mode Functions
|
||||||
* + WakeUp Mode Functions
|
* + WakeUp Mode Functions
|
||||||
* + FastModePlus Functions
|
* + FastModePlus Functions
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 STMicroelectronics.
|
* Copyright (c) 2017 STMicroelectronics.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under terms that can be found in the LICENSE file
|
* This software is licensed under terms that can be found in the LICENSE file
|
||||||
* in the root directory of this software component.
|
* in the root directory of this software component.
|
||||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
@verbatim
|
@verbatim
|
||||||
==============================================================================
|
==============================================================================
|
||||||
##### I2C peripheral Extended features #####
|
##### I2C peripheral Extended features #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
[..] Comparing to other previous devices, the I2C interface for STM32L4xx
|
[..] Comparing to other previous devices, the I2C interface for STM32L4xx
|
||||||
devices contains the following additional features
|
devices contains the following additional features
|
||||||
|
|
||||||
(+) Possibility to disable or enable Analog Noise Filter
|
(+) Possibility to disable or enable Analog Noise Filter
|
||||||
(+) Use of a configured Digital Noise Filter
|
(+) Use of a configured Digital Noise Filter
|
||||||
(+) Disable or enable wakeup from Stop mode(s)
|
(+) Disable or enable wakeup from Stop mode(s)
|
||||||
(+) Disable or enable Fast Mode Plus
|
(+) Disable or enable Fast Mode Plus
|
||||||
|
|
||||||
##### How to use this driver #####
|
##### How to use this driver #####
|
||||||
==============================================================================
|
==============================================================================
|
||||||
[..] This driver provides functions to configure Noise Filter and Wake Up Feature
|
[..] This driver provides functions to configure Noise Filter and Wake Up Feature
|
||||||
(#) Configure I2C Analog noise filter using the function HAL_I2CEx_ConfigAnalogFilter()
|
(#) Configure I2C Analog noise filter using the function HAL_I2CEx_ConfigAnalogFilter()
|
||||||
(#) Configure I2C Digital noise filter using the function HAL_I2CEx_ConfigDigitalFilter()
|
(#) Configure I2C Digital noise filter using the function HAL_I2CEx_ConfigDigitalFilter()
|
||||||
(#) Configure the enable or disable of I2C Wake Up Mode using the functions :
|
(#) Configure the enable or disable of I2C Wake Up Mode using the functions :
|
||||||
(++) HAL_I2CEx_EnableWakeUp()
|
(++) HAL_I2CEx_EnableWakeUp()
|
||||||
(++) HAL_I2CEx_DisableWakeUp()
|
(++) HAL_I2CEx_DisableWakeUp()
|
||||||
(#) Configure the enable or disable of fast mode plus driving capability using the functions :
|
(#) Configure the enable or disable of fast mode plus driving capability using the functions :
|
||||||
(++) HAL_I2CEx_EnableFastModePlus()
|
(++) HAL_I2CEx_EnableFastModePlus()
|
||||||
(++) HAL_I2CEx_DisableFastModePlus()
|
(++) HAL_I2CEx_DisableFastModePlus()
|
||||||
@endverbatim
|
@endverbatim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32l4xx_hal.h"
|
#include "stm32l4xx_hal.h"
|
||||||
|
|
||||||
/** @addtogroup STM32L4xx_HAL_Driver
|
/** @addtogroup STM32L4xx_HAL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx I2CEx
|
/** @defgroup I2CEx I2CEx
|
||||||
* @brief I2C Extended HAL module driver
|
* @brief I2C Extended HAL module driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAL_I2C_MODULE_ENABLED
|
#ifdef HAL_I2C_MODULE_ENABLED
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_Exported_Functions I2C Extended Exported Functions
|
/** @defgroup I2CEx_Exported_Functions I2C Extended Exported Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_Exported_Functions_Group1 Filter Mode Functions
|
/** @defgroup I2CEx_Exported_Functions_Group1 Filter Mode Functions
|
||||||
* @brief Filter Mode Functions
|
* @brief Filter Mode Functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Filter Mode Functions #####
|
##### Filter Mode Functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Configure Noise Filters
|
(+) Configure Noise Filters
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure I2C Analog noise filter.
|
* @brief Configure I2C Analog noise filter.
|
||||||
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified I2Cx peripheral.
|
* the configuration information for the specified I2Cx peripheral.
|
||||||
* @param AnalogFilter New state of the Analog filter.
|
* @param AnalogFilter New state of the Analog filter.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter)
|
HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
||||||
assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter));
|
assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter));
|
||||||
|
|
||||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hi2c);
|
__HAL_LOCK(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_BUSY;
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
||||||
|
|
||||||
/* Disable the selected I2C peripheral */
|
/* Disable the selected I2C peripheral */
|
||||||
__HAL_I2C_DISABLE(hi2c);
|
__HAL_I2C_DISABLE(hi2c);
|
||||||
|
|
||||||
/* Reset I2Cx ANOFF bit */
|
/* Reset I2Cx ANOFF bit */
|
||||||
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
|
hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF);
|
||||||
|
|
||||||
/* Set analog filter bit*/
|
/* Set analog filter bit*/
|
||||||
hi2c->Instance->CR1 |= AnalogFilter;
|
hi2c->Instance->CR1 |= AnalogFilter;
|
||||||
|
|
||||||
__HAL_I2C_ENABLE(hi2c);
|
__HAL_I2C_ENABLE(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_READY;
|
hi2c->State = HAL_I2C_STATE_READY;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hi2c);
|
__HAL_UNLOCK(hi2c);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_BUSY;
|
return HAL_BUSY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure I2C Digital noise filter.
|
* @brief Configure I2C Digital noise filter.
|
||||||
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified I2Cx peripheral.
|
* the configuration information for the specified I2Cx peripheral.
|
||||||
* @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F.
|
* @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter)
|
HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter)
|
||||||
{
|
{
|
||||||
uint32_t tmpreg;
|
uint32_t tmpreg;
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
||||||
assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter));
|
assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter));
|
||||||
|
|
||||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hi2c);
|
__HAL_LOCK(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_BUSY;
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
||||||
|
|
||||||
/* Disable the selected I2C peripheral */
|
/* Disable the selected I2C peripheral */
|
||||||
__HAL_I2C_DISABLE(hi2c);
|
__HAL_I2C_DISABLE(hi2c);
|
||||||
|
|
||||||
/* Get the old register value */
|
/* Get the old register value */
|
||||||
tmpreg = hi2c->Instance->CR1;
|
tmpreg = hi2c->Instance->CR1;
|
||||||
|
|
||||||
/* Reset I2Cx DNF bits [11:8] */
|
/* Reset I2Cx DNF bits [11:8] */
|
||||||
tmpreg &= ~(I2C_CR1_DNF);
|
tmpreg &= ~(I2C_CR1_DNF);
|
||||||
|
|
||||||
/* Set I2Cx DNF coefficient */
|
/* Set I2Cx DNF coefficient */
|
||||||
tmpreg |= DigitalFilter << 8U;
|
tmpreg |= DigitalFilter << 8U;
|
||||||
|
|
||||||
/* Store the new register value */
|
/* Store the new register value */
|
||||||
hi2c->Instance->CR1 = tmpreg;
|
hi2c->Instance->CR1 = tmpreg;
|
||||||
|
|
||||||
__HAL_I2C_ENABLE(hi2c);
|
__HAL_I2C_ENABLE(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_READY;
|
hi2c->State = HAL_I2C_STATE_READY;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hi2c);
|
__HAL_UNLOCK(hi2c);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_BUSY;
|
return HAL_BUSY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions
|
/** @defgroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions
|
||||||
* @brief WakeUp Mode Functions
|
* @brief WakeUp Mode Functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### WakeUp Mode Functions #####
|
##### WakeUp Mode Functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Configure Wake Up Feature
|
(+) Configure Wake Up Feature
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable I2C wakeup from Stop mode(s).
|
* @brief Enable I2C wakeup from Stop mode(s).
|
||||||
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified I2Cx peripheral.
|
* the configuration information for the specified I2Cx peripheral.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c)
|
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
||||||
|
|
||||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hi2c);
|
__HAL_LOCK(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_BUSY;
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
||||||
|
|
||||||
/* Disable the selected I2C peripheral */
|
/* Disable the selected I2C peripheral */
|
||||||
__HAL_I2C_DISABLE(hi2c);
|
__HAL_I2C_DISABLE(hi2c);
|
||||||
|
|
||||||
/* Enable wakeup from stop mode */
|
/* Enable wakeup from stop mode */
|
||||||
hi2c->Instance->CR1 |= I2C_CR1_WUPEN;
|
hi2c->Instance->CR1 |= I2C_CR1_WUPEN;
|
||||||
|
|
||||||
__HAL_I2C_ENABLE(hi2c);
|
__HAL_I2C_ENABLE(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_READY;
|
hi2c->State = HAL_I2C_STATE_READY;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hi2c);
|
__HAL_UNLOCK(hi2c);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_BUSY;
|
return HAL_BUSY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable I2C wakeup from Stop mode(s).
|
* @brief Disable I2C wakeup from Stop mode(s).
|
||||||
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
||||||
* the configuration information for the specified I2Cx peripheral.
|
* the configuration information for the specified I2Cx peripheral.
|
||||||
* @retval HAL status
|
* @retval HAL status
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c)
|
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c)
|
||||||
{
|
{
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
||||||
|
|
||||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||||
{
|
{
|
||||||
/* Process Locked */
|
/* Process Locked */
|
||||||
__HAL_LOCK(hi2c);
|
__HAL_LOCK(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_BUSY;
|
hi2c->State = HAL_I2C_STATE_BUSY;
|
||||||
|
|
||||||
/* Disable the selected I2C peripheral */
|
/* Disable the selected I2C peripheral */
|
||||||
__HAL_I2C_DISABLE(hi2c);
|
__HAL_I2C_DISABLE(hi2c);
|
||||||
|
|
||||||
/* Enable wakeup from stop mode */
|
/* Enable wakeup from stop mode */
|
||||||
hi2c->Instance->CR1 &= ~(I2C_CR1_WUPEN);
|
hi2c->Instance->CR1 &= ~(I2C_CR1_WUPEN);
|
||||||
|
|
||||||
__HAL_I2C_ENABLE(hi2c);
|
__HAL_I2C_ENABLE(hi2c);
|
||||||
|
|
||||||
hi2c->State = HAL_I2C_STATE_READY;
|
hi2c->State = HAL_I2C_STATE_READY;
|
||||||
|
|
||||||
/* Process Unlocked */
|
/* Process Unlocked */
|
||||||
__HAL_UNLOCK(hi2c);
|
__HAL_UNLOCK(hi2c);
|
||||||
|
|
||||||
return HAL_OK;
|
return HAL_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return HAL_BUSY;
|
return HAL_BUSY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
|
/** @defgroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
|
||||||
* @brief Fast Mode Plus Functions
|
* @brief Fast Mode Plus Functions
|
||||||
*
|
*
|
||||||
@verbatim
|
@verbatim
|
||||||
===============================================================================
|
===============================================================================
|
||||||
##### Fast Mode Plus Functions #####
|
##### Fast Mode Plus Functions #####
|
||||||
===============================================================================
|
===============================================================================
|
||||||
[..] This section provides functions allowing to:
|
[..] This section provides functions allowing to:
|
||||||
(+) Configure Fast Mode Plus
|
(+) Configure Fast Mode Plus
|
||||||
|
|
||||||
@endverbatim
|
@endverbatim
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable the I2C fast mode plus driving capability.
|
* @brief Enable the I2C fast mode plus driving capability.
|
||||||
* @param ConfigFastModePlus Selects the pin.
|
* @param ConfigFastModePlus Selects the pin.
|
||||||
* This parameter can be one of the @ref I2CEx_FastModePlus values
|
* This parameter can be one of the @ref I2CEx_FastModePlus values
|
||||||
* @note For I2C1, fast mode plus driving capability can be enabled on all selected
|
* @note For I2C1, fast mode plus driving capability can be enabled on all selected
|
||||||
* I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently
|
* I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently
|
||||||
* on each one of the following pins PB6, PB7, PB8 and PB9.
|
* on each one of the following pins PB6, PB7, PB8 and PB9.
|
||||||
* @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability
|
* @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability
|
||||||
* can be enabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
|
* can be enabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
|
||||||
* @note For all I2C2 pins fast mode plus driving capability can be enabled
|
* @note For all I2C2 pins fast mode plus driving capability can be enabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C2 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C2 parameter.
|
||||||
* @note For all I2C3 pins fast mode plus driving capability can be enabled
|
* @note For all I2C3 pins fast mode plus driving capability can be enabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C3 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C3 parameter.
|
||||||
* @note For all I2C4 pins fast mode plus driving capability can be enabled
|
* @note For all I2C4 pins fast mode plus driving capability can be enabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C4 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C4 parameter.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus)
|
void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus)
|
||||||
{
|
{
|
||||||
/* Check the parameter */
|
/* Check the parameter */
|
||||||
assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus));
|
assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus));
|
||||||
|
|
||||||
/* Enable SYSCFG clock */
|
/* Enable SYSCFG clock */
|
||||||
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
||||||
|
|
||||||
/* Enable fast mode plus driving capability for selected pin */
|
/* Enable fast mode plus driving capability for selected pin */
|
||||||
SET_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
|
SET_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disable the I2C fast mode plus driving capability.
|
* @brief Disable the I2C fast mode plus driving capability.
|
||||||
* @param ConfigFastModePlus Selects the pin.
|
* @param ConfigFastModePlus Selects the pin.
|
||||||
* This parameter can be one of the @ref I2CEx_FastModePlus values
|
* This parameter can be one of the @ref I2CEx_FastModePlus values
|
||||||
* @note For I2C1, fast mode plus driving capability can be disabled on all selected
|
* @note For I2C1, fast mode plus driving capability can be disabled on all selected
|
||||||
* I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently
|
* I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently
|
||||||
* on each one of the following pins PB6, PB7, PB8 and PB9.
|
* on each one of the following pins PB6, PB7, PB8 and PB9.
|
||||||
* @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability
|
* @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability
|
||||||
* can be disabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
|
* can be disabled only by using I2C_FASTMODEPLUS_I2C1 parameter.
|
||||||
* @note For all I2C2 pins fast mode plus driving capability can be disabled
|
* @note For all I2C2 pins fast mode plus driving capability can be disabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C2 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C2 parameter.
|
||||||
* @note For all I2C3 pins fast mode plus driving capability can be disabled
|
* @note For all I2C3 pins fast mode plus driving capability can be disabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C3 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C3 parameter.
|
||||||
* @note For all I2C4 pins fast mode plus driving capability can be disabled
|
* @note For all I2C4 pins fast mode plus driving capability can be disabled
|
||||||
* only by using I2C_FASTMODEPLUS_I2C4 parameter.
|
* only by using I2C_FASTMODEPLUS_I2C4 parameter.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus)
|
void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus)
|
||||||
{
|
{
|
||||||
/* Check the parameter */
|
/* Check the parameter */
|
||||||
assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus));
|
assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus));
|
||||||
|
|
||||||
/* Enable SYSCFG clock */
|
/* Enable SYSCFG clock */
|
||||||
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
||||||
|
|
||||||
/* Disable fast mode plus driving capability for selected pin */
|
/* Disable fast mode plus driving capability for selected pin */
|
||||||
CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
|
CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* HAL_I2C_MODULE_ENABLED */
|
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -5,10 +5,10 @@
|
|||||||
**
|
**
|
||||||
** @author : Auto-generated by STM32CubeIDE
|
** @author : Auto-generated by STM32CubeIDE
|
||||||
**
|
**
|
||||||
** @brief : Linker script for STM32L4A6ZGTx Device from STM32L4 series
|
** Abstract : Linker script for NUCLEO-L4A6ZG Board embedding STM32L4A6ZGTx Device from stm32l4 series
|
||||||
** 1024KBytes FLASH
|
** 1024Kbytes FLASH
|
||||||
** 320KBytes RAM
|
** 320Kbytes RAM
|
||||||
** 64KBytes RAM2
|
** 64Kbytes RAM2
|
||||||
**
|
**
|
||||||
** Set heap size, stack size and stack location according
|
** Set heap size, stack size and stack location according
|
||||||
** to application requirements.
|
** to application requirements.
|
||||||
@ -23,7 +23,7 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
** @attention
|
** @attention
|
||||||
**
|
**
|
||||||
** Copyright (c) 2024 STMicroelectronics.
|
** Copyright (c) 2022 STMicroelectronics.
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** This software is licensed under terms that can be found in the LICENSE file
|
** This software is licensed under terms that can be found in the LICENSE file
|
||||||
@ -39,8 +39,8 @@ ENTRY(Reset_Handler)
|
|||||||
/* Highest address of the user mode stack */
|
/* Highest address of the user mode stack */
|
||||||
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
|
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
|
||||||
|
|
||||||
_Min_Heap_Size = 0x200; /* required amount of heap */
|
_Min_Heap_Size = 0x200 ; /* required amount of heap */
|
||||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
_Min_Stack_Size = 0x400 ; /* required amount of stack */
|
||||||
|
|
||||||
/* Memories definition */
|
/* Memories definition */
|
||||||
MEMORY
|
MEMORY
|
||||||
@ -87,15 +87,13 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.ARM.extab (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
|
.ARM.extab : {
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
|
.ARM : {
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__exidx_start = .;
|
__exidx_start = .;
|
||||||
*(.ARM.exidx*)
|
*(.ARM.exidx*)
|
||||||
@ -103,7 +101,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
|
.preinit_array :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
@ -112,7 +110,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
|
.init_array :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
PROVIDE_HIDDEN (__init_array_start = .);
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
@ -122,7 +120,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
|
.fini_array :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user