updates
small bugfixes
This commit is contained in:
parent
53a44a4075
commit
213ee88c7a
15
.cproject
15
.cproject
@ -23,8 +23,9 @@
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.833723389" 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.409027395" 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.361525777" 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.211023288" 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.5 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32L432KBUx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L432xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L432KBUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.211023288" 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 || STM32L432KBUx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L432xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L432KBUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec.272750366" name="Convert to Motorola S-record file (-O srec)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1715051389" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="80" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.2138064041" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/tecware}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.657341031" 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.1606333987" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||
@ -37,7 +38,7 @@
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.678807872" 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.1884005207" 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.473901733" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.473901733" name="Optimization level" 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.og" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.2048405920" 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"/>
|
||||
@ -65,7 +66,7 @@
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1812177092" 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.2043918073" 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.1677716817" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" useByScannerDiscovery="false" value="${workspace_loc:/${ProjName}/STM32L432KBUx_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1677716817" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" useByScannerDiscovery="false" value="C:\Users\pique_n\Documents\Coldbox\TEC\tecware\STM32L432KBUx_FLASH.ld" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1089738183" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
@ -114,7 +115,9 @@
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.457493302" 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.763486195" 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.224854253" 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.1312392313" 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.5 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32L432KBUx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L432xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L432KBUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1312392313" 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 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32L432KBUx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc | ../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy | ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F | ../Drivers/CMSIS/Device/ST/STM32L4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32L432xx || || Drivers | Core/Startup | Middlewares | Core || || || ${workspace_loc:/${ProjName}/STM32L432KBUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec.1805742769" name="Convert to Motorola S-record file (-O srec)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.469807489" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="80" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.432480065" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/tecware}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1234401549" 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.984649609" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||
@ -128,7 +131,7 @@
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.242899579" 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.324924561" 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.g0" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1093707108" name="Optimization level" 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 id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1093707108" name="Optimization level" 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.og" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1051675013" 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="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32L432xx"/>
|
||||
@ -156,7 +159,7 @@
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1591620368" name="Optimization level" 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.642006127" 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.1617712272" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32L432KBUX_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1617712272" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32L432KBUx_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.362678597" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ Debug/**
|
||||
Debug/
|
||||
build/
|
||||
/Release/
|
||||
.metadata/**
|
||||
|
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
||||
<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="-1334530455183847715" 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">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1631119689331759957" 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>
|
||||
@ -16,7 +16,7 @@
|
||||
<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="-1334530455183847715" 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">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1631119689331759957" 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>
|
||||
|
@ -1,4 +1,4 @@
|
||||
2F62501ED4689FB349E356AB974DBE57=8C7CA2FF22792B677E2301DA43039820
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=8C7CA2FF22792B677E2301DA43039820
|
||||
DC22A860405A8BF2F2C095E5B6529F12=F216BE080F2C17807F72AFE2348FF317
|
||||
2F62501ED4689FB349E356AB974DBE57=97AEA8F7A6DEDA08C53D5080FEC61304
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=97AEA8F7A6DEDA08C53D5080FEC61304
|
||||
DC22A860405A8BF2F2C095E5B6529F12=BDCA684B3CBB9004D0FD137F3977D13A
|
||||
eclipse.preferences.version=1
|
||||
|
@ -157,6 +157,7 @@ PRIVATE VOID vTask( PVOID arg )
|
||||
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
boOK &= ERRH_boInitializeModule();
|
||||
boOK &= USFL_boInitializeModule();
|
||||
boOK &= VARH_boInitializeModule();
|
||||
|
||||
|
@ -263,7 +263,7 @@ PRIVATE VOID vTask( PVOID arg )
|
||||
CAND_boSendMessage( au8Buffer, 5, stMessage.boIsPrivate, stMessage.u8Type );
|
||||
}
|
||||
|
||||
} else if( u8Type == MESSAGE_TYPE_WRITE ){ // Message type writeset
|
||||
} else if( u8Type == MESSAGE_TYPE_WRITE ){ // Message type write
|
||||
VARH_UVariable uData;
|
||||
UTIL_vMemCopy(&stMessage.au8Data[1], &uData, 4);
|
||||
|
||||
@ -294,9 +294,8 @@ PRIVATE VOID vTask( PVOID arg )
|
||||
CAND_boSendMessage( au8Buffer, 2, stMessage.boIsPrivate, stMessage.u8Type );
|
||||
break;
|
||||
case COMMAND_SAVE_VARIABLES:
|
||||
au8Buffer[0] = COMMAND_SAVE_VARIABLES;
|
||||
au8Buffer[1] = VARH_vSaveVariablestoFlash() ? 0xFF : 0x00;
|
||||
CAND_boSendMessage( au8Buffer, 2, stMessage.boIsPrivate, stMessage.u8Type );
|
||||
VARH_vSaveVariablestoFlash();
|
||||
// @TODO Error handling Flash Save
|
||||
break;
|
||||
case COMMAND_LOAD_VARIABLES:
|
||||
VARH_vLoadVariablesfromFlash();
|
||||
|
@ -23,8 +23,6 @@
|
||||
//
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: INCLUDES
|
||||
// Description: List of required include files.
|
||||
@ -32,7 +30,7 @@
|
||||
|
||||
#include "PECO_PeltierController.h"
|
||||
|
||||
//Application
|
||||
// Application
|
||||
#include "../Application/VARH_VariableHandler.h"
|
||||
|
||||
// Driver
|
||||
@ -52,35 +50,27 @@
|
||||
// Description: Definition of local constants (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
#define REFRESH 100 // Refresh rate in ms
|
||||
#define REFRESH 200 // Refresh rate in ms
|
||||
|
||||
#define EVENT_TIMER_UPDATE ((U32)(1<<0))
|
||||
#define EVENT_TIMER_UPDATE ((U32)(1 << 0))
|
||||
|
||||
#define EVENT_FLAGS_ALL ( EVENT_TIMER_UPDATE )
|
||||
#define EVENT_FLAGS_ALL (EVENT_TIMER_UPDATE)
|
||||
|
||||
//=================================================================================================
|
||||
// Section: MACROS
|
||||
// Description: Definition of local macros (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: ENUMERATIONS
|
||||
// Description: Definition of local enumerations (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: STRUCTURES
|
||||
// Description: Definition of local Structures (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL VARIABLES
|
||||
// Description: Definition of local variables (visible by this module only).
|
||||
@ -96,7 +86,7 @@ LOCAL osEventFlagsId_t m_pstEventID = NULL;
|
||||
//=================================================================================================
|
||||
|
||||
LOCAL CONST osThreadAttr_t stTaskAttribute =
|
||||
{
|
||||
{
|
||||
"PECO_Thread", // name of the thread
|
||||
osThreadDetached, // attribute bits
|
||||
NULL, // memory for control block
|
||||
@ -109,7 +99,7 @@ LOCAL CONST osThreadAttr_t stTaskAttribute =
|
||||
};
|
||||
|
||||
LOCAL CONST osTimerAttr_t stTimerAttribute =
|
||||
{
|
||||
{
|
||||
"PECO_UpdateTimer", // name of the timer
|
||||
0, // attribute bits
|
||||
NULL, // memory for control block
|
||||
@ -117,29 +107,27 @@ LOCAL CONST osTimerAttr_t stTimerAttribute =
|
||||
};
|
||||
|
||||
LOCAL CONST osEventFlagsAttr_t stEventAttribute =
|
||||
{
|
||||
{
|
||||
"PECO_Event_Flags", // name of the event flags
|
||||
0, // attribute bits
|
||||
NULL, // memory for control block
|
||||
0, // size of provided memory for control block
|
||||
};
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL FUNCTIONS (PROTOTYPES)
|
||||
// Description: Definition of local functions (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
PRIVATE VOID vTask( PVOID arg );
|
||||
BOOL boSetPeltierVoltage( FLOAT Voltage );
|
||||
PRIVATE VOID vEventCallback( PVOID pvData );
|
||||
PRIVATE VOID vTask(PVOID arg);
|
||||
BOOL boSetPeltierVoltage(FLOAT Voltage);
|
||||
PRIVATE VOID vEventCallback(PVOID pvData);
|
||||
|
||||
//=================================================================================================
|
||||
// Section: EXTERNAL FUNCTIONS
|
||||
// Description: Definition of external (global) functions.
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: EXTERNAL VARIABLES
|
||||
// Description: Definition of external (global) variables.
|
||||
@ -159,19 +147,19 @@ extern IWDG_HandleTypeDef hiwdg;
|
||||
// Returns: Boolean TRUE if successful
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL PECO_boInitializeModule( VOID )
|
||||
BOOL PECO_boInitializeModule(VOID)
|
||||
{
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
boOK &= ( ( m_pstThreadID = osThreadNew( vTask, NULL, &stTaskAttribute ) ) == NULL ) ? FALSE : TRUE;
|
||||
boOK &= ( ( m_pstEventID = osEventFlagsNew( &stEventAttribute ) ) == NULL) ? FALSE : TRUE;
|
||||
boOK &= ( m_pstUpdateTimer = osTimerNew( vEventCallback, osTimerPeriodic, (PVOID)EVENT_TIMER_UPDATE, &stTimerAttribute ) ) == NULL ? FALSE : TRUE;
|
||||
boOK &= ((m_pstThreadID = osThreadNew(vTask, NULL, &stTaskAttribute)) == NULL) ? FALSE : TRUE;
|
||||
boOK &= ((m_pstEventID = osEventFlagsNew(&stEventAttribute)) == NULL) ? FALSE : TRUE;
|
||||
boOK &= (m_pstUpdateTimer = osTimerNew(vEventCallback, osTimerPeriodic, (PVOID)EVENT_TIMER_UPDATE, &stTimerAttribute)) == NULL ? FALSE : TRUE;
|
||||
|
||||
boSetPeltierVoltage(0);
|
||||
|
||||
boOK &= (osTimerStart( m_pstUpdateTimer, REFRESH ) == osOK ) ? TRUE : FALSE;
|
||||
boOK &= (osTimerStart(m_pstUpdateTimer, REFRESH) == osOK) ? TRUE : FALSE;
|
||||
|
||||
return( boOK );
|
||||
return (boOK);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
@ -180,9 +168,10 @@ BOOL PECO_boInitializeModule( VOID )
|
||||
// Parameters: BOOL boEnable
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
VOID PECO_Enable( BOOL boEnable ){
|
||||
VOID PECO_Enable(BOOL boEnable)
|
||||
{
|
||||
DIPO_vSetState(DIPO_eEN, boEnable);
|
||||
VARH_vSetVariableDataFromSystemU32( VARH_ePowerState, (U32)boEnable );
|
||||
VARH_vSetVariableDataFromSystemU32(VARH_ePowerState, (U32)boEnable);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
@ -191,8 +180,9 @@ VOID PECO_Enable( BOOL boEnable ){
|
||||
// Parameters: None
|
||||
// Returns: BOOL boEnableOutput
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
BOOL PECO_isEnabled( VOID ){
|
||||
return (BOOL)VARH_u32GetVariableData( VARH_ePowerState );
|
||||
BOOL PECO_isEnabled(VOID)
|
||||
{
|
||||
return (BOOL)VARH_u32GetVariableData(VARH_ePowerState);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@ -206,44 +196,44 @@ BOOL PECO_isEnabled( VOID ){
|
||||
// Parameters: None
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
VOID vTask( PVOID arg )
|
||||
VOID vTask(PVOID arg)
|
||||
{
|
||||
|
||||
UNUSED( arg );
|
||||
UNUSED(arg);
|
||||
U32 u32Flags;
|
||||
|
||||
FLOAT last_error = 0;
|
||||
FLOAT integral = 0;
|
||||
FLOAT dT = REFRESH / 1000.0f; // 0.1s
|
||||
FLOAT dT = REFRESH / 1000.0f; // 0.2s
|
||||
|
||||
while ( TRUE )
|
||||
while (TRUE)
|
||||
{
|
||||
|
||||
u32Flags = osEventFlagsWait( m_pstEventID, EVENT_FLAGS_ALL, osFlagsWaitAny, osWaitForever );
|
||||
u32Flags = osEventFlagsWait(m_pstEventID, EVENT_FLAGS_ALL, osFlagsWaitAny, osWaitForever);
|
||||
|
||||
if( u32Flags & EVENT_TIMER_UPDATE )
|
||||
if (u32Flags & EVENT_TIMER_UPDATE)
|
||||
{
|
||||
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
|
||||
if ( PECO_isEnabled() )
|
||||
if (PECO_isEnabled())
|
||||
{
|
||||
|
||||
if ( VARH_u32GetVariableData( VARH_eMode ) == PECO_eConstTemp )
|
||||
if (VARH_u32GetVariableData(VARH_eMode) == PECO_eConstTemp)
|
||||
{
|
||||
// TODO: check the measurements, everything ok?
|
||||
/** @todo check power good pin */
|
||||
|
||||
|
||||
// PID Regelung
|
||||
|
||||
FLOAT kp = VARH_flGetVariableData( VARH_ePID_kp );
|
||||
FLOAT ki = VARH_flGetVariableData( VARH_ePID_ki );
|
||||
FLOAT kd = VARH_flGetVariableData( VARH_ePID_kd );
|
||||
FLOAT max = VARH_flGetVariableData( VARH_ePID_Max );
|
||||
FLOAT min = VARH_flGetVariableData( VARH_ePID_Min );
|
||||
FLOAT kp = VARH_flGetVariableData(VARH_ePID_kp);
|
||||
FLOAT ki = VARH_flGetVariableData(VARH_ePID_ki);
|
||||
FLOAT kd = VARH_flGetVariableData(VARH_ePID_kd);
|
||||
FLOAT max = VARH_flGetVariableData(VARH_ePID_Max);
|
||||
FLOAT min = VARH_flGetVariableData(VARH_ePID_Min);
|
||||
|
||||
FLOAT Tnow = VARH_flGetVariableData( VARH_eTemp_Module );
|
||||
FLOAT Tset = VARH_flGetVariableData( VARH_ePID_Temp );
|
||||
FLOAT Tnow = VARH_flGetVariableData(VARH_eTemp_Module);
|
||||
FLOAT Tset = VARH_flGetVariableData(VARH_ePID_Temp);
|
||||
|
||||
// -error
|
||||
FLOAT error = Tnow - Tset;
|
||||
@ -256,38 +246,40 @@ VOID vTask( PVOID arg )
|
||||
FLOAT I = ki * integral;
|
||||
|
||||
// derivative term
|
||||
FLOAT D = kd * ( error - last_error ) / dT;
|
||||
FLOAT D = kd * (error - last_error) / dT;
|
||||
last_error = error;
|
||||
|
||||
// total
|
||||
FLOAT output = P + I + D;
|
||||
|
||||
// limitter
|
||||
if ( output > max ){
|
||||
if (output > max)
|
||||
{
|
||||
output = max;
|
||||
integral = 0;
|
||||
} else if ( output < min ){
|
||||
}
|
||||
else if (output < min)
|
||||
{
|
||||
output = min;
|
||||
integral = 0;
|
||||
}
|
||||
|
||||
boSetPeltierVoltage( output ); // set the output
|
||||
|
||||
} else if ( VARH_u32GetVariableData( VARH_eMode ) == PECO_eConst_Voltage )
|
||||
boSetPeltierVoltage(output); // set the output
|
||||
}
|
||||
else if (VARH_u32GetVariableData(VARH_eMode) == PECO_eConst_Voltage)
|
||||
{
|
||||
boSetPeltierVoltage(VARH_flGetVariableData(VARH_eControlVoltage)); // set the output
|
||||
last_error = 0;
|
||||
integral = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
boSetPeltierVoltage( VARH_flGetVariableData( VARH_eControlVoltage ) ); // set the output
|
||||
last_error = 0;
|
||||
integral = 0;
|
||||
}
|
||||
} else {
|
||||
last_error = 0;
|
||||
integral = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
@ -296,15 +288,18 @@ VOID vTask( PVOID arg )
|
||||
// Parameters: S8 Voltage (12V - -3V)
|
||||
// Returns: Boolean TRUE if successful
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
BOOL boSetPeltierVoltage( FLOAT Voltage ){
|
||||
BOOL boSetPeltierVoltage(FLOAT Voltage)
|
||||
{
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
if( Voltage > 12 ) Voltage = 12;
|
||||
if( Voltage < -3 ) Voltage = -3;
|
||||
if (Voltage > 12)
|
||||
Voltage = 12;
|
||||
if (Voltage < -3)
|
||||
Voltage = -3;
|
||||
|
||||
boOK &= ANPO_boSetVoltage( ( ( (FLOAT)Voltage ) + 20.088) / 34.103 );
|
||||
boOK &= ANPO_boSetVoltage(Voltage);
|
||||
|
||||
return( boOK );
|
||||
return (boOK);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
@ -313,9 +308,7 @@ BOOL boSetPeltierVoltage( FLOAT Voltage ){
|
||||
// Parameters: None
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
PRIVATE VOID vEventCallback( PVOID pvData )
|
||||
PRIVATE VOID vEventCallback(PVOID pvData)
|
||||
{
|
||||
osEventFlagsSet( m_pstEventID, (U32)pvData );
|
||||
osEventFlagsSet(m_pstEventID, (U32)pvData);
|
||||
}
|
||||
|
||||
|
||||
|
@ -195,12 +195,12 @@ BOOL ADCD_boInitializeModule( VOID )
|
||||
|
||||
osMutexAcquire( m_pstMutexID, osWaitForever );
|
||||
|
||||
// Conifg ADC Cold
|
||||
// Conifg ADC Module
|
||||
DIPO_vSetOutput( DIPO_eCS_Module );
|
||||
boOK &= boWriteReg( REG_CONFIG, (U16) CONFIG | CONFIG_FAULTSTATCLEAR, FALSE );
|
||||
DIPO_vResetOutput( DIPO_eCS_Module );
|
||||
|
||||
// Config ADC Hot
|
||||
// Config ADC Water
|
||||
DIPO_vSetOutput( DIPO_eCS_Water );
|
||||
boOK &= boWriteReg( REG_CONFIG, (U16) CONFIG | CONFIG_FAULTSTATCLEAR, FALSE );
|
||||
DIPO_vResetOutput( DIPO_eCS_Water );
|
||||
@ -250,7 +250,7 @@ BOOL ADCD_boReadData( ADCD_EnTemps eChannel, PU8 pu8Error, PU16 pu16Data )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( ( u16Data & 0x0001 ) == 0x0001 )
|
||||
if( ( u16Data & 0x0001 ) == 0x0001 ) // error
|
||||
{
|
||||
|
||||
osMutexAcquire( m_pstMutexID, osWaitForever );
|
||||
|
@ -63,6 +63,8 @@
|
||||
#define OVERSAMPLING_DIVISOR 16.0f // calculated with parameters from hardware oversampling
|
||||
// 6 bits(64x) - 2 bit shift = 4bit -> 16x
|
||||
|
||||
#define ALMOST_ZERO 0.05
|
||||
|
||||
//=================================================================================================
|
||||
// Section: MACROS
|
||||
// Description: Definition of local macros (visible by this module only).
|
||||
@ -93,6 +95,8 @@ LOCAL osThreadId_t m_pstThreadID = NULL;
|
||||
LOCAL osEventFlagsId_t m_pstEventID = NULL;
|
||||
LOCAL osMutexId_t m_pstMutexID = NULL;
|
||||
|
||||
LOCAL FLOAT aflValues[ANPI_eInNumberOfInputs]; // values
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL CONSTANTS
|
||||
// Description: Definition of local constants (visible by this module only).
|
||||
@ -208,7 +212,6 @@ VOID vTask( PVOID arg )
|
||||
U16 u16Offset;
|
||||
FLOAT flUadc;
|
||||
U32 au32ADCRawData[ANPI_eInNumberOfInputs];
|
||||
FLOAT aflValues[ANPI_eInNumberOfInputs]; // values
|
||||
|
||||
osDelay( 1 ); // Wait 1ms to have a Valid Value
|
||||
|
||||
@ -238,9 +241,21 @@ VOID vTask( PVOID arg )
|
||||
aflValues[u16Cnt] = flUadc * m_aflConversionFactor[u16Cnt] - m_aflOffset[u16Cnt];
|
||||
}
|
||||
|
||||
// Filter
|
||||
for( U16 u16Cnt = 0; u16Cnt < ANPI_eInNumberOfInputs; u16Cnt++ )
|
||||
{
|
||||
if ( -ALMOST_ZERO <= aflValues[u16Cnt] && aflValues[u16Cnt] < ALMOST_ZERO)
|
||||
aflValues[u16Cnt] = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_ePeltier_U, aflValues[ANPI_eOutputVoltage] );
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_ePeltier_I, aflValues[ANPI_eOutputCurrent] );
|
||||
if ( aflValues[ANPI_eOutputCurrent] == 0.0f ){
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_ePeltier_R, 0.0f );
|
||||
} else {
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_ePeltier_R, aflValues[ANPI_eOutputVoltage] / aflValues[ANPI_eOutputCurrent] );
|
||||
}
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_ePeltier_P, aflValues[ANPI_eOutputVoltage] * aflValues[ANPI_eOutputCurrent] );
|
||||
|
||||
VARH_vSetVariableDataFromSystemFloat( VARH_eSupply_U, aflValues[ANPI_eSupplyVoltage24V] );
|
||||
@ -262,6 +277,21 @@ void HAL_ADC_ConvCpltCallback( ADC_HandleTypeDef* hadc )
|
||||
osEventFlagsSet( m_pstEventID, ANPI_ADC_FULL_COMPLETE );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: HAL_ADC_ConvCpltCallback
|
||||
// Description: Handles the ADC interrupts
|
||||
// Parameters: None
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
FLOAT ANPI_GetVoltage( ANPI_EnAnalogInput enVoltage )
|
||||
{
|
||||
osMutexAcquire( m_pstMutexID, osWaitForever ); // aquire mutex
|
||||
FLOAT flVoltage = aflValues[enVoltage];
|
||||
osMutexRelease( m_pstMutexID ); // release mutex
|
||||
return flVoltage;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: HAL_ADC_ConvHalfCpltCallback
|
||||
// Description: Handles the ADC interrupts
|
||||
|
@ -94,6 +94,7 @@ typedef enum
|
||||
//=================================================================================================
|
||||
|
||||
BOOL ANPI_boInitializeModule( VOID );
|
||||
FLOAT ANPI_GetVoltage( ANPI_EnAnalogInput enVoltage );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -23,16 +23,16 @@
|
||||
//
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: INCLUDES
|
||||
// Description: List of required include files.
|
||||
//=================================================================================================
|
||||
|
||||
#include "ANPO_AnalogPortsOut.h"
|
||||
#include "ANPI_AnalogPortsIn.h"
|
||||
|
||||
#include "VARH_VariableHandler.h"
|
||||
#include "DIPO_DigitalPorts.h"
|
||||
|
||||
// Toolbox
|
||||
#include "../Toolbox/UTIL_Utility.h"
|
||||
@ -47,56 +47,92 @@
|
||||
// Description: Definition of local constants (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
#define REFRESH 50 // Refresh rate in ms
|
||||
|
||||
#define EVENT_TIMER_UPDATE ((U32)(1 << 0))
|
||||
|
||||
#define EVENT_FLAGS_ALL (EVENT_TIMER_UPDATE)
|
||||
|
||||
#define OFFSET 20.088
|
||||
#define FACTOR 34.103448
|
||||
|
||||
//=================================================================================================
|
||||
// Section: MACROS
|
||||
// Description: Definition of local macros (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: ENUMERATIONS
|
||||
// Description: Definition of local enumerations (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: STRUCTURES
|
||||
// Description: Definition of local Structures (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL VARIABLES
|
||||
// Description: Definition of local variables (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
LOCAL osThreadId_t m_pstThreadID = NULL;
|
||||
LOCAL osTimerId_t m_pstUpdateTimer = NULL;
|
||||
LOCAL osEventFlagsId_t m_pstEventID = NULL;
|
||||
|
||||
LOCAL FLOAT flVoltageActual = 0.0f;
|
||||
LOCAL FLOAT flVoltageSet = 0.0f;
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL CONSTANTS
|
||||
// Description: Definition of local constants (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
LOCAL CONST osThreadAttr_t stTaskAttribute =
|
||||
{
|
||||
"ANPO_Thread", // name of the thread
|
||||
osThreadDetached, // attribute bits
|
||||
NULL, // memory for control block
|
||||
0, // size of provided memory for control block
|
||||
NULL, // memory for stack
|
||||
1024, // size of stack
|
||||
osPriorityNormal, // initial thread priority (default: osPriorityNormal)
|
||||
0, // TrustZone module identifier
|
||||
0, // reserved (must be 0)
|
||||
};
|
||||
|
||||
LOCAL CONST osTimerAttr_t stTimerAttribute =
|
||||
{
|
||||
"ANPO_UpdateTimer", // name of the timer
|
||||
0, // attribute bits
|
||||
NULL, // memory for control block
|
||||
0, // size of provided memory for control block
|
||||
};
|
||||
|
||||
LOCAL CONST osEventFlagsAttr_t stEventAttribute =
|
||||
{
|
||||
"ANPO_Event_Flags", // name of the event flags
|
||||
0, // attribute bits
|
||||
NULL, // memory for control block
|
||||
0, // size of provided memory for control block
|
||||
};
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL FUNCTIONS (PROTOTYPES)
|
||||
// Description: Definition of local functions (visible by this module only).
|
||||
//=================================================================================================
|
||||
|
||||
U32 u32ConvertVoltagetoRaw( FLOAT flVoltage );
|
||||
U32 u32ConvertVoltagetoRaw(FLOAT flVoltage);
|
||||
BOOL boUpdateVoltage(VOID);
|
||||
|
||||
PRIVATE VOID vTask(PVOID arg);
|
||||
PRIVATE VOID vEventCallback(PVOID pvData);
|
||||
|
||||
//=================================================================================================
|
||||
// Section: EXTERNAL FUNCTIONS
|
||||
// Description: Definition of external (global) functions.
|
||||
//=================================================================================================
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: EXTERNAL VARIABLES
|
||||
// Description: Definition of external (global) variables.
|
||||
@ -116,13 +152,19 @@ extern DAC_HandleTypeDef hdac1;
|
||||
// Returns: Boolean, TRUE if successful
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
BOOL ANPO_boInitializeModule( VOID )
|
||||
BOOL ANPO_boInitializeModule(VOID)
|
||||
{
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
boOK &= HAL_DAC_Start( &hdac1, DAC_CHANNEL_1 ) == HAL_OK ? TRUE : FALSE;
|
||||
boOK &= ((m_pstThreadID = osThreadNew(vTask, NULL, &stTaskAttribute)) == NULL) ? FALSE : TRUE;
|
||||
boOK &= ((m_pstEventID = osEventFlagsNew(&stEventAttribute)) == NULL) ? FALSE : TRUE;
|
||||
boOK &= (m_pstUpdateTimer = osTimerNew(vEventCallback, osTimerPeriodic, (PVOID)EVENT_TIMER_UPDATE, &stTimerAttribute)) == NULL ? FALSE : TRUE;
|
||||
|
||||
return( boOK );
|
||||
boOK &= HAL_DAC_Start(&hdac1, DAC_CHANNEL_1) == HAL_OK ? TRUE : FALSE;
|
||||
|
||||
boOK &= (osTimerStart(m_pstUpdateTimer, REFRESH) == osOK) ? TRUE : FALSE;
|
||||
|
||||
return (boOK);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
@ -130,20 +172,82 @@ BOOL ANPO_boInitializeModule( VOID )
|
||||
// Descriptionn: Definition (implementation) of local functions.
|
||||
//=================================================================================================
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: vTask
|
||||
// Description: Task
|
||||
// Parameters: None
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
VOID vTask(PVOID arg)
|
||||
{
|
||||
UNUSED(arg);
|
||||
U32 u32EventFlags = 0;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
u32EventFlags = osEventFlagsWait(m_pstEventID, EVENT_FLAGS_ALL, osFlagsWaitAny, osWaitForever);
|
||||
|
||||
if (u32EventFlags & EVENT_TIMER_UPDATE)
|
||||
{
|
||||
boUpdateVoltage();
|
||||
|
||||
BOOL boPowerGood = DIPO_boGetInput(DIPO_ePG);
|
||||
/** @todo check power good pin */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: ANPO_boSetVoltage
|
||||
// Description: Sets the DAC Output to a specific Voltage
|
||||
// Description: Sets the Variable to a specific Voltage
|
||||
// Parameters: FLOAT Voltage
|
||||
// Returns: Boolean, TRUE if successful
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
BOOL ANPO_boSetVoltage( FLOAT flVoltage ){
|
||||
BOOL ANPO_boSetVoltage(FLOAT flVoltage)
|
||||
{
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
U32 u32RawData = u32ConvertVoltagetoRaw( flVoltage );
|
||||
flVoltageSet = flVoltage;
|
||||
|
||||
boOK &= HAL_DAC_SetValue( &hdac1, DAC_CHANNEL_1, DAC_ALIGN_12B_R, u32RawData );
|
||||
boOK &= osEventFlagsSet(m_pstEventID, EVENT_TIMER_UPDATE) == osOK ? TRUE : FALSE;
|
||||
|
||||
return( boOK );
|
||||
|
||||
return (boOK);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: boUpdateVoltage
|
||||
// Description: Updates the Voltage of the DAC Output with a ramp
|
||||
// Parameters: FLOAT Voltage
|
||||
// Returns: Boolean, TRUE if successful
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
BOOL boUpdateVoltage(VOID)
|
||||
{
|
||||
BOOL boOK = TRUE;
|
||||
|
||||
|
||||
if (flVoltageActual < flVoltageSet)
|
||||
{
|
||||
flVoltageActual += 0.1;
|
||||
if (flVoltageActual > flVoltageSet)
|
||||
{
|
||||
flVoltageActual = flVoltageSet;
|
||||
}
|
||||
}
|
||||
else if (flVoltageActual > flVoltageSet)
|
||||
{
|
||||
flVoltageActual -= 0.1;
|
||||
if (flVoltageActual < flVoltageSet)
|
||||
{
|
||||
flVoltageActual = flVoltageSet;
|
||||
}
|
||||
}
|
||||
|
||||
U32 u32RawData = u32ConvertVoltagetoRaw(flVoltageActual);
|
||||
|
||||
boOK &= HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_1, DAC_ALIGN_12B_R, u32RawData) == HAL_OK ? TRUE : FALSE;
|
||||
|
||||
return (boOK);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
@ -152,14 +256,24 @@ BOOL ANPO_boSetVoltage( FLOAT flVoltage ){
|
||||
// Parameters: FLOAT Voltage
|
||||
// Returns: U32
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
U32 u32ConvertVoltagetoRaw( FLOAT flVoltage ){
|
||||
U32 u32ConvertVoltagetoRaw(FLOAT flVoltage)
|
||||
{
|
||||
U32 RawData;
|
||||
|
||||
RawData = flVoltage * 4095 / VARH_flGetVariableData(VARH_eRef_U);
|
||||
FLOAT flTempVoltage = (((FLOAT)flVoltage) + OFFSET) / FACTOR;
|
||||
|
||||
RawData = flTempVoltage * 4095 / VARH_flGetVariableData(VARH_eRef_U);
|
||||
|
||||
return RawData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: vEventCallback
|
||||
// Description: Callback for events
|
||||
// Parameters: None
|
||||
// Returns: None
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
PRIVATE VOID vEventCallback(PVOID pvData)
|
||||
{
|
||||
osEventFlagsSet(m_pstEventID, (U32)pvData);
|
||||
}
|
||||
|
@ -113,6 +113,8 @@ BOOL ERRH_boInitializeModule( VOID )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: LOCAL FUNCTIONS
|
||||
// Descriptionn: Definition (implementation) of local functions.
|
||||
|
@ -42,7 +42,35 @@ extern "C" {
|
||||
// Description: Definition of global constants (visible by all modules).
|
||||
//=================================================================================================
|
||||
|
||||
// Error Definition
|
||||
|
||||
#define NO_ERROR 0x00000000
|
||||
|
||||
// CAN Errors
|
||||
|
||||
|
||||
// SPI Errors
|
||||
|
||||
|
||||
// ADC Errors
|
||||
|
||||
|
||||
// Analog In Errors
|
||||
|
||||
|
||||
// Temperature Errors
|
||||
|
||||
|
||||
// Userflash Errors
|
||||
|
||||
|
||||
// Peltier Controller Errors
|
||||
|
||||
|
||||
// Main Application Errors
|
||||
|
||||
|
||||
// HardFault Errors
|
||||
|
||||
//=================================================================================================
|
||||
// Section: MACROS
|
||||
|
@ -210,7 +210,7 @@ PRIVATE VOID vTask( PVOID arg )
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Function: flConvertADCData
|
||||
// Description: Converts resistor value to temperature data
|
||||
// Description: Converts resistor value(PT1000) to temperature data
|
||||
// Parameters: U16 u16RTemp
|
||||
// Returns: U16, temperature in Celcius
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
@ -40,6 +40,7 @@
|
||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
/*#define HAL_COMP_MODULE_ENABLED */
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_CRC_MODULE_ENABLED
|
||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||
#define HAL_DAC_MODULE_ENABLED
|
||||
@ -85,7 +86,6 @@
|
||||
/*#define HAL_PSSI_MODULE_ENABLED */
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
#define HAL_FLASH_MODULE_ENABLED
|
||||
|
@ -604,6 +604,8 @@ static void MX_DMA_Init(void)
|
||||
static void MX_GPIO_Init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
||||
/* USER CODE END MX_GPIO_Init_1 */
|
||||
|
||||
/* GPIO Ports Clock Enable */
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
@ -658,6 +660,8 @@ static void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
||||
/* USER CODE END MX_GPIO_Init_2 */
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 4 */
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
338
Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_iwdg.h
Normal file
338
Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_iwdg.h
Normal file
@ -0,0 +1,338 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32l4xx_ll_iwdg.h
|
||||
* @author MCD Application Team
|
||||
* @brief Header file of IWDG LL module.
|
||||
******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef STM32L4xx_LL_IWDG_H
|
||||
#define STM32L4xx_LL_IWDG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32l4xx.h"
|
||||
|
||||
/** @addtogroup STM32L4xx_LL_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if defined(IWDG)
|
||||
|
||||
/** @defgroup IWDG_LL IWDG
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Private types -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup IWDG_LL_Private_Constants IWDG Private Constants
|
||||
* @{
|
||||
*/
|
||||
#define LL_IWDG_KEY_RELOAD 0x0000AAAAU /*!< IWDG Reload Counter Enable */
|
||||
#define LL_IWDG_KEY_ENABLE 0x0000CCCCU /*!< IWDG Peripheral Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_ENABLE 0x00005555U /*!< IWDG KR Write Access Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_DISABLE 0x00000000U /*!< IWDG KR Write Access Disable */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/** @defgroup IWDG_LL_Exported_Constants IWDG Exported Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IWDG_LL_EC_GET_FLAG Get Flags Defines
|
||||
* @brief Flags defines which can be used with LL_IWDG_ReadReg function
|
||||
* @{
|
||||
*/
|
||||
#define LL_IWDG_SR_PVU IWDG_SR_PVU /*!< Watchdog prescaler value update */
|
||||
#define LL_IWDG_SR_RVU IWDG_SR_RVU /*!< Watchdog counter reload value update */
|
||||
#define LL_IWDG_SR_WVU IWDG_SR_WVU /*!< Watchdog counter window value update */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup IWDG_LL_EC_PRESCALER Prescaler Divider
|
||||
* @{
|
||||
*/
|
||||
#define LL_IWDG_PRESCALER_4 0x00000000U /*!< Divider by 4 */
|
||||
#define LL_IWDG_PRESCALER_8 (IWDG_PR_PR_0) /*!< Divider by 8 */
|
||||
#define LL_IWDG_PRESCALER_16 (IWDG_PR_PR_1) /*!< Divider by 16 */
|
||||
#define LL_IWDG_PRESCALER_32 (IWDG_PR_PR_1 | IWDG_PR_PR_0) /*!< Divider by 32 */
|
||||
#define LL_IWDG_PRESCALER_64 (IWDG_PR_PR_2) /*!< Divider by 64 */
|
||||
#define LL_IWDG_PRESCALER_128 (IWDG_PR_PR_2 | IWDG_PR_PR_0) /*!< Divider by 128 */
|
||||
#define LL_IWDG_PRESCALER_256 (IWDG_PR_PR_2 | IWDG_PR_PR_1) /*!< Divider by 256 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/** @defgroup IWDG_LL_Exported_Macros IWDG Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IWDG_LL_EM_WRITE_READ Common Write and read registers Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Write a value in IWDG register
|
||||
* @param __INSTANCE__ IWDG Instance
|
||||
* @param __REG__ Register to be written
|
||||
* @param __VALUE__ Value to be written in the register
|
||||
* @retval None
|
||||
*/
|
||||
#define LL_IWDG_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
|
||||
|
||||
/**
|
||||
* @brief Read a value in IWDG register
|
||||
* @param __INSTANCE__ IWDG Instance
|
||||
* @param __REG__ Register to be read
|
||||
* @retval Register value
|
||||
*/
|
||||
#define LL_IWDG_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
/** @defgroup IWDG_LL_Exported_Functions IWDG Exported Functions
|
||||
* @{
|
||||
*/
|
||||
/** @defgroup IWDG_LL_EF_Configuration Configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Start the Independent Watchdog
|
||||
* @note Except if the hardware watchdog option is selected
|
||||
* @rmtoll KR KEY LL_IWDG_Enable
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_Enable(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_ENABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reloads IWDG counter with value defined in the reload register
|
||||
* @rmtoll KR KEY LL_IWDG_ReloadCounter
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_ReloadCounter(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_RELOAD);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers
|
||||
* @rmtoll KR KEY LL_IWDG_EnableWriteAccess
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_EnableWriteAccess(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_WR_ACCESS_ENABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers
|
||||
* @rmtoll KR KEY LL_IWDG_DisableWriteAccess
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_DisableWriteAccess(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
WRITE_REG(IWDGx->KR, LL_IWDG_KEY_WR_ACCESS_DISABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Select the prescaler of the IWDG
|
||||
* @rmtoll PR PR LL_IWDG_SetPrescaler
|
||||
* @param IWDGx IWDG Instance
|
||||
* @param Prescaler This parameter can be one of the following values:
|
||||
* @arg @ref LL_IWDG_PRESCALER_4
|
||||
* @arg @ref LL_IWDG_PRESCALER_8
|
||||
* @arg @ref LL_IWDG_PRESCALER_16
|
||||
* @arg @ref LL_IWDG_PRESCALER_32
|
||||
* @arg @ref LL_IWDG_PRESCALER_64
|
||||
* @arg @ref LL_IWDG_PRESCALER_128
|
||||
* @arg @ref LL_IWDG_PRESCALER_256
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_SetPrescaler(IWDG_TypeDef *IWDGx, uint32_t Prescaler)
|
||||
{
|
||||
WRITE_REG(IWDGx->PR, IWDG_PR_PR & Prescaler);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the selected prescaler of the IWDG
|
||||
* @rmtoll PR PR LL_IWDG_GetPrescaler
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval Returned value can be one of the following values:
|
||||
* @arg @ref LL_IWDG_PRESCALER_4
|
||||
* @arg @ref LL_IWDG_PRESCALER_8
|
||||
* @arg @ref LL_IWDG_PRESCALER_16
|
||||
* @arg @ref LL_IWDG_PRESCALER_32
|
||||
* @arg @ref LL_IWDG_PRESCALER_64
|
||||
* @arg @ref LL_IWDG_PRESCALER_128
|
||||
* @arg @ref LL_IWDG_PRESCALER_256
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_GetPrescaler(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_REG(IWDGx->PR));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Specify the IWDG down-counter reload value
|
||||
* @rmtoll RLR RL LL_IWDG_SetReloadCounter
|
||||
* @param IWDGx IWDG Instance
|
||||
* @param Counter Value between Min_Data=0 and Max_Data=0x0FFF
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_SetReloadCounter(IWDG_TypeDef *IWDGx, uint32_t Counter)
|
||||
{
|
||||
WRITE_REG(IWDGx->RLR, IWDG_RLR_RL & Counter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the specified IWDG down-counter reload value
|
||||
* @rmtoll RLR RL LL_IWDG_GetReloadCounter
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval Value between Min_Data=0 and Max_Data=0x0FFF
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_GetReloadCounter(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_REG(IWDGx->RLR));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Specify high limit of the window value to be compared to the down-counter.
|
||||
* @rmtoll WINR WIN LL_IWDG_SetWindow
|
||||
* @param IWDGx IWDG Instance
|
||||
* @param Window Value between Min_Data=0 and Max_Data=0x0FFF
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_IWDG_SetWindow(IWDG_TypeDef *IWDGx, uint32_t Window)
|
||||
{
|
||||
WRITE_REG(IWDGx->WINR, IWDG_WINR_WIN & Window);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the high limit of the window value specified.
|
||||
* @rmtoll WINR WIN LL_IWDG_GetWindow
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval Value between Min_Data=0 and Max_Data=0x0FFF
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_GetWindow(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return (READ_REG(IWDGx->WINR));
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup IWDG_LL_EF_FLAG_Management FLAG_Management
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Check if flag Prescaler Value Update is set or not
|
||||
* @rmtoll SR PVU LL_IWDG_IsActiveFlag_PVU
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_PVU(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_PVU) == (IWDG_SR_PVU)) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if flag Reload Value Update is set or not
|
||||
* @rmtoll SR RVU LL_IWDG_IsActiveFlag_RVU
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_RVU(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_RVU) == (IWDG_SR_RVU)) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if flag Window Value Update is set or not
|
||||
* @rmtoll SR WVU LL_IWDG_IsActiveFlag_WVU
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsActiveFlag_WVU(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_WVU) == (IWDG_SR_WVU)) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if all flags Prescaler, Reload & Window Value Update are reset or not
|
||||
* @rmtoll SR PVU LL_IWDG_IsReady\n
|
||||
* SR RVU LL_IWDG_IsReady\n
|
||||
* SR WVU LL_IWDG_IsReady
|
||||
* @param IWDGx IWDG Instance
|
||||
* @retval State of bits (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_IWDG_IsReady(IWDG_TypeDef *IWDGx)
|
||||
{
|
||||
return ((READ_BIT(IWDGx->SR, IWDG_SR_PVU | IWDG_SR_RVU | IWDG_SR_WVU) == 0U) ? 1UL : 0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* IWDG */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* STM32L4xx_LL_IWDG_H */
|
1418
Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h
Normal file
1418
Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_spi.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed “as is,” without any warranty
|
||||
** Distribution: The file is distributed <EFBFBD>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
|
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="false"/>
|
||||
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.value" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{"fItems":[{"fIsFromMainTab":true,"fPath":"Debug/tec.elf","fProjectName":"tec","fPerformBuild":true,"fDownload":true,"fLoadSymbols":true}]}"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.override_start_address_mode" value="default"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target remote"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startServer" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.divby0" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61235"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="16000000"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="C:\Users\pique_n\Documents\Github\tec\Debug\st-link_gdbserver_log.txt"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{"fVersion":1,"fItems":[{"fDisplayName":"Reset","fIsSuppressible":false,"fResetAttribute":"Software system reset","fResetStrategies":[{"fDisplayName":"Software system reset","fLaunchAttribute":"system_reset","fGdbCommands":["monitor reset\r\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Hardware reset","fLaunchAttribute":"hardware_reset","fGdbCommands":["monitor reset hardware\r\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Core reset","fLaunchAttribute":"core_reset","fGdbCommands":["monitor reset core\r\n"],"fCmdOptions":["-g"]},{"fDisplayName":"None","fLaunchAttribute":"no_reset","fGdbCommands":[],"fCmdOptions":["-g"]}],"fGdbCommandGroup":{"name":"Additional commands","commands":[]},"fStartApplication":true}]}"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="threadx"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverAuto" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="cortex_m0"/>
|
||||
<intAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyPort" value="60000"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.stlink"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="61234"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/tec.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="tec"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.144641403"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/tec"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"><gdbmemoryBlockExpression address="134340608" label="0x801e000"/></memoryBlockExpressionList>"/>
|
||||
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
|
||||
</launchConfiguration>
|
@ -131,8 +131,8 @@ Mcu.PinsNb=28
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32L432KBUx
|
||||
MxCube.Version=6.7.0
|
||||
MxDb.Version=DB.6.0.70
|
||||
MxCube.Version=6.10.0
|
||||
MxDb.Version=DB.6.0.100
|
||||
NVIC.ADC1_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||
NVIC.CAN1_RX0_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
|
||||
@ -247,10 +247,13 @@ ProjectManager.PreviousToolchain=STM32CubeIDE
|
||||
ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=tecware.ioc
|
||||
ProjectManager.ProjectName=tecware
|
||||
ProjectManager.ProjectStructure=
|
||||
ProjectManager.RegisterCallBack=
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=STM32CubeIDE
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UAScriptAfterPath=
|
||||
ProjectManager.UAScriptBeforePath=
|
||||
ProjectManager.UnderRoot=true
|
||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-false,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_CAN1_Init-CAN1-false-HAL-true,6-MX_DAC1_Init-DAC1-false-HAL-true,7-MX_SPI1_Init-SPI1-false-HAL-true,8-MX_I2C1_Init-I2C1-false-HAL-true,9-MX_IWDG_Init-IWDG-false-HAL-true,10-MX_CRC_Init-CRC-false-HAL-true
|
||||
RCC.ADCCLockSelection=RCC_ADCCLKSOURCE_SYSCLK
|
||||
@ -326,4 +329,5 @@ VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG
|
||||
VP_SYS_VS_Systick.Mode=SysTick
|
||||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
|
||||
board=custom
|
||||
rtos.0.ip=FREERTOS
|
||||
isbadioc=false
|
||||
|
Loading…
x
Reference in New Issue
Block a user