变更
This commit is contained in:
commit
a58a15aa26
BIN
.cache/jb/UpdateWork.dat
Normal file
BIN
.cache/jb/UpdateWork.dat
Normal file
Binary file not shown.
1
.cache/jb/version.txt
Normal file
1
.cache/jb/version.txt
Normal file
@ -0,0 +1 @@
|
||||
(ssh://git@git.jetbrains.team/llvm/llvm-project.git 8fa9b8487f3ae42d08a4031b438ef8df2025b67c based on LLVM ed5dd8e5f0fb6ca4af26adcb6193a9d9106eb36a revision)
|
187
.cproject
Normal file
187
.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.607847054">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.607847054" 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.607847054" 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.607847054." name="/" resourcePath="">
|
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.261489956" 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.2084911625" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32G431VBTx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1394586083" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.59999429" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.1984140111" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" 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.1267087860" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" 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.1450558436" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" value="genericBoard" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1879587253" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" 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 || STM32G431VBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../USB_Device/App | ../USB_Device/Target | ../Drivers/STM32G4xx_HAL_Driver/Inc | ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../Drivers/CMSIS/Device/ST/STM32G4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32G431xx || || USB_Device | Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G431VBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.703046927" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" value="168" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1574791951" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/BoooomFOC_STSPIN32G4_EVB}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1456362012" 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.607144599" 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.1540948726" 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.2000862218" 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.1944112699" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.110287444" 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.1578603565" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" 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.476052417" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1963608420" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32G431xx"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.373873462" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../USB_Device/App"/>
|
||||
<listOptionValue builtIn="false" value="../USB_Device/Target"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/STM32G4xx_HAL_Driver/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy"/>
|
||||
<listOptionValue builtIn="false" value="../Middlewares/ST/STM32_USB_Device_Library/Core/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32G4xx/Include"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1183354118" 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.1592248049" 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.310267433" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" 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.1753787553" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.384187122" 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.533383182" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32G431VBTX_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.49608040" 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.1430497466" 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.1274220963" 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.1092004616" 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.1675302228" 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.2032045488" 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.1438945261" 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.1993683659" 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.655033111" 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.1794850586" 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="USB_Device"/>
|
||||
<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.107104535">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.107104535" 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.107104535" 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.107104535." name="/" resourcePath="">
|
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.357693130" 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.1108665242" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32G431VBTx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.520137052" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1956477081" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.492494204" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" 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.1425506387" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" 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.1498232860" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" value="genericBoard" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.268333874" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" 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 || STM32G431VBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../USB_Device/App | ../USB_Device/Target | ../Drivers/STM32G4xx_HAL_Driver/Inc | ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy | ../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc | ../Drivers/CMSIS/Device/ST/STM32G4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32G431xx || || USB_Device | Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32G431VBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1724099006" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" value="168" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1284979115" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/BoooomFOC_STSPIN32G4_EVB}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1943144139" 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.585159134" 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.929148476" 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.1557807089" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.414720310" 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.1539786155" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" 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.2065240704" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" 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.437929122" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32G431xx"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.2026911592" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../USB_Device/App"/>
|
||||
<listOptionValue builtIn="false" value="../USB_Device/Target"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/STM32G4xx_HAL_Driver/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy"/>
|
||||
<listOptionValue builtIn="false" value="../Middlewares/ST/STM32_USB_Device_Library/Core/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32G4xx/Include"/>
|
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1611034903" 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.1594520144" 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.765760652" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" 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.553974907" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" 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.717132681" 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.248594899" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32G431VBTX_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1816414939" 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.1467824829" 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.1142996718" 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.1451688047" 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.2013741999" 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.1903948750" 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.89159932" 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.1042119542" 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.424441151" 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.382852558" 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="USB_Device"/>
|
||||
<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="BoooomFOC_STSPIN32G4_EVB.null.1679282944" name="BoooomFOC_STSPIN32G4_EVB"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.607847054;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.607847054.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.110287444;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1183354118">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.107104535;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.107104535.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.414720310;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1611034903">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cproject>
|
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
2
.idea/BoooomFOC_STSPIN32G4_EVB.iml
Normal file
2
.idea/BoooomFOC_STSPIN32G4_EVB.iml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/BoooomFOC_STSPIN32G4_EVB.iml" filepath="$PROJECT_DIR$/.idea/BoooomFOC_STSPIN32G4_EVB.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
51
.mxproject
Normal file
51
.mxproject
Normal file
File diff suppressed because one or more lines are too long
32
.project
Normal file
32
.project
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>BoooomFOC_STSPIN32G4_EVB</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>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</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>
|
121
APP/APP_Main.c
Normal file
121
APP/APP_Main.c
Normal file
@ -0,0 +1,121 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/10.
|
||||
//
|
||||
|
||||
#include "APP_Main.h"
|
||||
|
||||
#include "Angle.h"
|
||||
#include "InteriorADC.h"
|
||||
//#include "Data/Current/InteriorADC/InteriorADC.h"
|
||||
|
||||
float CurrA, CurrB, CurrC;
|
||||
float Current_Temp, V_Temp;
|
||||
float32_t NowAngle;
|
||||
|
||||
void APP_Init() {
|
||||
tData Data;
|
||||
|
||||
Data.Angle.EncoderModel = MT6816;
|
||||
Data_Init(&Data);
|
||||
|
||||
NowAngle = Data.Angle.getAngle();
|
||||
|
||||
|
||||
__HAL_SPI_ENABLE(&hspi1);
|
||||
HAL_Delay(10);
|
||||
|
||||
//开启内部运放
|
||||
HAL_OPAMP_Start(&hopamp1);
|
||||
HAL_OPAMP_Start(&hopamp2);
|
||||
HAL_OPAMP_Start(&hopamp3);
|
||||
HAL_Delay(10);
|
||||
|
||||
while (InteriorADC_Init());
|
||||
HAL_ADC_Start_DMA(&hadc1, (uint32_t *) adc1_RegularBuf, 2);
|
||||
|
||||
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
|
||||
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
|
||||
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);
|
||||
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1);
|
||||
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_2);
|
||||
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_3);
|
||||
HAL_Delay(10);
|
||||
__HAL_TIM_ENABLE_IT(&htim1, TIM_IT_UPDATE);
|
||||
HAL_Delay(10);
|
||||
|
||||
GPIOE->BSRR = 1 << 7;
|
||||
HAL_Delay(10);
|
||||
}
|
||||
|
||||
uint16_t ADC_VAL1, ADC_VAL2;
|
||||
|
||||
//MCU内部温度传感器
|
||||
#define TS_CAL1 ((uint16_t*) ((uint32_t) 0x1FFF75A8)) // 30摄氏度时的MCU内部温度传感器校准值
|
||||
#define TS_CAL2 ((uint16_t*) ((uint32_t) 0x1FFF75CA)) //110摄氏度时的MCU内部温度传感器校准值
|
||||
|
||||
/*滑动平均滤波器长度*/
|
||||
#define MVF_LENGTH 128
|
||||
|
||||
float moving_average_filtre(float xn) {
|
||||
static int index = -1;
|
||||
static float buffer[MVF_LENGTH];
|
||||
static float sum = 0;
|
||||
float yn = 0;
|
||||
int i = 0;
|
||||
if (index == -1) {
|
||||
//初始化
|
||||
for (i = 0; i < MVF_LENGTH; i++) {
|
||||
buffer[i] = xn;
|
||||
}
|
||||
sum = xn * MVF_LENGTH;
|
||||
index = 0;
|
||||
} else {
|
||||
sum -= buffer[index];
|
||||
buffer[index] = xn;
|
||||
sum += xn;
|
||||
index++;
|
||||
if (index >= MVF_LENGTH) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
yn = sum / MVF_LENGTH;
|
||||
return yn;
|
||||
}
|
||||
|
||||
static float Current_Temp1, ii;
|
||||
|
||||
void APP_Main() {
|
||||
// TIM1->CCR1 = 0;
|
||||
// TIM1->CCR2 = 0;
|
||||
// TIM1->CCR3 = 100;
|
||||
// TIM1->CCR4 = 10;
|
||||
|
||||
ii += 0.001f;
|
||||
Current_Temp = ((110.0 - 30) / (*TS_CAL2 - *TS_CAL1) * (int16_t) (adc1_RegularBuf[1] * 3.3 / 3.0 - *TS_CAL1)) + 30;
|
||||
Current_Temp1 = moving_average_filtre(Current_Temp * sinf(ii));
|
||||
SendCurrent_Vofa(Current_Temp * sinf(ii), Current_Temp1, 0);
|
||||
|
||||
|
||||
// usb_printf("%f\r\n", NowAngle);
|
||||
|
||||
|
||||
// usb_printf("CoreTemp:%d,%d, %.2f\r\n", adc1_RegularBuf[0], adc1_RegularBuf[1], Current_Temp);
|
||||
// usb_printf("PhaseCurrent:%d, %d, %d\r\n", ADC1->JDR1 - 2040, ADC2->JDR1 - 2024, ADC1->JDR2 - 2024);
|
||||
// usb_printf("PhaseVoltage:%d, %d, %d\r\n", ADC2->JDR2, ADC2->JDR3, ADC2->JDR4);
|
||||
|
||||
|
||||
|
||||
// HAL_Delay(10);
|
||||
}
|
||||
|
||||
|
||||
//软件循环读取ADC
|
||||
// HAL_ADC_Start(&hadc1);
|
||||
// if (HAL_OK == HAL_ADC_PollForConversion(&hadc1, 50)) {
|
||||
// ADC_VAL1 = HAL_ADC_GetValue(&hadc1);
|
||||
// }
|
||||
|
||||
void APP_Task() {
|
||||
// Current_Temp = 1.0f;
|
||||
// Current_Temp = (1.43 - adc1_RegularBuf[0] * 3.3 / 4096) * 1000 / 4.35 + 25;
|
||||
}
|
37
APP/APP_Main.h
Normal file
37
APP/APP_Main.h
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/10.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H
|
||||
|
||||
#include "main.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
|
||||
#include "adc.h"
|
||||
#include "dma.h"
|
||||
#include "i2c.h"
|
||||
#include "opamp.h"
|
||||
#include "spi.h"
|
||||
#include "tim.h"
|
||||
#include "usb_device.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#include "usbd_cdc_if.h"
|
||||
//#include "arm_math.h"
|
||||
#include "Utils/arm_math.h"
|
||||
|
||||
#include "Communication.h"
|
||||
|
||||
|
||||
static __IO uint16_t adc1_RegularBuf[10];
|
||||
|
||||
void APP_Init();
|
||||
void APP_Main();
|
||||
void APP_Task();
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_APP_MAIN_H
|
27
BoooomCTL/Common/PID/PID.c
Normal file
27
BoooomCTL/Common/PID/PID.c
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "PID.h"
|
||||
|
||||
float PID_Generate(PID *pid) {
|
||||
pid->error = pid->target - pid->value;
|
||||
|
||||
if (pid->error > pid->errMin || pid->error < -pid->errMin)
|
||||
pid->errSum += pid->error * pid->ki;
|
||||
|
||||
if (pid->errSum > pid->errSumMax)
|
||||
pid->errSum = pid->errSumMax;
|
||||
else if (pid->errSum < -pid->errSumMax)
|
||||
pid->errSum = -pid->errSumMax;
|
||||
|
||||
pid->errDt = pid->error - pid->lastErr;
|
||||
pid->lastErr = pid->error;
|
||||
|
||||
pid->result = pid->kp * pid->error + pid->errSum + pid->kd * pid->errDt;
|
||||
|
||||
if (pid->result > pid->valMax)
|
||||
pid->result = pid->valMax;
|
||||
else if (pid->result < -pid->valMax)
|
||||
pid->result = -pid->valMax;
|
||||
}
|
32
BoooomCTL/Common/PID/PID.h
Normal file
32
BoooomCTL/Common/PID/PID.h
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_PID_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_PID_H
|
||||
|
||||
typedef struct pid {
|
||||
float kp;//比例系数
|
||||
float ki;//积分系数
|
||||
float kd;//微分系数
|
||||
|
||||
float target;
|
||||
float value;
|
||||
float error;
|
||||
|
||||
float errSum;
|
||||
float errSumMax;
|
||||
|
||||
float errMin;
|
||||
float valMax;
|
||||
|
||||
float lastErr;
|
||||
float errDt;
|
||||
|
||||
float result;
|
||||
} PID;
|
||||
|
||||
float PID_Generate(PID *pid);
|
||||
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_PID_H
|
43
BoooomCTL/Communication/Communication.c
Normal file
43
BoooomCTL/Communication/Communication.c
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
//#include "Communication.h"
|
||||
#include "APP_Main.h"
|
||||
|
||||
#define BYTE0(dwTemp) (*(char*)(&dwTemp))
|
||||
#define BYTE1(dwTemp) (*((char*)(&dwTemp) + 1))
|
||||
#define BYTE2(dwTemp) (*((char*)(&dwTemp) + 2))
|
||||
#define BYTE3(dwTemp) (*((char*)(&dwTemp) + 3))
|
||||
|
||||
uint8_t USBCDC_SendBuffur[APP_TX_DATA_SIZE];
|
||||
|
||||
void SendCurrent_Vofa(float a, float b, float c) {
|
||||
uint16_t USBCDC_SendBuffur_count = 0;
|
||||
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(a);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(a);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE2(a);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE3(a);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(b);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(b);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE2(b);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE3(b);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(c);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(c);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE2(c);
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE3(c);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(a);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(a);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(b);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(b);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE0(c);
|
||||
// USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = BYTE1(c);
|
||||
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = 0x00;
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = 0x00;
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = 0x80;
|
||||
USBCDC_SendBuffur[USBCDC_SendBuffur_count++] = 0x7f;
|
||||
|
||||
CDC_Transmit_FS(USBCDC_SendBuffur, USBCDC_SendBuffur_count);
|
||||
}
|
12
BoooomCTL/Communication/Communication.h
Normal file
12
BoooomCTL/Communication/Communication.h
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_COMMUNICATION_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_COMMUNICATION_H
|
||||
|
||||
|
||||
void SendCurrent_Vofa(float a, float b, float c);
|
||||
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_COMMUNICATION_H
|
62
BoooomCTL/Communication/Vofa/VOFA.c
Normal file
62
BoooomCTL/Communication/Vofa/VOFA.c
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* author <EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><EFBFBD>
|
||||
* date: 2022/10/21
|
||||
* description: <EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ƽ<EFBFBD>ʹ<EFBFBD><EFBFBD>vofa <EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺܸߣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲô<EFBFBD>ı<EFBFBD>ɽ<EFBFBD>ⷽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˡ<EFBFBD>
|
||||
* ɽ<EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD>̫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀǰ<EFBFBD><EFBFBD>justfloat<EFBFBD><EFBFBD> <EFBFBD>ɱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȽϷ<EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
//#include "zf_device_wireless_uart.h" //<2F><><EFBFBD><EFBFBD><EFBFBD>滻Ϊ<E6BBBB><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD> <20><>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD>zf <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
||||
#include "VOFA.h"
|
||||
#include "APP_Main.h"
|
||||
/**
|
||||
* @description: <EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><EFBFBD>ͽӿڷ<EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD>뽫<EFBFBD>Լ<EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD>ڷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><EFBFBD>ͳ<EFBFBD>ȥ
|
||||
* @param
|
||||
* buf : <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
||||
* len : <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @return:
|
||||
*
|
||||
* @demo
|
||||
* uart_send_buf_fcn(send_buf, 8); //<2F><>send_buf<75><66><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD>Ϊ8
|
||||
*/
|
||||
static inline void uart_send_buf_fcn(uint8_t *buf, uint16_t len) //<2F><><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC>ֿ<EFBFBD><D6BF>ܲ<EFBFBD>ͬ,ȥ<><C8A5>inlineЧ<65>ʻ<EFBFBD><CABB><EFBFBD><EFBFBD><CEA2>һЩ
|
||||
{
|
||||
for(int i=0;i<len;i++)
|
||||
{
|
||||
// wireless_uart_send_byte(*buf++); //<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: <EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD> JustFloat ģʽ<EFBFBD><EFBFBD><EFBFBD>ɱ䳤<EFBFBD><EFBFBD>Э<EFBFBD>鷢<EFBFBD><EFBFBD>
|
||||
* @param
|
||||
* len : <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><EFBFBD><EFBFBD>
|
||||
* ... : <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* ǿת<EFBFBD><EFBFBD>float<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @return:
|
||||
*
|
||||
* @demo
|
||||
* vodka_JustFloat_send(5, data1, data2, 3.14f, data4, data5);
|
||||
* vodka_JustFloat_send(1,(float)int<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>);
|
||||
*/
|
||||
float justfloat_send_buf[kWaveNumMax+1] = {0};
|
||||
void vodka_JustFloat_send(int len,...)
|
||||
{
|
||||
float* pfloat = justfloat_send_buf; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int32_t* pend = NULL; //֡β
|
||||
uint8_t* psend = (uint8_t*)justfloat_send_buf; //<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
|
||||
if(len > kWaveNumMax) return;
|
||||
va_list float_data;
|
||||
va_start(float_data, len);
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
*pfloat++ = (float)va_arg(float_data, double);
|
||||
}
|
||||
va_end(float_data);
|
||||
// pend = (int*)pfloat;
|
||||
*pend = (int)(0x7f800000);
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>psend<6E><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ */
|
||||
uart_send_buf_fcn(psend, (len+1)*sizeof(float));
|
||||
}
|
||||
|
5
BoooomCTL/Communication/Vofa/VOFA.h
Normal file
5
BoooomCTL/Communication/Vofa/VOFA.h
Normal file
@ -0,0 +1,5 @@
|
||||
#ifndef VOFA_H_
|
||||
#define VOFA_H_
|
||||
#define kWaveNumMax 20
|
||||
void vodka_JustFloat_send(int len,...); //可变长发送(调用方便)
|
||||
#endif
|
6
BoooomCTL/Controller/Controller.c
Normal file
6
BoooomCTL/Controller/Controller.c
Normal file
@ -0,0 +1,6 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Controller.h"
|
||||
|
8
BoooomCTL/Controller/Controller.h
Normal file
8
BoooomCTL/Controller/Controller.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_CONTROLLER_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_CONTROLLER_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_CONTROLLER_H
|
23
BoooomCTL/Controller/PreDrive/PreDrive.c
Normal file
23
BoooomCTL/Controller/PreDrive/PreDrive.c
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "PreDrive.h"
|
||||
|
||||
|
||||
|
||||
uint8_t PreDrive_Init_Buffur[2] = {0x00, 0x00};
|
||||
|
||||
|
||||
bool PreDrive_Init(void){
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x0c, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0x00;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x0c, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0xff;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x09, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0x00;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x09, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
HAL_Delay(10);
|
||||
|
||||
return 0;
|
||||
}
|
13
BoooomCTL/Controller/PreDrive/PreDrive.h
Normal file
13
BoooomCTL/Controller/PreDrive/PreDrive.h
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
||||
|
||||
#include "APP_Main.h"
|
||||
|
||||
bool PreDrive_Init(void);
|
||||
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
128
BoooomCTL/Controller/SVPWM/SVPWM.c
Normal file
128
BoooomCTL/Controller/SVPWM/SVPWM.c
Normal file
@ -0,0 +1,128 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/16.
|
||||
//
|
||||
|
||||
#include "SVPWM.h"
|
||||
|
||||
|
||||
inline int svpwm(float alpha, float beta, float *tA, float *tB, float *tC) {
|
||||
int Sextant;
|
||||
if (beta >= 0.0f) {
|
||||
if (alpha >= 0.0f) {
|
||||
//quadrant I
|
||||
if (ONE_BY_SQRT3 * beta > alpha)
|
||||
Sextant = 2; //sextant v2-v3
|
||||
else
|
||||
Sextant = 1; //sextant v1-v2
|
||||
|
||||
} else {
|
||||
//quadrant II
|
||||
if (-ONE_BY_SQRT3 * beta > alpha)
|
||||
Sextant = 3; //sextant v3-v4
|
||||
else
|
||||
Sextant = 2; //sextant v2-v3
|
||||
}
|
||||
} else {
|
||||
if (alpha >= 0.0f) {
|
||||
//quadrant IV
|
||||
if (-ONE_BY_SQRT3 * beta > alpha)
|
||||
Sextant = 5; //sextant v5-v6
|
||||
else
|
||||
Sextant = 6; //sextant v6-v1
|
||||
} else {
|
||||
//quadrant III
|
||||
if (ONE_BY_SQRT3 * beta > alpha)
|
||||
Sextant = 4; //sextant v4-v5
|
||||
else
|
||||
Sextant = 5; //sextant v5-v6
|
||||
}
|
||||
}
|
||||
|
||||
switch (Sextant) {
|
||||
// sextant v1-v2
|
||||
case 1: {
|
||||
// Vector on-times
|
||||
float t1 = alpha - ONE_BY_SQRT3 * beta;
|
||||
float t2 = TWO_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tA = (1.0f - t1 - t2) * 0.5f;
|
||||
*tB = *tA + t1;
|
||||
*tC = *tB + t2;
|
||||
}
|
||||
break;
|
||||
|
||||
// sextant v2-v3
|
||||
case 2: {
|
||||
// Vector on-times
|
||||
float t2 = alpha + ONE_BY_SQRT3 * beta;
|
||||
float t3 = -alpha + ONE_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tB = (1.0f - t2 - t3) * 0.5f;
|
||||
*tA = *tB + t3;
|
||||
*tC = *tA + t2;
|
||||
}
|
||||
break;
|
||||
|
||||
// sextant v3-v4
|
||||
case 3: {
|
||||
// Vector on-times
|
||||
float t3 = TWO_BY_SQRT3 * beta;
|
||||
float t4 = -alpha - ONE_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tB = (1.0f - t3 - t4) * 0.5f;
|
||||
*tC = *tB + t3;
|
||||
*tA = *tC + t4;
|
||||
}
|
||||
break;
|
||||
|
||||
// sextant v4-v5
|
||||
case 4: {
|
||||
// Vector on-times
|
||||
float t4 = -alpha + ONE_BY_SQRT3 * beta;
|
||||
float t5 = -TWO_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tC = (1.0f - t4 - t5) * 0.5f;
|
||||
*tB = *tC + t5;
|
||||
*tA = *tB + t4;
|
||||
}
|
||||
break;
|
||||
|
||||
// sextant v5-v6
|
||||
case 5: {
|
||||
// Vector on-times
|
||||
float t5 = -alpha - ONE_BY_SQRT3 * beta;
|
||||
float t6 = alpha - ONE_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tC = (1.0f - t5 - t6) * 0.5f;
|
||||
*tA = *tC + t5;
|
||||
*tB = *tA + t6;
|
||||
}
|
||||
break;
|
||||
|
||||
// sextant v6-v1
|
||||
case 6: {
|
||||
// Vector on-times
|
||||
float t6 = -TWO_BY_SQRT3 * beta;
|
||||
float t1 = alpha + ONE_BY_SQRT3 * beta;
|
||||
|
||||
// PWM timings
|
||||
*tA = (1.0f - t6 - t1) * 0.5f;
|
||||
*tC = *tA + t1;
|
||||
*tB = *tC + t6;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// if any of the results becomes NaN, result_valid will evaluate to false
|
||||
int result_valid =
|
||||
*tA >= 0.0f && *tA <= 1.0f
|
||||
&& *tB >= 0.0f && *tB <= 1.0f
|
||||
&& *tC >= 0.0f && *tC <= 1.0f;
|
||||
|
||||
return result_valid ? 0 : -1;
|
||||
}
|
14
BoooomCTL/Controller/SVPWM/SVPWM.h
Normal file
14
BoooomCTL/Controller/SVPWM/SVPWM.h
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/16.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_SVPWM_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_SVPWM_H
|
||||
|
||||
#define M_PI (3.14159265358f)
|
||||
#define M_2PI (6.28318530716f)
|
||||
#define ONE_BY_SQRT3 (0.57735026919f)
|
||||
#define TWO_BY_SQRT3 (2.0f * 0.57735026919f)
|
||||
#define SQRT3_BY_2 (0.86602540378f)
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_SVPWM_H
|
31
BoooomCTL/Data/Angle/Angle.c
Normal file
31
BoooomCTL/Data/Angle/Angle.c
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Angle.h"
|
||||
|
||||
|
||||
//#define EncoderName MT6816
|
||||
float32_t getAngle_MT6816() {
|
||||
// printf("Test");
|
||||
|
||||
return M_PI;
|
||||
}
|
||||
|
||||
float32_t getAngle_AS5600() {
|
||||
// printf("Test");
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
bool Data_Init(tData *data) {
|
||||
switch (data->Angle.EncoderModel) {
|
||||
case MT6816:
|
||||
data->Angle.getAngle = getAngle_MT6816;
|
||||
break;
|
||||
case AS5600:
|
||||
data->Angle.getAngle = getAngle_AS5600;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
66
BoooomCTL/Data/Angle/Angle.h
Normal file
66
BoooomCTL/Data/Angle/Angle.h
Normal file
@ -0,0 +1,66 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_ANGLE_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_ANGLE_H
|
||||
|
||||
#include "APP_Main.h"
|
||||
|
||||
typedef enum {
|
||||
MT6816,
|
||||
AS5600
|
||||
} tEncoderModel;
|
||||
|
||||
typedef struct {
|
||||
tEncoderModel EncoderModel;
|
||||
|
||||
float32_t (*getAngle)();
|
||||
} tAngle;
|
||||
|
||||
typedef struct {
|
||||
tAngle Angle;
|
||||
|
||||
float32_t (*Angle_Init)();
|
||||
} tData;
|
||||
|
||||
float32_t getAngle_MT6816();
|
||||
|
||||
float32_t getAngle_AS5600();
|
||||
|
||||
bool Data_Init(tData *data);
|
||||
|
||||
|
||||
typedef struct sMT6825 {
|
||||
bool no_mag;
|
||||
bool over_speed;
|
||||
uint32_t angle;
|
||||
|
||||
uint8_t rx_err_count;
|
||||
uint8_t check_err_count;
|
||||
} tMT6825;
|
||||
|
||||
typedef struct sEncoder {
|
||||
int raw;
|
||||
int count_in_cpr;
|
||||
int count_in_cpr_prev;
|
||||
|
||||
int64_t shadow_count;
|
||||
|
||||
// pll use
|
||||
float pos_cpr_counts;
|
||||
float vel_estimate_counts;
|
||||
|
||||
float pos;
|
||||
float vel;
|
||||
|
||||
float phase;
|
||||
float phase_vel;
|
||||
|
||||
float pll_kp;
|
||||
float pll_ki;
|
||||
float interpolation;
|
||||
float snap_threshold;
|
||||
} tEncoder;
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_ANGLE_H
|
5
BoooomCTL/Data/Angle/MT6816/MT6816.c
Normal file
5
BoooomCTL/Data/Angle/MT6816/MT6816.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "MT6816.h"
|
8
BoooomCTL/Data/Angle/MT6816/MT6816.h
Normal file
8
BoooomCTL/Data/Angle/MT6816/MT6816.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_MT6816_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_MT6816_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_MT6816_H
|
5
BoooomCTL/Data/Current/Current.c
Normal file
5
BoooomCTL/Data/Current/Current.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Current.h"
|
8
BoooomCTL/Data/Current/Current.h
Normal file
8
BoooomCTL/Data/Current/Current.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_CURRENT_H
|
21
BoooomCTL/Data/Current/InteriorADC/InteriorADC.c
Normal file
21
BoooomCTL/Data/Current/InteriorADC/InteriorADC.c
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "InteriorADC.h"
|
||||
|
||||
|
||||
bool InteriorADC_Init(void) {
|
||||
//使能ADC注入
|
||||
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
|
||||
HAL_ADCEx_Calibration_Start(&hadc2, ADC_SINGLE_ENDED);
|
||||
|
||||
HAL_Delay(100);
|
||||
HAL_ADCEx_InjectedStart(&hadc1);
|
||||
__HAL_ADC_ENABLE_IT(&hadc1, ADC_IT_JEOC);
|
||||
HAL_ADCEx_InjectedStart(&hadc2);
|
||||
__HAL_ADC_ENABLE_IT(&hadc2, ADC_IT_JEOC);
|
||||
|
||||
|
||||
return 0;//返回值为零表示初始化成功
|
||||
}
|
12
BoooomCTL/Data/Current/InteriorADC/InteriorADC.h
Normal file
12
BoooomCTL/Data/Current/InteriorADC/InteriorADC.h
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H
|
||||
#include "APP_Main.h"
|
||||
|
||||
|
||||
bool InteriorADC_Init(void);
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_INTERIORADC_H
|
5
BoooomCTL/Data/Data.c
Normal file
5
BoooomCTL/Data/Data.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Data.h"
|
8
BoooomCTL/Data/Data.h
Normal file
8
BoooomCTL/Data/Data.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_DATA_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_DATA_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_DATA_H
|
5
BoooomCTL/Data/Temperature/Temperature.c
Normal file
5
BoooomCTL/Data/Temperature/Temperature.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Temperature.h"
|
8
BoooomCTL/Data/Temperature/Temperature.h
Normal file
8
BoooomCTL/Data/Temperature/Temperature.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_TEMPERATURE_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_TEMPERATURE_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_TEMPERATURE_H
|
5
BoooomCTL/Data/Voltage/Voltage.c
Normal file
5
BoooomCTL/Data/Voltage/Voltage.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Voltage.h"
|
8
BoooomCTL/Data/Voltage/Voltage.h
Normal file
8
BoooomCTL/Data/Voltage/Voltage.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_VOLTAGE_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_VOLTAGE_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_VOLTAGE_H
|
5
BoooomCTL/Parameter/Parameter.c
Normal file
5
BoooomCTL/Parameter/Parameter.c
Normal file
@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "Parameter.h"
|
8
BoooomCTL/Parameter/Parameter.h
Normal file
8
BoooomCTL/Parameter/Parameter.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_PARAMETER_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_PARAMETER_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_PARAMETER_H
|
7361
BoooomCTL/Utils/arm_math.h
Normal file
7361
BoooomCTL/Utils/arm_math.h
Normal file
File diff suppressed because it is too large
Load Diff
7
BoooomDRV/Peripheral/SPI/SPI.c
Normal file
7
BoooomDRV/Peripheral/SPI/SPI.c
Normal file
@ -0,0 +1,7 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "SPI.h"
|
||||
|
||||
|
8
BoooomDRV/Peripheral/SPI/SPI.h
Normal file
8
BoooomDRV/Peripheral/SPI/SPI.h
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_SPI_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_SPI_H
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_SPI_H
|
20
BoooomFOC_STSPIN32G4_EVB.cfg
Normal file
20
BoooomFOC_STSPIN32G4_EVB.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This is for all ST NUCLEO with any STM32G4. Known boards at the moment:
|
||||
# NUCLEO-G431KB
|
||||
# https://www.st.com/en/evaluation-tools/nucleo-g431kb.html
|
||||
# NUCLEO-G431RB
|
||||
# https://www.st.com/en/evaluation-tools/nucleo-g431rb.html
|
||||
# NUCLEO-G474RE
|
||||
# https://www.st.com/en/evaluation-tools/nucleo-g474re.html
|
||||
# NUCLEO-G491RE
|
||||
# https://www.st.com/en/evaluation-tools/nucleo-g491re.html
|
||||
|
||||
source [find interface/stlink.cfg]
|
||||
|
||||
transport select hla_swd
|
||||
|
||||
source [find target/stm32g4x.cfg]
|
||||
|
||||
;reset_config srst_only
|
||||
reset_config none
|
397
BoooomFOC_STSPIN32G4_EVB.ioc
Normal file
397
BoooomFOC_STSPIN32G4_EVB.ioc
Normal file
@ -0,0 +1,397 @@
|
||||
#MicroXplorer Configuration settings - do not modify
|
||||
ADC1.Channel-26\#ChannelRegularConversion=ADC_CHANNEL_1
|
||||
ADC1.Channel-32\#ChannelRegularConversion=ADC_CHANNEL_TEMPSENSOR_ADC1
|
||||
ADC1.CommonPathInternal=null|ADC_CHANNEL_TEMPSENSOR_ADC1|null|null
|
||||
ADC1.ContinuousConvMode=ENABLE
|
||||
ADC1.DMAContinuousRequests=ENABLE
|
||||
ADC1.DiscontinuousConvMode=DISABLE
|
||||
ADC1.EOCSelection=ADC_EOC_SEQ_CONV
|
||||
ADC1.EnableInjectedConversion=ENABLE
|
||||
ADC1.EnableRegularConversion=ENABLE
|
||||
ADC1.ExternalTrigInjecConv=ADC_EXTERNALTRIGINJEC_T1_TRGO
|
||||
ADC1.ExternalTrigInjecConvEdge=ADC_EXTERNALTRIGINJECCONV_EDGE_FALLING
|
||||
ADC1.IPParameters=ContinuousConvMode,EOCSelection,DiscontinuousConvMode,DMAContinuousRequests,EnableRegularConversion,EnableInjectedConversion,Overrun,InjectedRank-8\#ChannelInjectedConversion,InjectedChannel-8\#ChannelInjectedConversion,InjectedSamplingTime-8\#ChannelInjectedConversion,InjectedOffsetNumber-8\#ChannelInjectedConversion,InjectedRank-9\#ChannelInjectedConversion,InjectedChannel-9\#ChannelInjectedConversion,InjectedSamplingTime-9\#ChannelInjectedConversion,InjectedOffsetNumber-9\#ChannelInjectedConversion,InjNumberOfConversion,ExternalTrigInjecConv,ExternalTrigInjecConvEdge,OversamplingMode,Rank-26\#ChannelRegularConversion,Channel-26\#ChannelRegularConversion,SamplingTime-26\#ChannelRegularConversion,OffsetNumber-26\#ChannelRegularConversion,NbrOfConversionFlag,NbrOfConversion,master,Rank-32\#ChannelRegularConversion,Channel-32\#ChannelRegularConversion,SamplingTime-32\#ChannelRegularConversion,OffsetNumber-32\#ChannelRegularConversion,CommonPathInternal
|
||||
ADC1.InjNumberOfConversion=2
|
||||
ADC1.InjectedChannel-8\#ChannelInjectedConversion=ADC_CHANNEL_3
|
||||
ADC1.InjectedChannel-9\#ChannelInjectedConversion=ADC_CHANNEL_12
|
||||
ADC1.InjectedOffsetNumber-8\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC1.InjectedOffsetNumber-9\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC1.InjectedRank-8\#ChannelInjectedConversion=1
|
||||
ADC1.InjectedRank-9\#ChannelInjectedConversion=2
|
||||
ADC1.InjectedSamplingTime-8\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
ADC1.InjectedSamplingTime-9\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
ADC1.NbrOfConversion=2
|
||||
ADC1.NbrOfConversionFlag=1
|
||||
ADC1.OffsetNumber-26\#ChannelRegularConversion=ADC_OFFSET_NONE
|
||||
ADC1.OffsetNumber-32\#ChannelRegularConversion=ADC_OFFSET_NONE
|
||||
ADC1.Overrun=ADC_OVR_DATA_PRESERVED
|
||||
ADC1.OversamplingMode=DISABLE
|
||||
ADC1.Rank-26\#ChannelRegularConversion=1
|
||||
ADC1.Rank-32\#ChannelRegularConversion=2
|
||||
ADC1.SamplingTime-26\#ChannelRegularConversion=ADC_SAMPLETIME_640CYCLES_5
|
||||
ADC1.SamplingTime-32\#ChannelRegularConversion=ADC_SAMPLETIME_640CYCLES_5
|
||||
ADC1.master=1
|
||||
ADC2.CommonPathInternal=null|null|null|null
|
||||
ADC2.ContinuousConvMode=DISABLE
|
||||
ADC2.DMAContinuousRequests=DISABLE
|
||||
ADC2.EOCSelection=ADC_EOC_SEQ_CONV
|
||||
ADC2.EnableInjectedConversion=ENABLE
|
||||
ADC2.EnableRegularConversion=DISABLE
|
||||
ADC2.ExternalTrigInjecConv=ADC_EXTERNALTRIGINJEC_T1_TRGO
|
||||
ADC2.ExternalTrigInjecConvEdge=ADC_EXTERNALTRIGINJECCONV_EDGE_FALLING
|
||||
ADC2.IPParameters=EOCSelection,DMAContinuousRequests,ContinuousConvMode,EnableRegularConversion,EnableInjectedConversion,InjectedRank-3\#ChannelInjectedConversion,InjectedChannel-3\#ChannelInjectedConversion,InjectedSamplingTime-3\#ChannelInjectedConversion,InjectedOffsetNumber-3\#ChannelInjectedConversion,InjNumberOfConversion,ExternalTrigInjecConv,ExternalTrigInjecConvEdge,InjectedRank-4\#ChannelInjectedConversion,InjectedChannel-4\#ChannelInjectedConversion,InjectedSamplingTime-4\#ChannelInjectedConversion,InjectedOffsetNumber-4\#ChannelInjectedConversion,InjectedRank-5\#ChannelInjectedConversion,InjectedChannel-5\#ChannelInjectedConversion,InjectedSamplingTime-5\#ChannelInjectedConversion,InjectedOffsetNumber-5\#ChannelInjectedConversion,InjectedRank-6\#ChannelInjectedConversion,InjectedChannel-6\#ChannelInjectedConversion,InjectedSamplingTime-6\#ChannelInjectedConversion,InjectedOffsetNumber-6\#ChannelInjectedConversion,CommonPathInternal
|
||||
ADC2.InjNumberOfConversion=4
|
||||
ADC2.InjectedChannel-3\#ChannelInjectedConversion=ADC_CHANNEL_3
|
||||
ADC2.InjectedChannel-4\#ChannelInjectedConversion=ADC_CHANNEL_6
|
||||
ADC2.InjectedChannel-5\#ChannelInjectedConversion=ADC_CHANNEL_7
|
||||
ADC2.InjectedChannel-6\#ChannelInjectedConversion=ADC_CHANNEL_8
|
||||
ADC2.InjectedOffsetNumber-3\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC2.InjectedOffsetNumber-4\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC2.InjectedOffsetNumber-5\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC2.InjectedOffsetNumber-6\#ChannelInjectedConversion=ADC_OFFSET_NONE
|
||||
ADC2.InjectedRank-3\#ChannelInjectedConversion=1
|
||||
ADC2.InjectedRank-4\#ChannelInjectedConversion=2
|
||||
ADC2.InjectedRank-5\#ChannelInjectedConversion=3
|
||||
ADC2.InjectedRank-6\#ChannelInjectedConversion=4
|
||||
ADC2.InjectedSamplingTime-3\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
ADC2.InjectedSamplingTime-4\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
ADC2.InjectedSamplingTime-5\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
ADC2.InjectedSamplingTime-6\#ChannelInjectedConversion=ADC_SAMPLETIME_6CYCLES_5
|
||||
CAD.formats=
|
||||
CAD.pinconfig=
|
||||
CAD.provider=
|
||||
Dma.ADC1.0.Direction=DMA_PERIPH_TO_MEMORY
|
||||
Dma.ADC1.0.EventEnable=DISABLE
|
||||
Dma.ADC1.0.Instance=DMA1_Channel1
|
||||
Dma.ADC1.0.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
|
||||
Dma.ADC1.0.MemInc=DMA_MINC_ENABLE
|
||||
Dma.ADC1.0.Mode=DMA_CIRCULAR
|
||||
Dma.ADC1.0.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
|
||||
Dma.ADC1.0.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.ADC1.0.Polarity=HAL_DMAMUX_REQ_GEN_RISING
|
||||
Dma.ADC1.0.Priority=DMA_PRIORITY_LOW
|
||||
Dma.ADC1.0.RequestNumber=1
|
||||
Dma.ADC1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,SignalID,Polarity,RequestNumber,SyncSignalID,SyncPolarity,SyncEnable,EventEnable,SyncRequestNumber
|
||||
Dma.ADC1.0.SignalID=NONE
|
||||
Dma.ADC1.0.SyncEnable=DISABLE
|
||||
Dma.ADC1.0.SyncPolarity=HAL_DMAMUX_SYNC_NO_EVENT
|
||||
Dma.ADC1.0.SyncRequestNumber=1
|
||||
Dma.ADC1.0.SyncSignalID=NONE
|
||||
Dma.Request0=ADC1
|
||||
Dma.RequestsNb=1
|
||||
File.Version=6
|
||||
GPIO.groupedBy=Group By Peripherals
|
||||
I2C3.IPParameters=Timing
|
||||
I2C3.Timing=0x60505F8C
|
||||
KeepUserPlacement=false
|
||||
Mcu.CPN=STM32G431VBT3
|
||||
Mcu.Family=STM32G4
|
||||
Mcu.IP0=ADC1
|
||||
Mcu.IP1=ADC2
|
||||
Mcu.IP10=SYS
|
||||
Mcu.IP11=TIM1
|
||||
Mcu.IP12=USB
|
||||
Mcu.IP13=USB_DEVICE
|
||||
Mcu.IP2=DMA
|
||||
Mcu.IP3=I2C3
|
||||
Mcu.IP4=NVIC
|
||||
Mcu.IP5=OPAMP1
|
||||
Mcu.IP6=OPAMP2
|
||||
Mcu.IP7=OPAMP3
|
||||
Mcu.IP8=RCC
|
||||
Mcu.IP9=SPI1
|
||||
Mcu.IPNb=14
|
||||
Mcu.Name=STM32G431V(6-8-B)Tx
|
||||
Mcu.Package=LQFP100
|
||||
Mcu.Pin0=PF0-OSC_IN
|
||||
Mcu.Pin1=PF1-OSC_OUT
|
||||
Mcu.Pin10=PA7
|
||||
Mcu.Pin11=PC5
|
||||
Mcu.Pin12=PB0
|
||||
Mcu.Pin13=PB1
|
||||
Mcu.Pin14=PB2
|
||||
Mcu.Pin15=PE7
|
||||
Mcu.Pin16=PE8
|
||||
Mcu.Pin17=PE9
|
||||
Mcu.Pin18=PE10
|
||||
Mcu.Pin19=PE11
|
||||
Mcu.Pin2=PC0
|
||||
Mcu.Pin20=PE12
|
||||
Mcu.Pin21=PE13
|
||||
Mcu.Pin22=PE14
|
||||
Mcu.Pin23=PE15
|
||||
Mcu.Pin24=PB10
|
||||
Mcu.Pin25=PC8
|
||||
Mcu.Pin26=PC9
|
||||
Mcu.Pin27=PA11
|
||||
Mcu.Pin28=PA12
|
||||
Mcu.Pin29=PA13
|
||||
Mcu.Pin3=PC1
|
||||
Mcu.Pin30=PA14
|
||||
Mcu.Pin31=PD2
|
||||
Mcu.Pin32=PB3
|
||||
Mcu.Pin33=PB4
|
||||
Mcu.Pin34=PB5
|
||||
Mcu.Pin35=VP_ADC1_TempSens_Input
|
||||
Mcu.Pin36=VP_SYS_VS_Systick
|
||||
Mcu.Pin37=VP_SYS_VS_DBSignals
|
||||
Mcu.Pin38=VP_TIM1_VS_ClockSourceINT
|
||||
Mcu.Pin39=VP_TIM1_VS_no_output4
|
||||
Mcu.Pin4=PC2
|
||||
Mcu.Pin40=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS
|
||||
Mcu.Pin5=PA0
|
||||
Mcu.Pin6=PA1
|
||||
Mcu.Pin7=PA2
|
||||
Mcu.Pin8=PA3
|
||||
Mcu.Pin9=PA6
|
||||
Mcu.PinsNb=41
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32G431VBTx
|
||||
MxCube.Version=6.8.0
|
||||
MxDb.Version=DB.6.0.80
|
||||
NVIC.ADC1_2_IRQn=true\:1\:0\:true\:false\:true\:true\:true\:true
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.DMA1_Channel1_IRQn=true\:2\:0\:true\:false\:true\:false\:true\:true
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.ForceEnableDMAVector=true
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:false
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.SysTick_IRQn=true\:15\:0\:true\:false\:true\:false\:true\:false
|
||||
NVIC.TIM1_UP_TIM16_IRQn=true\:15\:0\:true\:false\:true\:true\:true\:true
|
||||
NVIC.USB_LP_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
PA0.Locked=true
|
||||
PA0.Mode=IN1-Single-Ended
|
||||
PA0.Signal=ADC1_IN1
|
||||
PA1.Locked=true
|
||||
PA1.Mode=Standalone
|
||||
PA1.Signal=OPAMP1_VINP
|
||||
PA11.Mode=Device
|
||||
PA11.Signal=USB_DM
|
||||
PA12.Mode=Device
|
||||
PA12.Signal=USB_DP
|
||||
PA13.Mode=Serial_Wire
|
||||
PA13.Signal=SYS_JTMS-SWDIO
|
||||
PA14.Mode=Serial_Wire
|
||||
PA14.Signal=SYS_JTCK-SWCLK
|
||||
PA2.Locked=true
|
||||
PA2.Signal=SharedAnalog_PA2
|
||||
PA3.Locked=true
|
||||
PA3.Mode=Standalone
|
||||
PA3.Signal=OPAMP1_VINM
|
||||
PA6.Locked=true
|
||||
PA6.Signal=SharedAnalog_PA6
|
||||
PA7.Locked=true
|
||||
PA7.Mode=Standalone
|
||||
PA7.Signal=OPAMP2_VINP
|
||||
PB0.Locked=true
|
||||
PB0.Mode=Standalone
|
||||
PB0.Signal=OPAMP3_VINP
|
||||
PB1.Locked=true
|
||||
PB1.Signal=SharedAnalog_PB1
|
||||
PB10.Locked=true
|
||||
PB10.Signal=GPIO_Input
|
||||
PB2.Locked=true
|
||||
PB2.Mode=Standalone
|
||||
PB2.Signal=OPAMP3_VINM
|
||||
PB3.GPIOParameters=GPIO_Speed
|
||||
PB3.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
|
||||
PB3.Locked=true
|
||||
PB3.Mode=Full_Duplex_Master
|
||||
PB3.Signal=SPI1_SCK
|
||||
PB4.GPIOParameters=GPIO_Speed,GPIO_PuPd
|
||||
PB4.GPIO_PuPd=GPIO_PULLDOWN
|
||||
PB4.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
|
||||
PB4.Locked=true
|
||||
PB4.Mode=Full_Duplex_Master
|
||||
PB4.Signal=SPI1_MISO
|
||||
PB5.GPIOParameters=GPIO_Speed
|
||||
PB5.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
|
||||
PB5.Locked=true
|
||||
PB5.Mode=Full_Duplex_Master
|
||||
PB5.Signal=SPI1_MOSI
|
||||
PC0.Locked=true
|
||||
PC0.Mode=IN6-Single-Ended
|
||||
PC0.Signal=ADC2_IN6
|
||||
PC1.Locked=true
|
||||
PC1.Mode=IN7-Single-Ended
|
||||
PC1.Signal=ADC2_IN7
|
||||
PC2.Locked=true
|
||||
PC2.Mode=IN8-Single-Ended
|
||||
PC2.Signal=ADC2_IN8
|
||||
PC5.Locked=true
|
||||
PC5.Mode=Standalone
|
||||
PC5.Signal=OPAMP2_VINM
|
||||
PC8.Locked=true
|
||||
PC8.Mode=I2C
|
||||
PC8.Signal=I2C3_SCL
|
||||
PC9.Locked=true
|
||||
PC9.Mode=I2C
|
||||
PC9.Signal=I2C3_SDA
|
||||
PD2.GPIOParameters=PinState,GPIO_Label
|
||||
PD2.GPIO_Label=SPI1_CS
|
||||
PD2.Locked=true
|
||||
PD2.PinState=GPIO_PIN_RESET
|
||||
PD2.Signal=GPIO_Output
|
||||
PE10.Locked=true
|
||||
PE10.Mode=PWM Generation2 CH2 CH2N
|
||||
PE10.Signal=TIM1_CH2N
|
||||
PE11.Locked=true
|
||||
PE11.Signal=S_TIM1_CH2
|
||||
PE12.Locked=true
|
||||
PE12.Mode=PWM Generation3 CH3 CH3N
|
||||
PE12.Signal=TIM1_CH3N
|
||||
PE13.Locked=true
|
||||
PE13.Signal=S_TIM1_CH3
|
||||
PE14.Locked=true
|
||||
PE14.Signal=GPIO_Input
|
||||
PE15.GPIOParameters=GPIO_PuPd
|
||||
PE15.GPIO_PuPd=GPIO_PULLUP
|
||||
PE15.Locked=true
|
||||
PE15.Signal=GPIO_Input
|
||||
PE7.Locked=true
|
||||
PE7.Signal=GPIO_Output
|
||||
PE8.Locked=true
|
||||
PE8.Mode=PWM Generation1 CH1 CH1N
|
||||
PE8.Signal=TIM1_CH1N
|
||||
PE9.Locked=true
|
||||
PE9.Signal=S_TIM1_CH1
|
||||
PF0-OSC_IN.Mode=HSE-External-Oscillator
|
||||
PF0-OSC_IN.Signal=RCC_OSC_IN
|
||||
PF1-OSC_OUT.Mode=HSE-External-Oscillator
|
||||
PF1-OSC_OUT.Signal=RCC_OSC_OUT
|
||||
PinOutPanel.RotationAngle=0
|
||||
ProjectManager.AskForMigrate=true
|
||||
ProjectManager.BackupPrevious=false
|
||||
ProjectManager.CompilerOptimize=6
|
||||
ProjectManager.ComputerToolchain=false
|
||||
ProjectManager.CoupleFile=true
|
||||
ProjectManager.CustomerFirmwarePackage=
|
||||
ProjectManager.DefaultFWLocation=true
|
||||
ProjectManager.DeletePrevious=true
|
||||
ProjectManager.DeviceId=STM32G431VBTx
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_G4 V1.5.1
|
||||
ProjectManager.FreePins=false
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.HeapSize=0x200
|
||||
ProjectManager.KeepUserCode=true
|
||||
ProjectManager.LastFirmware=true
|
||||
ProjectManager.LibraryCopy=1
|
||||
ProjectManager.MainLocation=Core/Src
|
||||
ProjectManager.NoMain=false
|
||||
ProjectManager.PreviousToolchain=STM32CubeIDE
|
||||
ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=BoooomFOC_STSPIN32G4_EVB.ioc
|
||||
ProjectManager.ProjectName=BoooomFOC_STSPIN32G4_EVB
|
||||
ProjectManager.ProjectStructure=
|
||||
ProjectManager.RegisterCallBack=
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=STM32CubeIDE
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UnderRoot=true
|
||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_TIM1_Init-TIM1-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_I2C3_Init-I2C3-false-HAL-true,7-MX_OPAMP1_Init-OPAMP1-false-HAL-true,8-MX_OPAMP2_Init-OPAMP2-false-HAL-true,9-MX_OPAMP3_Init-OPAMP3-false-HAL-true,10-MX_ADC2_Init-ADC2-false-HAL-true,11-MX_USB_Device_Init-USB_DEVICE-false-HAL-false,12-MX_SPI1_Init-SPI1-false-HAL-true
|
||||
RCC.ADC12Freq_Value=168000000
|
||||
RCC.AHBFreq_Value=168000000
|
||||
RCC.APB1Freq_Value=168000000
|
||||
RCC.APB1TimFreq_Value=168000000
|
||||
RCC.APB2Freq_Value=168000000
|
||||
RCC.APB2TimFreq_Value=168000000
|
||||
RCC.CK48CLockSelection=RCC_USBCLKSOURCE_HSI48
|
||||
RCC.CRSFreq_Value=48000000
|
||||
RCC.CortexFreq_Value=168000000
|
||||
RCC.EXTERNAL_CLOCK_VALUE=12288000
|
||||
RCC.EnbaleCSS=true
|
||||
RCC.FCLKCortexFreq_Value=168000000
|
||||
RCC.FDCANFreq_Value=168000000
|
||||
RCC.FamilyName=M
|
||||
RCC.HCLKFreq_Value=168000000
|
||||
RCC.HSE_VALUE=24000000
|
||||
RCC.HSI48_VALUE=48000000
|
||||
RCC.HSI_VALUE=16000000
|
||||
RCC.I2C1Freq_Value=168000000
|
||||
RCC.I2C2Freq_Value=168000000
|
||||
RCC.I2C3Freq_Value=168000000
|
||||