Modify firmware
This commit is contained in:
parent
6ef456b8b7
commit
3a15cccad2
187
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/.cproject
Normal file
187
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/.cproject
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?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.1885940915">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1885940915" 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.1885940915" 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.1885940915." name="/" resourcePath="">
|
||||||
|
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.1605694760" 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.1952471794" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F413VGTx" valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1128271574" 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.739323970" 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.2080118045" 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.951325644" 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.406302366" 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.1074033597" 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 || STM32F413VGTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32F4xx_HAL_Driver/Inc | ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy | ../Drivers/CMSIS/Device/ST/STM32F4xx/Include | ../Drivers/CMSIS/Include | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F || || || USE_HAL_DRIVER | STM32F413xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32F413VGTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.2031824430" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="24" valueType="string"/>
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.579435323" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||||
|
<builder buildPath="${workspace_loc:/ICD_0.1_100pin_07082025}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.720798104" 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.644531896" name="MCU 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.1640938700" 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.2060591823" 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.507857807" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.830295066" name="MCU 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.1295242587" 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.2025804428" 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.1749569082" 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="STM32F413xx"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
|
||||||
|
<listOptionValue builtIn="false" value="ARM_MATH_CM4"/>
|
||||||
|
</option>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1459332989" 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/STM32F4xx_HAL_Driver/Inc"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1027557937" 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.883274162" name="MCU 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.256860580" 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.660135784" 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.1884516975" name="MCU 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.1602463234" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F413VGTX_FLASH.ld}" valueType="string"/>
|
||||||
|
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.966297693" 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.690605601" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1784347082" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.871735340" 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.854521065" 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.1822787444" 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.206378044" 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.1102825806" 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.1637074749" 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.436105942" 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.1358372915">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1358372915" 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.1358372915" 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.1358372915." name="/" resourcePath="">
|
||||||
|
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1786386920" 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.1547959618" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F413VGTx" valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.110744963" 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.811586478" 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.14451092" 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.1843123354" 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.46983909" 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.1212392337" 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 || STM32F413VGTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32F4xx_HAL_Driver/Inc | ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy | ../Drivers/CMSIS/Device/ST/STM32F4xx/Include | ../Drivers/CMSIS/Include | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F || || || USE_HAL_DRIVER | STM32F413xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32F413VGTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||||
|
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1606126768" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="24" valueType="string"/>
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1041302926" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||||
|
<builder buildPath="${workspace_loc:/ICD_0.1_100pin_07082025}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.946969358" 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.1231054984" name="MCU 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.735064142" 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.1722897347" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.650871017" name="MCU 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.1784252589" 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.978597020" 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.160540584" 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="STM32F413xx"/>
|
||||||
|
</option>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1646867254" 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/STM32F4xx_HAL_Driver/Inc"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
|
||||||
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.438783746" 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.167856598" name="MCU 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.190228380" 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.13516415" 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.891892496" name="MCU 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.155030268" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F413VGTX_FLASH.ld}" valueType="string"/>
|
||||||
|
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.61393781" 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.787148452" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1129027474" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
||||||
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.182208593" 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.1129406855" 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.660820122" 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.557200032" 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.1601781518" 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.1617504951" 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.1870172985" 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.core.pathentry"/>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="ICD_0.1_100pin_07082025.null.1181094842" name="ICD_0.1_100pin_07082025"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1885940915;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1885940915.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.830295066;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1027557937">
|
||||||
|
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1358372915;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1358372915.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.650871017;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.438783746">
|
||||||
|
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="refreshScope"/>
|
||||||
|
</cproject>
|
||||||
File diff suppressed because one or more lines are too long
32
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/.project
Normal file
32
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/.project
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>ICD_0.1_100pin_07082025</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature</nature>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature>
|
||||||
|
<nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<project>
|
||||||
|
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1885940915" name="Debug">
|
||||||
|
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||||
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="406563365828733591" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
|
</provider>
|
||||||
|
</extension>
|
||||||
|
</configuration>
|
||||||
|
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1358372915" name="Release">
|
||||||
|
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||||
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="406563365828733591" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
|
</provider>
|
||||||
|
</extension>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,189 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_compact_if=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=34
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain=18
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list=0
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_lambda_expression=20
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_member_access=0
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||||
|
org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_block=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_linkage_declaration=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_switch=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=next_line
|
||||||
|
org.eclipse.cdt.core.formatter.comment.line_up_line_comment_in_blocks_on_first_column=false
|
||||||
|
org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment=1
|
||||||
|
org.eclipse.cdt.core.formatter.comment.never_indent_line_comments_on_first_column=true
|
||||||
|
org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
|
||||||
|
org.eclipse.cdt.core.formatter.comment_formatter_off_tag=@formatter\:off
|
||||||
|
org.eclipse.cdt.core.formatter.comment_formatter_on_tag=@formatter\:on
|
||||||
|
org.eclipse.cdt.core.formatter.compact_else_if=true
|
||||||
|
org.eclipse.cdt.core.formatter.continuation_indentation=2
|
||||||
|
org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||||
|
org.eclipse.cdt.core.formatter.format_block_comment=true
|
||||||
|
org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||||
|
org.eclipse.cdt.core.formatter.format_header_comment=true
|
||||||
|
org.eclipse.cdt.core.formatter.format_line_comment=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false
|
||||||
|
org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces=0
|
||||||
|
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_linkage=false
|
||||||
|
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=false
|
||||||
|
org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false
|
||||||
|
org.eclipse.cdt.core.formatter.indent_empty_lines=false
|
||||||
|
org.eclipse.cdt.core.formatter.indent_label_compare_to_statements=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||||
|
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||||
|
org.eclipse.cdt.core.formatter.indentation.size=4
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_after_colon_in_constructor_initializer_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_after_label=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_structured_binding_name_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_lambda_return=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_opening_structured_binding_name_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_pointer_in_declarator_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_pointer_in_method_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_closing_structured_binding_name_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_structured_binding_name_list=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_lambda_return=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_linkage_declaration=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_opening_structured_binding_name_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_pointer_in_declarator_list=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_pointer_in_method_declaration=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_ref_qualifier_in_structured_binding=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||||
|
org.eclipse.cdt.core.formatter.join_wrapped_lines=true
|
||||||
|
org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
|
||||||
|
org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||||
|
org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
|
||||||
|
org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
|
||||||
|
org.eclipse.cdt.core.formatter.lineSplit=120
|
||||||
|
org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
|
org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
|
org.eclipse.cdt.core.formatter.tabulation.char=tab
|
||||||
|
org.eclipse.cdt.core.formatter.tabulation.size=4
|
||||||
|
org.eclipse.cdt.core.formatter.use_comment_formatter_tag=true
|
||||||
|
org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
formatter_profile=_MY
|
||||||
|
formatter_settings_version=1
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding/<project>=UTF-8
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
635E684B79701B039C64EA45C3F84D30=360292FCCDDAFCFDCC0A9C26D625E746
|
||||||
|
66BE74F758C12D739921AEA421D593D3=2
|
||||||
|
8DF89ED150041C4CBC7CB9A9CAA90856=4D88E89513CFAB4A49CA30CB8ABB58E8
|
||||||
|
DC22A860405A8BF2F2C095E5B6529F12=4D88E89513CFAB4A49CA30CB8ABB58E8
|
||||||
|
eclipse.preferences.version=1
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/*
|
||||||
|
* FreeRTOS Kernel V10.3.1
|
||||||
|
* Portion Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
* Portion Copyright (C) 2019 StMicroelectronics, Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org
|
||||||
|
* http://aws.amazon.com/freertos
|
||||||
|
*
|
||||||
|
* 1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
#ifndef FREERTOS_CONFIG_H
|
||||||
|
#define FREERTOS_CONFIG_H
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------
|
||||||
|
* Application specific definitions.
|
||||||
|
*
|
||||||
|
* These definitions should be adjusted for your particular hardware and
|
||||||
|
* application requirements.
|
||||||
|
*
|
||||||
|
* These parameters and more are described within the 'configuration' section of the
|
||||||
|
* FreeRTOS API documentation available on the FreeRTOS.org web site.
|
||||||
|
*
|
||||||
|
* See http://www.freertos.org/a00110.html
|
||||||
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
/* Section where include file can be added */
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Ensure definitions are only used by the compiler, and not by the assembler. */
|
||||||
|
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
|
||||||
|
#include <stdint.h>
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
#endif
|
||||||
|
#define configENABLE_FPU 1
|
||||||
|
#define configENABLE_MPU 0
|
||||||
|
|
||||||
|
#define configUSE_PREEMPTION 1
|
||||||
|
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||||
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||||
|
#define configUSE_IDLE_HOOK 0
|
||||||
|
#define configUSE_TICK_HOOK 0
|
||||||
|
#define configCPU_CLOCK_HZ ( SystemCoreClock )
|
||||||
|
#define configTICK_RATE_HZ ((TickType_t)1000)
|
||||||
|
#define configMAX_PRIORITIES ( 7 )
|
||||||
|
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
|
||||||
|
#define configTOTAL_HEAP_SIZE ((size_t)60000)
|
||||||
|
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||||
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
#define configUSE_MUTEXES 1
|
||||||
|
#define configQUEUE_REGISTRY_SIZE 8
|
||||||
|
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||||
|
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
|
||||||
|
/* Defaults to size_t for backward compatibility, but can be changed
|
||||||
|
if lengths will always be less than the number of bytes in a size_t. */
|
||||||
|
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
|
||||||
|
/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */
|
||||||
|
|
||||||
|
/* Co-routine definitions. */
|
||||||
|
#define configUSE_CO_ROUTINES 0
|
||||||
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
||||||
|
/* The following flag must be enabled only when using newlib */
|
||||||
|
#define configUSE_NEWLIB_REENTRANT 1
|
||||||
|
|
||||||
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
|
to exclude the API function. */
|
||||||
|
#define INCLUDE_vTaskPrioritySet 1
|
||||||
|
#define INCLUDE_uxTaskPriorityGet 1
|
||||||
|
#define INCLUDE_vTaskDelete 1
|
||||||
|
#define INCLUDE_vTaskCleanUpResources 0
|
||||||
|
#define INCLUDE_vTaskSuspend 1
|
||||||
|
#define INCLUDE_vTaskDelayUntil 0
|
||||||
|
#define INCLUDE_vTaskDelay 1
|
||||||
|
#define INCLUDE_xTaskGetSchedulerState 1
|
||||||
|
|
||||||
|
/* Cortex-M specific definitions. */
|
||||||
|
#ifdef __NVIC_PRIO_BITS
|
||||||
|
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
|
||||||
|
#define configPRIO_BITS __NVIC_PRIO_BITS
|
||||||
|
#else
|
||||||
|
#define configPRIO_BITS 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The lowest interrupt priority that can be used in a call to a "set priority"
|
||||||
|
function. */
|
||||||
|
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
|
||||||
|
|
||||||
|
/* The highest interrupt priority that can be used by any interrupt service
|
||||||
|
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
|
||||||
|
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
|
||||||
|
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
|
||||||
|
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
|
||||||
|
|
||||||
|
/* Interrupt priorities used by the kernel port layer itself. These are generic
|
||||||
|
to all Cortex-M ports, and do not rely on any particular library functions. */
|
||||||
|
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
||||||
|
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
|
||||||
|
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
||||||
|
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
||||||
|
|
||||||
|
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||||
|
header file. */
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );}
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
|
||||||
|
standard names. */
|
||||||
|
#define vPortSVCHandler SVC_Handler
|
||||||
|
#define xPortPendSVHandler PendSV_Handler
|
||||||
|
|
||||||
|
/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick,
|
||||||
|
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
|
||||||
|
|
||||||
|
#define xPortSysTickHandler SysTick_Handler
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Defines */
|
||||||
|
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
|
||||||
|
/* USER CODE END Defines */
|
||||||
|
|
||||||
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file adc.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the adc.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __ADC_H__
|
||||||
|
#define __ADC_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#define Critical_volt 3500//напряжение при котором выключаемся
|
||||||
|
#define Low_volt 3600//Низкое напряжение сигнализируем об этом
|
||||||
|
#define High_volt 4100//высокое напряжение считаем, что 100%
|
||||||
|
#define ADC_WAIT 80//20*сек сколько не возвращать флаг назад
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
extern ADC_HandleTypeDef hadc1;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_ADC1_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
typedef struct adc_struct
|
||||||
|
{
|
||||||
|
HAL_StatusTypeDef error;//флаг говорящий об ошибке во время работы
|
||||||
|
|
||||||
|
uint16_t ecg_1_raw;//RA
|
||||||
|
uint16_t ecg_2_raw;//RV
|
||||||
|
uint16_t ecg_3_raw;//LV
|
||||||
|
|
||||||
|
uint16_t bat_raw;
|
||||||
|
uint16_t bat_volt;//напряжение в сотых вольта
|
||||||
|
uint8_t bat_pers;
|
||||||
|
|
||||||
|
uint16_t hv_raw;
|
||||||
|
uint16_t hv_volt;
|
||||||
|
|
||||||
|
uint16_t rv_comp_raw;
|
||||||
|
uint16_t ra_comp_raw;
|
||||||
|
uint16_t lv_comp_raw;
|
||||||
|
|
||||||
|
bool drdy_trigger;//Флаг говорящий о том что готова новая пачка данных
|
||||||
|
}adc_struct;
|
||||||
|
|
||||||
|
void adc_read(adc_struct* adc);//чтение всего в структуру
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ADC_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,167 @@
|
|||||||
|
#ifndef _CONTROL
|
||||||
|
#define _CONTROL
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
|
||||||
|
//#include "usart.h"
|
||||||
|
#include "adc.h"
|
||||||
|
#include "gpio.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#define TYPE_ECG 0
|
||||||
|
#define TYPE_WATCH 1
|
||||||
|
#define DEV_TYPE TYPE_WATCH
|
||||||
|
|
||||||
|
#define MEM_ADR FLASH_MEM_ADDR//адрес куда пишем данные со всеми настройками.
|
||||||
|
#define APP_ADR FLASH_BOOT_ADDR//проги куда прыгать, правда это бессмысленно
|
||||||
|
|
||||||
|
#define BUT_CNT 30
|
||||||
|
#define DISP_CNT 30
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
//базовые значения основных параметров
|
||||||
|
#define BASE_SERIAL_NUM 0x4001
|
||||||
|
#define BASE_MASTER_ADR 0x1001
|
||||||
|
#define BASE_MESH_ADR BASE_SERIAL_NUM//пока он совпадает с серийным номером
|
||||||
|
#define BASE_MESH_ID 0x1313
|
||||||
|
#define BASE_PASSWORD 777777
|
||||||
|
|
||||||
|
//максимальный и минимальный серийник
|
||||||
|
#define MIN_SERIAL_NUM 0x4000
|
||||||
|
#define MAX_SERIAL_NUM 0x4FFF
|
||||||
|
//максимальный и минимальный id сети
|
||||||
|
#define MIN_MESH_ID 0x0000
|
||||||
|
#define MAX_MESH_ID 0xFFFF
|
||||||
|
//максимальный и минимальный адрес мастера(адрес куда мы шлём сообщения) сети
|
||||||
|
#define MIN_MESH_MASTER_ID 0x0000
|
||||||
|
#define MAX_MESH_MASTER_ID 0xFFFF
|
||||||
|
//минимально и максимально возможный пароль
|
||||||
|
#define MIN_PASS 0
|
||||||
|
#define MAX_PASS 999999
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
//базовые значения ФПГ
|
||||||
|
#define HAND_WAIT 1000//100 5c примерно ждем устаканивания сигнала
|
||||||
|
#define HR_HIGH 16000
|
||||||
|
#define HR_LOW 4000
|
||||||
|
#define HR_WAIT 600//600 3c примерно ждем устаканивания сигнала
|
||||||
|
#define AFE_AMB_TRESHOLD -10000 //пороговое значение, выше которого мы считаем что часы сняты.
|
||||||
|
|
||||||
|
//максимальные и минимальные значения верхнего порога чсс
|
||||||
|
#define HR_HIGH_MIN 10000 //100-240 уд\мин
|
||||||
|
#define HR_HIGH_MAX 24000
|
||||||
|
//максимальные и минимальные значения нижнего порога чсс
|
||||||
|
#define HR_LOW_MIN 4000 //40-99 уд\мин
|
||||||
|
#define HR_LOW_MAX 9900
|
||||||
|
//максимальные и минимальные значения времени тревоги по поводу ЧСС
|
||||||
|
#define HR_WAIT_MIN 0 //0-10 сек
|
||||||
|
#define HR_WAIT_MAX 2000
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
//пороги акселерометра базовые
|
||||||
|
#define LOW_G_TRES 300 //порог от которого считаем падении
|
||||||
|
#define LOW_G_TIME 12 //0.05сек сколько должно длится это состояние
|
||||||
|
#define LOW_G_ALARM_TIME 750 //3сек сколько сигналим о тревоге*/
|
||||||
|
|
||||||
|
#define HIGH_G_TRES 8000 //порог от которого считаем удар
|
||||||
|
#define HIGH_G_ALARM_TIME 750 //3сек сколько сигналим о тревоге
|
||||||
|
|
||||||
|
//максимальные и минимальные значения порога свободного падения
|
||||||
|
#define LOW_G_TRES_MIN 10//10-1000mg
|
||||||
|
#define LOW_G_TRES_MAX 1000
|
||||||
|
//максимальные и минимальные значения времени свободного падения для срабатывания тревоги
|
||||||
|
#define LOW_G_TIME_MIN 2//10мс-500мс
|
||||||
|
#define LOW_G_TIME_MAX 100
|
||||||
|
//максимальные и минимальные значения времени тревоги по поводу свободного падения
|
||||||
|
#define LOW_G_ALARM_TIME_MIN 0//0-10 сек
|
||||||
|
#define LOW_G_ALARM_TIME_MAX 2000
|
||||||
|
//максимальные и минимальные значения порога высокого ускорения (удара)
|
||||||
|
#define HIGH_G_TRES_MIN 2000//2000-12000mg
|
||||||
|
#define HIGH_G_TRES_MAX 12000
|
||||||
|
//максимальные и минимальные значения времени тревоги по поводу высокого ускорения (удара)
|
||||||
|
#define HIGH_G_ALARM_TIME_MIN 0//0-10 сек
|
||||||
|
#define HIGH_G_ALARM_TIME_MAX 2000
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
//пороги термометра базовые
|
||||||
|
#define TEMP_LOW 3000//20*сек
|
||||||
|
#define TEMP_HIGH 3400//20*сек
|
||||||
|
#define TEMP_WAIT 2//20*сек
|
||||||
|
//максимальные и минимальные значения низкой температуры
|
||||||
|
#define TEMP_LOW_MIN 2800//28-33.5гр
|
||||||
|
#define TEMP_LOW_MAX 3350
|
||||||
|
//максимальные и минимальные значения высокой температуры
|
||||||
|
#define TEMP_HIGH_MIN 3360//33.6-38гр
|
||||||
|
#define TEMP_HIGH_MAX 3800
|
||||||
|
//максимальные и минимальные значения времени тревоги
|
||||||
|
#define TEMP_WAIT_MIN 0//20*сек
|
||||||
|
#define TEMP_WAIT_MAX 200
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//режим работы
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
None = 0x0,//технический когда ничего не загрузилось
|
||||||
|
StartUP = 0x1,//технический режим включения инициализация всего и вся, проверка оборудования
|
||||||
|
Stream = 0x2,//потоковая передача данных без анализа тупо 3 канала как сейчас можно со счётчиком
|
||||||
|
Sleep = 0x3 // технический режим требуется для прехода в сон и всё
|
||||||
|
} work_mode;
|
||||||
|
|
||||||
|
|
||||||
|
//режим BLE
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ble_off = 0x0,//выключен4300
|
||||||
|
ble_raw = 0x1,//передаем сырые данные
|
||||||
|
ble_mesh = 0x2,//обмен сообщениями в mesh сети медлено, но надежно
|
||||||
|
} ble_mode;
|
||||||
|
|
||||||
|
typedef struct Contr
|
||||||
|
{
|
||||||
|
work_mode set_mode; //какой режим выставлен
|
||||||
|
work_mode now_mode; //какой режим сейчас
|
||||||
|
bool btn_1_state;//состояние кнопки 1
|
||||||
|
int btn_1_cnt; //счетчик кнопки 1
|
||||||
|
//это по идее не нужно
|
||||||
|
int Ecount; //подсчёт ошибок
|
||||||
|
int timer;
|
||||||
|
bool interupt; //флаг
|
||||||
|
uint32_t rf_counter; //подсчёт отправленных сообщений
|
||||||
|
uint8_t mesh_counter;//подсчёт отправленных сообщений
|
||||||
|
//new
|
||||||
|
|
||||||
|
bool DATA_write; //флаг что вообще нужно данные писать.
|
||||||
|
ble_mode ble_mode_set; //режим работы BLE
|
||||||
|
ble_mode ble_mode_now; //режим работы BLE
|
||||||
|
|
||||||
|
//по идее от сюда идет только настройка параметров выше нет смысла записывать данные
|
||||||
|
//настройки внутренних параметров
|
||||||
|
bool dev_type; //что это за устройство неизменяемый параметр 0 ЭКГ 1 часы
|
||||||
|
int serial_number; //серийный номер устройства
|
||||||
|
int password; //пароль нужен для серийного режима.
|
||||||
|
int mesh_netid; //номер сети для MESH режима
|
||||||
|
int mesh_adr; //адрес в сети при режиме mesh
|
||||||
|
int master_adr; //адрес куда отправлять данные в сети при режиме mesh
|
||||||
|
bool ble_ask; //мужно ли подтвержденеи отпрваки в режиме mesh
|
||||||
|
} ctrl_struct;
|
||||||
|
|
||||||
|
void control_init(void);
|
||||||
|
void control_init_var(ctrl_struct * control);
|
||||||
|
void lets_sleep(void);
|
||||||
|
void FL_read_str(ctrl_struct * control);
|
||||||
|
void FL_write_str(ctrl_struct * control);
|
||||||
|
uint8_t FL_read_byte(uint32_t addr);
|
||||||
|
|
||||||
|
int update_str(ctrl_struct * buf_str,ctrl_struct * main_str);
|
||||||
|
int scan_str_USB(char* mess);
|
||||||
|
|
||||||
|
void new_app_start();//go to usb msd
|
||||||
|
#endif
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef _DELAY
|
||||||
|
#define _DELAY
|
||||||
|
|
||||||
|
#define SYSCLK 24 //Частота SYSCLK в МГц. Необходима для работы функций delay_us() и delay_ms()
|
||||||
|
//#include "stm32f4xx_wwdg.h"
|
||||||
|
|
||||||
|
// Прототипы функций
|
||||||
|
void delay_us(unsigned int t);
|
||||||
|
void delay_ms(unsigned int t);
|
||||||
|
|
||||||
|
|
||||||
|
void delay_us_wd(unsigned int t);
|
||||||
|
void delay_ms_wd(unsigned int t);
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file dma.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the dma.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __DMA_H__
|
||||||
|
#define __DMA_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* DMA memory to memory transfer handles -------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_DMA_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __DMA_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef _FILTER_H
|
||||||
|
#define _FILTER_H
|
||||||
|
|
||||||
|
float iir_50hz_2or(float NewSample);//50hz 2 order
|
||||||
|
float iir_50hz_1or(float NewSample);//50hz 1 order
|
||||||
|
float iir_hp(float NewSample);//hifh pass 1 order 1hz shit
|
||||||
|
float iir_4060(float NewSample);
|
||||||
|
float iir_lp30(float NewSample);
|
||||||
|
#endif
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file gpio.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the gpio.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __GPIO_H__
|
||||||
|
#define __GPIO_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_GPIO_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /*__ GPIO_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,390 @@
|
|||||||
|
#ifndef _ICD
|
||||||
|
#define _ICD
|
||||||
|
#include "main.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "cmsis_os.h"
|
||||||
|
#include "adc.h"
|
||||||
|
//Глобальные настройки, делаем их неизменными
|
||||||
|
#define F103 0
|
||||||
|
#define F412 1
|
||||||
|
#define MK_TYPE F412
|
||||||
|
|
||||||
|
#define LAMP false//увеличенное время разряда
|
||||||
|
#define SPI_MODE false//с фронт энда берём данные
|
||||||
|
#define ACTIVE_CH 3//с фронт энда берём данные
|
||||||
|
#define CAP_VOLT_CTRL true//нужен ли контроль реального напряжения на конденсаторе
|
||||||
|
|
||||||
|
#define CAPACITY 0.000200
|
||||||
|
#define FORCE_DELAY 100 //Задержка МС после зарядки конденсатора в принудительном режиме
|
||||||
|
#define DANGER_HV true //чтобы риту не ёбнуло если 1 значит по реальному заряжаем
|
||||||
|
|
||||||
|
|
||||||
|
#define RG 1000.0//сопротивление резистора в омах
|
||||||
|
|
||||||
|
#define VOLT_COEF 3300.0/(4096*(1 + 100000.0/RG))
|
||||||
|
#define VOLT_COEF_MAX30003 0.000005
|
||||||
|
//по даташиту G = 1 + (100 kΩ / RG(1000 у нас)) G = 101
|
||||||
|
//перевод остч тов в вольты 3.3/4096
|
||||||
|
// Х*3.3/(4096*(1 + 100000.0/RG)) это сколько вольт у нас
|
||||||
|
#define MOV_AV_COEF 0.02//коэффициет скользящего среднего
|
||||||
|
|
||||||
|
#define MIN_TRES 0.5
|
||||||
|
#define MAX_TRES 3.0
|
||||||
|
|
||||||
|
#define DATA_RATE 200
|
||||||
|
//время для стабилизации сигналов когда ничего не происходит
|
||||||
|
#define ALL_TIME_MS 1500
|
||||||
|
#define START_UP_TIME_MS 2000
|
||||||
|
#define SEARCH_BASE_TIME_MS 700
|
||||||
|
#define SEARCH_MAX_TIME_MS 125
|
||||||
|
#define SQUARE_TIME_MS 400
|
||||||
|
#define TRIANGLE_TIME_MS 300
|
||||||
|
#define TRIANGLE_STEP_TIME_MS 50
|
||||||
|
#define LV_TIME_MS 500
|
||||||
|
#define LV_START_TIME_MS 5
|
||||||
|
#define LV_STOP_TIME_MS 50
|
||||||
|
|
||||||
|
#define SQUARE_COEF 0.5
|
||||||
|
#define TRIANGLE_COEF 0.85
|
||||||
|
|
||||||
|
#define TERAPY_TRES 10//сколько нужно единичных фибриляций для терапии
|
||||||
|
|
||||||
|
// Период 0 - FIBR_PERIOD считаем фибриляцией
|
||||||
|
#define FIBR_PERIOD 250
|
||||||
|
#define FIBR_PERIOD_MIN 250
|
||||||
|
#define FIBR_PERIOD_MAX 350
|
||||||
|
// Период FIBR_PERIOD - TACHY_2_PERIOD считаем тахикардией глубокой
|
||||||
|
#define TACHY_2_PERIOD 350
|
||||||
|
#define TACHY_2_PERIOD_MIN 300
|
||||||
|
#define TACHY_2_PERIOD_MAX 400
|
||||||
|
// Период TACHY_2_PERIOD - TACHY_1_PERIOD считаем тахикардией неглубокой
|
||||||
|
#define TACHY_1_PERIOD 400
|
||||||
|
#define TACHY_1_PERIOD_MIN 350
|
||||||
|
#define TACHY_1_PERIOD_MAX 450
|
||||||
|
|
||||||
|
// в десятых джоуля
|
||||||
|
#define MIN_ENERGY 10
|
||||||
|
#define MAX_ENERGY 100
|
||||||
|
//сколько шагов должно быть в терапии
|
||||||
|
#define HV_STEP_NUM 1
|
||||||
|
//время в мс когда мы слепы
|
||||||
|
#define HV_BLIND_TIME_MS 1500
|
||||||
|
// размер буффера редетекции
|
||||||
|
#define REDET_BUF_LEN 8
|
||||||
|
// сколько нужно плохих периодов для продолжения терапии
|
||||||
|
#define REDET_BAD_MAX 4
|
||||||
|
|
||||||
|
#define STANDBY_TIME_MS 10*1000//пусть будет 1 минут
|
||||||
|
|
||||||
|
|
||||||
|
#define CHARDE_TONE 120
|
||||||
|
#define READY_TONE 100
|
||||||
|
#define SHOCK_TONE 80
|
||||||
|
#define NO_TONE 0
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
Monitor = 0, // Тупо смотрим
|
||||||
|
Normal = 1, // поиск порогов и терапия
|
||||||
|
Force = 2 // только терапия похуй на сигнал
|
||||||
|
} main_mode;
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
low = 0, // активен нижний ключ
|
||||||
|
high = 1, // активен верхний ключ
|
||||||
|
z_state = 2 // оба неактивны
|
||||||
|
} half_br;
|
||||||
|
|
||||||
|
|
||||||
|
//режим поиска пиков 3 байта
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
Mode_start_UP = 0, // тупо накапливаем среднее секунды 3 чтоб никого случайно током не ударить
|
||||||
|
Mode_search_BASE = 1, // поиск по нижнему порогу из памяти
|
||||||
|
Mode_search_SQUARE = 2, // поиск 300-400 мс по прошлый порог*коэффициент
|
||||||
|
Mode_search_TRIANGLE = 3, // поиск в режиме треугольников
|
||||||
|
Mode_search_MAX = 4, // режим поиска максимума Vsense
|
||||||
|
Mode_stimulation_LV = 5, // нет пиков стимулируем низким напряжением и не анализируем заданное время в Mode_search_BASE?
|
||||||
|
Mode_stimulation_HV = 6 // отключаем вход чтобы не улетела скользящее среднее
|
||||||
|
// Mode_stimulation_HV = 6 // Обнаружили фибриляцию начали заряжать конденсатор(возможно это над режим т.к. в нём мы тоже ищем пики)
|
||||||
|
} search_mode;
|
||||||
|
|
||||||
|
//режимы терапии 2 байта
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
Terapy_off = 0, // активна при тупом поиске корзин
|
||||||
|
Terapy_fibr = 1, // терапия фибриляции
|
||||||
|
Terapy_tachy_2 = 2, // терапия сильной тахикардии
|
||||||
|
Terapy_tachy_1 = 3 // терапия слабой тахикардии
|
||||||
|
} terapy_mode;
|
||||||
|
|
||||||
|
//подрежимы терапии 3 байта
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
sub_off = 0, // неактивный
|
||||||
|
sub_cap_ch = 1, // зарядка конденсатора
|
||||||
|
sub_redet = 2, // редетекция
|
||||||
|
sub_shock = 3, // удар током + время слепоты
|
||||||
|
sub_stim_fail = 4 // провели стимуляцию, но не помогло
|
||||||
|
} terapy_sub_mode;
|
||||||
|
|
||||||
|
|
||||||
|
//тип для события, каким он может быть 2 байта
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
Vsense = 0, // нормальное сокращение
|
||||||
|
Vpace = 1, // пришлось стимулировать сейчас не используем
|
||||||
|
Vnoise = 2, // шумы в QRS комплексе(пока не реализовали)
|
||||||
|
} QRS_type;
|
||||||
|
|
||||||
|
//конфигурация высоковольтных электродов
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
rv_neg_scv_poz = 0, // Электрод RV отрицательный SCV положительный
|
||||||
|
rv_neg_can_poz = 1, // Электрод RV отрицательный корпус прибора положительный
|
||||||
|
rv_neg_scv_can_poz = 2, // Электрод RV отрицательный SCV и корпус прибора положительный
|
||||||
|
} hv_polarity;
|
||||||
|
|
||||||
|
//тип высоковольтной стимуляции
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
hv_mode_fixed = 0, // стимуляция идёт согласно заданному времени
|
||||||
|
hv_mode_adaptive = 1, // стимуляция идёт согласно заданным процентам, но не более 2 длительностей фаз
|
||||||
|
hv_mode_mixed = 2, // Электрод RV отрицательный SCV и корпус прибора положительный//fixme надо подумать
|
||||||
|
} hv_mode;
|
||||||
|
|
||||||
|
//полярность низковольтной стимуляции
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
lv_mono = 0, // стимуляция идёт между выводами tip-can
|
||||||
|
lv_bipolar = 1 // стимуляция идёт между выводами tip-coil
|
||||||
|
} lv_polarity;
|
||||||
|
|
||||||
|
//режим низковольтной стимуляции
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
lv_mode_none = 0, //без стимуляции
|
||||||
|
lv_mode_BURST = 1, //режим для вызова фибрилляции после отработки пачки сбрасывается в lv_mode_none
|
||||||
|
lv_mode_VOO = 2, //стимуляция идёт независимо от активности сердца
|
||||||
|
lv_mode_VVI = 3 //стимуляция ингибируется при активности сердца
|
||||||
|
} lv_mode;
|
||||||
|
|
||||||
|
//подрежим низковольтной стимуляции
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
lv_sub_free = 0, //Свободный без всякого вмешательства tip и coil свободны разряда\заряда не происходит
|
||||||
|
lv_sub_charge = 1, //Заряд без всякого вмешательства tip и coil идёт заряд
|
||||||
|
lv_sub_shock = 2, //Разряд coil на землю притягиваем tip к конденсатору заряда нет
|
||||||
|
lv_sub_relax = 3, //Релаксация tip и coil притянуты к земле
|
||||||
|
lv_sub_discharge = 4 //Разряд без всякого вмешательства tip и coil свободны идёт разряд(необязательный режим)
|
||||||
|
} lv_sub_mode;
|
||||||
|
|
||||||
|
|
||||||
|
//тип для RR интервала
|
||||||
|
typedef struct icd_str
|
||||||
|
{
|
||||||
|
main_mode work_set_mode; //режим
|
||||||
|
main_mode work_now_mode; //режим
|
||||||
|
|
||||||
|
search_mode search_set_mode; //режим
|
||||||
|
search_mode search_now_mode; //режим
|
||||||
|
bool filter_on;//фильтр активен
|
||||||
|
uint8_t active_ch;//какой канал используем 0-3 0 это spi
|
||||||
|
bool sd_card;//используем ли мы SD карту?
|
||||||
|
bool dc_cut;//стираем ли мы постоянную составляющую
|
||||||
|
bool rr_now;//сейчас сокращение сердца
|
||||||
|
//минимальный и максимальный пороги с плав. точкой и инт в десятых миливольта
|
||||||
|
float min_tres;
|
||||||
|
uint8_t min_tres_d;
|
||||||
|
float max_tres;
|
||||||
|
uint8_t max_tres_d;
|
||||||
|
// коэффициент на который умножается сигнал при переход в режим квадратов
|
||||||
|
float square_coef;
|
||||||
|
uint8_t square_coef_d;
|
||||||
|
// коэффициент на который умножается сигнал на каждой ступени в режиме треугольников
|
||||||
|
float triangle_coef;
|
||||||
|
uint8_t triangle_coef_d;
|
||||||
|
|
||||||
|
// счётчик режимов чтобы не задерживаться слишком долго в одном режиме
|
||||||
|
uint16_t mode_cnt;
|
||||||
|
// время слепоты при включении
|
||||||
|
uint16_t start_up_time;
|
||||||
|
// время поиска в базовом режиме с минимальным порогом
|
||||||
|
uint16_t base_time;
|
||||||
|
// Время в мс которое алгоритм ищет максимум
|
||||||
|
uint16_t max_search_time;
|
||||||
|
|
||||||
|
// Время в мс нахождения в режиме поиска квадратов
|
||||||
|
uint16_t square_time;
|
||||||
|
|
||||||
|
// время на весь режим треугольников
|
||||||
|
uint16_t triangle_time;
|
||||||
|
// время каждой ступени в режиме треугольников
|
||||||
|
uint16_t triangle_step_time;
|
||||||
|
|
||||||
|
//новое про низкое напряжение
|
||||||
|
bool lv_start; //начало стимуляции
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
lv_polarity lv_polarity;//полярность низковольтной стимуляции
|
||||||
|
lv_mode lv_mode;//режим низковольтной стимуляции
|
||||||
|
|
||||||
|
uint8_t lv_shock_time;//время импульса низковольной стимуляции 1-20(0,1-2мс) одна единица 0,1мс шаг 0.1мс
|
||||||
|
uint8_t lv_relax_time;//время стабилизации после удара низковольной стимуляции 0-20(0-20мс) одна единица 1мс шаг 1мс
|
||||||
|
uint8_t lv_voltage;//какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
|
||||||
|
//bool BURST_active;//параметр вводящий нас в режим burst посылка пачки импульсов для вызова фибрилляции
|
||||||
|
uint8_t BURST_cnt;//сколько импульсов в одной пачке 5-50 одна единица 1 импульс шаг 1 импульс
|
||||||
|
uint8_t BURST_voltage;//какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
uint16_t BURST_period;//период следования импульсов в мс 150-500мс одна единица 1мс шаг 10 мс на ползунке
|
||||||
|
|
||||||
|
|
||||||
|
// Время в мс которое длится режим стимуляции низким напряжением
|
||||||
|
uint16_t lv_mode_time;
|
||||||
|
// это во моногом эрзац.
|
||||||
|
uint16_t lv_start_time; //во сколько начали выдавать импульс
|
||||||
|
uint16_t lv_stop_time; //во сколько закончили выдавать импульс
|
||||||
|
|
||||||
|
uint16_t max_time; //сколько отведено на весь QRS комплекс
|
||||||
|
|
||||||
|
// тип последнего определённого события
|
||||||
|
QRS_type last_QRS;
|
||||||
|
// время между последним и предпоследним событием
|
||||||
|
uint16_t last_period;
|
||||||
|
|
||||||
|
|
||||||
|
float last_RR_amp;// переменная в которой храним амплитуды начала QRS#
|
||||||
|
int32_t last_RR_poz;//переменная в котором храним положение начала QRS#
|
||||||
|
int16_t last_RR_poz_rel;//переменная в которой храним относительное положение начала QRS
|
||||||
|
|
||||||
|
// Счётчики нужны для алгоритма терапии Михаила
|
||||||
|
uint32_t Vs_cnt;//счётчик собственных сокращений сердца
|
||||||
|
uint32_t Vn_cnt;//счётчик собственных сокращений которые в шуме(не детектируется пока fixme)
|
||||||
|
uint32_t Vp_cnt;//счётчик принудительных стимуляций сердца низким напряжением(низковольтная стимуляция)
|
||||||
|
|
||||||
|
bool LV_on;// реально стимулируем низковольтно
|
||||||
|
bool HV_on;// реально стимулируем высоковольтно
|
||||||
|
|
||||||
|
int32_t counter;
|
||||||
|
float ecg_rv_filt; //экг в миливольтах для врачей
|
||||||
|
float ecg_rv_mov_av; //скользящее среднее для вычитания постоянной составляющей из сигнала
|
||||||
|
float ecg_rv_pos_sig; //сигнал из которого вычтена постоянная сост. и взят модуль
|
||||||
|
float ecg_rv_din_treshold;//динамический порог
|
||||||
|
|
||||||
|
// тут уже корзины
|
||||||
|
//порог периода фибриляции если период меньше, чем это число это фибриляция
|
||||||
|
uint16_t fibr_tres;
|
||||||
|
//порог периода Тахикардии 2 если период меньше, чем это число это Тахикардия 2
|
||||||
|
uint16_t tachy_2_tres;
|
||||||
|
//порог периода Тахикардии 1 если период меньше, чем это число это Тахикардия 1
|
||||||
|
uint16_t tachy_1_tres;
|
||||||
|
|
||||||
|
uint32_t vs_cnt_last;//сбрасываемый счётчик Vs событий
|
||||||
|
uint16_t filt_period;//фильтрованный скользящим средним период
|
||||||
|
uint8_t fibr_cnt; //счётчик фибриляции при обнаружении короткого RR он растёт
|
||||||
|
uint8_t tachy_2_cnt; //счётчик Тахикардии 2 при обнаружении короткого RR он растёт
|
||||||
|
uint8_t tachy_1_cnt; //счётчик Тахикардии 1 при обнаружении короткого RR он растёт
|
||||||
|
uint8_t norm_cnt; //счётчик событий c нормальным ЧСС при достижении 5 сбрасываем все корзины
|
||||||
|
|
||||||
|
uint32_t vp_cnt_last;//сбрасываемый счётчик Vs событий нужен при редетекции сергей сказал что Vp достаточно для выхода из режима
|
||||||
|
uint8_t fibr_max_tres; //порог счётчика фибриляций при котором начинаем терапию
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////
|
||||||
|
///// терапия /////
|
||||||
|
/////////////////////////////////////////////////////
|
||||||
|
terapy_mode terapy_set;//заданный режим терапии
|
||||||
|
terapy_mode terapy_now;//текущий режим терапии
|
||||||
|
|
||||||
|
terapy_sub_mode sub_mode;//подрежим для индикации
|
||||||
|
|
||||||
|
uint8_t hv_step_number;//сколько шагов ВВ терапии?
|
||||||
|
uint8_t hv_step_cnt;// какой сейчас шаг?
|
||||||
|
|
||||||
|
//новое про высокое напряжение
|
||||||
|
//режимы стимуляции
|
||||||
|
bool hv_sound_accomp;//нужно ли звуковое сопровождение при заряде и ударе
|
||||||
|
hv_polarity hv_polarity;//полярность стимуляции
|
||||||
|
hv_mode hv_mode;//тип способа задания длительности импульса
|
||||||
|
//время константы времени стимуляции
|
||||||
|
uint8_t hv_phase_1_duration;// время в десятых мс приходящееся на 1 фазу 30-120(3-12мс) одна единица 0,1мс
|
||||||
|
uint8_t hv_phase_2_duration;// время в десятых мс приходящееся на 2 фазу 20-100(2-10мс) одна единица 0,1мс
|
||||||
|
uint8_t hv_switch_duration;// время в десятых мс приходящееся на переключение между фазами 10-30(1-3мс) одна единица 0,1мс
|
||||||
|
//процентные параметры стимуляции
|
||||||
|
uint8_t hv_switching_voltage;//процент напряжения при котором происходит завешение 1 фазы при адаптивном режиме (20-80) одна единица 1%
|
||||||
|
uint8_t hv_cutoff_voltage;//процент напряжения при котором происходит завешение 2 фазы при адаптивном режиме (5-50) одна единица 1%
|
||||||
|
|
||||||
|
uint16_t hv_step_energy;//сколько джоулей в одном шаге считаем в зависимости от минимума и максимума.
|
||||||
|
uint16_t min_energy;
|
||||||
|
uint16_t now_energy;
|
||||||
|
uint16_t max_energy;
|
||||||
|
|
||||||
|
|
||||||
|
uint16_t hv_blind_time;//время которое мы слепы после HV разряда
|
||||||
|
|
||||||
|
uint8_t redet_num; //какой длинны мы заполныем буффер при редетекции
|
||||||
|
uint8_t redet_bad; //сколько нам нужно плохих событий для запуска терапии
|
||||||
|
uint8_t redet_cnt; //сколько всего событий в редетекции
|
||||||
|
uint8_t redet_bad_cnt; //сколько реально плохих событий
|
||||||
|
|
||||||
|
uint32_t standby_timer;//сколько отдыхать после неудачного подавления фибриляции
|
||||||
|
|
||||||
|
uint8_t com_buf[20];
|
||||||
|
|
||||||
|
uint8_t spi_pot_set;//spi резистор для задания КУ
|
||||||
|
uint8_t spi_pot_now;//spi резистор для задания КУ
|
||||||
|
} icd_str;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
float my_abs(float a);
|
||||||
|
void get_data(icd_str * icd_str,uint16_t input);
|
||||||
|
void get_data_max30003(icd_str * icd_str,int32_t input);
|
||||||
|
|
||||||
|
void init_icd(icd_str * icd_str);
|
||||||
|
bool mode_start(icd_str * icd_str);
|
||||||
|
bool check_mode_len(icd_str * icd_str,uint16_t base_time, search_mode mode_to_set);
|
||||||
|
bool check_tres(icd_str * icd_str);
|
||||||
|
void search_alg(icd_str * icd_str);
|
||||||
|
uint16_t moving_avarage(uint16_t data);
|
||||||
|
void basket_alg(icd_str * icd_str);
|
||||||
|
bool quick_analyse(icd_str * icd_str);
|
||||||
|
|
||||||
|
|
||||||
|
void hv_charge(icd_str * icd_str);
|
||||||
|
//функция плавного разряда Конденсатора
|
||||||
|
void hv_discharge(bool state);
|
||||||
|
//функция резкого разряда
|
||||||
|
void hv_shock(icd_str * icd_str);
|
||||||
|
|
||||||
|
void terapy_algorithm(icd_str * icd_str);
|
||||||
|
void hv_pwm(bool state);
|
||||||
|
void hv_sound(uint32_t presc);
|
||||||
|
|
||||||
|
//управление защитными реле
|
||||||
|
void relay_all_control(bool RV_safe,bool RA_safe,bool CAN_safe);
|
||||||
|
void relay_ra_control(bool RA_safe);
|
||||||
|
void relay_rv_control(bool RV_safe);
|
||||||
|
void relay_can_control(bool CAN_safe);
|
||||||
|
//управление ключами
|
||||||
|
void hv_ll_control(half_br state_RV, half_br state_SCV, half_br state_CAN);
|
||||||
|
void hv_power(bool state);
|
||||||
|
void hv_ll_rv_control(half_br state);
|
||||||
|
void hv_ll_scv_control(half_br state);
|
||||||
|
void hv_ll_can_control(half_br state);
|
||||||
|
|
||||||
|
|
||||||
|
void ll_h_off(void);
|
||||||
|
void ll_h_1_side(half_br state);
|
||||||
|
void ll_h_2_side(half_br state);
|
||||||
|
void ll_bi_dis(void);
|
||||||
|
|
||||||
|
void ra_lv_control(icd_str * icd_str,lv_sub_mode mode);
|
||||||
|
void rv_lv_control(icd_str * icd_str,lv_sub_mode mode);
|
||||||
|
|
||||||
|
void hv_en_control(bool en_RV, bool en_SCV, bool en_CAN);
|
||||||
|
void hv_en_rv(bool state);
|
||||||
|
void hv_en_scv(bool state);
|
||||||
|
void hv_en_can(bool state);
|
||||||
|
#endif
|
||||||
@ -0,0 +1,197 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file : main.h
|
||||||
|
* @brief : Header for main.c file.
|
||||||
|
* This file contains the common defines of the application.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __MAIN_H
|
||||||
|
#define __MAIN_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_hal.h"
|
||||||
|
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN ET */
|
||||||
|
|
||||||
|
/* USER CODE END ET */
|
||||||
|
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN EC */
|
||||||
|
|
||||||
|
/* USER CODE END EC */
|
||||||
|
|
||||||
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN EM */
|
||||||
|
|
||||||
|
/* USER CODE END EM */
|
||||||
|
|
||||||
|
/* Exported functions prototypes ---------------------------------------------*/
|
||||||
|
void Error_Handler(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
|
/* USER CODE END EFP */
|
||||||
|
|
||||||
|
/* Private defines -----------------------------------------------------------*/
|
||||||
|
#define RV_LV_COIL_TO_GND_Pin GPIO_PIN_2
|
||||||
|
#define RV_LV_COIL_TO_GND_GPIO_Port GPIOE
|
||||||
|
#define RV_LV_TIP_TO_GND_Pin GPIO_PIN_3
|
||||||
|
#define RV_LV_TIP_TO_GND_GPIO_Port GPIOE
|
||||||
|
#define V12_PWR_Pin GPIO_PIN_4
|
||||||
|
#define V12_PWR_GPIO_Port GPIOE
|
||||||
|
#define BUZ_PWM_Pin GPIO_PIN_6
|
||||||
|
#define BUZ_PWM_GPIO_Port GPIOE
|
||||||
|
#define RV_COMP_ADC_Pin GPIO_PIN_1
|
||||||
|
#define RV_COMP_ADC_GPIO_Port GPIOC
|
||||||
|
#define RA_COMP_ADC_Pin GPIO_PIN_2
|
||||||
|
#define RA_COMP_ADC_GPIO_Port GPIOC
|
||||||
|
#define LV_COMP_ADC_Pin GPIO_PIN_3
|
||||||
|
#define LV_COMP_ADC_GPIO_Port GPIOC
|
||||||
|
#define BUT_1_Pin GPIO_PIN_0
|
||||||
|
#define BUT_1_GPIO_Port GPIOA
|
||||||
|
#define RV_PWM_1_Pin GPIO_PIN_1
|
||||||
|
#define RV_PWM_1_GPIO_Port GPIOA
|
||||||
|
#define RV_PWM_2_Pin GPIO_PIN_2
|
||||||
|
#define RV_PWM_2_GPIO_Port GPIOA
|
||||||
|
#define RV_PWM_3_Pin GPIO_PIN_3
|
||||||
|
#define RV_PWM_3_GPIO_Port GPIOA
|
||||||
|
#define RA_ADC_Pin GPIO_PIN_4
|
||||||
|
#define RA_ADC_GPIO_Port GPIOA
|
||||||
|
#define RV_ADC_Pin GPIO_PIN_5
|
||||||
|
#define RV_ADC_GPIO_Port GPIOA
|
||||||
|
#define LV_ADC_Pin GPIO_PIN_6
|
||||||
|
#define LV_ADC_GPIO_Port GPIOA
|
||||||
|
#define RA_LV_SHOCK_Pin GPIO_PIN_7
|
||||||
|
#define RA_LV_SHOCK_GPIO_Port GPIOA
|
||||||
|
#define HV_ADC_Pin GPIO_PIN_4
|
||||||
|
#define HV_ADC_GPIO_Port GPIOC
|
||||||
|
#define BAT_ADC_Pin GPIO_PIN_5
|
||||||
|
#define BAT_ADC_GPIO_Port GPIOC
|
||||||
|
#define RA_LV_DIS_Pin GPIO_PIN_0
|
||||||
|
#define RA_LV_DIS_GPIO_Port GPIOB
|
||||||
|
#define RA_LV_COIL_TO_GND_Pin GPIO_PIN_1
|
||||||
|
#define RA_LV_COIL_TO_GND_GPIO_Port GPIOB
|
||||||
|
#define RA_LV_TIP_TO_GND_Pin GPIO_PIN_2
|
||||||
|
#define RA_LV_TIP_TO_GND_GPIO_Port GPIOB
|
||||||
|
#define INA_PWR_Pin GPIO_PIN_7
|
||||||
|
#define INA_PWR_GPIO_Port GPIOE
|
||||||
|
#define COMP_PWR_Pin GPIO_PIN_8
|
||||||
|
#define COMP_PWR_GPIO_Port GPIOE
|
||||||
|
#define RED_PWM_Pin GPIO_PIN_9
|
||||||
|
#define RED_PWM_GPIO_Port GPIOE
|
||||||
|
#define DOP_PWR_Pin GPIO_PIN_10
|
||||||
|
#define DOP_PWR_GPIO_Port GPIOE
|
||||||
|
#define GREEN_PWM_Pin GPIO_PIN_11
|
||||||
|
#define GREEN_PWM_GPIO_Port GPIOE
|
||||||
|
#define BLUE_PWM_Pin GPIO_PIN_13
|
||||||
|
#define BLUE_PWM_GPIO_Port GPIOE
|
||||||
|
#define HV_PWM_Pin GPIO_PIN_14
|
||||||
|
#define HV_PWM_GPIO_Port GPIOE
|
||||||
|
#define HV_DIS_Pin GPIO_PIN_15
|
||||||
|
#define HV_DIS_GPIO_Port GPIOE
|
||||||
|
#define CAN_LV_TO_GND_Pin GPIO_PIN_10
|
||||||
|
#define CAN_LV_TO_GND_GPIO_Port GPIOB
|
||||||
|
#define POT_CS_1_Pin GPIO_PIN_12
|
||||||
|
#define POT_CS_1_GPIO_Port GPIOB
|
||||||
|
#define POT_PWR_Pin GPIO_PIN_14
|
||||||
|
#define POT_PWR_GPIO_Port GPIOB
|
||||||
|
#define POT_CS_4_Pin GPIO_PIN_8
|
||||||
|
#define POT_CS_4_GPIO_Port GPIOD
|
||||||
|
#define POT_CS_5_Pin GPIO_PIN_9
|
||||||
|
#define POT_CS_5_GPIO_Port GPIOD
|
||||||
|
#define POT_CS_6_Pin GPIO_PIN_10
|
||||||
|
#define POT_CS_6_GPIO_Port GPIOD
|
||||||
|
#define RA_RELAY_Pin GPIO_PIN_11
|
||||||
|
#define RA_RELAY_GPIO_Port GPIOD
|
||||||
|
#define RV_RELAY_Pin GPIO_PIN_12
|
||||||
|
#define RV_RELAY_GPIO_Port GPIOD
|
||||||
|
#define CAN_RELAY_Pin GPIO_PIN_13
|
||||||
|
#define CAN_RELAY_GPIO_Port GPIOD
|
||||||
|
#define LV_LV_TIP_TO_GND_Pin GPIO_PIN_14
|
||||||
|
#define LV_LV_TIP_TO_GND_GPIO_Port GPIOD
|
||||||
|
#define LV_LV_DIS_Pin GPIO_PIN_15
|
||||||
|
#define LV_LV_DIS_GPIO_Port GPIOD
|
||||||
|
#define LV_PWM_1_Pin GPIO_PIN_6
|
||||||
|
#define LV_PWM_1_GPIO_Port GPIOC
|
||||||
|
#define LV_PWM_2_Pin GPIO_PIN_7
|
||||||
|
#define LV_PWM_2_GPIO_Port GPIOC
|
||||||
|
#define LV_PWM_3_Pin GPIO_PIN_8
|
||||||
|
#define LV_PWM_3_GPIO_Port GPIOC
|
||||||
|
#define LV_LV_SHOCK_Pin GPIO_PIN_9
|
||||||
|
#define LV_LV_SHOCK_GPIO_Port GPIOC
|
||||||
|
#define LV_LV_COIL_TO_GND_Pin GPIO_PIN_8
|
||||||
|
#define LV_LV_COIL_TO_GND_GPIO_Port GPIOA
|
||||||
|
#define BLE_PWRC_Pin GPIO_PIN_11
|
||||||
|
#define BLE_PWRC_GPIO_Port GPIOA
|
||||||
|
#define BLE_PWR_Pin GPIO_PIN_12
|
||||||
|
#define BLE_PWR_GPIO_Port GPIOA
|
||||||
|
#define ADXL_PWR_Pin GPIO_PIN_15
|
||||||
|
#define ADXL_PWR_GPIO_Port GPIOA
|
||||||
|
#define ADXL_CS_Pin GPIO_PIN_0
|
||||||
|
#define ADXL_CS_GPIO_Port GPIOD
|
||||||
|
#define ADXL_INT_1_Pin GPIO_PIN_1
|
||||||
|
#define ADXL_INT_1_GPIO_Port GPIOD
|
||||||
|
#define HV_HS_CAN_Pin GPIO_PIN_2
|
||||||
|
#define HV_HS_CAN_GPIO_Port GPIOD
|
||||||
|
#define HV_EN_CAN_Pin GPIO_PIN_3
|
||||||
|
#define HV_EN_CAN_GPIO_Port GPIOD
|
||||||
|
#define HV_LS_CAN_Pin GPIO_PIN_4
|
||||||
|
#define HV_LS_CAN_GPIO_Port GPIOD
|
||||||
|
#define HV_HS_SCV_Pin GPIO_PIN_5
|
||||||
|
#define HV_HS_SCV_GPIO_Port GPIOD
|
||||||
|
#define HV_EN_SCV_Pin GPIO_PIN_6
|
||||||
|
#define HV_EN_SCV_GPIO_Port GPIOD
|
||||||
|
#define HV_LS_SCV_Pin GPIO_PIN_7
|
||||||
|
#define HV_LS_SCV_GPIO_Port GPIOD
|
||||||
|
#define HV_HS_RV_Pin GPIO_PIN_3
|
||||||
|
#define HV_HS_RV_GPIO_Port GPIOB
|
||||||
|
#define HV_EN_RV_Pin GPIO_PIN_4
|
||||||
|
#define HV_EN_RV_GPIO_Port GPIOB
|
||||||
|
#define HV_LS_RV_Pin GPIO_PIN_5
|
||||||
|
#define HV_LS_RV_GPIO_Port GPIOB
|
||||||
|
#define RA_PWM_1_Pin GPIO_PIN_6
|
||||||
|
#define RA_PWM_1_GPIO_Port GPIOB
|
||||||
|
#define RA_PWM_2_Pin GPIO_PIN_7
|
||||||
|
#define RA_PWM_2_GPIO_Port GPIOB
|
||||||
|
#define RA_PWM_3_Pin GPIO_PIN_8
|
||||||
|
#define RA_PWM_3_GPIO_Port GPIOB
|
||||||
|
#define RV_LV_SHOCK_Pin GPIO_PIN_9
|
||||||
|
#define RV_LV_SHOCK_GPIO_Port GPIOB
|
||||||
|
#define HV_LOGIC_PWR_Pin GPIO_PIN_0
|
||||||
|
#define HV_LOGIC_PWR_GPIO_Port GPIOE
|
||||||
|
#define RV_LV_DIS_Pin GPIO_PIN_1
|
||||||
|
#define RV_LV_DIS_GPIO_Port GPIOE
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __MAIN_H */
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
#ifndef _PARSE_H
|
||||||
|
#define _PARSE_H
|
||||||
|
#include "icd.h"
|
||||||
|
void parse_command(uint8_t* buf, icd_str * icd_str);
|
||||||
|
#endif
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file spi.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the spi.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __SPI_H__
|
||||||
|
#define __SPI_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
extern SPI_HandleTypeDef hspi2;
|
||||||
|
|
||||||
|
extern SPI_HandleTypeDef hspi3;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_SPI2_Init(void);
|
||||||
|
void MX_SPI3_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
void POT_set(uint8_t val);
|
||||||
|
void POT_cheek(uint8_t* set, uint8_t* now);
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SPI_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,495 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_conf_template.h
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief HAL configuration template file.
|
||||||
|
* This file should be copied to the application folder and renamed
|
||||||
|
* to stm32f4xx_hal_conf.h.
|
||||||
|
******************************************************************************
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F4xx_HAL_CONF_H
|
||||||
|
#define __STM32F4xx_HAL_CONF_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* ########################## Module Selection ############################## */
|
||||||
|
/**
|
||||||
|
* @brief This is the list of modules to be used in the HAL driver
|
||||||
|
*/
|
||||||
|
#define HAL_MODULE_ENABLED
|
||||||
|
|
||||||
|
/* #define HAL_CRYP_MODULE_ENABLED */
|
||||||
|
#define HAL_ADC_MODULE_ENABLED
|
||||||
|
/* #define HAL_CAN_MODULE_ENABLED */
|
||||||
|
/* #define HAL_CRC_MODULE_ENABLED */
|
||||||
|
/* #define HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||||
|
/* #define HAL_DAC_MODULE_ENABLED */
|
||||||
|
/* #define HAL_DCMI_MODULE_ENABLED */
|
||||||
|
/* #define HAL_DMA2D_MODULE_ENABLED */
|
||||||
|
/* #define HAL_ETH_MODULE_ENABLED */
|
||||||
|
/* #define HAL_ETH_LEGACY_MODULE_ENABLED */
|
||||||
|
/* #define HAL_NAND_MODULE_ENABLED */
|
||||||
|
/* #define HAL_NOR_MODULE_ENABLED */
|
||||||
|
/* #define HAL_PCCARD_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SRAM_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SDRAM_MODULE_ENABLED */
|
||||||
|
/* #define HAL_HASH_MODULE_ENABLED */
|
||||||
|
/* #define HAL_I2C_MODULE_ENABLED */
|
||||||
|
/* #define HAL_I2S_MODULE_ENABLED */
|
||||||
|
/* #define HAL_IWDG_MODULE_ENABLED */
|
||||||
|
/* #define HAL_LTDC_MODULE_ENABLED */
|
||||||
|
/* #define HAL_RNG_MODULE_ENABLED */
|
||||||
|
/* #define HAL_RTC_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SAI_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SD_MODULE_ENABLED */
|
||||||
|
/* #define HAL_MMC_MODULE_ENABLED */
|
||||||
|
#define HAL_SPI_MODULE_ENABLED
|
||||||
|
#define HAL_TIM_MODULE_ENABLED
|
||||||
|
#define HAL_UART_MODULE_ENABLED
|
||||||
|
/* #define HAL_USART_MODULE_ENABLED */
|
||||||
|
/* #define HAL_IRDA_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SMARTCARD_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SMBUS_MODULE_ENABLED */
|
||||||
|
/* #define HAL_WWDG_MODULE_ENABLED */
|
||||||
|
/* #define HAL_PCD_MODULE_ENABLED */
|
||||||
|
/* #define HAL_HCD_MODULE_ENABLED */
|
||||||
|
/* #define HAL_DSI_MODULE_ENABLED */
|
||||||
|
/* #define HAL_QSPI_MODULE_ENABLED */
|
||||||
|
/* #define HAL_QSPI_MODULE_ENABLED */
|
||||||
|
/* #define HAL_CEC_MODULE_ENABLED */
|
||||||
|
/* #define HAL_FMPI2C_MODULE_ENABLED */
|
||||||
|
/* #define HAL_FMPSMBUS_MODULE_ENABLED */
|
||||||
|
/* #define HAL_SPDIFRX_MODULE_ENABLED */
|
||||||
|
/* #define HAL_DFSDM_MODULE_ENABLED */
|
||||||
|
/* #define HAL_LPTIM_MODULE_ENABLED */
|
||||||
|
#define HAL_GPIO_MODULE_ENABLED
|
||||||
|
#define HAL_EXTI_MODULE_ENABLED
|
||||||
|
#define HAL_DMA_MODULE_ENABLED
|
||||||
|
#define HAL_RCC_MODULE_ENABLED
|
||||||
|
#define HAL_FLASH_MODULE_ENABLED
|
||||||
|
#define HAL_PWR_MODULE_ENABLED
|
||||||
|
#define HAL_CORTEX_MODULE_ENABLED
|
||||||
|
|
||||||
|
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||||
|
/**
|
||||||
|
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||||
|
* This value is used by the RCC HAL module to compute the system frequency
|
||||||
|
* (when HSE is used as system clock source, directly or through the PLL).
|
||||||
|
*/
|
||||||
|
#if !defined (HSE_VALUE)
|
||||||
|
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||||
|
#endif /* HSE_VALUE */
|
||||||
|
|
||||||
|
#if !defined (HSE_STARTUP_TIMEOUT)
|
||||||
|
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
|
||||||
|
#endif /* HSE_STARTUP_TIMEOUT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Internal High Speed oscillator (HSI) value.
|
||||||
|
* This value is used by the RCC HAL module to compute the system frequency
|
||||||
|
* (when HSI is used as system clock source, directly or through the PLL).
|
||||||
|
*/
|
||||||
|
#if !defined (HSI_VALUE)
|
||||||
|
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
|
||||||
|
#endif /* HSI_VALUE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Internal Low Speed oscillator (LSI) value.
|
||||||
|
*/
|
||||||
|
#if !defined (LSI_VALUE)
|
||||||
|
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||||
|
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||||
|
The real value may vary depending on the variations
|
||||||
|
in voltage and temperature.*/
|
||||||
|
/**
|
||||||
|
* @brief External Low Speed oscillator (LSE) value.
|
||||||
|
*/
|
||||||
|
#if !defined (LSE_VALUE)
|
||||||
|
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||||
|
#endif /* LSE_VALUE */
|
||||||
|
|
||||||
|
#if !defined (LSE_STARTUP_TIMEOUT)
|
||||||
|
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
|
||||||
|
#endif /* LSE_STARTUP_TIMEOUT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief External clock source for I2S peripheral
|
||||||
|
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||||
|
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||||
|
*/
|
||||||
|
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||||
|
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External audio frequency in Hz*/
|
||||||
|
#endif /* EXTERNAL_CLOCK_VALUE */
|
||||||
|
|
||||||
|
/* Tip: To avoid modifying this file each time you need to use different HSE,
|
||||||
|
=== you can define the HSE value in your toolchain compiler preprocessor. */
|
||||||
|
|
||||||
|
/* ########################### System Configuration ######################### */
|
||||||
|
/**
|
||||||
|
* @brief This is the HAL system configuration section
|
||||||
|
*/
|
||||||
|
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||||
|
#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */
|
||||||
|
#define USE_RTOS 0U
|
||||||
|
#define PREFETCH_ENABLE 1U
|
||||||
|
#define INSTRUCTION_CACHE_ENABLE 1U
|
||||||
|
#define DATA_CACHE_ENABLE 1U
|
||||||
|
|
||||||
|
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
|
||||||
|
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
|
||||||
|
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
|
||||||
|
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
|
||||||
|
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
|
||||||
|
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
|
||||||
|
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
|
||||||
|
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
|
||||||
|
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
|
||||||
|
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
|
||||||
|
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
|
||||||
|
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
|
||||||
|
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
|
||||||
|
#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */
|
||||||
|
#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */
|
||||||
|
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
|
||||||
|
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
|
||||||
|
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
|
||||||
|
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
|
||||||
|
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
|
||||||
|
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
|
||||||
|
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
|
||||||
|
#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
|
||||||
|
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
|
||||||
|
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
|
||||||
|
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
|
||||||
|
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
|
||||||
|
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
|
||||||
|
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
|
||||||
|
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
|
||||||
|
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
|
||||||
|
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
|
||||||
|
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||||
|
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||||
|
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
|
||||||
|
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||||
|
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
|
||||||
|
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||||
|
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||||
|
|
||||||
|
/* ########################## Assert Selection ############################## */
|
||||||
|
/**
|
||||||
|
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||||
|
* HAL drivers code
|
||||||
|
*/
|
||||||
|
#define USE_FULL_ASSERT 1U
|
||||||
|
|
||||||
|
/* ################## Ethernet peripheral configuration ##################### */
|
||||||
|
|
||||||
|
/* Section 1 : Ethernet peripheral configuration */
|
||||||
|
|
||||||
|
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
|
||||||
|
#define MAC_ADDR0 2U
|
||||||
|
#define MAC_ADDR1 0U
|
||||||
|
#define MAC_ADDR2 0U
|
||||||
|
#define MAC_ADDR3 0U
|
||||||
|
#define MAC_ADDR4 0U
|
||||||
|
#define MAC_ADDR5 0U
|
||||||
|
|
||||||
|
/* Definition of the Ethernet driver buffers size and count */
|
||||||
|
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
|
||||||
|
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
|
||||||
|
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
|
||||||
|
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
|
||||||
|
|
||||||
|
/* Section 2: PHY configuration section */
|
||||||
|
|
||||||
|
/* DP83848_PHY_ADDRESS Address*/
|
||||||
|
#define DP83848_PHY_ADDRESS
|
||||||
|
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
|
||||||
|
#define PHY_RESET_DELAY 0x000000FFU
|
||||||
|
/* PHY Configuration delay */
|
||||||
|
#define PHY_CONFIG_DELAY 0x00000FFFU
|
||||||
|
|
||||||
|
#define PHY_READ_TO 0x0000FFFFU
|
||||||
|
#define PHY_WRITE_TO 0x0000FFFFU
|
||||||
|
|
||||||
|
/* Section 3: Common PHY Registers */
|
||||||
|
|
||||||
|
#define PHY_BCR ((uint16_t)0x0000U) /*!< Transceiver Basic Control Register */
|
||||||
|
#define PHY_BSR ((uint16_t)0x0001U) /*!< Transceiver Basic Status Register */
|
||||||
|
|
||||||
|
#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */
|
||||||
|
#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */
|
||||||
|
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */
|
||||||
|
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */
|
||||||
|
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */
|
||||||
|
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */
|
||||||
|
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */
|
||||||
|
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */
|
||||||
|
#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */
|
||||||
|
#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */
|
||||||
|
|
||||||
|
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */
|
||||||
|
#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */
|
||||||
|
#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
|
||||||
|
|
||||||
|
/* Section 4: Extended PHY Registers */
|
||||||
|
#define PHY_SR ((uint16_t)) /*!< PHY status register Offset */
|
||||||
|
|
||||||
|
#define PHY_SPEED_STATUS ((uint16_t)) /*!< PHY Speed mask */
|
||||||
|
#define PHY_DUPLEX_STATUS ((uint16_t)) /*!< PHY Duplex mask */
|
||||||
|
|
||||||
|
/* ################## SPI peripheral configuration ########################## */
|
||||||
|
|
||||||
|
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||||
|
* Activated: CRC code is present inside driver
|
||||||
|
* Deactivated: CRC code cleaned from driver
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define USE_SPI_CRC 0U
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* @brief Include module's header file
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAL_RCC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_rcc.h"
|
||||||
|
#endif /* HAL_RCC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_GPIO_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_gpio.h"
|
||||||
|
#endif /* HAL_GPIO_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_EXTI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_exti.h"
|
||||||
|
#endif /* HAL_EXTI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DMA_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dma.h"
|
||||||
|
#endif /* HAL_DMA_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CORTEX_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_cortex.h"
|
||||||
|
#endif /* HAL_CORTEX_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_ADC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_adc.h"
|
||||||
|
#endif /* HAL_ADC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CAN_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_can.h"
|
||||||
|
#endif /* HAL_CAN_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_can_legacy.h"
|
||||||
|
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CRC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_crc.h"
|
||||||
|
#endif /* HAL_CRC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CRYP_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_cryp.h"
|
||||||
|
#endif /* HAL_CRYP_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DMA2D_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dma2d.h"
|
||||||
|
#endif /* HAL_DMA2D_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DAC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dac.h"
|
||||||
|
#endif /* HAL_DAC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DCMI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dcmi.h"
|
||||||
|
#endif /* HAL_DCMI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_ETH_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_eth.h"
|
||||||
|
#endif /* HAL_ETH_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_ETH_LEGACY_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_eth_legacy.h"
|
||||||
|
#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_FLASH_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_flash.h"
|
||||||
|
#endif /* HAL_FLASH_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SRAM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_sram.h"
|
||||||
|
#endif /* HAL_SRAM_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_NOR_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_nor.h"
|
||||||
|
#endif /* HAL_NOR_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_NAND_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_nand.h"
|
||||||
|
#endif /* HAL_NAND_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_PCCARD_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_pccard.h"
|
||||||
|
#endif /* HAL_PCCARD_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SDRAM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_sdram.h"
|
||||||
|
#endif /* HAL_SDRAM_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_HASH_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_hash.h"
|
||||||
|
#endif /* HAL_HASH_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_I2C_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_i2c.h"
|
||||||
|
#endif /* HAL_I2C_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SMBUS_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_smbus.h"
|
||||||
|
#endif /* HAL_SMBUS_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_I2S_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_i2s.h"
|
||||||
|
#endif /* HAL_I2S_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_IWDG_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_iwdg.h"
|
||||||
|
#endif /* HAL_IWDG_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_LTDC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_ltdc.h"
|
||||||
|
#endif /* HAL_LTDC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_PWR_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_pwr.h"
|
||||||
|
#endif /* HAL_PWR_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_RNG_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_rng.h"
|
||||||
|
#endif /* HAL_RNG_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_RTC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_rtc.h"
|
||||||
|
#endif /* HAL_RTC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SAI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_sai.h"
|
||||||
|
#endif /* HAL_SAI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SD_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_sd.h"
|
||||||
|
#endif /* HAL_SD_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SPI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_spi.h"
|
||||||
|
#endif /* HAL_SPI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_TIM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_tim.h"
|
||||||
|
#endif /* HAL_TIM_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_UART_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_uart.h"
|
||||||
|
#endif /* HAL_UART_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_USART_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_usart.h"
|
||||||
|
#endif /* HAL_USART_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_IRDA_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_irda.h"
|
||||||
|
#endif /* HAL_IRDA_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SMARTCARD_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_smartcard.h"
|
||||||
|
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_WWDG_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_wwdg.h"
|
||||||
|
#endif /* HAL_WWDG_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_PCD_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_pcd.h"
|
||||||
|
#endif /* HAL_PCD_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_HCD_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_hcd.h"
|
||||||
|
#endif /* HAL_HCD_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DSI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dsi.h"
|
||||||
|
#endif /* HAL_DSI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_QSPI_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_qspi.h"
|
||||||
|
#endif /* HAL_QSPI_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_CEC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_cec.h"
|
||||||
|
#endif /* HAL_CEC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_FMPI2C_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_fmpi2c.h"
|
||||||
|
#endif /* HAL_FMPI2C_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_FMPSMBUS_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_fmpsmbus.h"
|
||||||
|
#endif /* HAL_FMPSMBUS_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_SPDIFRX_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_spdifrx.h"
|
||||||
|
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_DFSDM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_dfsdm.h"
|
||||||
|
#endif /* HAL_DFSDM_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_LPTIM_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_lptim.h"
|
||||||
|
#endif /* HAL_LPTIM_MODULE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef HAL_MMC_MODULE_ENABLED
|
||||||
|
#include "stm32f4xx_hal_mmc.h"
|
||||||
|
#endif /* HAL_MMC_MODULE_ENABLED */
|
||||||
|
|
||||||
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
#ifdef USE_FULL_ASSERT
|
||||||
|
/**
|
||||||
|
* @brief The assert_param macro is used for function's parameters check.
|
||||||
|
* @param expr If expr is false, it calls assert_failed function
|
||||||
|
* which reports the name of the source file and the source
|
||||||
|
* line number of the call that failed.
|
||||||
|
* If expr is true, it returns no value.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||||
|
/* Exported functions ------------------------------------------------------- */
|
||||||
|
void assert_failed(uint8_t* file, uint32_t line);
|
||||||
|
#else
|
||||||
|
#define assert_param(expr) ((void)0U)
|
||||||
|
#endif /* USE_FULL_ASSERT */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F4xx_HAL_CONF_H */
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_it.h
|
||||||
|
* @brief This file contains the headers of the interrupt handlers.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __STM32F4xx_IT_H
|
||||||
|
#define __STM32F4xx_IT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN ET */
|
||||||
|
|
||||||
|
/* USER CODE END ET */
|
||||||
|
|
||||||
|
/* Exported constants --------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN EC */
|
||||||
|
|
||||||
|
/* USER CODE END EC */
|
||||||
|
|
||||||
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN EM */
|
||||||
|
|
||||||
|
/* USER CODE END EM */
|
||||||
|
|
||||||
|
/* Exported functions prototypes ---------------------------------------------*/
|
||||||
|
void NMI_Handler(void);
|
||||||
|
void HardFault_Handler(void);
|
||||||
|
void MemManage_Handler(void);
|
||||||
|
void BusFault_Handler(void);
|
||||||
|
void UsageFault_Handler(void);
|
||||||
|
void DebugMon_Handler(void);
|
||||||
|
void USART1_IRQHandler(void);
|
||||||
|
void TIM8_BRK_TIM12_IRQHandler(void);
|
||||||
|
void TIM6_DAC_IRQHandler(void);
|
||||||
|
void DMA2_Stream2_IRQHandler(void);
|
||||||
|
void DMA2_Stream7_IRQHandler(void);
|
||||||
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
|
/* USER CODE END EFP */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STM32F4xx_IT_H */
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file tim.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the tim.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __TIM_H__
|
||||||
|
#define __TIM_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim1;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim2;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim3;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim4;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim6;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim9;
|
||||||
|
|
||||||
|
extern TIM_HandleTypeDef htim14;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_TIM1_Init(void);
|
||||||
|
void MX_TIM2_Init(void);
|
||||||
|
void MX_TIM3_Init(void);
|
||||||
|
void MX_TIM4_Init(void);
|
||||||
|
void MX_TIM6_Init(void);
|
||||||
|
void MX_TIM9_Init(void);
|
||||||
|
void MX_TIM14_Init(void);
|
||||||
|
|
||||||
|
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __TIM_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file usart.h
|
||||||
|
* @brief This file contains all the function prototypes for
|
||||||
|
* the usart.c file
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
|
#ifndef __USART_H__
|
||||||
|
#define __USART_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "control.h"
|
||||||
|
#include "icd.h"
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
extern UART_HandleTypeDef huart1;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Private defines */
|
||||||
|
#define TX_PLOAD_WIDTH 32
|
||||||
|
#define MESH_PLOAD_WIDTH 28
|
||||||
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
|
void MX_USART1_UART_Init(void);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Prototypes */
|
||||||
|
void print_usart(const char *pFormat, ...);
|
||||||
|
void ble_init(bool on_off);
|
||||||
|
void ble_control(ctrl_struct* control);
|
||||||
|
void ble_deinit(void);
|
||||||
|
void ble_HEX(ctrl_struct* control, adc_struct* adc,bool send);
|
||||||
|
void ble_HEX_new(ctrl_struct* control, icd_str * icd_str, adc_struct* adc,bool send);
|
||||||
|
/* USER CODE END Prototypes */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __USART_H__ */
|
||||||
|
|
||||||
@ -0,0 +1,274 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file adc.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of the ADC instances.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "adc.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
adc_struct adc_str;//структура ацп
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
ADC_HandleTypeDef hadc1;
|
||||||
|
|
||||||
|
/* ADC1 init function */
|
||||||
|
void MX_ADC1_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN ADC1_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_Init 0 */
|
||||||
|
|
||||||
|
ADC_ChannelConfTypeDef sConfig = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN ADC1_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_Init 1 */
|
||||||
|
|
||||||
|
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
|
||||||
|
*/
|
||||||
|
hadc1.Instance = ADC1;
|
||||||
|
hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
|
||||||
|
hadc1.Init.Resolution = ADC_RESOLUTION_12B;
|
||||||
|
hadc1.Init.ScanConvMode = ENABLE;
|
||||||
|
hadc1.Init.ContinuousConvMode = DISABLE;
|
||||||
|
hadc1.Init.DiscontinuousConvMode = ENABLE;
|
||||||
|
hadc1.Init.NbrOfDiscConversion = 1;
|
||||||
|
hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
|
||||||
|
hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
|
||||||
|
hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
|
||||||
|
hadc1.Init.NbrOfConversion = 8;
|
||||||
|
hadc1.Init.DMAContinuousRequests = DISABLE;
|
||||||
|
hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
|
||||||
|
if (HAL_ADC_Init(&hadc1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_4;
|
||||||
|
sConfig.Rank = 1;
|
||||||
|
sConfig.SamplingTime = ADC_SAMPLETIME_28CYCLES;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_5;
|
||||||
|
sConfig.Rank = 2;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_6;
|
||||||
|
sConfig.Rank = 3;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_11;
|
||||||
|
sConfig.Rank = 4;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_12;
|
||||||
|
sConfig.Rank = 5;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_13;
|
||||||
|
sConfig.Rank = 6;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_14;
|
||||||
|
sConfig.Rank = 7;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
|
||||||
|
*/
|
||||||
|
sConfig.Channel = ADC_CHANNEL_15;
|
||||||
|
sConfig.Rank = 8;
|
||||||
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN ADC1_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
if(adcHandle->Instance==ADC1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN ADC1_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_MspInit 0 */
|
||||||
|
/* ADC1 clock enable */
|
||||||
|
__HAL_RCC_ADC1_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
/**ADC1 GPIO Configuration
|
||||||
|
PC1 ------> ADC1_IN11
|
||||||
|
PC2 ------> ADC1_IN12
|
||||||
|
PC3 ------> ADC1_IN13
|
||||||
|
PA4 ------> ADC1_IN4
|
||||||
|
PA5 ------> ADC1_IN5
|
||||||
|
PA6 ------> ADC1_IN6
|
||||||
|
PC4 ------> ADC1_IN14
|
||||||
|
PC5 ------> ADC1_IN15
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = RV_COMP_ADC_Pin|RA_COMP_ADC_Pin|LV_COMP_ADC_Pin|HV_ADC_Pin
|
||||||
|
|BAT_ADC_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = RA_ADC_Pin|RV_ADC_Pin|LV_ADC_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN ADC1_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_MspInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(adcHandle->Instance==ADC1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN ADC1_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_ADC1_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**ADC1 GPIO Configuration
|
||||||
|
PC1 ------> ADC1_IN11
|
||||||
|
PC2 ------> ADC1_IN12
|
||||||
|
PC3 ------> ADC1_IN13
|
||||||
|
PA4 ------> ADC1_IN4
|
||||||
|
PA5 ------> ADC1_IN5
|
||||||
|
PA6 ------> ADC1_IN6
|
||||||
|
PC4 ------> ADC1_IN14
|
||||||
|
PC5 ------> ADC1_IN15
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOC, RV_COMP_ADC_Pin|RA_COMP_ADC_Pin|LV_COMP_ADC_Pin|HV_ADC_Pin
|
||||||
|
|BAT_ADC_Pin);
|
||||||
|
|
||||||
|
HAL_GPIO_DeInit(GPIOA, RA_ADC_Pin|RV_ADC_Pin|LV_ADC_Pin);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN ADC1_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END ADC1_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
uint8_t volt_to_pers(uint32_t vin)
|
||||||
|
{
|
||||||
|
if(vin < Low_volt)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if(vin > High_volt)
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint8_t vout = (uint8_t)((vin-3600)/5);
|
||||||
|
return vout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void adc_read(adc_struct* adc)
|
||||||
|
{
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->ecg_1_raw = HAL_ADC_GetValue(&hadc1);//Небольшой псевдо фильтр цифровой K - 0.1
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->ecg_2_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->ecg_3_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->rv_comp_raw = HAL_ADC_GetValue(&hadc1);//Небольшой псевдо фильтр цифровой K - 0.1
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->ra_comp_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->lv_comp_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->hv_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
adc->hv_volt = ((uint32_t)(adc->hv_raw) * 9700)/4095;//40 миливольт падение на идеальном диоде
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Start(&hadc1);
|
||||||
|
adc->error = HAL_ADC_PollForConversion(&hadc1, 1);
|
||||||
|
adc->bat_raw = HAL_ADC_GetValue(&hadc1);
|
||||||
|
adc->bat_volt = ((uint32_t)(adc->bat_raw) * 6600)/4095 + 40;//40 миливольт падение на идеальном диоде
|
||||||
|
adc->bat_pers = volt_to_pers(adc->bat_volt);//40 миливольт падение на идеальном диоде
|
||||||
|
|
||||||
|
|
||||||
|
adc->error = HAL_ADC_Stop(&hadc1);
|
||||||
|
adc->drdy_trigger = true;
|
||||||
|
}
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
#include "control.h"
|
||||||
|
|
||||||
|
ctrl_struct Control; //FLASH (rx)
|
||||||
|
|
||||||
|
void control_init(void)
|
||||||
|
{
|
||||||
|
Control.dev_type = DEV_TYPE;
|
||||||
|
Control.ble_mode_set = ble_raw;
|
||||||
|
Control.ble_mode_now = ble_off;
|
||||||
|
Control.serial_number = BASE_SERIAL_NUM;
|
||||||
|
Control.password = BASE_PASSWORD;
|
||||||
|
Control.mesh_netid = BASE_MESH_ID;
|
||||||
|
Control.mesh_adr = BASE_MESH_ADR;
|
||||||
|
Control.master_adr = BASE_MASTER_ADR;
|
||||||
|
Control.ble_ask = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void control_init_var(ctrl_struct * control)
|
||||||
|
{
|
||||||
|
control->dev_type = DEV_TYPE;
|
||||||
|
control->ble_mode_set = ble_off;
|
||||||
|
control->ble_mode_set = ble_off;
|
||||||
|
control->serial_number = BASE_SERIAL_NUM;
|
||||||
|
control->password = BASE_PASSWORD;
|
||||||
|
control->mesh_netid = BASE_MESH_ID;
|
||||||
|
control->mesh_adr = BASE_MESH_ADR;
|
||||||
|
control->master_adr = BASE_MASTER_ADR;
|
||||||
|
control->ble_ask = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void lets_sleep(void)
|
||||||
|
{
|
||||||
|
//Выключили питание АЦП
|
||||||
|
HAL_GPIO_WritePin(INA_PWR_GPIO_Port, INA_PWR_Pin, RESET);
|
||||||
|
//Выключили питание потенциометра
|
||||||
|
HAL_GPIO_WritePin(POT_PWR_GPIO_Port, POT_PWR_Pin, GPIO_PIN_RESET);
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, SET);
|
||||||
|
|
||||||
|
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
|
||||||
|
//Сейчас второй кнопки нет!!
|
||||||
|
//HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);//если вторая кнопка тоже подключена PC0
|
||||||
|
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
|
||||||
|
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
|
||||||
|
HAL_PWR_EnterSTANDBYMode();
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//***************************************************************************
|
||||||
|
//
|
||||||
|
// Переделанная библиотека задержек - теперь не ругается
|
||||||
|
//
|
||||||
|
//***************************************************************************
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#include "delay.h"
|
||||||
|
|
||||||
|
//===============================================================
|
||||||
|
// Задержка времени в мкс
|
||||||
|
//===============================================================
|
||||||
|
void delay_us(unsigned int t)
|
||||||
|
{
|
||||||
|
unsigned long i;
|
||||||
|
i = t*SYSCLK;
|
||||||
|
while(i--);
|
||||||
|
}
|
||||||
|
|
||||||
|
//===============================================================
|
||||||
|
// Задержка времени в мс
|
||||||
|
//===============================================================
|
||||||
|
void delay_ms(unsigned int t)
|
||||||
|
{
|
||||||
|
unsigned long i;
|
||||||
|
i = t*SYSCLK*100;
|
||||||
|
while(i--);
|
||||||
|
}
|
||||||
|
|
||||||
|
//===============================================================
|
||||||
|
// Задержка времени в мкс со сбросом вотчдога
|
||||||
|
//===============================================================
|
||||||
|
void delay_us_wd(unsigned int t)
|
||||||
|
{
|
||||||
|
unsigned long i;
|
||||||
|
i = t*SYSCLK;
|
||||||
|
while(i--);
|
||||||
|
/*{
|
||||||
|
if(i%10000 == 0)
|
||||||
|
WWDG_SetCounter(0x7F);//новое перезагрузка таймера вотчдога;
|
||||||
|
};*/
|
||||||
|
}
|
||||||
|
|
||||||
|
//===============================================================
|
||||||
|
// Задержка времени в мкс со сбросом вотчдога
|
||||||
|
//===============================================================
|
||||||
|
void delay_ms_wd(unsigned int t)
|
||||||
|
{
|
||||||
|
unsigned long i;
|
||||||
|
i = t*SYSCLK*100;
|
||||||
|
while(i--);
|
||||||
|
/*{
|
||||||
|
if(i%10000 == 0)
|
||||||
|
WWDG_SetCounter(0x7F);//новое перезагрузка таймера вотчдога;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file dma.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of all the requested memory to memory DMA transfers.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "dma.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
/* Configure DMA */
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable DMA controller clock
|
||||||
|
*/
|
||||||
|
void MX_DMA_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* DMA controller clock enable */
|
||||||
|
__HAL_RCC_DMA2_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* DMA interrupt init */
|
||||||
|
/* DMA2_Stream2_IRQn interrupt configuration */
|
||||||
|
HAL_NVIC_SetPriority(DMA2_Stream2_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(DMA2_Stream2_IRQn);
|
||||||
|
/* DMA2_Stream7_IRQn interrupt configuration */
|
||||||
|
HAL_NVIC_SetPriority(DMA2_Stream7_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(DMA2_Stream7_IRQn);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
#include "filter.h"
|
||||||
|
|
||||||
|
#define NCoef_50hz_2or 4
|
||||||
|
|
||||||
|
float iir_50hz_2or(float NewSample)
|
||||||
|
{
|
||||||
|
float ACoef[NCoef_50hz_2or+1] = {
|
||||||
|
0.88238733633963495000,
|
||||||
|
0.00000000000000000000,
|
||||||
|
1.76477467267926990000,
|
||||||
|
0.00000000000000000000,
|
||||||
|
0.88238733633963495000
|
||||||
|
};
|
||||||
|
|
||||||
|
float BCoef[NCoef_50hz_2or+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
0.00000000002797958790,
|
||||||
|
1.73472576874776110000,
|
||||||
|
-0.00000000003972608856,
|
||||||
|
0.76600660085864003000
|
||||||
|
};
|
||||||
|
|
||||||
|
static float y[NCoef_50hz_2or+1]; //output samples
|
||||||
|
static float x[NCoef_50hz_2or+1]; //input samples
|
||||||
|
int n;
|
||||||
|
|
||||||
|
//shift the old samples
|
||||||
|
for(n=NCoef_50hz_2or; n>0; n--) {
|
||||||
|
x[n] = x[n-1];
|
||||||
|
y[n] = y[n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate the new output
|
||||||
|
x[0] = NewSample;
|
||||||
|
y[0] = ACoef[0] * x[0];
|
||||||
|
for(n=1; n<=NCoef_50hz_2or; n++)
|
||||||
|
y[0] += ACoef[n] * x[n] - BCoef[n] * y[n];
|
||||||
|
|
||||||
|
return y[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
#define NCoef_50hz_1or 2
|
||||||
|
float iir_50hz_1or(float NewSample) {
|
||||||
|
float ACoef[NCoef_50hz_1or+1] = {
|
||||||
|
0.90906873056553772000,
|
||||||
|
0.00000000000000000000,
|
||||||
|
0.90906873056553772000
|
||||||
|
};
|
||||||
|
|
||||||
|
float BCoef[NCoef_50hz_1or+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
-0.00000000003423416752,
|
||||||
|
0.82727194590455844000
|
||||||
|
};
|
||||||
|
|
||||||
|
static float y[NCoef_50hz_1or+1]; //output samples
|
||||||
|
static float x[NCoef_50hz_1or+1]; //input samples
|
||||||
|
int n;
|
||||||
|
|
||||||
|
//shift the old samples
|
||||||
|
for(n=NCoef_50hz_1or; n>0; n--) {
|
||||||
|
x[n] = x[n-1];
|
||||||
|
y[n] = y[n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate the new output
|
||||||
|
x[0] = NewSample;
|
||||||
|
y[0] = ACoef[0] * x[0];
|
||||||
|
for(n=1; n<=NCoef_50hz_1or; n++)
|
||||||
|
y[0] += ACoef[n] * x[n] - BCoef[n] * y[n];
|
||||||
|
|
||||||
|
return y[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
#define NCoefhp 1
|
||||||
|
float iir_hp(float NewSample) {
|
||||||
|
float ACoef[NCoefhp+1] = {
|
||||||
|
0.98452866335087641000,
|
||||||
|
-0.98452866335087641000
|
||||||
|
};
|
||||||
|
|
||||||
|
float BCoef[NCoefhp+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
-0.96906741719524436000
|
||||||
|
};
|
||||||
|
|
||||||
|
static float y[NCoefhp+1]; //output samples
|
||||||
|
static float x[NCoefhp+1]; //input samples
|
||||||
|
int n;
|
||||||
|
|
||||||
|
//shift the old samples
|
||||||
|
for(n=NCoefhp; n>0; n--) {
|
||||||
|
x[n] = x[n-1];
|
||||||
|
y[n] = y[n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate the new output
|
||||||
|
x[0] = NewSample;
|
||||||
|
y[0] = ACoef[0] * x[0];
|
||||||
|
for(n=1; n<=NCoefhp; n++)
|
||||||
|
y[0] += ACoef[n] * x[n] - BCoef[n] * y[n];
|
||||||
|
|
||||||
|
return y[0];
|
||||||
|
}
|
||||||
|
#define NCoef_4060 4
|
||||||
|
float iir_4060(float NewSample) {
|
||||||
|
float ACoef[NCoef_4060+1] = {
|
||||||
|
0.63878443277987573000,
|
||||||
|
0.00000000000000000000,
|
||||||
|
1.27756886555975150000,
|
||||||
|
0.00000000000000000000,
|
||||||
|
0.63878443277987573000
|
||||||
|
};
|
||||||
|
|
||||||
|
float BCoef[NCoef_4060+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
0.00000000001085573304,
|
||||||
|
1.14298050252887370000,
|
||||||
|
-0.00000000003731445864,
|
||||||
|
0.41280159805878519000
|
||||||
|
};
|
||||||
|
|
||||||
|
static float y[NCoef_4060+1]; //output samples
|
||||||
|
static float x[NCoef_4060+1]; //input samples
|
||||||
|
int n;
|
||||||
|
|
||||||
|
//shift the old samples
|
||||||
|
for(n=NCoef_4060; n>0; n--) {
|
||||||
|
x[n] = x[n-1];
|
||||||
|
y[n] = y[n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate the new output
|
||||||
|
x[0] = NewSample;
|
||||||
|
y[0] = ACoef[0] * x[0];
|
||||||
|
for(n=1; n<=NCoef_4060; n++)
|
||||||
|
y[0] += ACoef[n] * x[n] - BCoef[n] * y[n];
|
||||||
|
|
||||||
|
return y[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
#define NCoef_lp 4
|
||||||
|
float iir_lp30(float NewSample) {
|
||||||
|
float ACoef[NCoef_lp+1] = {
|
||||||
|
0.01856343837888402300,
|
||||||
|
0.07425375351553609200,
|
||||||
|
0.11138063027330414000,
|
||||||
|
0.07425375351553609200,
|
||||||
|
0.01856343837888402300
|
||||||
|
};
|
||||||
|
|
||||||
|
float BCoef[NCoef_lp+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
-1.57039885122817170000,
|
||||||
|
1.27561332498327910000,
|
||||||
|
-0.48440336833508529000,
|
||||||
|
0.07619706461033234900
|
||||||
|
};
|
||||||
|
|
||||||
|
static float y[NCoef_lp+1]; //output samples
|
||||||
|
static float x[NCoef_lp+1]; //input samples
|
||||||
|
int n;
|
||||||
|
|
||||||
|
//shift the old samples
|
||||||
|
for(n=NCoef_lp; n>0; n--) {
|
||||||
|
x[n] = x[n-1];
|
||||||
|
y[n] = y[n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calculate the new output
|
||||||
|
x[0] = NewSample;
|
||||||
|
y[0] = ACoef[0] * x[0];
|
||||||
|
for(n=1; n<=NCoef_lp; n++)
|
||||||
|
y[0] += ACoef[n] * x[n] - BCoef[n] * y[n];
|
||||||
|
|
||||||
|
return y[0];
|
||||||
|
}
|
||||||
@ -0,0 +1,305 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* File Name : freertos.c
|
||||||
|
* Description : Code for freertos applications
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "cmsis_os.h"
|
||||||
|
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "adc.h"
|
||||||
|
#include "usart.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "icd.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "spi.h"
|
||||||
|
#include "gpio.h"
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PTD */
|
||||||
|
extern adc_struct adc_str;//структура ацп
|
||||||
|
extern ctrl_struct Control; //FLASH (rx)
|
||||||
|
extern icd_str ICD; //
|
||||||
|
/* USER CODE END PTD */
|
||||||
|
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PD */
|
||||||
|
|
||||||
|
/* USER CODE END PD */
|
||||||
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PM */
|
||||||
|
|
||||||
|
/* USER CODE END PM */
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Variables */
|
||||||
|
|
||||||
|
/* USER CODE END Variables */
|
||||||
|
osThreadId defaultTaskHandle;
|
||||||
|
uint32_t defaultTaskBuffer[ 300 ];
|
||||||
|
osStaticThreadDef_t defaultTaskControlBlock;
|
||||||
|
osThreadId OprosTaskHandle;
|
||||||
|
uint32_t OprosTaskBuffer[ 300 ];
|
||||||
|
osStaticThreadDef_t OprosTaskControlBlock;
|
||||||
|
osThreadId ControlTaskHandle;
|
||||||
|
uint32_t ControlTaskBuffer[ 300 ];
|
||||||
|
osStaticThreadDef_t ControlTaskControlBlock;
|
||||||
|
osThreadId LowSpeedTaskHandle;
|
||||||
|
uint32_t LowSpeedTaskBuffer[ 300 ];
|
||||||
|
osStaticThreadDef_t LowSpeedTaskControlBlock;
|
||||||
|
osThreadId ButTaskHandle;
|
||||||
|
uint32_t ButTaskBuffer[ 300 ];
|
||||||
|
osStaticThreadDef_t ButTaskControlBlock;
|
||||||
|
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN FunctionPrototypes */
|
||||||
|
|
||||||
|
/* USER CODE END FunctionPrototypes */
|
||||||
|
|
||||||
|
void StartDefaultTask(void const * argument);
|
||||||
|
void StartOprosTask(void const * argument);
|
||||||
|
void StartControlTask(void const * argument);
|
||||||
|
void StartLowSpeedTask(void const * argument);
|
||||||
|
void StartButTask(void const * argument);
|
||||||
|
|
||||||
|
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
||||||
|
|
||||||
|
/* GetIdleTaskMemory prototype (linked to static allocation support) */
|
||||||
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
|
||||||
|
|
||||||
|
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
|
||||||
|
static StaticTask_t xIdleTaskTCBBuffer;
|
||||||
|
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
|
||||||
|
|
||||||
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
|
||||||
|
{
|
||||||
|
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
|
||||||
|
*ppxIdleTaskStackBuffer = &xIdleStack[0];
|
||||||
|
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||||
|
/* place for user code */
|
||||||
|
}
|
||||||
|
/* USER CODE END GET_IDLE_TASK_MEMORY */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief FreeRTOS initialization
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void MX_FREERTOS_Init(void) {
|
||||||
|
/* USER CODE BEGIN Init */
|
||||||
|
init_icd(&ICD);
|
||||||
|
/* USER CODE END Init */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN RTOS_MUTEX */
|
||||||
|
/* add mutexes, ... */
|
||||||
|
/* USER CODE END RTOS_MUTEX */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN RTOS_SEMAPHORES */
|
||||||
|
/* add semaphores, ... */
|
||||||
|
/* USER CODE END RTOS_SEMAPHORES */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN RTOS_TIMERS */
|
||||||
|
/* start timers, add new ones, ... */
|
||||||
|
/* USER CODE END RTOS_TIMERS */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN RTOS_QUEUES */
|
||||||
|
/* add queues, ... */
|
||||||
|
/* USER CODE END RTOS_QUEUES */
|
||||||
|
|
||||||
|
/* Create the thread(s) */
|
||||||
|
/* definition and creation of defaultTask */
|
||||||
|
osThreadStaticDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 300, defaultTaskBuffer, &defaultTaskControlBlock);
|
||||||
|
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
|
||||||
|
|
||||||
|
/* definition and creation of OprosTask */
|
||||||
|
osThreadStaticDef(OprosTask, StartOprosTask, osPriorityNormal, 0, 300, OprosTaskBuffer, &OprosTaskControlBlock);
|
||||||
|
OprosTaskHandle = osThreadCreate(osThread(OprosTask), NULL);
|
||||||
|
|
||||||
|
/* definition and creation of ControlTask */
|
||||||
|
osThreadStaticDef(ControlTask, StartControlTask, osPriorityIdle, 0, 300, ControlTaskBuffer, &ControlTaskControlBlock);
|
||||||
|
ControlTaskHandle = osThreadCreate(osThread(ControlTask), NULL);
|
||||||
|
|
||||||
|
/* definition and creation of LowSpeedTask */
|
||||||
|
osThreadStaticDef(LowSpeedTask, StartLowSpeedTask, osPriorityIdle, 0, 300, LowSpeedTaskBuffer, &LowSpeedTaskControlBlock);
|
||||||
|
LowSpeedTaskHandle = osThreadCreate(osThread(LowSpeedTask), NULL);
|
||||||
|
|
||||||
|
/* definition and creation of ButTask */
|
||||||
|
osThreadStaticDef(ButTask, StartButTask, osPriorityIdle, 0, 300, ButTaskBuffer, &ButTaskControlBlock);
|
||||||
|
ButTaskHandle = osThreadCreate(osThread(ButTask), NULL);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN RTOS_THREADS */
|
||||||
|
/* add threads, ... */
|
||||||
|
/* USER CODE END RTOS_THREADS */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Header_StartDefaultTask */
|
||||||
|
/**
|
||||||
|
* @brief Function implementing the defaultTask thread.
|
||||||
|
* @param argument: Not used
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header_StartDefaultTask */
|
||||||
|
void StartDefaultTask(void const * argument)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN StartDefaultTask */
|
||||||
|
/* Infinite loop */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if(ICD.lv_start == true)
|
||||||
|
{
|
||||||
|
rv_lv_control(&ICD,lv_sub_charge);
|
||||||
|
rv_lv_control(&ICD,lv_sub_shock);
|
||||||
|
rv_lv_control(&ICD,lv_sub_relax);
|
||||||
|
// rv_lv_control(&ICD,lv_sub_free);
|
||||||
|
rv_lv_control(&ICD,lv_sub_discharge);
|
||||||
|
ICD.lv_start = false;
|
||||||
|
// rv_lv_control(icd_str,lv_sub_free);
|
||||||
|
}
|
||||||
|
osDelay(5);
|
||||||
|
}
|
||||||
|
/* USER CODE END StartDefaultTask */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Header_StartOprosTask */
|
||||||
|
/**
|
||||||
|
* @brief Function implementing the OprosTask thread.
|
||||||
|
* @param argument: Not used
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header_StartOprosTask */
|
||||||
|
void StartOprosTask(void const * argument)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN StartOprosTask */
|
||||||
|
/* Infinite loop */
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
if (ICD.active_ch == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(adc_str.drdy_trigger)
|
||||||
|
{
|
||||||
|
adc_str.drdy_trigger = false;//сбросили флаг
|
||||||
|
if(ICD.active_ch == 1)
|
||||||
|
get_data(&ICD,adc_str.ecg_1_raw);
|
||||||
|
if(ICD.active_ch == 2)
|
||||||
|
get_data(&ICD,adc_str.ecg_2_raw);
|
||||||
|
if(ICD.active_ch == 3)
|
||||||
|
get_data(&ICD,adc_str.ecg_3_raw);
|
||||||
|
//обычный алгоритм поиска
|
||||||
|
search_alg(&ICD);
|
||||||
|
ble_HEX_new(&Control,&ICD, &adc_str,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
osDelay(1);
|
||||||
|
}
|
||||||
|
/* USER CODE END StartOprosTask */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Header_StartControlTask */
|
||||||
|
/**
|
||||||
|
* @brief Function implementing the ControlTask thread.
|
||||||
|
* @param argument: Not used
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header_StartControlTask */
|
||||||
|
void StartControlTask(void const * argument)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN StartControlTask */
|
||||||
|
/* Infinite loop */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
terapy_algorithm(&ICD);
|
||||||
|
osDelay(100);
|
||||||
|
}
|
||||||
|
/* USER CODE END StartControlTask */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Header_StartLowSpeedTask */
|
||||||
|
/**
|
||||||
|
* @brief Function implementing the LowSpeedTask thread.
|
||||||
|
* @param argument: Not used
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header_StartLowSpeedTask */
|
||||||
|
void StartLowSpeedTask(void const * argument)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN StartLowSpeedTask */
|
||||||
|
static uint8_t buff[16];
|
||||||
|
|
||||||
|
HAL_StatusTypeDef status;
|
||||||
|
|
||||||
|
HAL_GPIO_WritePin(POT_PWR_GPIO_Port, POT_PWR_Pin, GPIO_PIN_SET);
|
||||||
|
osDelay(100);
|
||||||
|
/* Infinite loop */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
POT_cheek(&ICD.spi_pot_set, &ICD.spi_pot_now);
|
||||||
|
status = HAL_UART_Receive_DMA(&huart1, (uint8_t*) buff, 7);
|
||||||
|
osDelay(10);
|
||||||
|
if (status == HAL_OK)
|
||||||
|
parse_command(buff, &ICD);
|
||||||
|
}
|
||||||
|
/* USER CODE END StartLowSpeedTask */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Header_StartButTask */
|
||||||
|
/**
|
||||||
|
* @brief Function implementing the ButTask thread.
|
||||||
|
* @param argument: Not used
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header_StartButTask */
|
||||||
|
void StartButTask(void const * argument)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN StartButTask */
|
||||||
|
/* Infinite loop */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (HAL_GPIO_ReadPin(BUT_1_GPIO_Port, BUT_1_Pin) == GPIO_PIN_SET)
|
||||||
|
{
|
||||||
|
Control.btn_1_state = true;
|
||||||
|
Control.btn_1_cnt++;
|
||||||
|
if (Control.btn_1_cnt > BUT_CNT)
|
||||||
|
{
|
||||||
|
Control.set_mode = Sleep; //идем вверх по режимам
|
||||||
|
osDelay(4000);
|
||||||
|
lets_sleep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Control.btn_1_state = false;
|
||||||
|
Control.btn_1_cnt = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* USER CODE END StartButTask */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Private application code --------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Application */
|
||||||
|
|
||||||
|
/* USER CODE END Application */
|
||||||
@ -0,0 +1,186 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file gpio.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of all used GPIO pins.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "gpio.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
/* Configure GPIO */
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
/** Configure pins as
|
||||||
|
* Analog
|
||||||
|
* Input
|
||||||
|
* Output
|
||||||
|
* EVENT_OUT
|
||||||
|
* EXTI
|
||||||
|
* Free pins are configured automatically as Analog (this feature is enabled through
|
||||||
|
* the Code Generation settings)
|
||||||
|
*/
|
||||||
|
void MX_GPIO_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
|
||||||
|
/* GPIO Ports Clock Enable */
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOH_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOE, RV_LV_COIL_TO_GND_Pin|RV_LV_TIP_TO_GND_Pin|INA_PWR_Pin|COMP_PWR_Pin
|
||||||
|
|DOP_PWR_Pin|HV_DIS_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOE, V12_PWR_Pin|HV_LOGIC_PWR_Pin|RV_LV_DIS_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(RA_LV_SHOCK_GPIO_Port, RA_LV_SHOCK_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOB, RA_LV_DIS_Pin|HV_EN_RV_Pin|RV_LV_SHOCK_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOB, RA_LV_COIL_TO_GND_Pin|RA_LV_TIP_TO_GND_Pin|CAN_LV_TO_GND_Pin|POT_CS_1_Pin
|
||||||
|
|POT_PWR_Pin|HV_HS_RV_Pin|HV_LS_RV_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOD, POT_CS_4_Pin|POT_CS_5_Pin|POT_CS_6_Pin|LV_LV_TIP_TO_GND_Pin
|
||||||
|
|ADXL_CS_Pin|HV_HS_CAN_Pin|HV_LS_CAN_Pin|HV_HS_SCV_Pin
|
||||||
|
|HV_LS_SCV_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOD, RA_RELAY_Pin|RV_RELAY_Pin|CAN_RELAY_Pin|LV_LV_DIS_Pin
|
||||||
|
|HV_EN_CAN_Pin|HV_EN_SCV_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(LV_LV_SHOCK_GPIO_Port, LV_LV_SHOCK_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOA, LV_LV_COIL_TO_GND_Pin|BLE_PWRC_Pin|BLE_PWR_Pin|ADXL_PWR_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PEPin PEPin PEPin PEPin
|
||||||
|
PEPin PEPin PEPin */
|
||||||
|
GPIO_InitStruct.Pin = RV_LV_COIL_TO_GND_Pin|RV_LV_TIP_TO_GND_Pin|INA_PWR_Pin|COMP_PWR_Pin
|
||||||
|
|DOP_PWR_Pin|HV_LOGIC_PWR_Pin|RV_LV_DIS_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PEPin PEPin */
|
||||||
|
GPIO_InitStruct.Pin = V12_PWR_Pin|HV_DIS_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PE5 PE12 */
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_12;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PC13 PC0 */
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_0;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = RA_LV_SHOCK_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(RA_LV_SHOCK_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PBPin PBPin PBPin PBPin
|
||||||
|
PBPin PBPin PBPin PBPin
|
||||||
|
PBPin */
|
||||||
|
GPIO_InitStruct.Pin = RA_LV_DIS_Pin|RA_LV_COIL_TO_GND_Pin|RA_LV_TIP_TO_GND_Pin|CAN_LV_TO_GND_Pin
|
||||||
|
|POT_PWR_Pin|HV_HS_RV_Pin|HV_EN_RV_Pin|HV_LS_RV_Pin
|
||||||
|
|RV_LV_SHOCK_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = POT_CS_1_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(POT_CS_1_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PDPin PDPin PDPin PDPin
|
||||||
|
PDPin PDPin */
|
||||||
|
GPIO_InitStruct.Pin = POT_CS_4_Pin|POT_CS_5_Pin|POT_CS_6_Pin|LV_LV_TIP_TO_GND_Pin
|
||||||
|
|LV_LV_DIS_Pin|ADXL_CS_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PDPin PDPin PDPin PDPin
|
||||||
|
PDPin PDPin PDPin PDPin
|
||||||
|
PDPin */
|
||||||
|
GPIO_InitStruct.Pin = RA_RELAY_Pin|RV_RELAY_Pin|CAN_RELAY_Pin|HV_HS_CAN_Pin
|
||||||
|
|HV_EN_CAN_Pin|HV_LS_CAN_Pin|HV_HS_SCV_Pin|HV_EN_SCV_Pin
|
||||||
|
|HV_LS_SCV_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = LV_LV_SHOCK_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(LV_LV_SHOCK_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : PAPin PAPin PAPin PAPin */
|
||||||
|
GPIO_InitStruct.Pin = LV_LV_COIL_TO_GND_Pin|BLE_PWRC_Pin|BLE_PWR_Pin|ADXL_PWR_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = ADXL_INT_1_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
HAL_GPIO_Init(ADXL_INT_1_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
|
/* USER CODE END 2 */
|
||||||
1086
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/Core/Src/icd.c
Normal file
1086
2_iteration/v.0.1/firmware/ICD_0.1_100pin_07082025/Core/Src/icd.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,271 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file : main.c
|
||||||
|
* @brief : Main program body
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
#include "cmsis_os.h"
|
||||||
|
#include "adc.h"
|
||||||
|
#include "dma.h"
|
||||||
|
#include "spi.h"
|
||||||
|
#include "tim.h"
|
||||||
|
#include "usart.h"
|
||||||
|
#include "gpio.h"
|
||||||
|
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "control.h"
|
||||||
|
#include "icd.h"
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PTD */
|
||||||
|
extern ctrl_struct Control; //FLASH (rx)
|
||||||
|
/* USER CODE END PTD */
|
||||||
|
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PD */
|
||||||
|
|
||||||
|
/* USER CODE END PD */
|
||||||
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PM */
|
||||||
|
|
||||||
|
/* USER CODE END PM */
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
|
/* USER CODE END PV */
|
||||||
|
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
void SystemClock_Config(void);
|
||||||
|
void MX_FREERTOS_Init(void);
|
||||||
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
|
/* Private user code ---------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The application entry point.
|
||||||
|
* @retval int
|
||||||
|
*/
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
/* MCU Configuration--------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
||||||
|
HAL_Init();
|
||||||
|
|
||||||
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
|
/* USER CODE END Init */
|
||||||
|
|
||||||
|
/* Configure the system clock */
|
||||||
|
SystemClock_Config();
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SysInit */
|
||||||
|
control_init();
|
||||||
|
/* USER CODE END SysInit */
|
||||||
|
|
||||||
|
/* Initialize all configured peripherals */
|
||||||
|
MX_GPIO_Init();
|
||||||
|
MX_DMA_Init();
|
||||||
|
MX_SPI2_Init();
|
||||||
|
MX_SPI3_Init();
|
||||||
|
MX_TIM3_Init();
|
||||||
|
MX_TIM4_Init();
|
||||||
|
MX_USART1_UART_Init();
|
||||||
|
MX_ADC1_Init();
|
||||||
|
MX_TIM1_Init();
|
||||||
|
MX_TIM2_Init();
|
||||||
|
MX_TIM9_Init();
|
||||||
|
MX_TIM14_Init();
|
||||||
|
MX_TIM6_Init();
|
||||||
|
/* USER CODE BEGIN 2 */
|
||||||
|
hv_pwm(false);
|
||||||
|
hv_power(false);
|
||||||
|
hv_ll_control(z_state, z_state, z_state);
|
||||||
|
HAL_Delay(20);
|
||||||
|
relay_all_control(false, false, false);
|
||||||
|
//чтобы не пробило перевели в разамкнутое состояние все полумосты
|
||||||
|
|
||||||
|
ble_control(&Control);
|
||||||
|
HAL_TIM_Base_Start_IT(&htim6);// Таймер съёма данных
|
||||||
|
// высокое напряжение таймер
|
||||||
|
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_4);
|
||||||
|
// светодиод
|
||||||
|
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
|
||||||
|
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
|
||||||
|
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);
|
||||||
|
|
||||||
|
// RV таймер накачки
|
||||||
|
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);
|
||||||
|
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_3);
|
||||||
|
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_4);
|
||||||
|
|
||||||
|
// RA таймер накачки
|
||||||
|
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);
|
||||||
|
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);
|
||||||
|
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_3);
|
||||||
|
|
||||||
|
// LV таймер накачки
|
||||||
|
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
|
||||||
|
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_2);
|
||||||
|
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_3);
|
||||||
|
|
||||||
|
// Таймер Звука
|
||||||
|
HAL_TIM_PWM_Start(&htim9, TIM_CHANNEL_2);
|
||||||
|
// fixme добавить ещё таймеров
|
||||||
|
|
||||||
|
//Включили питание АЦП
|
||||||
|
HAL_GPIO_WritePin(INA_PWR_GPIO_Port, INA_PWR_Pin, SET);
|
||||||
|
HAL_GPIO_WritePin(DOP_PWR_GPIO_Port, DOP_PWR_Pin, SET);
|
||||||
|
HAL_GPIO_WritePin(COMP_PWR_GPIO_Port, COMP_PWR_Pin, SET);
|
||||||
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
|
/* Call init function for freertos objects (in cmsis_os2.c) */
|
||||||
|
MX_FREERTOS_Init();
|
||||||
|
|
||||||
|
/* Start scheduler */
|
||||||
|
osKernelStart();
|
||||||
|
|
||||||
|
/* We should never get here as control is now taken by the scheduler */
|
||||||
|
|
||||||
|
/* Infinite loop */
|
||||||
|
/* USER CODE BEGIN WHILE */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 3 */
|
||||||
|
}
|
||||||
|
/* USER CODE END 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System Clock Configuration
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void SystemClock_Config(void)
|
||||||
|
{
|
||||||
|
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
||||||
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
||||||
|
|
||||||
|
/** Configure the main internal regulator output voltage
|
||||||
|
*/
|
||||||
|
__HAL_RCC_PWR_CLK_ENABLE();
|
||||||
|
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||||
|
|
||||||
|
/** Initializes the RCC Oscillators according to the specified parameters
|
||||||
|
* in the RCC_OscInitTypeDef structure.
|
||||||
|
*/
|
||||||
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
||||||
|
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||||
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||||
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
|
||||||
|
RCC_OscInitStruct.PLL.PLLM = 8;
|
||||||
|
RCC_OscInitStruct.PLL.PLLN = 192;
|
||||||
|
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV8;
|
||||||
|
RCC_OscInitStruct.PLL.PLLQ = 2;
|
||||||
|
RCC_OscInitStruct.PLL.PLLR = 2;
|
||||||
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Initializes the CPU, AHB and APB buses clocks
|
||||||
|
*/
|
||||||
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||||
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||||
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
|
||||||
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
||||||
|
|
||||||
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 4 */
|
||||||
|
|
||||||
|
/* USER CODE END 4 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Period elapsed callback in non blocking mode
|
||||||
|
* @note This function is called when TIM12 interrupt took place, inside
|
||||||
|
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
|
||||||
|
* a global variable "uwTick" used as application time base.
|
||||||
|
* @param htim : TIM handle
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN Callback 0 */
|
||||||
|
|
||||||
|
/* USER CODE END Callback 0 */
|
||||||
|
if (htim->Instance == TIM12) {
|
||||||
|
HAL_IncTick();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN Callback 1 */
|
||||||
|
|
||||||
|
/* USER CODE END Callback 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function is executed in case of error occurrence.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void Error_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN Error_Handler_Debug */
|
||||||
|
/* User can add his own implementation to report the HAL error return state */
|
||||||
|
__disable_irq();
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/* USER CODE END Error_Handler_Debug */
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USE_FULL_ASSERT
|
||||||
|
/**
|
||||||
|
* @brief Reports the name of the source file and the source line number
|
||||||
|
* where the assert_param error has occurred.
|
||||||
|
* @param file: pointer to the source file name
|
||||||
|
* @param line: assert_param error line source number
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void assert_failed(uint8_t *file, uint32_t line)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN 6 */
|
||||||
|
/* User can add his own implementation to report the file name and line number,
|
||||||
|
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||||
|
/* USER CODE END 6 */
|
||||||
|
}
|
||||||
|
#endif /* USE_FULL_ASSERT */
|
||||||
@ -0,0 +1,597 @@
|
|||||||
|
#include "parse.h"
|
||||||
|
|
||||||
|
float unpackFloat(const void *buf)
|
||||||
|
{
|
||||||
|
const unsigned char *b = (const unsigned char *)buf;
|
||||||
|
uint32_t temp = 0;
|
||||||
|
temp = ((b[0] << 24) |
|
||||||
|
(b[1] << 16) |
|
||||||
|
(b[2] << 8) |
|
||||||
|
b[3]);
|
||||||
|
return *((float *) &temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool check_float(float data_in, float data_min, float data_max)
|
||||||
|
{
|
||||||
|
if((data_in >= data_min) && (data_in <= data_max))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t unpackUint16(const void *buf)
|
||||||
|
{
|
||||||
|
const unsigned char *b = (const unsigned char *)buf;
|
||||||
|
uint16_t temp = 0;
|
||||||
|
temp = ((b[2] << 8) | b[3]);
|
||||||
|
return *((uint16_t *) &temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool check_uint16(uint16_t data_in, uint16_t data_min, uint16_t data_max)
|
||||||
|
{
|
||||||
|
if((data_in >= data_min) && (data_in <= data_max))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t unpackUint8(const void *buf)
|
||||||
|
{
|
||||||
|
const unsigned char *b = (const unsigned char *)buf;
|
||||||
|
uint8_t temp = 0;
|
||||||
|
temp = b[3];
|
||||||
|
return *((uint8_t *) &temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool check_uint8(uint8_t data_in, uint8_t data_min, uint8_t data_max)
|
||||||
|
{
|
||||||
|
if((data_in >= data_min) && (data_in <= data_max))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t unpackUint32(const void *buf)
|
||||||
|
{
|
||||||
|
const unsigned char *b = (const unsigned char *)buf;
|
||||||
|
uint32_t temp = 0;
|
||||||
|
temp = ((b[0] << 24) |
|
||||||
|
(b[1] << 16) |
|
||||||
|
(b[2] << 8) |
|
||||||
|
b[3]);
|
||||||
|
return *((uint32_t *) &temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool check_uint32(uint32_t data_in, uint32_t data_min, uint32_t data_max)
|
||||||
|
{
|
||||||
|
if((data_in >= data_min) && (data_in <= data_max))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void parse_command(uint8_t* buf, icd_str * icd_str)
|
||||||
|
{
|
||||||
|
float fdata = -1.0;
|
||||||
|
if ((buf[0] == 0x55) && (buf[6] == 0x77))
|
||||||
|
{
|
||||||
|
switch (buf[1])
|
||||||
|
{
|
||||||
|
//float min_tres
|
||||||
|
case 0x01:
|
||||||
|
{
|
||||||
|
fdata = unpackFloat(&buf[2]);
|
||||||
|
if (check_float(fdata, 0.1, 10.0)) //fixme сделал большую вариабельность
|
||||||
|
{
|
||||||
|
if (fdata < icd_str->max_tres)
|
||||||
|
// проверили что меньше максимального порога
|
||||||
|
icd_str->min_tres = fdata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//float max_tres
|
||||||
|
case 0x02:
|
||||||
|
{
|
||||||
|
fdata = unpackFloat(&buf[2]);
|
||||||
|
if (check_float(fdata, 1.5, 20.0)) //fixme сделал большую вариабельность
|
||||||
|
{
|
||||||
|
if (fdata > icd_str->min_tres)
|
||||||
|
// проверили что больше минимального порога
|
||||||
|
icd_str->max_tres = fdata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//float square_coef
|
||||||
|
case 0x03:
|
||||||
|
{
|
||||||
|
fdata = unpackFloat(&buf[2]);
|
||||||
|
if (check_float(fdata, 0.25, 0.75))
|
||||||
|
{
|
||||||
|
icd_str->square_coef = fdata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//float triangle_coef
|
||||||
|
case 0x04:
|
||||||
|
{
|
||||||
|
fdata = unpackFloat(&buf[2]);
|
||||||
|
// min max triangle coef???? const 0.85
|
||||||
|
if (check_float(fdata, 0.8, 0.9))
|
||||||
|
{
|
||||||
|
icd_str->triangle_coef = fdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//start_up_time
|
||||||
|
case 0x05:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 2))
|
||||||
|
{
|
||||||
|
icd_str->work_set_mode = idata;
|
||||||
|
//fixme тут нужно написать сброс всего и вся
|
||||||
|
if (idata == Monitor)
|
||||||
|
{
|
||||||
|
icd_str->fibr_cnt = 0;
|
||||||
|
icd_str->tachy_2_cnt = 0;
|
||||||
|
icd_str->tachy_1_cnt = 0;
|
||||||
|
icd_str->fibr_cnt = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//base_time
|
||||||
|
case 0x06:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// min max???? const 300
|
||||||
|
if (check_uint16(idata, 100, 400))
|
||||||
|
{
|
||||||
|
icd_str->base_time = idata / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//square_time
|
||||||
|
case 0x07:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// 350
|
||||||
|
if (check_uint16(idata, 300, 400))
|
||||||
|
{
|
||||||
|
icd_str->square_time = idata / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//triangle_time
|
||||||
|
case 0x08:
|
||||||
|
{
|
||||||
|
// uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// // 300
|
||||||
|
// if(check_uint16(idata, 200, 400))
|
||||||
|
// {
|
||||||
|
// icd_str->triangle_time = idata;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//triangle_step_time сделаю тут максимальное время на цикл лучше
|
||||||
|
case 0x09:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, 500, 2000)) //границы берём из графического интерфейса лучше переделатьь в дефайны
|
||||||
|
{
|
||||||
|
icd_str->max_time = idata / 5;
|
||||||
|
}
|
||||||
|
// uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// // 50
|
||||||
|
// if(check_uint16(idata, 40, 60))
|
||||||
|
// {
|
||||||
|
// icd_str->triangle_step_time = idata;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//lv_mode_time
|
||||||
|
case 0x0A:
|
||||||
|
{
|
||||||
|
// uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// // ????
|
||||||
|
// if(check_uint16(idata, 40, 60))
|
||||||
|
// {
|
||||||
|
// icd_str->lv_mode_time = idata;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//lv_start_time
|
||||||
|
case 0x0B:
|
||||||
|
{
|
||||||
|
// uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// icd_str->lv_start_time = idata;
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//lv_stop_time
|
||||||
|
case 0x0C:
|
||||||
|
{
|
||||||
|
// uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
// icd_str->lv_stop_time = idata;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//max_time
|
||||||
|
case 0x0D:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, 120, 150)) //границы берём из графического интерфейса лучше переделатьь в дефайны
|
||||||
|
{
|
||||||
|
icd_str->max_search_time = idata / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//bool LV_on //bool HV_on
|
||||||
|
case 0x0E:
|
||||||
|
{
|
||||||
|
// не стала делать, не используется же пока
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//fibr_tres
|
||||||
|
case 0x10:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, FIBR_PERIOD_MIN, FIBR_PERIOD_MAX))
|
||||||
|
{
|
||||||
|
idata /= 5;
|
||||||
|
//если меньше тахи2 и тахи 1
|
||||||
|
if ((idata < icd_str->tachy_2_tres) && (idata < icd_str->tachy_1_tres))
|
||||||
|
// проверили что меньше максимального порога
|
||||||
|
icd_str->fibr_tres = idata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//tachy_2_tres
|
||||||
|
case 0x11:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, TACHY_2_PERIOD_MIN, TACHY_2_PERIOD_MAX))
|
||||||
|
{
|
||||||
|
idata /= 5;
|
||||||
|
//если больше фибр и меньше тахи 1
|
||||||
|
if ((idata > icd_str->fibr_tres) && (idata < icd_str->tachy_1_tres))
|
||||||
|
// проверили что меньше максимального порога
|
||||||
|
icd_str->tachy_2_tres = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//tachy_1_tres
|
||||||
|
case 0x12:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, TACHY_1_PERIOD_MIN, TACHY_1_PERIOD_MAX))
|
||||||
|
{
|
||||||
|
idata /= 5;
|
||||||
|
//если больше фибр и больше тахи 2
|
||||||
|
if ((idata > icd_str->fibr_tres) && (idata > icd_str->tachy_2_tres))
|
||||||
|
// проверили что меньше максимального порога
|
||||||
|
icd_str->tachy_1_tres = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//fibr_max_tres
|
||||||
|
case 0x13:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 10, 60))
|
||||||
|
{
|
||||||
|
icd_str->fibr_max_tres = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//hv_step_number
|
||||||
|
case 0x14:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 1, 8))
|
||||||
|
{
|
||||||
|
icd_str->hv_step_number = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//min_energy
|
||||||
|
case 0x15:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, 1, 70))
|
||||||
|
{
|
||||||
|
icd_str->min_energy = idata * 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//max_energy
|
||||||
|
case 0x16:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, 1, 70))
|
||||||
|
{
|
||||||
|
if (idata * 10 >= icd_str->min_energy)
|
||||||
|
icd_str->max_energy = idata * 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//cap_polarity
|
||||||
|
case 0x17:
|
||||||
|
{
|
||||||
|
//не делала
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//hv_blind_time
|
||||||
|
case 0x18:
|
||||||
|
{
|
||||||
|
uint16_t idata = unpackUint16(&buf[2]);
|
||||||
|
if (check_uint16(idata, 100, 5000))
|
||||||
|
{
|
||||||
|
icd_str->hv_blind_time = idata / 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//redet_num
|
||||||
|
case 0x19:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 4, 10))
|
||||||
|
{
|
||||||
|
icd_str->redet_num = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//redet_bad
|
||||||
|
case 0x1A:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 2, 8))
|
||||||
|
{
|
||||||
|
icd_str->redet_bad = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//standby_timer
|
||||||
|
case 0x1B:
|
||||||
|
{
|
||||||
|
uint32_t idata = unpackUint32(&buf[2]);
|
||||||
|
if (check_uint32(idata, 10, 3600))
|
||||||
|
{
|
||||||
|
icd_str->standby_timer = idata * 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x1C:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 255))
|
||||||
|
{
|
||||||
|
icd_str->spi_pot_set = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x1D:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 255))
|
||||||
|
{
|
||||||
|
if (idata > 0)
|
||||||
|
NVIC_SystemReset(); //перезагрузка
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//с фильтром без фильтра
|
||||||
|
case 0x1E:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 1))
|
||||||
|
{
|
||||||
|
icd_str->filter_on = (bool) idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//с какой канал используем
|
||||||
|
case 0x1F:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 3))
|
||||||
|
{
|
||||||
|
icd_str->active_ch = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//использование SD карты
|
||||||
|
case 0x20:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 1))
|
||||||
|
{
|
||||||
|
icd_str->sd_card = (bool) idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//вычитание постоянной составляющей
|
||||||
|
case 0x21:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 1))
|
||||||
|
{
|
||||||
|
icd_str->dc_cut = (bool) idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//полярность низковольтной стимуляции
|
||||||
|
case 0x22:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 0x1))
|
||||||
|
{
|
||||||
|
icd_str->lv_polarity = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//режим низковольтной стимуляции
|
||||||
|
case 0x23:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 0xF))
|
||||||
|
{
|
||||||
|
icd_str->lv_mode = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//время импульса низковольной стимуляции 1-20(0,1-2мс) одна единица 0,1мс шаг 0.1мс
|
||||||
|
case 0x24:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 1, 20))
|
||||||
|
{
|
||||||
|
icd_str->lv_shock_time = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//время стабилизации после удара низковольной стимуляции 0-20(0-20мс) одна единица 1мс шаг 1мс
|
||||||
|
case 0x25:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 20))
|
||||||
|
{
|
||||||
|
icd_str->lv_relax_time = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
case 0x26:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 10, 80))
|
||||||
|
{
|
||||||
|
icd_str->lv_voltage = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//сколько импульсов в одной пачке 5-50 одна единица 1 импульс шаг 1 импульс
|
||||||
|
case 0x27:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 5, 50))
|
||||||
|
{
|
||||||
|
icd_str->BURST_cnt = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
case 0x28:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 10, 80))
|
||||||
|
{
|
||||||
|
icd_str->BURST_voltage = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//период следования импульсов в мс 150-500мс одна единица 1мс шаг 10 мс на ползунке
|
||||||
|
case 0x29:
|
||||||
|
{
|
||||||
|
uint32_t idata = unpackUint32(&buf[2]);
|
||||||
|
if (check_uint16(idata, 150, 500))
|
||||||
|
{
|
||||||
|
icd_str->BURST_period = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//новое про высокое напряжение
|
||||||
|
//полярность стимуляции
|
||||||
|
case 0x30:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 2))
|
||||||
|
{
|
||||||
|
icd_str->hv_polarity = idata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//тип способа задания длительности импульса
|
||||||
|
case 0x31:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 0, 2))
|
||||||
|
{
|
||||||
|
icd_str->hv_mode = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// время в десятых мс приходящееся на 1 фазу 30-120(3-12мс) одна единица 0,1мс
|
||||||
|
case 0x32:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 30, 120))
|
||||||
|
{
|
||||||
|
icd_str->hv_phase_1_duration = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// время в десятых мс приходящееся на 2 фазу 20-100(2-10мс) одна единица 0,1мс
|
||||||
|
case 0x33:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 20, 100))
|
||||||
|
{
|
||||||
|
icd_str->hv_phase_2_duration = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// время в десятых мс приходящееся на переключение между фазами 10-30(1-3мс) одна единица 0,1мс
|
||||||
|
case 0x34:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 10, 30))
|
||||||
|
{
|
||||||
|
icd_str->hv_switch_duration = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//процент напряжения при котором происходит завешение 1 фазы при адаптивном режиме (20-80) одна единица 1%
|
||||||
|
case 0x35:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 20, 80))
|
||||||
|
{
|
||||||
|
icd_str->hv_switching_voltage = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
//процент напряжения при котором происходит завешение 2 фазы при адаптивном режиме (5-50) одна единица 1%
|
||||||
|
case 0x36:
|
||||||
|
{
|
||||||
|
uint8_t idata = unpackUint8(&buf[2]);
|
||||||
|
if (check_uint8(idata, 5, 50))
|
||||||
|
{
|
||||||
|
icd_str->hv_cutoff_voltage = idata;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
//код неверный
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,210 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file spi.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of the SPI instances.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "spi.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
SPI_HandleTypeDef hspi2;
|
||||||
|
SPI_HandleTypeDef hspi3;
|
||||||
|
|
||||||
|
/* SPI2 init function */
|
||||||
|
void MX_SPI2_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI2_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI2_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_Init 1 */
|
||||||
|
hspi2.Instance = SPI2;
|
||||||
|
hspi2.Init.Mode = SPI_MODE_MASTER;
|
||||||
|
hspi2.Init.Direction = SPI_DIRECTION_2LINES;
|
||||||
|
hspi2.Init.DataSize = SPI_DATASIZE_8BIT;
|
||||||
|
hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||||
|
hspi2.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||||
|
hspi2.Init.NSS = SPI_NSS_SOFT;
|
||||||
|
hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||||
|
hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||||
|
hspi2.Init.TIMode = SPI_TIMODE_DISABLE;
|
||||||
|
hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
||||||
|
hspi2.Init.CRCPolynomial = 10;
|
||||||
|
if (HAL_SPI_Init(&hspi2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN SPI2_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
/* SPI3 init function */
|
||||||
|
void MX_SPI3_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI3_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI3_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_Init 1 */
|
||||||
|
hspi3.Instance = SPI3;
|
||||||
|
hspi3.Init.Mode = SPI_MODE_MASTER;
|
||||||
|
hspi3.Init.Direction = SPI_DIRECTION_2LINES;
|
||||||
|
hspi3.Init.DataSize = SPI_DATASIZE_8BIT;
|
||||||
|
hspi3.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||||
|
hspi3.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||||
|
hspi3.Init.NSS = SPI_NSS_SOFT;
|
||||||
|
hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||||
|
hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||||
|
hspi3.Init.TIMode = SPI_TIMODE_DISABLE;
|
||||||
|
hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
||||||
|
hspi3.Init.CRCPolynomial = 10;
|
||||||
|
if (HAL_SPI_Init(&hspi3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN SPI3_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
if(spiHandle->Instance==SPI2)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SPI2_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_MspInit 0 */
|
||||||
|
/* SPI2 clock enable */
|
||||||
|
__HAL_RCC_SPI2_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
/**SPI2 GPIO Configuration
|
||||||
|
PB13 ------> SPI2_SCK
|
||||||
|
PB15 ------> SPI2_MOSI
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_15;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI2_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(spiHandle->Instance==SPI3)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SPI3_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_MspInit 0 */
|
||||||
|
/* SPI3 clock enable */
|
||||||
|
__HAL_RCC_SPI3_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
/**SPI3 GPIO Configuration
|
||||||
|
PC10 ------> SPI3_SCK
|
||||||
|
PC11 ------> SPI3_MISO
|
||||||
|
PC12 ------> SPI3_MOSI
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF6_SPI3;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI3_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_MspInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(spiHandle->Instance==SPI2)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SPI2_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_SPI2_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**SPI2 GPIO Configuration
|
||||||
|
PB13 ------> SPI2_SCK
|
||||||
|
PB15 ------> SPI2_MOSI
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13|GPIO_PIN_15);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI2_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI2_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(spiHandle->Instance==SPI3)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN SPI3_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_SPI3_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**SPI3 GPIO Configuration
|
||||||
|
PC10 ------> SPI3_SCK
|
||||||
|
PC11 ------> SPI3_MISO
|
||||||
|
PC12 ------> SPI3_MOSI
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN SPI3_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END SPI3_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
void POT_set(uint8_t val)
|
||||||
|
{
|
||||||
|
HAL_GPIO_WritePin(POT_CS_1_GPIO_Port, POT_CS_1_Pin, RESET);
|
||||||
|
HAL_SPI_Transmit(&hspi2, &val, 1, 10);
|
||||||
|
HAL_GPIO_WritePin(POT_CS_1_GPIO_Port, POT_CS_1_Pin, SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
void POT_cheek(uint8_t* set, uint8_t* now)
|
||||||
|
{
|
||||||
|
if (set != now)
|
||||||
|
{
|
||||||
|
now = set;
|
||||||
|
HAL_GPIO_WritePin(POT_CS_1_GPIO_Port, POT_CS_1_Pin, RESET);
|
||||||
|
HAL_SPI_Transmit(&hspi2, now, 1, 10);
|
||||||
|
HAL_GPIO_WritePin(POT_CS_1_GPIO_Port, POT_CS_1_Pin, SET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_msp.c
|
||||||
|
* @brief This file provides code for the MSP Initialization
|
||||||
|
* and de-Initialization codes.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN TD */
|
||||||
|
|
||||||
|
/* USER CODE END TD */
|
||||||
|
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Define */
|
||||||
|
|
||||||
|
/* USER CODE END Define */
|
||||||
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Macro */
|
||||||
|
|
||||||
|
/* USER CODE END Macro */
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
|
/* USER CODE END PV */
|
||||||
|
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
|
/* External functions --------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN ExternalFunctions */
|
||||||
|
|
||||||
|
/* USER CODE END ExternalFunctions */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
/**
|
||||||
|
* Initializes the Global MSP.
|
||||||
|
*/
|
||||||
|
void HAL_MspInit(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END MspInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
||||||
|
__HAL_RCC_PWR_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* System interrupt init*/
|
||||||
|
/* PendSV_IRQn interrupt configuration */
|
||||||
|
HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END MspInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_hal_timebase_tim.c
|
||||||
|
* @brief HAL time base based on the hardware TIM.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "stm32f4xx_hal.h"
|
||||||
|
#include "stm32f4xx_hal_tim.h"
|
||||||
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
TIM_HandleTypeDef htim12;
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
/* Private functions ---------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function configures the TIM12 as a time base source.
|
||||||
|
* The time source is configured to have 1ms time base with a dedicated
|
||||||
|
* Tick interrupt priority.
|
||||||
|
* @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().
|
||||||
|
* @param TickPriority: Tick interrupt priority.
|
||||||
|
* @retval HAL status
|
||||||
|
*/
|
||||||
|
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
||||||
|
{
|
||||||
|
RCC_ClkInitTypeDef clkconfig;
|
||||||
|
uint32_t uwTimclock, uwAPB1Prescaler = 0U;
|
||||||
|
|
||||||
|
uint32_t uwPrescalerValue = 0U;
|
||||||
|
uint32_t pFLatency;
|
||||||
|
HAL_StatusTypeDef status;
|
||||||
|
|
||||||
|
/* Enable TIM12 clock */
|
||||||
|
__HAL_RCC_TIM12_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* Get clock configuration */
|
||||||
|
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
|
||||||
|
|
||||||
|
/* Get APB1 prescaler */
|
||||||
|
uwAPB1Prescaler = clkconfig.APB1CLKDivider;
|
||||||
|
/* Compute TIM12 clock */
|
||||||
|
if (uwAPB1Prescaler == RCC_HCLK_DIV1)
|
||||||
|
{
|
||||||
|
uwTimclock = HAL_RCC_GetPCLK1Freq();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Compute the prescaler value to have TIM12 counter clock equal to 1MHz */
|
||||||
|
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
|
||||||
|
|
||||||
|
/* Initialize TIM12 */
|
||||||
|
htim12.Instance = TIM12;
|
||||||
|
|
||||||
|
/* Initialize TIMx peripheral as follow:
|
||||||
|
|
||||||
|
+ Period = [(TIM12CLK/1000) - 1]. to have a (1/1000) s time base.
|
||||||
|
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
||||||
|
+ ClockDivision = 0
|
||||||
|
+ Counter direction = Up
|
||||||
|
*/
|
||||||
|
htim12.Init.Period = (1000000U / 1000U) - 1U;
|
||||||
|
htim12.Init.Prescaler = uwPrescalerValue;
|
||||||
|
htim12.Init.ClockDivision = 0;
|
||||||
|
htim12.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim12.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
|
||||||
|
status = HAL_TIM_Base_Init(&htim12);
|
||||||
|
if (status == HAL_OK)
|
||||||
|
{
|
||||||
|
/* Start the TIM time Base generation in interrupt mode */
|
||||||
|
status = HAL_TIM_Base_Start_IT(&htim12);
|
||||||
|
if (status == HAL_OK)
|
||||||
|
{
|
||||||
|
/* Enable the TIM12 global Interrupt */
|
||||||
|
HAL_NVIC_EnableIRQ(TIM8_BRK_TIM12_IRQn);
|
||||||
|
/* Configure the SysTick IRQ priority */
|
||||||
|
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
|
||||||
|
{
|
||||||
|
/* Configure the TIM IRQ priority */
|
||||||
|
HAL_NVIC_SetPriority(TIM8_BRK_TIM12_IRQn, TickPriority, 0U);
|
||||||
|
uwTickPrio = TickPriority;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status = HAL_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return function status */
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Suspend Tick increment.
|
||||||
|
* @note Disable the tick increment by disabling TIM12 update interrupt.
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_SuspendTick(void)
|
||||||
|
{
|
||||||
|
/* Disable TIM12 update Interrupt */
|
||||||
|
__HAL_TIM_DISABLE_IT(&htim12, TIM_IT_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Resume Tick increment.
|
||||||
|
* @note Enable the tick increment by Enabling TIM12 update interrupt.
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void HAL_ResumeTick(void)
|
||||||
|
{
|
||||||
|
/* Enable TIM12 Update interrupt */
|
||||||
|
__HAL_TIM_ENABLE_IT(&htim12, TIM_IT_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,273 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file stm32f4xx_it.c
|
||||||
|
* @brief Interrupt Service Routines.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "main.h"
|
||||||
|
#include "stm32f4xx_it.h"
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "adc.h"
|
||||||
|
#include "control.h"
|
||||||
|
#include "icd.h"
|
||||||
|
extern ctrl_struct Control; //FLASH (rx)
|
||||||
|
extern icd_str ICD;
|
||||||
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN TD */
|
||||||
|
|
||||||
|
/* USER CODE END TD */
|
||||||
|
|
||||||
|
/* Private define ------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PD */
|
||||||
|
|
||||||
|
/* USER CODE END PD */
|
||||||
|
|
||||||
|
/* Private macro -------------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PM */
|
||||||
|
|
||||||
|
/* USER CODE END PM */
|
||||||
|
|
||||||
|
/* Private variables ---------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PV */
|
||||||
|
extern adc_struct adc_str;//структура ацп
|
||||||
|
/* USER CODE END PV */
|
||||||
|
|
||||||
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
|
/* Private user code ---------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
/* External variables --------------------------------------------------------*/
|
||||||
|
extern TIM_HandleTypeDef htim6;
|
||||||
|
extern DMA_HandleTypeDef hdma_usart1_tx;
|
||||||
|
extern DMA_HandleTypeDef hdma_usart1_rx;
|
||||||
|
extern UART_HandleTypeDef huart1;
|
||||||
|
extern TIM_HandleTypeDef htim12;
|
||||||
|
|
||||||
|
/* USER CODE BEGIN EV */
|
||||||
|
|
||||||
|
/* USER CODE END EV */
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Cortex-M4 Processor Interruption and Exception Handlers */
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* @brief This function handles Non maskable interrupt.
|
||||||
|
*/
|
||||||
|
void NMI_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END NonMaskableInt_IRQn 0 */
|
||||||
|
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/* USER CODE END NonMaskableInt_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles Hard fault interrupt.
|
||||||
|
*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN HardFault_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END HardFault_IRQn 0 */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
|
||||||
|
/* USER CODE END W1_HardFault_IRQn 0 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles Memory management fault.
|
||||||
|
*/
|
||||||
|
void MemManage_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END MemoryManagement_IRQn 0 */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
|
||||||
|
/* USER CODE END W1_MemoryManagement_IRQn 0 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles Pre-fetch fault, memory access fault.
|
||||||
|
*/
|
||||||
|
void BusFault_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN BusFault_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END BusFault_IRQn 0 */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN W1_BusFault_IRQn 0 */
|
||||||
|
/* USER CODE END W1_BusFault_IRQn 0 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles Undefined instruction or illegal state.
|
||||||
|
*/
|
||||||
|
void UsageFault_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN UsageFault_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END UsageFault_IRQn 0 */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */
|
||||||
|
/* USER CODE END W1_UsageFault_IRQn 0 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles Debug monitor.
|
||||||
|
*/
|
||||||
|
void DebugMon_Handler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END DebugMonitor_IRQn 0 */
|
||||||
|
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END DebugMonitor_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* STM32F4xx Peripheral Interrupt Handlers */
|
||||||
|
/* Add here the Interrupt Handlers for the used peripherals. */
|
||||||
|
/* For the available peripheral interrupt handler names, */
|
||||||
|
/* please refer to the startup file (startup_stm32f4xx.s). */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles USART1 global interrupt.
|
||||||
|
*/
|
||||||
|
void USART1_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN USART1_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_IRQn 0 */
|
||||||
|
HAL_UART_IRQHandler(&huart1);
|
||||||
|
/* USER CODE BEGIN USART1_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles TIM8 break interrupt and TIM12 global interrupt.
|
||||||
|
*/
|
||||||
|
void TIM8_BRK_TIM12_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM8_BRK_TIM12_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM8_BRK_TIM12_IRQn 0 */
|
||||||
|
HAL_TIM_IRQHandler(&htim12);
|
||||||
|
/* USER CODE BEGIN TIM8_BRK_TIM12_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM8_BRK_TIM12_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
|
||||||
|
*/
|
||||||
|
void TIM6_DAC_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM6_DAC_IRQn 0 */
|
||||||
|
static uint8_t period = 0;
|
||||||
|
/* USER CODE END TIM6_DAC_IRQn 0 */
|
||||||
|
HAL_TIM_IRQHandler(&htim6);
|
||||||
|
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
|
||||||
|
if (Control.set_mode == Sleep)
|
||||||
|
{
|
||||||
|
TIM1->CCR1 = period;
|
||||||
|
TIM1->CCR2 = 0;
|
||||||
|
TIM1->CCR3 = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ICD.work_set_mode == Monitor) //вроде зелёный
|
||||||
|
{
|
||||||
|
TIM1->CCR1 = 0;
|
||||||
|
TIM1->CCR2 = period;
|
||||||
|
TIM1->CCR3 = 0;
|
||||||
|
}
|
||||||
|
else if (ICD.work_set_mode == Normal) //вроде жёлтый
|
||||||
|
{
|
||||||
|
TIM1->CCR1 = 0;
|
||||||
|
TIM1->CCR2 = period;
|
||||||
|
TIM1->CCR3 = period;
|
||||||
|
}
|
||||||
|
else //вроде красный
|
||||||
|
{
|
||||||
|
TIM1->CCR1 = 0;
|
||||||
|
TIM1->CCR2 = period;
|
||||||
|
TIM1->CCR3 = period;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
period++;
|
||||||
|
if(period > 200) period = 0;
|
||||||
|
adc_read(&adc_str);
|
||||||
|
/* USER CODE END TIM6_DAC_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles DMA2 stream2 global interrupt.
|
||||||
|
*/
|
||||||
|
void DMA2_Stream2_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN DMA2_Stream2_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream2_IRQn 0 */
|
||||||
|
HAL_DMA_IRQHandler(&hdma_usart1_rx);
|
||||||
|
/* USER CODE BEGIN DMA2_Stream2_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream2_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles DMA2 stream7 global interrupt.
|
||||||
|
*/
|
||||||
|
void DMA2_Stream7_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN DMA2_Stream7_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream7_IRQn 0 */
|
||||||
|
HAL_DMA_IRQHandler(&hdma_usart1_tx);
|
||||||
|
/* USER CODE BEGIN DMA2_Stream7_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END DMA2_Stream7_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,176 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file syscalls.c
|
||||||
|
* @author Auto-generated by STM32CubeIDE
|
||||||
|
* @brief STM32CubeIDE Minimal System calls file
|
||||||
|
*
|
||||||
|
* For more information about which c-functions
|
||||||
|
* need which of these lowlevel functions
|
||||||
|
* please consult the Newlib libc-manual
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020-2024 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Includes */
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/times.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* Variables */
|
||||||
|
extern int __io_putchar(int ch) __attribute__((weak));
|
||||||
|
extern int __io_getchar(void) __attribute__((weak));
|
||||||
|
|
||||||
|
|
||||||
|
char *__env[1] = { 0 };
|
||||||
|
char **environ = __env;
|
||||||
|
|
||||||
|
|
||||||
|
/* Functions */
|
||||||
|
void initialise_monitor_handles()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int _getpid(void)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _kill(int pid, int sig)
|
||||||
|
{
|
||||||
|
(void)pid;
|
||||||
|
(void)sig;
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _exit (int status)
|
||||||
|
{
|
||||||
|
_kill(status, -1);
|
||||||
|
while (1) {} /* Make sure we hang here */
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) int _read(int file, char *ptr, int len)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
int DataIdx;
|
||||||
|
|
||||||
|
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||||
|
{
|
||||||
|
*ptr++ = __io_getchar();
|
||||||
|
}
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) int _write(int file, char *ptr, int len)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
int DataIdx;
|
||||||
|
|
||||||
|
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||||
|
{
|
||||||
|
__io_putchar(*ptr++);
|
||||||
|
}
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _close(int file)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int _fstat(int file, struct stat *st)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
st->st_mode = S_IFCHR;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _isatty(int file)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _lseek(int file, int ptr, int dir)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
(void)ptr;
|
||||||
|
(void)dir;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _open(char *path, int flags, ...)
|
||||||
|
{
|
||||||
|
(void)path;
|
||||||
|
(void)flags;
|
||||||
|
/* Pretend like we always fail */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _wait(int *status)
|
||||||
|
{
|
||||||
|
(void)status;
|
||||||
|
errno = ECHILD;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _unlink(char *name)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
errno = ENOENT;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _times(struct tms *buf)
|
||||||
|
{
|
||||||
|
(void)buf;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _stat(char *file, struct stat *st)
|
||||||
|
{
|
||||||
|
(void)file;
|
||||||
|
st->st_mode = S_IFCHR;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _link(char *old, char *new)
|
||||||
|
{
|
||||||
|
(void)old;
|
||||||
|
(void)new;
|
||||||
|
errno = EMLINK;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _fork(void)
|
||||||
|
{
|
||||||
|
errno = EAGAIN;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _execve(char *name, char **argv, char **env)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
(void)argv;
|
||||||
|
(void)env;
|
||||||
|
errno = ENOMEM;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file sysmem.c
|
||||||
|
* @author Generated by STM32CubeIDE
|
||||||
|
* @brief STM32CubeIDE System Memory calls file
|
||||||
|
*
|
||||||
|
* For more information about which C functions
|
||||||
|
* need which of these lowlevel functions
|
||||||
|
* please consult the newlib libc manual
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2024 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Includes */
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pointer to the current high watermark of the heap usage
|
||||||
|
*/
|
||||||
|
static uint8_t *__sbrk_heap_end = NULL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief _sbrk() allocates memory to the newlib heap and is used by malloc
|
||||||
|
* and others from the C library
|
||||||
|
*
|
||||||
|
* @verbatim
|
||||||
|
* ############################################################################
|
||||||
|
* # .data # .bss # newlib heap # MSP stack #
|
||||||
|
* # # # # Reserved by _Min_Stack_Size #
|
||||||
|
* ############################################################################
|
||||||
|
* ^-- RAM start ^-- _end _estack, RAM end --^
|
||||||
|
* @endverbatim
|
||||||
|
*
|
||||||
|
* This implementation starts allocating at the '_end' linker symbol
|
||||||
|
* The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
|
||||||
|
* The implementation considers '_estack' linker symbol to be RAM end
|
||||||
|
* NOTE: If the MSP stack, at any point during execution, grows larger than the
|
||||||
|
* reserved size, please increase the '_Min_Stack_Size'.
|
||||||
|
*
|
||||||
|
* @param incr Memory size
|
||||||
|
* @return Pointer to allocated memory
|
||||||
|
*/
|
||||||
|
void *_sbrk(ptrdiff_t incr)
|
||||||
|
{
|
||||||
|
extern uint8_t _end; /* Symbol defined in the linker script */
|
||||||
|
extern uint8_t _estack; /* Symbol defined in the linker script */
|
||||||
|
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
|
||||||
|
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
|
||||||
|
const uint8_t *max_heap = (uint8_t *)stack_limit;
|
||||||
|
uint8_t *prev_heap_end;
|
||||||
|
|
||||||
|
/* Initialize heap end at first call */
|
||||||
|
if (NULL == __sbrk_heap_end)
|
||||||
|
{
|
||||||
|
__sbrk_heap_end = &_end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Protect heap from growing into the reserved MSP stack */
|
||||||
|
if (__sbrk_heap_end + incr > max_heap)
|
||||||
|
{
|
||||||
|
errno = ENOMEM;
|
||||||
|
return (void *)-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
prev_heap_end = __sbrk_heap_end;
|
||||||
|
__sbrk_heap_end += incr;
|
||||||
|
|
||||||
|
return (void *)prev_heap_end;
|
||||||
|
}
|
||||||
@ -0,0 +1,747 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file system_stm32f4xx.c
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
|
||||||
|
*
|
||||||
|
* This file provides two functions and one global variable to be called from
|
||||||
|
* user application:
|
||||||
|
* - SystemInit(): This function is called at startup just after reset and
|
||||||
|
* before branch to main program. This call is made inside
|
||||||
|
* the "startup_stm32f4xx.s" file.
|
||||||
|
*
|
||||||
|
* - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
|
||||||
|
* by the user application to setup the SysTick
|
||||||
|
* timer or configure other parameters.
|
||||||
|
*
|
||||||
|
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
|
||||||
|
* be called whenever the core clock is changed
|
||||||
|
* during program execution.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
* @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 stm32f4xx_system
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_Includes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "stm32f4xx.h"
|
||||||
|
|
||||||
|
#if !defined (HSE_VALUE)
|
||||||
|
#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
|
||||||
|
#endif /* HSE_VALUE */
|
||||||
|
|
||||||
|
#if !defined (HSI_VALUE)
|
||||||
|
#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
|
||||||
|
#endif /* HSI_VALUE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_TypesDefinitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/************************* Miscellaneous Configuration ************************/
|
||||||
|
/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */
|
||||||
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
/* #define DATA_IN_ExtSRAM */
|
||||||
|
#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
|
||||||
|
STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/* #define DATA_IN_ExtSDRAM */
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\
|
||||||
|
STM32F479xx */
|
||||||
|
|
||||||
|
/* Note: Following vector table addresses must be defined in line with linker
|
||||||
|
configuration. */
|
||||||
|
/*!< Uncomment the following line if you need to relocate the vector table
|
||||||
|
anywhere in Flash or Sram, else the vector table is kept at the automatic
|
||||||
|
remap of boot address selected */
|
||||||
|
/* #define USER_VECT_TAB_ADDRESS */
|
||||||
|
|
||||||
|
#if defined(USER_VECT_TAB_ADDRESS)
|
||||||
|
/*!< Uncomment the following line if you need to relocate your vector Table
|
||||||
|
in Sram else user remap will be done in Flash. */
|
||||||
|
/* #define VECT_TAB_SRAM */
|
||||||
|
#if defined(VECT_TAB_SRAM)
|
||||||
|
#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
|
||||||
|
This value must be a multiple of 0x200. */
|
||||||
|
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
|
||||||
|
This value must be a multiple of 0x200. */
|
||||||
|
#else
|
||||||
|
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
|
||||||
|
This value must be a multiple of 0x200. */
|
||||||
|
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
|
||||||
|
This value must be a multiple of 0x200. */
|
||||||
|
#endif /* VECT_TAB_SRAM */
|
||||||
|
#endif /* USER_VECT_TAB_ADDRESS */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_Variables
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* This variable is updated in three ways:
|
||||||
|
1) by calling CMSIS function SystemCoreClockUpdate()
|
||||||
|
2) by calling HAL API function HAL_RCC_GetHCLKFreq()
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
uint32_t SystemCoreClock = 16000000;
|
||||||
|
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||||
|
const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
|
||||||
|
static void SystemInit_ExtMemCtl(void);
|
||||||
|
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup STM32F4xx_System_Private_Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Setup the microcontroller system
|
||||||
|
* Initialize the FPU setting, vector table location and External memory
|
||||||
|
* configuration.
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void SystemInit(void)
|
||||||
|
{
|
||||||
|
/* FPU settings ------------------------------------------------------------*/
|
||||||
|
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|
||||||
|
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
|
||||||
|
SystemInit_ExtMemCtl();
|
||||||
|
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
|
||||||
|
|
||||||
|
/* Configure the Vector Table location -------------------------------------*/
|
||||||
|
#if defined(USER_VECT_TAB_ADDRESS)
|
||||||
|
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
|
||||||
|
#endif /* USER_VECT_TAB_ADDRESS */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Update SystemCoreClock variable according to Clock Register Values.
|
||||||
|
* The SystemCoreClock variable contains the core clock (HCLK), it can
|
||||||
|
* be used by the user application to setup the SysTick timer or configure
|
||||||
|
* other parameters.
|
||||||
|
*
|
||||||
|
* @note Each time the core clock (HCLK) changes, this function must be called
|
||||||
|
* to update SystemCoreClock variable value. Otherwise, any configuration
|
||||||
|
* based on this variable will be incorrect.
|
||||||
|
*
|
||||||
|
* @note - The system frequency computed by this function is not the real
|
||||||
|
* frequency in the chip. It is calculated based on the predefined
|
||||||
|
* constant and the selected clock source:
|
||||||
|
*
|
||||||
|
* - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
|
||||||
|
*
|
||||||
|
* - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
|
||||||
|
*
|
||||||
|
* - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
|
||||||
|
* or HSI_VALUE(*) multiplied/divided by the PLL factors.
|
||||||
|
*
|
||||||
|
* (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value
|
||||||
|
* 16 MHz) but the real value may vary depending on the variations
|
||||||
|
* in voltage and temperature.
|
||||||
|
*
|
||||||
|
* (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value
|
||||||
|
* depends on the application requirements), user has to ensure that HSE_VALUE
|
||||||
|
* is same as the real frequency of the crystal used. Otherwise, this function
|
||||||
|
* may have wrong result.
|
||||||
|
*
|
||||||
|
* - The result of this function could be not correct when using fractional
|
||||||
|
* value for HSE crystal.
|
||||||
|
*
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void SystemCoreClockUpdate(void)
|
||||||
|
{
|
||||||
|
uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
|
||||||
|
|
||||||
|
/* Get SYSCLK source -------------------------------------------------------*/
|
||||||
|
tmp = RCC->CFGR & RCC_CFGR_SWS;
|
||||||
|
|
||||||
|
switch (tmp)
|
||||||
|
{
|
||||||
|
case 0x00: /* HSI used as system clock source */
|
||||||
|
SystemCoreClock = HSI_VALUE;
|
||||||
|
break;
|
||||||
|
case 0x04: /* HSE used as system clock source */
|
||||||
|
SystemCoreClock = HSE_VALUE;
|
||||||
|
break;
|
||||||
|
case 0x08: /* PLL used as system clock source */
|
||||||
|
|
||||||
|
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
|
||||||
|
SYSCLK = PLL_VCO / PLL_P
|
||||||
|
*/
|
||||||
|
pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
|
||||||
|
pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
|
||||||
|
|
||||||
|
if (pllsource != 0)
|
||||||
|
{
|
||||||
|
/* HSE used as PLL clock source */
|
||||||
|
pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* HSI used as PLL clock source */
|
||||||
|
pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
|
||||||
|
SystemCoreClock = pllvco/pllp;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
SystemCoreClock = HSI_VALUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Compute HCLK frequency --------------------------------------------------*/
|
||||||
|
/* Get HCLK prescaler */
|
||||||
|
tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
|
||||||
|
/* HCLK frequency */
|
||||||
|
SystemCoreClock >>= tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (DATA_IN_ExtSRAM) && defined (DATA_IN_ExtSDRAM)
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/**
|
||||||
|
* @brief Setup the external memory controller.
|
||||||
|
* Called in startup_stm32f4xx.s before jump to main.
|
||||||
|
* This function configures the external memories (SRAM/SDRAM)
|
||||||
|
* This SRAM/SDRAM will be used as program data memory (including heap and stack).
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void SystemInit_ExtMemCtl(void)
|
||||||
|
{
|
||||||
|
__IO uint32_t tmp = 0x00;
|
||||||
|
|
||||||
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
|
register __IO uint32_t index;
|
||||||
|
|
||||||
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
|
||||||
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
|
||||||
|
|
||||||
|
/* Connect PDx pins to FMC Alternate function */
|
||||||
|
GPIOD->AFR[0] = 0x00CCC0CC;
|
||||||
|
GPIOD->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PDx pins in Alternate function mode */
|
||||||
|
GPIOD->MODER = 0xAAAA0A8A;
|
||||||
|
/* Configure PDx pins speed to 100 MHz */
|
||||||
|
GPIOD->OSPEEDR = 0xFFFF0FCF;
|
||||||
|
/* Configure PDx pins Output type to push-pull */
|
||||||
|
GPIOD->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PDx pins */
|
||||||
|
GPIOD->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PEx pins to FMC Alternate function */
|
||||||
|
GPIOE->AFR[0] = 0xC00CC0CC;
|
||||||
|
GPIOE->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PEx pins in Alternate function mode */
|
||||||
|
GPIOE->MODER = 0xAAAA828A;
|
||||||
|
/* Configure PEx pins speed to 100 MHz */
|
||||||
|
GPIOE->OSPEEDR = 0xFFFFC3CF;
|
||||||
|
/* Configure PEx pins Output type to push-pull */
|
||||||
|
GPIOE->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PEx pins */
|
||||||
|
GPIOE->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PFx pins to FMC Alternate function */
|
||||||
|
GPIOF->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOF->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PFx pins in Alternate function mode */
|
||||||
|
GPIOF->MODER = 0xAA800AAA;
|
||||||
|
/* Configure PFx pins speed to 50 MHz */
|
||||||
|
GPIOF->OSPEEDR = 0xAA800AAA;
|
||||||
|
/* Configure PFx pins Output type to push-pull */
|
||||||
|
GPIOF->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PFx pins */
|
||||||
|
GPIOF->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PGx pins to FMC Alternate function */
|
||||||
|
GPIOG->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOG->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PGx pins in Alternate function mode */
|
||||||
|
GPIOG->MODER = 0xAAAAAAAA;
|
||||||
|
/* Configure PGx pins speed to 50 MHz */
|
||||||
|
GPIOG->OSPEEDR = 0xAAAAAAAA;
|
||||||
|
/* Configure PGx pins Output type to push-pull */
|
||||||
|
GPIOG->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PGx pins */
|
||||||
|
GPIOG->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PHx pins to FMC Alternate function */
|
||||||
|
GPIOH->AFR[0] = 0x00C0CC00;
|
||||||
|
GPIOH->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PHx pins in Alternate function mode */
|
||||||
|
GPIOH->MODER = 0xAAAA08A0;
|
||||||
|
/* Configure PHx pins speed to 50 MHz */
|
||||||
|
GPIOH->OSPEEDR = 0xAAAA08A0;
|
||||||
|
/* Configure PHx pins Output type to push-pull */
|
||||||
|
GPIOH->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PHx pins */
|
||||||
|
GPIOH->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PIx pins to FMC Alternate function */
|
||||||
|
GPIOI->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOI->AFR[1] = 0x00000CC0;
|
||||||
|
/* Configure PIx pins in Alternate function mode */
|
||||||
|
GPIOI->MODER = 0x0028AAAA;
|
||||||
|
/* Configure PIx pins speed to 50 MHz */
|
||||||
|
GPIOI->OSPEEDR = 0x0028AAAA;
|
||||||
|
/* Configure PIx pins Output type to push-pull */
|
||||||
|
GPIOI->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PIx pins */
|
||||||
|
GPIOI->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/*-- FMC Configuration -------------------------------------------------------*/
|
||||||
|
/* Enable the FMC interface clock */
|
||||||
|
RCC->AHB3ENR |= 0x00000001;
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
|
||||||
|
|
||||||
|
FMC_Bank5_6->SDCR[0] = 0x000019E4;
|
||||||
|
FMC_Bank5_6->SDTR[0] = 0x01115351;
|
||||||
|
|
||||||
|
/* SDRAM initialization sequence */
|
||||||
|
/* Clock enable command */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000011;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delay */
|
||||||
|
for (index = 0; index<1000; index++);
|
||||||
|
|
||||||
|
/* PALL command */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000012;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Auto refresh command */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000073;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MRD register program */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00046014;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set refresh count */
|
||||||
|
tmpreg = FMC_Bank5_6->SDRTR;
|
||||||
|
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
|
||||||
|
|
||||||
|
/* Disable write protection */
|
||||||
|
tmpreg = FMC_Bank5_6->SDCR[0];
|
||||||
|
FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
|
||||||
|
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
|
FMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
|
||||||
|
#if defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FMC_Bank1->BTCR[2] = 0x00001091;
|
||||||
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
|
|
||||||
|
(void)(tmp);
|
||||||
|
}
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
||||||
|
#elif defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
|
||||||
|
/**
|
||||||
|
* @brief Setup the external memory controller.
|
||||||
|
* Called in startup_stm32f4xx.s before jump to main.
|
||||||
|
* This function configures the external memories (SRAM/SDRAM)
|
||||||
|
* This SRAM/SDRAM will be used as program data memory (including heap and stack).
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void SystemInit_ExtMemCtl(void)
|
||||||
|
{
|
||||||
|
__IO uint32_t tmp = 0x00;
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
#if defined (DATA_IN_ExtSDRAM)
|
||||||
|
register uint32_t tmpreg = 0, timeout = 0xFFFF;
|
||||||
|
register __IO uint32_t index;
|
||||||
|
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
/* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
|
||||||
|
clock */
|
||||||
|
RCC->AHB1ENR |= 0x0000007D;
|
||||||
|
#else
|
||||||
|
/* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface
|
||||||
|
clock */
|
||||||
|
RCC->AHB1ENR |= 0x000001F8;
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
|
||||||
|
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
/* Connect PAx pins to FMC Alternate function */
|
||||||
|
GPIOA->AFR[0] |= 0xC0000000;
|
||||||
|
GPIOA->AFR[1] |= 0x00000000;
|
||||||
|
/* Configure PDx pins in Alternate function mode */
|
||||||
|
GPIOA->MODER |= 0x00008000;
|
||||||
|
/* Configure PDx pins speed to 50 MHz */
|
||||||
|
GPIOA->OSPEEDR |= 0x00008000;
|
||||||
|
/* Configure PDx pins Output type to push-pull */
|
||||||
|
GPIOA->OTYPER |= 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PDx pins */
|
||||||
|
GPIOA->PUPDR |= 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PCx pins to FMC Alternate function */
|
||||||
|
GPIOC->AFR[0] |= 0x00CC0000;
|
||||||
|
GPIOC->AFR[1] |= 0x00000000;
|
||||||
|
/* Configure PDx pins in Alternate function mode */
|
||||||
|
GPIOC->MODER |= 0x00000A00;
|
||||||
|
/* Configure PDx pins speed to 50 MHz */
|
||||||
|
GPIOC->OSPEEDR |= 0x00000A00;
|
||||||
|
/* Configure PDx pins Output type to push-pull */
|
||||||
|
GPIOC->OTYPER |= 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PDx pins */
|
||||||
|
GPIOC->PUPDR |= 0x00000000;
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
|
||||||
|
/* Connect PDx pins to FMC Alternate function */
|
||||||
|
GPIOD->AFR[0] = 0x000000CC;
|
||||||
|
GPIOD->AFR[1] = 0xCC000CCC;
|
||||||
|
/* Configure PDx pins in Alternate function mode */
|
||||||
|
GPIOD->MODER = 0xA02A000A;
|
||||||
|
/* Configure PDx pins speed to 50 MHz */
|
||||||
|
GPIOD->OSPEEDR = 0xA02A000A;
|
||||||
|
/* Configure PDx pins Output type to push-pull */
|
||||||
|
GPIOD->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PDx pins */
|
||||||
|
GPIOD->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PEx pins to FMC Alternate function */
|
||||||
|
GPIOE->AFR[0] = 0xC00000CC;
|
||||||
|
GPIOE->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PEx pins in Alternate function mode */
|
||||||
|
GPIOE->MODER = 0xAAAA800A;
|
||||||
|
/* Configure PEx pins speed to 50 MHz */
|
||||||
|
GPIOE->OSPEEDR = 0xAAAA800A;
|
||||||
|
/* Configure PEx pins Output type to push-pull */
|
||||||
|
GPIOE->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PEx pins */
|
||||||
|
GPIOE->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PFx pins to FMC Alternate function */
|
||||||
|
GPIOF->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOF->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PFx pins in Alternate function mode */
|
||||||
|
GPIOF->MODER = 0xAA800AAA;
|
||||||
|
/* Configure PFx pins speed to 50 MHz */
|
||||||
|
GPIOF->OSPEEDR = 0xAA800AAA;
|
||||||
|
/* Configure PFx pins Output type to push-pull */
|
||||||
|
GPIOF->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PFx pins */
|
||||||
|
GPIOF->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PGx pins to FMC Alternate function */
|
||||||
|
GPIOG->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOG->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PGx pins in Alternate function mode */
|
||||||
|
GPIOG->MODER = 0xAAAAAAAA;
|
||||||
|
/* Configure PGx pins speed to 50 MHz */
|
||||||
|
GPIOG->OSPEEDR = 0xAAAAAAAA;
|
||||||
|
/* Configure PGx pins Output type to push-pull */
|
||||||
|
GPIOG->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PGx pins */
|
||||||
|
GPIOG->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/* Connect PHx pins to FMC Alternate function */
|
||||||
|
GPIOH->AFR[0] = 0x00C0CC00;
|
||||||
|
GPIOH->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PHx pins in Alternate function mode */
|
||||||
|
GPIOH->MODER = 0xAAAA08A0;
|
||||||
|
/* Configure PHx pins speed to 50 MHz */
|
||||||
|
GPIOH->OSPEEDR = 0xAAAA08A0;
|
||||||
|
/* Configure PHx pins Output type to push-pull */
|
||||||
|
GPIOH->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PHx pins */
|
||||||
|
GPIOH->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PIx pins to FMC Alternate function */
|
||||||
|
GPIOI->AFR[0] = 0xCCCCCCCC;
|
||||||
|
GPIOI->AFR[1] = 0x00000CC0;
|
||||||
|
/* Configure PIx pins in Alternate function mode */
|
||||||
|
GPIOI->MODER = 0x0028AAAA;
|
||||||
|
/* Configure PIx pins speed to 50 MHz */
|
||||||
|
GPIOI->OSPEEDR = 0x0028AAAA;
|
||||||
|
/* Configure PIx pins Output type to push-pull */
|
||||||
|
GPIOI->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PIx pins */
|
||||||
|
GPIOI->PUPDR = 0x00000000;
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
|
||||||
|
|
||||||
|
/*-- FMC Configuration -------------------------------------------------------*/
|
||||||
|
/* Enable the FMC interface clock */
|
||||||
|
RCC->AHB3ENR |= 0x00000001;
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
|
||||||
|
|
||||||
|
/* Configure and enable SDRAM bank1 */
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
FMC_Bank5_6->SDCR[0] = 0x00001954;
|
||||||
|
#else
|
||||||
|
FMC_Bank5_6->SDCR[0] = 0x000019E4;
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
FMC_Bank5_6->SDTR[0] = 0x01115351;
|
||||||
|
|
||||||
|
/* SDRAM initialization sequence */
|
||||||
|
/* Clock enable command */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000011;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delay */
|
||||||
|
for (index = 0; index<1000; index++);
|
||||||
|
|
||||||
|
/* PALL command */
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000012;
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Auto refresh command */
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
FMC_Bank5_6->SDCMR = 0x000000F3;
|
||||||
|
#else
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00000073;
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MRD register program */
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00044014;
|
||||||
|
#else
|
||||||
|
FMC_Bank5_6->SDCMR = 0x00046014;
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
timeout = 0xFFFF;
|
||||||
|
while((tmpreg != 0) && (timeout-- > 0))
|
||||||
|
{
|
||||||
|
tmpreg = FMC_Bank5_6->SDSR & 0x00000020;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set refresh count */
|
||||||
|
tmpreg = FMC_Bank5_6->SDRTR;
|
||||||
|
#if defined(STM32F446xx)
|
||||||
|
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C<<1));
|
||||||
|
#else
|
||||||
|
FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
|
||||||
|
#endif /* STM32F446xx */
|
||||||
|
|
||||||
|
/* Disable write protection */
|
||||||
|
tmpreg = FMC_Bank5_6->SDCR[0];
|
||||||
|
FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
|
||||||
|
#endif /* DATA_IN_ExtSDRAM */
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
|
||||||
|
|
||||||
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
|
||||||
|
|| defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
|
||||||
|
#if defined(DATA_IN_ExtSRAM)
|
||||||
|
/*-- GPIOs Configuration -----------------------------------------------------*/
|
||||||
|
/* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */
|
||||||
|
RCC->AHB1ENR |= 0x00000078;
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);
|
||||||
|
|
||||||
|
/* Connect PDx pins to FMC Alternate function */
|
||||||
|
GPIOD->AFR[0] = 0x00CCC0CC;
|
||||||
|
GPIOD->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PDx pins in Alternate function mode */
|
||||||
|
GPIOD->MODER = 0xAAAA0A8A;
|
||||||
|
/* Configure PDx pins speed to 100 MHz */
|
||||||
|
GPIOD->OSPEEDR = 0xFFFF0FCF;
|
||||||
|
/* Configure PDx pins Output type to push-pull */
|
||||||
|
GPIOD->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PDx pins */
|
||||||
|
GPIOD->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PEx pins to FMC Alternate function */
|
||||||
|
GPIOE->AFR[0] = 0xC00CC0CC;
|
||||||
|
GPIOE->AFR[1] = 0xCCCCCCCC;
|
||||||
|
/* Configure PEx pins in Alternate function mode */
|
||||||
|
GPIOE->MODER = 0xAAAA828A;
|
||||||
|
/* Configure PEx pins speed to 100 MHz */
|
||||||
|
GPIOE->OSPEEDR = 0xFFFFC3CF;
|
||||||
|
/* Configure PEx pins Output type to push-pull */
|
||||||
|
GPIOE->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PEx pins */
|
||||||
|
GPIOE->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PFx pins to FMC Alternate function */
|
||||||
|
GPIOF->AFR[0] = 0x00CCCCCC;
|
||||||
|
GPIOF->AFR[1] = 0xCCCC0000;
|
||||||
|
/* Configure PFx pins in Alternate function mode */
|
||||||
|
GPIOF->MODER = 0xAA000AAA;
|
||||||
|
/* Configure PFx pins speed to 100 MHz */
|
||||||
|
GPIOF->OSPEEDR = 0xFF000FFF;
|
||||||
|
/* Configure PFx pins Output type to push-pull */
|
||||||
|
GPIOF->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PFx pins */
|
||||||
|
GPIOF->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/* Connect PGx pins to FMC Alternate function */
|
||||||
|
GPIOG->AFR[0] = 0x00CCCCCC;
|
||||||
|
GPIOG->AFR[1] = 0x000000C0;
|
||||||
|
/* Configure PGx pins in Alternate function mode */
|
||||||
|
GPIOG->MODER = 0x00085AAA;
|
||||||
|
/* Configure PGx pins speed to 100 MHz */
|
||||||
|
GPIOG->OSPEEDR = 0x000CAFFF;
|
||||||
|
/* Configure PGx pins Output type to push-pull */
|
||||||
|
GPIOG->OTYPER = 0x00000000;
|
||||||
|
/* No pull-up, pull-down for PGx pins */
|
||||||
|
GPIOG->PUPDR = 0x00000000;
|
||||||
|
|
||||||
|
/*-- FMC/FSMC Configuration --------------------------------------------------*/
|
||||||
|
/* Enable the FMC/FSMC interface clock */
|
||||||
|
RCC->AHB3ENR |= 0x00000001;
|
||||||
|
|
||||||
|
#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
|
FMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
|
#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
|
||||||
|
#if defined(STM32F469xx) || defined(STM32F479xx)
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FMC_Bank1->BTCR[2] = 0x00001091;
|
||||||
|
FMC_Bank1->BTCR[3] = 0x00110212;
|
||||||
|
FMC_Bank1E->BWTR[2] = 0x0fffffff;
|
||||||
|
#endif /* STM32F469xx || STM32F479xx */
|
||||||
|
#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
|
||||||
|
|| defined(STM32F412Zx) || defined(STM32F412Vx)
|
||||||
|
/* Delay after an RCC peripheral clock enabling */
|
||||||
|
tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
|
||||||
|
/* Configure and enable Bank1_SRAM2 */
|
||||||
|
FSMC_Bank1->BTCR[2] = 0x00001011;
|
||||||
|
FSMC_Bank1->BTCR[3] = 0x00000201;
|
||||||
|
FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
|
||||||
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
|
||||||
|
#endif /* DATA_IN_ExtSRAM */
|
||||||
|
#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
|
||||||
|
STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */
|
||||||
|
(void)(tmp);
|
||||||
|
}
|
||||||
|
#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
@ -0,0 +1,709 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file tim.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of the TIM instances.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "tim.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
TIM_HandleTypeDef htim1;
|
||||||
|
TIM_HandleTypeDef htim2;
|
||||||
|
TIM_HandleTypeDef htim3;
|
||||||
|
TIM_HandleTypeDef htim4;
|
||||||
|
TIM_HandleTypeDef htim6;
|
||||||
|
TIM_HandleTypeDef htim9;
|
||||||
|
TIM_HandleTypeDef htim14;
|
||||||
|
|
||||||
|
/* TIM1 init function */
|
||||||
|
void MX_TIM1_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM1_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_Init 0 */
|
||||||
|
|
||||||
|
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||||
|
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM1_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_Init 1 */
|
||||||
|
htim1.Instance = TIM1;
|
||||||
|
htim1.Init.Prescaler = 1;
|
||||||
|
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim1.Init.Period = 200;
|
||||||
|
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim1.Init.RepetitionCounter = 0;
|
||||||
|
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||||
|
if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||||
|
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||||
|
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
|
||||||
|
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||||
|
sBreakDeadTimeConfig.DeadTime = 0;
|
||||||
|
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
|
||||||
|
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
|
||||||
|
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
|
||||||
|
if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM1_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim1);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM2 init function */
|
||||||
|
void MX_TIM2_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM2_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_Init 0 */
|
||||||
|
|
||||||
|
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||||
|
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM2_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_Init 1 */
|
||||||
|
htim2.Instance = TIM2;
|
||||||
|
htim2.Init.Prescaler = 0;
|
||||||
|
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim2.Init.Period = 3000;
|
||||||
|
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||||
|
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||||
|
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||||
|
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM2;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM2_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim2);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM3 init function */
|
||||||
|
void MX_TIM3_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM3_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_Init 0 */
|
||||||
|
|
||||||
|
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||||
|
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM3_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_Init 1 */
|
||||||
|
htim3.Instance = TIM3;
|
||||||
|
htim3.Init.Prescaler = 0;
|
||||||
|
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim3.Init.Period = 3000;
|
||||||
|
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||||
|
if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||||
|
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||||
|
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM2;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM3_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim3);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM4 init function */
|
||||||
|
void MX_TIM4_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM4_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_Init 0 */
|
||||||
|
|
||||||
|
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||||
|
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM4_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_Init 1 */
|
||||||
|
htim4.Instance = TIM4;
|
||||||
|
htim4.Init.Prescaler = 0;
|
||||||
|
htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim4.Init.Period = 3000;
|
||||||
|
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||||
|
if (HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim4) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||||
|
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||||
|
if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM2;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM4_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim4);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM6 init function */
|
||||||
|
void MX_TIM6_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM6_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_Init 0 */
|
||||||
|
|
||||||
|
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM6_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_Init 1 */
|
||||||
|
htim6.Instance = TIM6;
|
||||||
|
htim6.Init.Prescaler = 2;
|
||||||
|
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim6.Init.Period = 39999;
|
||||||
|
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim6) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||||
|
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||||
|
if (HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM6_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM9 init function */
|
||||||
|
void MX_TIM9_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM9_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_Init 0 */
|
||||||
|
|
||||||
|
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||||
|
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM9_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_Init 1 */
|
||||||
|
htim9.Instance = TIM9;
|
||||||
|
htim9.Init.Prescaler = 99;
|
||||||
|
htim9.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim9.Init.Period = 200;
|
||||||
|
htim9.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim9.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim9) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||||
|
if (HAL_TIM_ConfigClockSource(&htim9, &sClockSourceConfig) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
if (HAL_TIM_PWM_Init(&htim9) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||||
|
sConfigOC.Pulse = 0;
|
||||||
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
|
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||||
|
if (HAL_TIM_PWM_ConfigChannel(&htim9, &sConfigOC, TIM_CHANNEL_2) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM9_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_Init 2 */
|
||||||
|
HAL_TIM_MspPostInit(&htim9);
|
||||||
|
|
||||||
|
}
|
||||||
|
/* TIM14 init function */
|
||||||
|
void MX_TIM14_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM14_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM14_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_Init 1 */
|
||||||
|
htim14.Instance = TIM14;
|
||||||
|
htim14.Init.Prescaler = 0;
|
||||||
|
htim14.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
|
htim14.Init.Period = 65535;
|
||||||
|
htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
|
htim14.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||||
|
if (HAL_TIM_Base_Init(&htim14) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN TIM14_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(tim_baseHandle->Instance==TIM1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM1_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspInit 0 */
|
||||||
|
/* TIM1 clock enable */
|
||||||
|
__HAL_RCC_TIM1_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM1_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM2)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM2_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspInit 0 */
|
||||||
|
/* TIM2 clock enable */
|
||||||
|
__HAL_RCC_TIM2_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM2_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM3)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM3_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspInit 0 */
|
||||||
|
/* TIM3 clock enable */
|
||||||
|
__HAL_RCC_TIM3_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM3_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM4)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM4_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspInit 0 */
|
||||||
|
/* TIM4 clock enable */
|
||||||
|
__HAL_RCC_TIM4_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM4_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM6)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM6_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_MspInit 0 */
|
||||||
|
/* TIM6 clock enable */
|
||||||
|
__HAL_RCC_TIM6_CLK_ENABLE();
|
||||||
|
|
||||||
|
/* TIM6 interrupt Init */
|
||||||
|
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
|
||||||
|
/* USER CODE BEGIN TIM6_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM9)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM9_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspInit 0 */
|
||||||
|
/* TIM9 clock enable */
|
||||||
|
__HAL_RCC_TIM9_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM9_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM14)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM14_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_MspInit 0 */
|
||||||
|
/* TIM14 clock enable */
|
||||||
|
__HAL_RCC_TIM14_CLK_ENABLE();
|
||||||
|
/* USER CODE BEGIN TIM14_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_MspInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
if(timHandle->Instance==TIM1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM1_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspPostInit 0 */
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
/**TIM1 GPIO Configuration
|
||||||
|
PE9 ------> TIM1_CH1
|
||||||
|
PE11 ------> TIM1_CH2
|
||||||
|
PE13 ------> TIM1_CH3
|
||||||
|
PE14 ------> TIM1_CH4
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = RED_PWM_Pin|GREEN_PWM_Pin|BLUE_PWM_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
|
||||||
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = HV_PWM_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
|
||||||
|
HAL_GPIO_Init(HV_PWM_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM1_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
else if(timHandle->Instance==TIM2)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM2_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
/**TIM2 GPIO Configuration
|
||||||
|
PA1 ------> TIM2_CH2
|
||||||
|
PA2 ------> TIM2_CH3
|
||||||
|
PA3 ------> TIM2_CH4
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = RV_PWM_1_Pin|RV_PWM_2_Pin|RV_PWM_3_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM2_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
else if(timHandle->Instance==TIM3)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM3_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
/**TIM3 GPIO Configuration
|
||||||
|
PC6 ------> TIM3_CH1
|
||||||
|
PC7 ------> TIM3_CH2
|
||||||
|
PC8 ------> TIM3_CH3
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = LV_PWM_1_Pin|LV_PWM_2_Pin|LV_PWM_3_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
|
||||||
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM3_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
else if(timHandle->Instance==TIM4)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM4_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
|
/**TIM4 GPIO Configuration
|
||||||
|
PB6 ------> TIM4_CH1
|
||||||
|
PB7 ------> TIM4_CH2
|
||||||
|
PB8 ------> TIM4_CH3
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = RA_PWM_1_Pin|RA_PWM_2_Pin|RA_PWM_3_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM4_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
else if(timHandle->Instance==TIM9)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM9_MspPostInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspPostInit 0 */
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||||
|
/**TIM9 GPIO Configuration
|
||||||
|
PE6 ------> TIM9_CH2
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = BUZ_PWM_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF3_TIM9;
|
||||||
|
HAL_GPIO_Init(BUZ_PWM_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USER CODE BEGIN TIM9_MspPostInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspPostInit 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(tim_baseHandle->Instance==TIM1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM1_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM1_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM1_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM1_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM2)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM2_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM2_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM2_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM2_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM3)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM3_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM3_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM3_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM3_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM4)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM4_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM4_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM4_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM4_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM6)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM6_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM6_CLK_DISABLE();
|
||||||
|
|
||||||
|
/* TIM6 interrupt Deinit */
|
||||||
|
HAL_NVIC_DisableIRQ(TIM6_DAC_IRQn);
|
||||||
|
/* USER CODE BEGIN TIM6_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM6_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM9)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM9_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM9_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM9_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM9_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
else if(tim_baseHandle->Instance==TIM14)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN TIM14_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_TIM14_CLK_DISABLE();
|
||||||
|
/* USER CODE BEGIN TIM14_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END TIM14_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,467 @@
|
|||||||
|
/* USER CODE BEGIN Header */
|
||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file usart.c
|
||||||
|
* @brief This file provides code for the configuration
|
||||||
|
* of the USART instances.
|
||||||
|
******************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
/* USER CODE END Header */
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "usart.h"
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 0 */
|
||||||
|
extern adc_struct adc_str;//структура ацп
|
||||||
|
uint8_t TX_BUF[TX_PLOAD_WIDTH+1];
|
||||||
|
uint8_t MESH_BUF[MESH_PLOAD_WIDTH+1];
|
||||||
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
|
UART_HandleTypeDef huart1;
|
||||||
|
DMA_HandleTypeDef hdma_usart1_tx;
|
||||||
|
DMA_HandleTypeDef hdma_usart1_rx;
|
||||||
|
|
||||||
|
/* USART1 init function */
|
||||||
|
|
||||||
|
void MX_USART1_UART_Init(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* USER CODE BEGIN USART1_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_Init 0 */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN USART1_Init 1 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_Init 1 */
|
||||||
|
huart1.Instance = USART1;
|
||||||
|
huart1.Init.BaudRate = 115200;
|
||||||
|
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
||||||
|
huart1.Init.StopBits = UART_STOPBITS_1;
|
||||||
|
huart1.Init.Parity = UART_PARITY_NONE;
|
||||||
|
huart1.Init.Mode = UART_MODE_TX_RX;
|
||||||
|
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
|
||||||
|
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
|
||||||
|
if (HAL_UART_Init(&huart1) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
/* USER CODE BEGIN USART1_Init 2 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_Init 2 */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
|
if(uartHandle->Instance==USART1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN USART1_MspInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_MspInit 0 */
|
||||||
|
/* USART1 clock enable */
|
||||||
|
__HAL_RCC_USART1_CLK_ENABLE();
|
||||||
|
|
||||||
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
|
/**USART1 GPIO Configuration
|
||||||
|
PA9 ------> USART1_TX
|
||||||
|
PA10 ------> USART1_RX
|
||||||
|
*/
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* USART1 DMA Init */
|
||||||
|
/* USART1_TX Init */
|
||||||
|
hdma_usart1_tx.Instance = DMA2_Stream7;
|
||||||
|
hdma_usart1_tx.Init.Channel = DMA_CHANNEL_4;
|
||||||
|
hdma_usart1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
|
||||||
|
hdma_usart1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||||
|
hdma_usart1_tx.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
|
hdma_usart1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||||
|
hdma_usart1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||||
|
hdma_usart1_tx.Init.Mode = DMA_NORMAL;
|
||||||
|
hdma_usart1_tx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
|
hdma_usart1_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
||||||
|
if (HAL_DMA_Init(&hdma_usart1_tx) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
__HAL_LINKDMA(uartHandle,hdmatx,hdma_usart1_tx);
|
||||||
|
|
||||||
|
/* USART1_RX Init */
|
||||||
|
hdma_usart1_rx.Instance = DMA2_Stream2;
|
||||||
|
hdma_usart1_rx.Init.Channel = DMA_CHANNEL_4;
|
||||||
|
hdma_usart1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||||
|
hdma_usart1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||||
|
hdma_usart1_rx.Init.MemInc = DMA_MINC_ENABLE;
|
||||||
|
hdma_usart1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||||
|
hdma_usart1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||||
|
hdma_usart1_rx.Init.Mode = DMA_NORMAL;
|
||||||
|
hdma_usart1_rx.Init.Priority = DMA_PRIORITY_LOW;
|
||||||
|
hdma_usart1_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
|
||||||
|
if (HAL_DMA_Init(&hdma_usart1_rx) != HAL_OK)
|
||||||
|
{
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
__HAL_LINKDMA(uartHandle,hdmarx,hdma_usart1_rx);
|
||||||
|
|
||||||
|
/* USART1 interrupt Init */
|
||||||
|
HAL_NVIC_SetPriority(USART1_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(USART1_IRQn);
|
||||||
|
/* USER CODE BEGIN USART1_MspInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_MspInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(uartHandle->Instance==USART1)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN USART1_MspDeInit 0 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_MspDeInit 0 */
|
||||||
|
/* Peripheral clock disable */
|
||||||
|
__HAL_RCC_USART1_CLK_DISABLE();
|
||||||
|
|
||||||
|
/**USART1 GPIO Configuration
|
||||||
|
PA9 ------> USART1_TX
|
||||||
|
PA10 ------> USART1_RX
|
||||||
|
*/
|
||||||
|
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
|
||||||
|
|
||||||
|
/* USART1 DMA DeInit */
|
||||||
|
HAL_DMA_DeInit(uartHandle->hdmatx);
|
||||||
|
HAL_DMA_DeInit(uartHandle->hdmarx);
|
||||||
|
|
||||||
|
/* USART1 interrupt Deinit */
|
||||||
|
HAL_NVIC_DisableIRQ(USART1_IRQn);
|
||||||
|
/* USER CODE BEGIN USART1_MspDeInit 1 */
|
||||||
|
|
||||||
|
/* USER CODE END USART1_MspDeInit 1 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 1 */
|
||||||
|
void print_usart(const char *pFormat, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
static char tbuff[256];
|
||||||
|
static HAL_StatusTypeDef res;
|
||||||
|
// Forward call to vsprintf
|
||||||
|
va_start(ap, pFormat);
|
||||||
|
vsprintf(tbuff, pFormat, ap);
|
||||||
|
// HAL_UART_Transmit(&huart1, (unsigned char*)tbuff, strlen(tbuff), 10);
|
||||||
|
res = HAL_UART_Transmit_DMA(&huart1, (unsigned char*)tbuff, strlen(tbuff));
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ble_control(ctrl_struct* control)
|
||||||
|
{
|
||||||
|
if(control->ble_mode_now != control->ble_mode_set)
|
||||||
|
{
|
||||||
|
if(control->ble_mode_set == ble_off)
|
||||||
|
{
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, SET);
|
||||||
|
control->ble_mode_now = ble_off;
|
||||||
|
}
|
||||||
|
if(control->ble_mode_set == ble_raw)
|
||||||
|
{
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, SET);
|
||||||
|
HAL_GPIO_WritePin(BLE_PWRC_GPIO_Port, BLE_PWRC_Pin, RESET);
|
||||||
|
HAL_Delay(100);
|
||||||
|
control->ble_mode_now = ble_off;
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, RESET);
|
||||||
|
HAL_Delay(2000);
|
||||||
|
// print_usart("AT+ROLE6\r\n");//это режим мастер-слейв в нем устройство потребляет 1мА
|
||||||
|
// HAL_Delay(200);
|
||||||
|
// print_usart("AT+NAMEIIcd_%04x\r\n",control->serial_number);//set name
|
||||||
|
// HAL_Delay(200);
|
||||||
|
// print_usart("AT+TYPE1\r\n");//slave
|
||||||
|
// HAL_Delay(200);
|
||||||
|
// print_usart("AT+PIN%06d\r\n",control->password);//slave
|
||||||
|
// HAL_Delay(200);
|
||||||
|
// print_usart("AT+BAUD8\r\n");//slave
|
||||||
|
// HAL_Delay(200);
|
||||||
|
// print_usart("AT+RESET\r\n");//подтверждение настроек
|
||||||
|
// HAL_Delay(1000);
|
||||||
|
HAL_GPIO_WritePin(BLE_PWRC_GPIO_Port, BLE_PWRC_Pin, SET);
|
||||||
|
control->ble_mode_now = ble_raw;
|
||||||
|
}
|
||||||
|
if(control->ble_mode_set == ble_mesh)
|
||||||
|
{
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, SET);
|
||||||
|
HAL_GPIO_WritePin(BLE_PWRC_GPIO_Port, BLE_PWRC_Pin, RESET);
|
||||||
|
HAL_Delay(100);
|
||||||
|
control->ble_mode_now = ble_off;
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, RESET);
|
||||||
|
HAL_Delay(2000);
|
||||||
|
print_usart("AT+ROLE5\r\n");//в режиме MESH 4мА
|
||||||
|
HAL_Delay(100);
|
||||||
|
print_usart("AT+MADDR%04x\r\n",control->serial_number);//адрес в сети должен быть разным у всех устройств сети
|
||||||
|
HAL_Delay(100);
|
||||||
|
print_usart("AT+NETID%04x\r\n",control->mesh_netid);//номер сети должен быть одним у всех устройсв сети
|
||||||
|
HAL_Delay(100);
|
||||||
|
print_usart("AT+NAMEECG_MESH_%04x\r\n",control->serial_number);//set name
|
||||||
|
HAL_Delay(100);
|
||||||
|
print_usart("AT+RESET\r\n");//подтверждение настроек
|
||||||
|
HAL_Delay(1000);
|
||||||
|
HAL_GPIO_WritePin(BLE_PWRC_GPIO_Port, BLE_PWRC_Pin, SET);
|
||||||
|
control->ble_mode_now = ble_mesh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void ble_deinit(void)
|
||||||
|
{
|
||||||
|
HAL_GPIO_WritePin(BLE_PWR_GPIO_Port, BLE_PWR_Pin, SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void float2Bytes(float float_variable,uint8_t bytes_temp[4])
|
||||||
|
{
|
||||||
|
memcpy(bytes_temp, (unsigned char*) (&float_variable), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ble_HEX_new(ctrl_struct *control, icd_str *icd_str, adc_struct *adc, bool send)
|
||||||
|
{
|
||||||
|
TX_BUF[0] = 0x55; //стартовый байт
|
||||||
|
|
||||||
|
static uint8_t bytes[4];
|
||||||
|
|
||||||
|
TX_BUF[1] = (icd_str->counter >> 24) & 0xFF;
|
||||||
|
TX_BUF[2] = (icd_str->counter >> 16) & 0xFF;
|
||||||
|
TX_BUF[3] = (icd_str->counter >> 8) & 0xFF;
|
||||||
|
TX_BUF[4] = (icd_str->counter & 0xFF);
|
||||||
|
|
||||||
|
float2Bytes(icd_str->ecg_rv_din_treshold, &bytes[0]); //fixme временно
|
||||||
|
|
||||||
|
TX_BUF[5] = bytes[0];
|
||||||
|
TX_BUF[6] = bytes[1];
|
||||||
|
TX_BUF[7] = bytes[2];
|
||||||
|
TX_BUF[8] = bytes[3];
|
||||||
|
|
||||||
|
float2Bytes(icd_str->ecg_rv_pos_sig, &bytes[0]);
|
||||||
|
|
||||||
|
TX_BUF[9] = bytes[0];
|
||||||
|
TX_BUF[10] = bytes[1];
|
||||||
|
TX_BUF[11] = bytes[2];
|
||||||
|
TX_BUF[12] = bytes[3];
|
||||||
|
|
||||||
|
if (icd_str->dc_cut)
|
||||||
|
float2Bytes((icd_str->ecg_rv_filt - icd_str->ecg_rv_mov_av), &bytes[0]);
|
||||||
|
else
|
||||||
|
float2Bytes((icd_str->ecg_rv_filt), &bytes[0]);
|
||||||
|
|
||||||
|
TX_BUF[13] = bytes[0];
|
||||||
|
TX_BUF[14] = bytes[1];
|
||||||
|
TX_BUF[15] = bytes[2];
|
||||||
|
TX_BUF[16] = bytes[3];
|
||||||
|
|
||||||
|
TX_BUF[17] = ((icd_str->last_RR_poz_rel * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[18] = ((icd_str->last_RR_poz_rel * 5) & 0xFF);
|
||||||
|
|
||||||
|
TX_BUF[19] = (((uint8_t) icd_str->search_now_mode & 0x7) << 5) | (((uint8_t) icd_str->sub_mode & 0x7) << 2)
|
||||||
|
| (((uint8_t) icd_str->terapy_now & 0x3) << 0);
|
||||||
|
|
||||||
|
TX_BUF[20] = (((uint8_t) icd_str->filter_on & 0x1) << 7) | (((uint8_t) icd_str->work_set_mode & 0x3) << 5)
|
||||||
|
| (((uint8_t) icd_str->LV_on & 0x1) << 4) | (((uint8_t) icd_str->HV_on & 0x1) << 3)
|
||||||
|
| (((uint8_t) icd_str->rr_now & 0x1) << 2) | (((uint8_t) icd_str->last_QRS & 0x3) << 0);
|
||||||
|
|
||||||
|
//не будем выпендриваться займём 8последних байт
|
||||||
|
if (icd_str->counter % 12 == 0)
|
||||||
|
{
|
||||||
|
float2Bytes(icd_str->min_tres, &bytes[0]);
|
||||||
|
TX_BUF[23] = bytes[0];
|
||||||
|
TX_BUF[24] = bytes[1];
|
||||||
|
TX_BUF[25] = bytes[2];
|
||||||
|
TX_BUF[26] = bytes[3];
|
||||||
|
|
||||||
|
float2Bytes(icd_str->max_tres, &bytes[0]); //fixme временно
|
||||||
|
TX_BUF[27] = bytes[0];
|
||||||
|
TX_BUF[28] = bytes[1];
|
||||||
|
TX_BUF[29] = bytes[2];
|
||||||
|
TX_BUF[30] = bytes[3];
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 1)
|
||||||
|
{
|
||||||
|
float2Bytes(icd_str->square_coef, &bytes[0]);
|
||||||
|
TX_BUF[23] = bytes[0];
|
||||||
|
TX_BUF[24] = bytes[1];
|
||||||
|
TX_BUF[25] = bytes[2];
|
||||||
|
TX_BUF[26] = bytes[3];
|
||||||
|
|
||||||
|
float2Bytes(icd_str->triangle_coef, &bytes[0]); //fixme временно
|
||||||
|
TX_BUF[27] = bytes[0];
|
||||||
|
TX_BUF[28] = bytes[1];
|
||||||
|
TX_BUF[29] = bytes[2];
|
||||||
|
TX_BUF[30] = bytes[3];
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 2)
|
||||||
|
{
|
||||||
|
// время слепоты при включении
|
||||||
|
TX_BUF[23] = ((icd_str->start_up_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->start_up_time * 5) & 0xFF);
|
||||||
|
// время поиска в базовом режиме с минимальным порогом
|
||||||
|
TX_BUF[25] = ((icd_str->base_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[26] = ((icd_str->base_time * 5) & 0xFF);
|
||||||
|
// Время в мс которое алгоритм ищет максимум
|
||||||
|
TX_BUF[27] = ((icd_str->max_search_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[28] = ((icd_str->max_search_time * 5) & 0xFF);
|
||||||
|
// Время в мс нахождения в режиме поиска квадратов
|
||||||
|
TX_BUF[29] = ((icd_str->square_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->square_time * 5) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 3)
|
||||||
|
{
|
||||||
|
TX_BUF[24] = (((uint8_t) icd_str->dc_cut & 0x1) << 3) | (((uint8_t) icd_str->sd_card & 0x1) << 2)
|
||||||
|
| (((uint8_t) icd_str->active_ch & 0x3) << 0);
|
||||||
|
//сопротивление потенциометра
|
||||||
|
TX_BUF[25] = (icd_str->spi_pot_set) & 0xFF;
|
||||||
|
//напряжение в процентах
|
||||||
|
TX_BUF[26] = ((adc_str.bat_pers) & 0xFF);
|
||||||
|
//напряжение на АКБ
|
||||||
|
TX_BUF[27] = ((adc_str.bat_volt) >> 8) & 0xFF;
|
||||||
|
TX_BUF[28] = ((adc_str.bat_volt) & 0xFF);
|
||||||
|
//напряжение на конденсаторе
|
||||||
|
TX_BUF[29] = ((adc_str.hv_volt) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((adc_str.hv_volt) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 4)
|
||||||
|
{
|
||||||
|
// время слепоты при включении
|
||||||
|
TX_BUF[23] = ((icd_str->lv_stop_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->lv_stop_time * 5) & 0xFF);
|
||||||
|
// время на весь qrs
|
||||||
|
TX_BUF[25] = ((icd_str->max_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[26] = ((icd_str->max_time * 5) & 0xFF);
|
||||||
|
// время между последним и предпоследним событием
|
||||||
|
TX_BUF[27] = ((icd_str->last_period * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[28] = ((icd_str->last_period * 5) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 5)
|
||||||
|
{
|
||||||
|
//счётчик собственных сокращений сердца 24 бита
|
||||||
|
TX_BUF[23] = ((icd_str->Vs_cnt) >> 16) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->Vs_cnt) >> 8) & 0xFF;
|
||||||
|
TX_BUF[25] = ((icd_str->Vs_cnt) & 0xFF);
|
||||||
|
//счётчик собственных сокращений которые в шуме(не детектируется
|
||||||
|
TX_BUF[26] = ((icd_str->Vn_cnt) >> 8) & 0xFF;
|
||||||
|
TX_BUF[27] = ((icd_str->Vn_cnt) & 0xFF);
|
||||||
|
//счётчик принудительных стимуляций сердца низким напряжением(низковольтная стимуляция)
|
||||||
|
TX_BUF[28] = ((icd_str->Vp_cnt) >> 16) & 0xFF;
|
||||||
|
TX_BUF[29] = ((icd_str->Vp_cnt) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->Vp_cnt) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 6)
|
||||||
|
{
|
||||||
|
//порог периода фибриляции если период меньше, чем это число это фибриляция
|
||||||
|
TX_BUF[23] = ((icd_str->fibr_tres * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->fibr_tres * 5) & 0xFF);
|
||||||
|
//порог периода Тахикардии 2 если период меньше, чем это число это Тахикардия 2
|
||||||
|
TX_BUF[25] = ((icd_str->tachy_2_tres * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[26] = ((icd_str->tachy_2_tres * 5) & 0xFF);
|
||||||
|
//порог периода Тахикардии 1 если период меньше, чем это число это Тахикардия 1
|
||||||
|
TX_BUF[27] = ((icd_str->tachy_1_tres * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[28] = ((icd_str->tachy_1_tres * 5) & 0xFF);
|
||||||
|
//сбрасываемый счётчик Vs событи
|
||||||
|
TX_BUF[29] = ((icd_str->vs_cnt_last) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->vs_cnt_last) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 7)
|
||||||
|
{
|
||||||
|
//фильтрованный скользящим средним период
|
||||||
|
TX_BUF[23] = ((icd_str->filt_period * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->filt_period * 5) & 0xFF);
|
||||||
|
//счётчик фибриляции при обнаружении короткого RR он растёт
|
||||||
|
TX_BUF[25] = ((icd_str->fibr_cnt) & 0xFF);
|
||||||
|
//счётчик Тахикардии 2 при обнаружении короткого RR он растёт
|
||||||
|
TX_BUF[26] = ((icd_str->tachy_2_cnt) & 0xFF);
|
||||||
|
//счётчик Тахикардии 1 при обнаружении короткого RR он растёт
|
||||||
|
TX_BUF[27] = ((icd_str->tachy_1_cnt) & 0xFF);
|
||||||
|
//счётчик нормальных событий при достижении 5 сбрасываем все корзины
|
||||||
|
TX_BUF[28] = ((icd_str->norm_cnt) & 0xFF);
|
||||||
|
//порог счётчика фибриляций при котором начинаем терапию
|
||||||
|
TX_BUF[29] = ((icd_str->fibr_max_tres) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 8)
|
||||||
|
{
|
||||||
|
//фильтрованный скользящим средним период
|
||||||
|
TX_BUF[23] = (((uint8_t) icd_str->hv_step_number & 0xF) << 4) | (((uint8_t) icd_str->hv_step_cnt & 0xF) << 0);
|
||||||
|
//сколько джоулей в одном шаге считаем в зависимости от минимума и максимума.
|
||||||
|
TX_BUF[24] = ((icd_str->hv_step_energy) >> 8) & 0xFF;
|
||||||
|
TX_BUF[25] = ((icd_str->hv_step_energy) & 0xFF);
|
||||||
|
//так как всегда мало потратим 1 байт
|
||||||
|
TX_BUF[26] = (icd_str->min_energy) & 0xFF;
|
||||||
|
//текущая энергия конденсатора
|
||||||
|
TX_BUF[27] = ((icd_str->now_energy) >> 8) & 0xFF;
|
||||||
|
TX_BUF[28] = ((icd_str->now_energy) & 0xFF);
|
||||||
|
//максимальная энергия конденсатора
|
||||||
|
TX_BUF[29] = ((icd_str->max_energy) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->max_energy) & 0xFF);
|
||||||
|
}
|
||||||
|
else if (icd_str->counter % 12 == 9)
|
||||||
|
{
|
||||||
|
//время которое мы слепы после HV разряда
|
||||||
|
TX_BUF[23] = ((icd_str->hv_blind_time * 5) >> 8) & 0xFF;
|
||||||
|
TX_BUF[24] = ((icd_str->hv_blind_time * 5) & 0xFF);
|
||||||
|
//какой длинны мы заполныем буффер при редетекции//сколько нам нужно плохих событий для запуска терапии
|
||||||
|
TX_BUF[25] = (((uint8_t) icd_str->redet_num & 0xF) << 4) | ((uint8_t) icd_str->redet_bad & 0xF);
|
||||||
|
//сколько всего событий в редетекции//сколько реально плохих событий
|
||||||
|
TX_BUF[26] = (((uint8_t) icd_str->redet_cnt & 0xF) << 4) | (((uint8_t) icd_str->redet_bad_cnt & 0xF) << 0);
|
||||||
|
//время которое мы ничего не делаем если терапия не сработала
|
||||||
|
TX_BUF[27] = ((icd_str->standby_timer) >> 24) & 0xFF;
|
||||||
|
TX_BUF[28] = ((icd_str->standby_timer) >> 16) & 0xFF;
|
||||||
|
TX_BUF[29] = ((icd_str->standby_timer) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->standby_timer) & 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (icd_str->counter % 12 == 10)
|
||||||
|
{
|
||||||
|
//новое про низкое напряжение
|
||||||
|
TX_BUF[23] = (((uint8_t) icd_str->lv_polarity & 0x3) << 4) | (((uint8_t) icd_str->lv_mode & 0xF) << 0);
|
||||||
|
TX_BUF[24] = ((icd_str->lv_shock_time) & 0xFF); //время импульса низковольной стимуляции 1-20(0,1-2мс) одна единица 0,1мс шаг 0.1мс
|
||||||
|
TX_BUF[25] = ((icd_str->lv_relax_time) & 0xFF); //время стабилизации после удара низковольной стимуляции 0-20(0-20мс) одна единица 1мс шаг 1мс
|
||||||
|
TX_BUF[26] = ((icd_str->lv_voltage) & 0xFF); //какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
TX_BUF[27] = ((icd_str->BURST_cnt) & 0xFF); //сколько импульсов в одной пачке 5-50 одна единица 1 импульс шаг 1 импульс
|
||||||
|
TX_BUF[28] = ((icd_str->BURST_voltage) & 0xFF); //какое напряжение у импульсов 10-80(1,0-8,0В) одна единица 0,1В шаг 0,1В
|
||||||
|
//период следования импульсов в мс 150-500мс одна единица 1мс шаг 10 мс на ползунке
|
||||||
|
TX_BUF[29] = ((icd_str->BURST_period) >> 8) & 0xFF;
|
||||||
|
TX_BUF[30] = ((icd_str->BURST_period) & 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (icd_str->counter % 12 == 11)
|
||||||
|
{
|
||||||
|
//новое про высокое напряжение
|
||||||
|
TX_BUF[23] = (((uint8_t) icd_str->hv_polarity & 0x3) << 2) | (((uint8_t) icd_str->hv_mode & 0x3) << 0);
|
||||||
|
TX_BUF[24] = ((icd_str->hv_phase_1_duration) & 0xFF);// время в десятых мс приходящееся на 1 фазу 30-120(3-12мс) одна единица 0,1мс
|
||||||
|
TX_BUF[25] = ((icd_str->hv_phase_2_duration) & 0xFF);// время в десятых мс приходящееся на 2 фазу 20-100(2-10мс) одна единица 0,1мс
|
||||||
|
TX_BUF[26] = ((icd_str->hv_switch_duration) & 0xFF);// время в десятых мс приходящееся на переключение между фазами 10-30(1-3мс) одна единица 0,1мс
|
||||||
|
TX_BUF[27] = ((icd_str->hv_switching_voltage) & 0xFF);//процент напряжения при котором происходит завешение 1 фазы при адаптивном режиме (20-80) одна единица 1%
|
||||||
|
TX_BUF[28] = ((icd_str->hv_cutoff_voltage) & 0xFF); //процент напряжения при котором происходит завешение 2 фазы при адаптивном режиме (5-50) одна единица 1%
|
||||||
|
}
|
||||||
|
TX_BUF[31] = 0x77; //конечный байт
|
||||||
|
//данные шлём не всегда.
|
||||||
|
if ((control->ble_mode_set == ble_raw) && (control->ble_mode_now == ble_raw))
|
||||||
|
if (send)
|
||||||
|
HAL_UART_Transmit_DMA(&huart1, TX_BUF, TX_PLOAD_WIDTH); //TX_PLOAD_WIDTH);//было до этого TX_PLOAD_WIDTH+1 но работало не очень
|
||||||
|
}
|
||||||
|
/* USER CODE END 1 */
|
||||||
@ -0,0 +1,568 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @file startup_stm32f413xx.s
|
||||||
|
* @author MCD Application Team
|
||||||
|
* @brief STM32F413xx Devices vector table for GCC based toolchains.
|
||||||
|
* This module performs:
|
||||||
|
* - Set the initial SP
|
||||||
|
* - Set the initial PC == Reset_Handler,
|
||||||
|
* - Set the vector table entries with the exceptions ISR address
|
||||||
|
* - Branches to main in the C library (which eventually
|
||||||
|
* calls main()).
|
||||||
|
* After Reset the Cortex-M4 processor is in Thread mode,
|
||||||
|
* priority is Privileged, and the Stack is set to Main.
|
||||||
|
******************************************************************************
|
||||||
|
* @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.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.cpu cortex-m4
|
||||||
|
.fpu softvfp
|
||||||
|
.thumb
|
||||||
|
|
||||||
|
.global g_pfnVectors
|
||||||
|
.global Default_Handler
|
||||||
|
|
||||||
|
/* start address for the initialization values of the .data section.
|
||||||
|
defined in linker script */
|
||||||
|
.word _sidata
|
||||||
|
/* start address for the .data section. defined in linker script */
|
||||||
|
.word _sdata
|
||||||
|
/* end address for the .data section. defined in linker script */
|
||||||
|
.word _edata
|
||||||
|
/* start address for the .bss section. defined in linker script */
|
||||||
|
.word _sbss
|
||||||
|
/* end address for the .bss section. defined in linker script */
|
||||||
|
.word _ebss
|
||||||
|
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is the code that gets called when the processor first
|
||||||
|
* starts execution following a reset event. Only the absolutely
|
||||||
|
* necessary set is performed, after which the application
|
||||||
|
* supplied main() routine is called.
|
||||||
|
* @param None
|
||||||
|
* @retval : None
|
||||||
|
*/
|
||||||
|
|
||||||
|
.section .text.Reset_Handler
|
||||||
|
.weak Reset_Handler
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
Reset_Handler:
|
||||||
|
ldr sp, =_estack /* set stack pointer */
|
||||||
|
|
||||||
|
/* Call the clock system initialization function.*/
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
|
ldr r0, =_sdata
|
||||||
|
ldr r1, =_edata
|
||||||
|
ldr r2, =_sidata
|
||||||
|
movs r3, #0
|
||||||
|
b LoopCopyDataInit
|
||||||
|
|
||||||
|
CopyDataInit:
|
||||||
|
ldr r4, [r2, r3]
|
||||||
|
str r4, [r0, r3]
|
||||||
|
adds r3, r3, #4
|
||||||
|
|
||||||
|
LoopCopyDataInit:
|
||||||
|
adds r4, r0, r3
|
||||||
|
cmp r4, r1
|
||||||
|
bcc CopyDataInit
|
||||||
|
|
||||||
|
/* Zero fill the bss segment. */
|
||||||
|
ldr r2, =_sbss
|
||||||
|
ldr r4, =_ebss
|
||||||
|
movs r3, #0
|
||||||
|
b LoopFillZerobss
|
||||||
|
|
||||||
|
FillZerobss:
|
||||||
|
str r3, [r2]
|
||||||
|
adds r2, r2, #4
|
||||||
|
|
||||||
|
LoopFillZerobss:
|
||||||
|
cmp r2, r4
|
||||||
|
bcc FillZerobss
|
||||||
|
|
||||||
|
/* Call static constructors */
|
||||||
|
bl __libc_init_array
|
||||||
|
/* Call the application's entry point.*/
|
||||||
|
bl main
|
||||||
|
bx lr
|
||||||
|
.size Reset_Handler, .-Reset_Handler
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is the code that gets called when the processor receives an
|
||||||
|
* unexpected interrupt. This simply enters an infinite loop, preserving
|
||||||
|
* the system state for examination by a debugger.
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
.section .text.Default_Handler,"ax",%progbits
|
||||||
|
Default_Handler:
|
||||||
|
Infinite_Loop:
|
||||||
|
b Infinite_Loop
|
||||||
|
.size Default_Handler, .-Default_Handler
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
||||||
|
* must be placed on this to ensure that it ends up at physical address
|
||||||
|
* 0x0000.0000.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
.section .isr_vector,"a",%progbits
|
||||||
|
.type g_pfnVectors, %object
|
||||||
|
|
||||||
|
g_pfnVectors:
|
||||||
|
.word _estack
|
||||||
|
.word Reset_Handler
|
||||||
|
.word NMI_Handler
|
||||||
|
.word HardFault_Handler
|
||||||
|
.word MemManage_Handler
|
||||||
|
.word BusFault_Handler
|
||||||
|
.word UsageFault_Handler
|
||||||
|
.word 0
|
||||||
|
.word 0
|
||||||
|
.word 0
|
||||||
|
.word 0
|
||||||
|
.word SVC_Handler
|
||||||
|
.word DebugMon_Handler
|
||||||
|
.word 0
|
||||||
|
.word PendSV_Handler
|
||||||
|
.word SysTick_Handler
|
||||||
|
|
||||||
|
/* External Interrupts */
|
||||||
|
.word WWDG_IRQHandler /* Window WatchDog */
|
||||||
|
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
||||||
|
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
||||||
|
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
||||||
|
.word FLASH_IRQHandler /* FLASH */
|
||||||
|
.word RCC_IRQHandler /* RCC */
|
||||||
|
.word EXTI0_IRQHandler /* EXTI Line0 */
|
||||||
|
.word EXTI1_IRQHandler /* EXTI Line1 */
|
||||||
|
.word EXTI2_IRQHandler /* EXTI Line2 */
|
||||||
|
.word EXTI3_IRQHandler /* EXTI Line3 */
|
||||||
|
.word EXTI4_IRQHandler /* EXTI Line4 */
|
||||||
|
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
||||||
|
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
||||||
|
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
||||||
|
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
||||||
|
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
||||||
|
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
||||||
|
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
||||||
|
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
||||||
|
.word CAN1_TX_IRQHandler /* CAN1 TX */
|
||||||
|
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
|
||||||
|
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
|
||||||
|
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
|
||||||
|
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
||||||
|
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
||||||
|
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
||||||
|
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
||||||
|
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
||||||
|
.word TIM2_IRQHandler /* TIM2 */
|
||||||
|
.word TIM3_IRQHandler /* TIM3 */
|
||||||
|
.word TIM4_IRQHandler /* TIM4 */
|
||||||
|
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
||||||
|
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
||||||
|
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
||||||
|
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
||||||
|
.word SPI1_IRQHandler /* SPI1 */
|
||||||
|
.word SPI2_IRQHandler /* SPI2 */
|
||||||
|
.word USART1_IRQHandler /* USART1 */
|
||||||
|
.word USART2_IRQHandler /* USART2 */
|
||||||
|
.word USART3_IRQHandler /* USART3 */
|
||||||
|
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
||||||
|
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
||||||
|
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
||||||
|
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
|
||||||
|
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
|
||||||
|
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
|
||||||
|
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
|
||||||
|
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
||||||
|
.word FSMC_IRQHandler /* FSMC */
|
||||||
|
.word SDIO_IRQHandler /* SDIO */
|
||||||
|
.word TIM5_IRQHandler /* TIM5 */
|
||||||
|
.word SPI3_IRQHandler /* SPI3 */
|
||||||
|
.word UART4_IRQHandler /* UART4 */
|
||||||
|
.word UART5_IRQHandler /* UART5 */
|
||||||
|
.word TIM6_DAC_IRQHandler /* TIM6, DAC1 and DAC2 */
|
||||||
|
.word TIM7_IRQHandler /* TIM7 */
|
||||||
|
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
||||||
|
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
||||||
|
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
||||||
|
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
||||||
|
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
||||||
|
.word DFSDM1_FLT0_IRQHandler /* DFSDM1 Filter0 */
|
||||||
|
.word DFSDM1_FLT1_IRQHandler /* DFSDM1 Filter1 */
|
||||||
|
.word CAN2_TX_IRQHandler /* CAN2 TX */
|
||||||
|
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
|
||||||
|
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
|
||||||
|
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
|
||||||
|
.word OTG_FS_IRQHandler /* USB OTG FS */
|
||||||
|
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
||||||
|
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
||||||
|
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
||||||
|
.word USART6_IRQHandler /* USART6 */
|
||||||
|
.word I2C3_EV_IRQHandler /* I2C3 event */
|
||||||
|
.word I2C3_ER_IRQHandler /* I2C3 error */
|
||||||
|
.word CAN3_TX_IRQHandler /* CAN3 TX */
|
||||||
|
.word CAN3_RX0_IRQHandler /* CAN3 RX0 */
|
||||||
|
.word CAN3_RX1_IRQHandler /* CAN3 RX1 */
|
||||||
|
.word CAN3_SCE_IRQHandler /* CAN3 SCE */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word RNG_IRQHandler /* RNG */
|
||||||
|
.word FPU_IRQHandler /* FPU */
|
||||||
|
.word UART7_IRQHandler /* UART7 */
|
||||||
|
.word UART8_IRQHandler /* UART8 */
|
||||||
|
.word SPI4_IRQHandler /* SPI4 */
|
||||||
|
.word SPI5_IRQHandler /* SPI5 */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word SAI1_IRQHandler /* SAI1 */
|
||||||
|
.word UART9_IRQHandler /* UART9 */
|
||||||
|
.word UART10_IRQHandler /* UART10 */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word QUADSPI_IRQHandler /* QuadSPI */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word 0 /* Reserved */
|
||||||
|
.word FMPI2C1_EV_IRQHandler /* FMPI2C1 Event */
|
||||||
|
.word FMPI2C1_ER_IRQHandler /* FMPI2C1 Error */
|
||||||
|
.word LPTIM1_IRQHandler /* LPTIM1 */
|
||||||
|
.word DFSDM2_FLT0_IRQHandler /* DFSDM2 Filter0 */
|
||||||
|
.word DFSDM2_FLT1_IRQHandler /* DFSDM2 Filter1 */
|
||||||
|
.word DFSDM2_FLT2_IRQHandler /* DFSDM2 Filter2 */
|
||||||
|
.word DFSDM2_FLT3_IRQHandler /* DFSDM2 Filter3 */
|
||||||
|
|
||||||
|
|
||||||
|
.size g_pfnVectors, .-g_pfnVectors
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* Provide weak aliases for each Exception handler to the Default_Handler.
|
||||||
|
* As they are weak aliases, any function with the same name will override
|
||||||
|
* this definition.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
.weak NMI_Handler
|
||||||
|
.thumb_set NMI_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.thumb_set HardFault_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak MemManage_Handler
|
||||||
|
.thumb_set MemManage_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak BusFault_Handler
|
||||||
|
.thumb_set BusFault_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak UsageFault_Handler
|
||||||
|
.thumb_set UsageFault_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak SVC_Handler
|
||||||
|
.thumb_set SVC_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak DebugMon_Handler
|
||||||
|
.thumb_set DebugMon_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak PendSV_Handler
|
||||||
|
.thumb_set PendSV_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak SysTick_Handler
|
||||||
|
.thumb_set SysTick_Handler,Default_Handler
|
||||||
|
|
||||||
|
.weak WWDG_IRQHandler
|
||||||
|
.thumb_set WWDG_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak PVD_IRQHandler
|
||||||
|
.thumb_set PVD_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TAMP_STAMP_IRQHandler
|
||||||
|
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak RTC_WKUP_IRQHandler
|
||||||
|
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak FLASH_IRQHandler
|
||||||
|
.thumb_set FLASH_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak RCC_IRQHandler
|
||||||
|
.thumb_set RCC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI0_IRQHandler
|
||||||
|
.thumb_set EXTI0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI1_IRQHandler
|
||||||
|
.thumb_set EXTI1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI2_IRQHandler
|
||||||
|
.thumb_set EXTI2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI3_IRQHandler
|
||||||
|
.thumb_set EXTI3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI4_IRQHandler
|
||||||
|
.thumb_set EXTI4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream0_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream1_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream2_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream3_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream4_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream5_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream6_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak ADC_IRQHandler
|
||||||
|
.thumb_set ADC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN1_TX_IRQHandler
|
||||||
|
.thumb_set CAN1_TX_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN1_RX0_IRQHandler
|
||||||
|
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN1_RX1_IRQHandler
|
||||||
|
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN1_SCE_IRQHandler
|
||||||
|
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI9_5_IRQHandler
|
||||||
|
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM1_BRK_TIM9_IRQHandler
|
||||||
|
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM1_UP_TIM10_IRQHandler
|
||||||
|
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
||||||
|
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM1_CC_IRQHandler
|
||||||
|
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM2_IRQHandler
|
||||||
|
.thumb_set TIM2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM3_IRQHandler
|
||||||
|
.thumb_set TIM3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM4_IRQHandler
|
||||||
|
.thumb_set TIM4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C1_EV_IRQHandler
|
||||||
|
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C1_ER_IRQHandler
|
||||||
|
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C2_EV_IRQHandler
|
||||||
|
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C2_ER_IRQHandler
|
||||||
|
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SPI1_IRQHandler
|
||||||
|
.thumb_set SPI1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SPI2_IRQHandler
|
||||||
|
.thumb_set SPI2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak USART1_IRQHandler
|
||||||
|
.thumb_set USART1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak USART2_IRQHandler
|
||||||
|
.thumb_set USART2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak USART3_IRQHandler
|
||||||
|
.thumb_set USART3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak EXTI15_10_IRQHandler
|
||||||
|
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak RTC_Alarm_IRQHandler
|
||||||
|
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak OTG_FS_WKUP_IRQHandler
|
||||||
|
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM8_BRK_TIM12_IRQHandler
|
||||||
|
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM8_UP_TIM13_IRQHandler
|
||||||
|
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM8_TRG_COM_TIM14_IRQHandler
|
||||||
|
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM8_CC_IRQHandler
|
||||||
|
.thumb_set TIM8_CC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA1_Stream7_IRQHandler
|
||||||
|
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak FSMC_IRQHandler
|
||||||
|
.thumb_set FSMC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SDIO_IRQHandler
|
||||||
|
.thumb_set SDIO_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM5_IRQHandler
|
||||||
|
.thumb_set TIM5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SPI3_IRQHandler
|
||||||
|
.thumb_set SPI3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART4_IRQHandler
|
||||||
|
.thumb_set UART4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART5_IRQHandler
|
||||||
|
.thumb_set UART5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM6_DAC_IRQHandler
|
||||||
|
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak TIM7_IRQHandler
|
||||||
|
.thumb_set TIM7_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream0_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream1_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream2_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream3_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream4_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM1_FLT0_IRQHandler
|
||||||
|
.thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM1_FLT1_IRQHandler
|
||||||
|
.thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN2_TX_IRQHandler
|
||||||
|
.thumb_set CAN2_TX_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN2_RX0_IRQHandler
|
||||||
|
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN2_RX1_IRQHandler
|
||||||
|
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN2_SCE_IRQHandler
|
||||||
|
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak OTG_FS_IRQHandler
|
||||||
|
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream5_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream6_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DMA2_Stream7_IRQHandler
|
||||||
|
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak USART6_IRQHandler
|
||||||
|
.thumb_set USART6_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C3_EV_IRQHandler
|
||||||
|
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak I2C3_ER_IRQHandler
|
||||||
|
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN3_TX_IRQHandler
|
||||||
|
.thumb_set CAN3_TX_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN3_RX0_IRQHandler
|
||||||
|
.thumb_set CAN3_RX0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN3_RX1_IRQHandler
|
||||||
|
.thumb_set CAN3_RX1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak CAN3_SCE_IRQHandler
|
||||||
|
.thumb_set CAN3_SCE_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak RNG_IRQHandler
|
||||||
|
.thumb_set RNG_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak FPU_IRQHandler
|
||||||
|
.thumb_set FPU_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART7_IRQHandler
|
||||||
|
.thumb_set UART7_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART8_IRQHandler
|
||||||
|
.thumb_set UART8_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SPI4_IRQHandler
|
||||||
|
.thumb_set SPI4_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SPI5_IRQHandler
|
||||||
|
.thumb_set SPI5_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak SAI1_IRQHandler
|
||||||
|
.thumb_set SAI1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART9_IRQHandler
|
||||||
|
.thumb_set UART9_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak UART10_IRQHandler
|
||||||
|
.thumb_set UART10_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak QUADSPI_IRQHandler
|
||||||
|
.thumb_set QUADSPI_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak FMPI2C1_EV_IRQHandler
|
||||||
|
.thumb_set FMPI2C1_EV_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak FMPI2C1_ER_IRQHandler
|
||||||
|
.thumb_set FMPI2C1_ER_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak LPTIM1_IRQHandler
|
||||||
|
.thumb_set LPTIM1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM2_FLT0_IRQHandler
|
||||||
|
.thumb_set DFSDM2_FLT0_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM2_FLT1_IRQHandler
|
||||||
|
.thumb_set DFSDM2_FLT1_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM2_FLT2_IRQHandler
|
||||||
|
.thumb_set DFSDM2_FLT2_IRQHandler,Default_Handler
|
||||||
|
|
||||||
|
.weak DFSDM2_FLT3_IRQHandler
|
||||||
|
.thumb_set DFSDM2_FLT3_IRQHandler,Default_Handler
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/adc.c:30:6:MX_ADC1_Init 10
|
||||||
|
../Core/Src/adc.c:141:6:HAL_ADC_MspInit 2
|
||||||
|
../Core/Src/adc.c:182:6:HAL_ADC_MspDeInit 2
|
||||||
|
../Core/Src/adc.c:216:9:volt_to_pers 3
|
||||||
|
../Core/Src/adc.c:233:6:adc_read 1
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
Core/Src/adc.o: ../Core/Src/adc.c ../Core/Inc/adc.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/adc.c:30:6:MX_ADC1_Init 24 static
|
||||||
|
../Core/Src/adc.c:141:6:HAL_ADC_MspInit 48 static
|
||||||
|
../Core/Src/adc.c:182:6:HAL_ADC_MspDeInit 16 static
|
||||||
|
../Core/Src/adc.c:216:9:volt_to_pers 24 static
|
||||||
|
../Core/Src/adc.c:233:6:adc_read 16 static
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
../Core/Src/control.c:5:6:control_init 1
|
||||||
|
../Core/Src/control.c:18:6:control_init_var 1
|
||||||
|
../Core/Src/control.c:32:6:lets_sleep 1
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
Core/Src/control.o: ../Core/Src/control.c ../Core/Inc/control.h \
|
||||||
|
../Core/Inc/main.h ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Core/Inc/adc.h ../Core/Inc/gpio.h
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
../Core/Src/control.c:5:6:control_init 4 static
|
||||||
|
../Core/Src/control.c:18:6:control_init_var 16 static
|
||||||
|
../Core/Src/control.c:32:6:lets_sleep 8 static
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
../Core/Src/delay.c:17:6:delay_us 2
|
||||||
|
../Core/Src/delay.c:27:6:delay_ms 2
|
||||||
|
../Core/Src/delay.c:37:6:delay_us_wd 2
|
||||||
|
../Core/Src/delay.c:51:6:delay_ms_wd 2
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
Core/Src/delay.o: ../Core/Src/delay.c ../Core/Inc/delay.h
|
||||||
|
../Core/Inc/delay.h:
|
||||||
Binary file not shown.
@ -0,0 +1,4 @@
|
|||||||
|
../Core/Src/delay.c:17:6:delay_us 24 static
|
||||||
|
../Core/Src/delay.c:27:6:delay_ms 24 static
|
||||||
|
../Core/Src/delay.c:37:6:delay_us_wd 24 static
|
||||||
|
../Core/Src/delay.c:51:6:delay_ms_wd 24 static
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/dma.c:39:6:MX_DMA_Init 1
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
Core/Src/dma.o: ../Core/Src/dma.c ../Core/Inc/dma.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Core/Inc/dma.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/dma.c:39:6:MX_DMA_Init 16 static
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/filter.c:5:7:iir_50hz_2or 3
|
||||||
|
../Core/Src/filter.c:43:7:iir_50hz_1or 3
|
||||||
|
../Core/Src/filter.c:76:7:iir_hp 3
|
||||||
|
../Core/Src/filter.c:106:7:iir_4060 3
|
||||||
|
../Core/Src/filter.c:143:7:iir_lp30 3
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
Core/Src/filter.o: ../Core/Src/filter.c ../Core/Inc/filter.h
|
||||||
|
../Core/Inc/filter.h:
|
||||||
Binary file not shown.
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/filter.c:5:7:iir_50hz_2or 72 static
|
||||||
|
../Core/Src/filter.c:43:7:iir_50hz_1or 48 static
|
||||||
|
../Core/Src/filter.c:76:7:iir_hp 40 static
|
||||||
|
../Core/Src/filter.c:106:7:iir_4060 72 static
|
||||||
|
../Core/Src/filter.c:143:7:iir_lp30 72 static
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
../Core/Src/freertos.c:94:6:vApplicationGetIdleTaskMemory 1
|
||||||
|
../Core/Src/freertos.c:108:6:MX_FREERTOS_Init 1
|
||||||
|
../Core/Src/freertos.c:163:6:StartDefaultTask 2
|
||||||
|
../Core/Src/freertos.c:191:6:StartOprosTask 6
|
||||||
|
../Core/Src/freertos.c:229:6:StartControlTask 1
|
||||||
|
../Core/Src/freertos.c:248:6:StartLowSpeedTask 2
|
||||||
|
../Core/Src/freertos.c:276:6:StartButTask 3
|
||||||
@ -0,0 +1,116 @@
|
|||||||
|
Core/Src/freertos.o: ../Core/Src/freertos.c \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h \
|
||||||
|
../Core/Inc/FreeRTOSConfig.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h \
|
||||||
|
../Core/Inc/main.h ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Core/Inc/adc.h ../Core/Inc/main.h ../Core/Inc/usart.h \
|
||||||
|
../Core/Inc/control.h ../Core/Inc/adc.h ../Core/Inc/gpio.h \
|
||||||
|
../Core/Inc/icd.h ../Core/Inc/control.h ../Core/Inc/icd.h \
|
||||||
|
../Core/Inc/parse.h ../Core/Inc/spi.h ../Core/Inc/gpio.h
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:
|
||||||
|
../Core/Inc/FreeRTOSConfig.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Core/Inc/usart.h:
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/parse.h:
|
||||||
|
../Core/Inc/spi.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
../Core/Src/freertos.c:94:6:vApplicationGetIdleTaskMemory 24 static
|
||||||
|
../Core/Src/freertos.c:108:6:MX_FREERTOS_Init 160 static
|
||||||
|
../Core/Src/freertos.c:163:6:StartDefaultTask 16 static
|
||||||
|
../Core/Src/freertos.c:191:6:StartOprosTask 16 static
|
||||||
|
../Core/Src/freertos.c:229:6:StartControlTask 16 static
|
||||||
|
../Core/Src/freertos.c:248:6:StartLowSpeedTask 24 static
|
||||||
|
../Core/Src/freertos.c:276:6:StartButTask 16 static
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/gpio.c:44:6:MX_GPIO_Init 1
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
Core/Src/gpio.o: ../Core/Src/gpio.c ../Core/Inc/gpio.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/gpio.c:44:6:MX_GPIO_Init 56 static
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
../Core/Src/icd.c:12:6:init_icd 1
|
||||||
|
../Core/Src/icd.c:126:7:my_abs 2
|
||||||
|
../Core/Src/icd.c:132:6:mode_start 2
|
||||||
|
../Core/Src/icd.c:144:6:get_data 2
|
||||||
|
../Core/Src/icd.c:158:6:get_data_max30003 1
|
||||||
|
../Core/Src/icd.c:169:6:check_mode_len 4
|
||||||
|
../Core/Src/icd.c:199:6:check_tres 11
|
||||||
|
../Core/Src/icd.c:249:6:search_alg 27
|
||||||
|
../Core/Src/icd.c:386:10:moving_avarage 3
|
||||||
|
../Core/Src/icd.c:405:6:basket_alg 8
|
||||||
|
../Core/Src/icd.c:445:6:terapy_start 2
|
||||||
|
../Core/Src/icd.c:456:6:hv_pwm 2
|
||||||
|
../Core/Src/icd.c:475:6:hv_sound 2
|
||||||
|
../Core/Src/icd.c:492:6:hv_charge 4
|
||||||
|
../Core/Src/icd.c:558:6:hv_shock 2
|
||||||
|
../Core/Src/icd.c:584:6:quick_analyse 4
|
||||||
|
../Core/Src/icd.c:624:6:fibr_terapy 6
|
||||||
|
../Core/Src/icd.c:696:6:terapy_algorithm 7
|
||||||
|
../Core/Src/icd.c:751:6:relay_all_control 1
|
||||||
|
../Core/Src/icd.c:758:6:relay_ra_control 2
|
||||||
|
../Core/Src/icd.c:767:6:relay_rv_control 2
|
||||||
|
../Core/Src/icd.c:775:6:relay_can_control 2
|
||||||
|
../Core/Src/icd.c:784:6:hv_ll_control 1
|
||||||
|
../Core/Src/icd.c:792:6:hv_power 2
|
||||||
|
../Core/Src/icd.c:807:6:hv_ll_rv_control 3
|
||||||
|
../Core/Src/icd.c:830:6:hv_ll_scv_control 3
|
||||||
|
../Core/Src/icd.c:853:6:hv_ll_can_control 3
|
||||||
|
../Core/Src/icd.c:877:6:hv_discharge 2
|
||||||
|
../Core/Src/icd.c:894:6:ll_bi_dis 1
|
||||||
|
../Core/Src/icd.c:923:6:ra_lv_control 6
|
||||||
|
../Core/Src/icd.c:986:6:rv_lv_control 6
|
||||||
|
../Core/Src/icd.c:1056:6:hv_en_control 1
|
||||||
|
../Core/Src/icd.c:1064:6:hv_en_rv 2
|
||||||
|
../Core/Src/icd.c:1072:6:hv_en_scv 2
|
||||||
|
../Core/Src/icd.c:1080:6:hv_en_can 2
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
Core/Src/icd.o: ../Core/Src/icd.c ../Core/Inc/icd.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h \
|
||||||
|
../Core/Inc/FreeRTOSConfig.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Core/Inc/adc.h ../Core/Inc/filter.h ../Core/Inc/parse.h \
|
||||||
|
../Core/Inc/icd.h ../Core/Inc/delay.h
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:
|
||||||
|
../Core/Inc/FreeRTOSConfig.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/filter.h:
|
||||||
|
../Core/Inc/parse.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/delay.h:
|
||||||
Binary file not shown.
@ -0,0 +1,35 @@
|
|||||||
|
../Core/Src/icd.c:12:6:init_icd 16 static
|
||||||
|
../Core/Src/icd.c:126:7:my_abs 16 static
|
||||||
|
../Core/Src/icd.c:132:6:mode_start 16 static
|
||||||
|
../Core/Src/icd.c:144:6:get_data 32 static
|
||||||
|
../Core/Src/icd.c:158:6:get_data_max30003 32 static
|
||||||
|
../Core/Src/icd.c:169:6:check_mode_len 16 static
|
||||||
|
../Core/Src/icd.c:199:6:check_tres 16 static
|
||||||
|
../Core/Src/icd.c:249:6:search_alg 16 static
|
||||||
|
../Core/Src/icd.c:386:10:moving_avarage 24 static
|
||||||
|
../Core/Src/icd.c:405:6:basket_alg 16 static
|
||||||
|
../Core/Src/icd.c:445:6:terapy_start 16 static
|
||||||
|
../Core/Src/icd.c:456:6:hv_pwm 16 static
|
||||||
|
../Core/Src/icd.c:475:6:hv_sound 16 static
|
||||||
|
../Core/Src/icd.c:492:6:hv_charge 32 static
|
||||||
|
../Core/Src/icd.c:558:6:hv_shock 16 static
|
||||||
|
../Core/Src/icd.c:584:6:quick_analyse 16 static
|
||||||
|
../Core/Src/icd.c:624:6:fibr_terapy 16 static
|
||||||
|
../Core/Src/icd.c:696:6:terapy_algorithm 16 static
|
||||||
|
../Core/Src/icd.c:751:6:relay_all_control 16 static
|
||||||
|
../Core/Src/icd.c:758:6:relay_ra_control 16 static
|
||||||
|
../Core/Src/icd.c:767:6:relay_rv_control 16 static
|
||||||
|
../Core/Src/icd.c:775:6:relay_can_control 16 static
|
||||||
|
../Core/Src/icd.c:784:6:hv_ll_control 16 static
|
||||||
|
../Core/Src/icd.c:792:6:hv_power 16 static
|
||||||
|
../Core/Src/icd.c:807:6:hv_ll_rv_control 16 static
|
||||||
|
../Core/Src/icd.c:830:6:hv_ll_scv_control 16 static
|
||||||
|
../Core/Src/icd.c:853:6:hv_ll_can_control 16 static
|
||||||
|
../Core/Src/icd.c:877:6:hv_discharge 16 static
|
||||||
|
../Core/Src/icd.c:894:6:ll_bi_dis 8 static
|
||||||
|
../Core/Src/icd.c:923:6:ra_lv_control 16 static
|
||||||
|
../Core/Src/icd.c:986:6:rv_lv_control 24 static
|
||||||
|
../Core/Src/icd.c:1056:6:hv_en_control 16 static
|
||||||
|
../Core/Src/icd.c:1064:6:hv_en_rv 16 static
|
||||||
|
../Core/Src/icd.c:1072:6:hv_en_scv 16 static
|
||||||
|
../Core/Src/icd.c:1080:6:hv_en_can 16 static
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/main.c:72:5:main 1
|
||||||
|
../Core/Src/main.c:174:6:SystemClock_Config 3
|
||||||
|
../Core/Src/main.c:228:6:HAL_TIM_PeriodElapsedCallback 2
|
||||||
|
../Core/Src/main.c:245:6:Error_Handler 1
|
||||||
|
../Core/Src/main.c:264:6:assert_failed 1
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h \
|
||||||
|
../Core/Inc/FreeRTOSConfig.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Core/Inc/adc.h ../Core/Inc/main.h ../Core/Inc/dma.h ../Core/Inc/spi.h \
|
||||||
|
../Core/Inc/tim.h ../Core/Inc/usart.h ../Core/Inc/control.h \
|
||||||
|
../Core/Inc/adc.h ../Core/Inc/gpio.h ../Core/Inc/icd.h \
|
||||||
|
../Core/Inc/gpio.h ../Core/Inc/control.h ../Core/Inc/icd.h
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:
|
||||||
|
../Core/Inc/FreeRTOSConfig.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Core/Inc/dma.h:
|
||||||
|
../Core/Inc/spi.h:
|
||||||
|
../Core/Inc/tim.h:
|
||||||
|
../Core/Inc/usart.h:
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
Binary file not shown.
@ -0,0 +1,5 @@
|
|||||||
|
../Core/Src/main.c:72:5:main 8 static
|
||||||
|
../Core/Src/main.c:174:6:SystemClock_Config 88 static
|
||||||
|
../Core/Src/main.c:228:6:HAL_TIM_PeriodElapsedCallback 16 static
|
||||||
|
../Core/Src/main.c:245:6:Error_Handler 4 static,ignoring_inline_asm
|
||||||
|
../Core/Src/main.c:264:6:assert_failed 16 static
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
../Drivers/CMSIS/Include/core_cm4.h:1938:34:__NVIC_SystemReset 1
|
||||||
|
../Core/Src/parse.c:3:7:unpackFloat 1
|
||||||
|
../Core/Src/parse.c:14:6:check_float 3
|
||||||
|
../Core/Src/parse.c:23:10:unpackUint16 1
|
||||||
|
../Core/Src/parse.c:31:6:check_uint16 3
|
||||||
|
../Core/Src/parse.c:40:9:unpackUint8 1
|
||||||
|
../Core/Src/parse.c:48:6:check_uint8 3
|
||||||
|
../Core/Src/parse.c:57:10:unpackUint32 1
|
||||||
|
../Core/Src/parse.c:68:6:check_uint32 3
|
||||||
|
../Core/Src/parse.c:77:6:parse_command 96
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
Core/Src/parse.o: ../Core/Src/parse.c ../Core/Inc/parse.h \
|
||||||
|
../Core/Inc/icd.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h \
|
||||||
|
../Core/Inc/FreeRTOSConfig.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Core/Inc/adc.h
|
||||||
|
../Core/Inc/parse.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:
|
||||||
|
../Core/Inc/FreeRTOSConfig.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
Binary file not shown.
@ -0,0 +1,10 @@
|
|||||||
|
../Drivers/CMSIS/Include/core_cm4.h:1938:34:__NVIC_SystemReset 4 static,ignoring_inline_asm
|
||||||
|
../Core/Src/parse.c:3:7:unpackFloat 24 static
|
||||||
|
../Core/Src/parse.c:14:6:check_float 24 static
|
||||||
|
../Core/Src/parse.c:23:10:unpackUint16 24 static
|
||||||
|
../Core/Src/parse.c:31:6:check_uint16 16 static
|
||||||
|
../Core/Src/parse.c:40:9:unpackUint8 24 static
|
||||||
|
../Core/Src/parse.c:48:6:check_uint8 16 static
|
||||||
|
../Core/Src/parse.c:57:10:unpackUint32 24 static
|
||||||
|
../Core/Src/parse.c:68:6:check_uint32 24 static
|
||||||
|
../Core/Src/parse.c:77:6:parse_command 80 static
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
../Core/Src/spi.c:31:6:MX_SPI2_Init 2
|
||||||
|
../Core/Src/spi.c:63:6:MX_SPI3_Init 2
|
||||||
|
../Core/Src/spi.c:95:6:HAL_SPI_MspInit 3
|
||||||
|
../Core/Src/spi.c:150:6:HAL_SPI_MspDeInit 3
|
||||||
|
../Core/Src/spi.c:193:6:POT_set 1
|
||||||
|
../Core/Src/spi.c:200:6:POT_cheek 2
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
Core/Src/spi.o: ../Core/Src/spi.c ../Core/Inc/spi.h ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Core/Inc/spi.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
../Core/Src/spi.c:31:6:MX_SPI2_Init 8 static
|
||||||
|
../Core/Src/spi.c:63:6:MX_SPI3_Init 8 static
|
||||||
|
../Core/Src/spi.c:95:6:HAL_SPI_MspInit 56 static
|
||||||
|
../Core/Src/spi.c:150:6:HAL_SPI_MspDeInit 16 static
|
||||||
|
../Core/Src/spi.c:193:6:POT_set 16 static
|
||||||
|
../Core/Src/spi.c:200:6:POT_cheek 16 static
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/stm32f4xx_hal_msp.c:63:6:HAL_MspInit 1
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
Core/Src/stm32f4xx_hal_msp.o: ../Core/Src/stm32f4xx_hal_msp.c \
|
||||||
|
../Core/Inc/main.h ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
../Core/Src/stm32f4xx_hal_msp.c:63:6:HAL_MspInit 16 static
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:41:19:HAL_InitTick 5
|
||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:120:6:HAL_SuspendTick 1
|
||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:132:6:HAL_ResumeTick 1
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
Core/Src/stm32f4xx_hal_timebase_tim.o: \
|
||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:41:19:HAL_InitTick 64 static
|
||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:120:6:HAL_SuspendTick 4 static
|
||||||
|
../Core/Src/stm32f4xx_hal_timebase_tim.c:132:6:HAL_ResumeTick 4 static
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
../Core/Src/stm32f4xx_it.c:79:6:NMI_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:94:6:HardFault_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:109:6:MemManage_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:124:6:BusFault_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:139:6:UsageFault_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:154:6:DebugMon_Handler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:174:6:USART1_IRQHandler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:188:6:TIM8_BRK_TIM12_IRQHandler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:202:6:TIM6_DAC_IRQHandler 5
|
||||||
|
../Core/Src/stm32f4xx_it.c:246:6:DMA2_Stream2_IRQHandler 1
|
||||||
|
../Core/Src/stm32f4xx_it.c:260:6:DMA2_Stream7_IRQHandler 1
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
Core/Src/stm32f4xx_it.o: ../Core/Src/stm32f4xx_it.c ../Core/Inc/main.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h \
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h \
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h \
|
||||||
|
../Core/Inc/stm32f4xx_it.h ../Core/Inc/adc.h ../Core/Inc/main.h \
|
||||||
|
../Core/Inc/control.h ../Core/Inc/adc.h ../Core/Inc/gpio.h \
|
||||||
|
../Core/Inc/icd.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h \
|
||||||
|
../Core/Inc/FreeRTOSConfig.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h \
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:
|
||||||
|
../Core/Inc/stm32f4xx_hal_conf.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f413xx.h:
|
||||||
|
../Drivers/CMSIS/Include/core_cm4.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||||
|
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||||
|
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||||
|
../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h:
|
||||||
|
../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:
|
||||||
|
../Core/Inc/stm32f4xx_it.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/main.h:
|
||||||
|
../Core/Inc/control.h:
|
||||||
|
../Core/Inc/adc.h:
|
||||||
|
../Core/Inc/gpio.h:
|
||||||
|
../Core/Inc/icd.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h:
|
||||||
|
../Core/Inc/FreeRTOSConfig.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/list.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/event_groups.h:
|
||||||
|
../Middlewares/Third_Party/FreeRTOS/Source/include/timers.h:
|
||||||
Binary file not shown.
@ -0,0 +1,11 @@
|
|||||||
|
../Core/Src/stm32f4xx_it.c:79:6:NMI_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:94:6:HardFault_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:109:6:MemManage_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:124:6:BusFault_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:139:6:UsageFault_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:154:6:DebugMon_Handler 4 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:174:6:USART1_IRQHandler 8 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:188:6:TIM8_BRK_TIM12_IRQHandler 8 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:202:6:TIM6_DAC_IRQHandler 8 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:246:6:DMA2_Stream2_IRQHandler 8 static
|
||||||
|
../Core/Src/stm32f4xx_it.c:260:6:DMA2_Stream7_IRQHandler 8 static
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user