Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4d2e96c1b | |||
| 4e46602753 | |||
| ba49c70af7 | |||
| 7a80f99106 | |||
| 59a3dfedf5 | |||
| af1613e43a | |||
| ef61452bbf | |||
| 6c4c5a6e8e | |||
| 1f656f6be3 | |||
| 3dea49aaa3 | |||
| 8ad154f4e4 | |||
| 19c85c0fb5 | |||
| 6807a787d9 | |||
| 557953aedc | |||
| d17a54d7f8 | |||
| 31a7e9b5f2 | |||
| ec69da3b6d | |||
| b9aff38268 | |||
| 627ca7dde0 | |||
| ae143d2d7b | |||
| 900c9c4706 | |||
| b712c99487 | |||
| 9664e9ab6d | |||
| f43341fc0c | |||
| aa572db220 | |||
| 47c10d5e73 | |||
| b743a552ee | |||
| e2bb110d15 | |||
| 2723304b4c | |||
| d1c324acde | |||
| afa28c9781 | |||
| 9cc51a14c6 | |||
| d305b8a948 | |||
| 1b0acb5bad | |||
| 1d4330b903 | |||
| ec1782b6f8 | |||
| f2b52f34a9 |
+41
-41
@@ -34,17 +34,17 @@
|
||||
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
|
||||
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.277675815" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="18.1.4.LTS" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.277675815" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="18.1.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.1593934674" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.632414212" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.632414212" name="GNU Make.FlashROM" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.154623462" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.974280107" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.1783826131" name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.1536570599" name="Application binary interface. (--abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.1895413316" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.322983319" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.1305400753" name="Speed vs. size trade-offs (--opt_for_speed, -mf)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.1468985930" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.974280107" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.1783826131" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.1536570599" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.1895413316" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.322983319" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.1305400753" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.1468985930" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
<listOptionValue builtIn="false" value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
|
||||
@@ -70,7 +70,7 @@
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1897088" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1897088" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
|
||||
@@ -86,19 +86,19 @@
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.871011287" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.863089168" name="C Dialect" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.1454248503" name="Enable support for GCC extensions (DEPRECATED) (--gcc)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1965115059" name="Suppress diagnostic <id> (--diag_suppress, -pds)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.871011287" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.863089168" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.1454248503" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1965115059" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="48"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1638011093" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1638011093" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.1920170652" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.2038786257" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.811478344" name="Place each function in a separate subsection (--gen_func_subsections, -ms)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1229809338" name="Read options from specified file (--cmd_file, -@)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.1920170652" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.2038786257" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.811478344" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1229809338" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
|
||||
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
|
||||
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
|
||||
@@ -109,48 +109,48 @@
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.463094612" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1351821865" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.174129193" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE" value="256" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.567300083" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE" value="0" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1800982811" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1091211742" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.1479599481" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.174129193" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE" value="256" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.567300083" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE" value="0" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1800982811" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1091211742" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.1479599481" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
|
||||
<listOptionValue builtIn="false" value="${ROM}/common_rom_releases/03282014/common_rom.symbols"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.672837228" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.672837228" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.544523272" name="Suppress diagnostic <id> (--diag_suppress)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.544523272" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="10247-D"/>
|
||||
<listOptionValue builtIn="false" value="16002-D"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1281207998" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.468817864" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.1679096029" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.254835397" name="Aggressively reduce size of the DWARF information (--compress_dwarf)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1848192295" name="Eliminate sections not needed in the executable (--unused_section_elimination)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1281207998" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.468817864" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.1679096029" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.254835397" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1848192295" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1999849945" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.25027104" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.888093741" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.19288898" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.11734737" name="Specify rom width (--romwidth, -romwidth=width)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.466140455" name="Specify memory width (--memwidth, -memwidth=width)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.824070691" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.11734737" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.466140455" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.824070691" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1392704063" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.225737408" name="Package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.225737408" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_RTSC_TIRTOSCC13XX_CC26XX_REPOS}"/>
|
||||
<listOptionValue builtIn="false" value="${TARGET_CONTENT_BASE}"/>
|
||||
</option>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.571281110" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.205178830" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.1097777495" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.744121344" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.165807018" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.391961861" name="Additional compiler options (--compileOptions)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.571281110" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.205178830" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.1097777495" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.744121344" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.165807018" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.391961861" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+9
-9
@@ -1,12 +1,12 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_02_25_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
@@ -16,14 +16,14 @@ BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/pa
|
||||
|
||||
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
|
||||
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armar rq
|
||||
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+67
-23
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#define BOARD_C771
|
||||
#define BOARD_C7A1
|
||||
|
||||
typedef struct _formula{
|
||||
|
||||
@@ -46,10 +46,11 @@ struct _correction{
|
||||
uint16_t Gain0Boundary[2];
|
||||
uint16_t Gain1Boundary[4];
|
||||
uint16_t Gain2Boundary[2];
|
||||
uint16_t Usercode2DAC15v;
|
||||
|
||||
} Correction =
|
||||
|
||||
#ifdef BOARD_C6E1 // not well
|
||||
#ifdef BOARD_C6E1 //not well
|
||||
{
|
||||
.ADC_volt[0].coeff = (-6251051),
|
||||
.ADC_volt[0].offset = 102081366120,
|
||||
@@ -77,6 +78,8 @@ struct _correction{
|
||||
|
||||
.Usercode2DAC[1].coeff = (-10511469),
|
||||
.Usercode2DAC[1].offset = 563770560100,
|
||||
|
||||
.Usercode2DAC15v = MEGA_15V,
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -108,10 +111,12 @@ struct _correction{
|
||||
|
||||
.Usercode2DAC[1].coeff = (-178077711),
|
||||
.Usercode2DAC[1].offset = 4777894559527,
|
||||
|
||||
.Usercode2DAC15v = 41485,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_C6D4 // not well
|
||||
#ifdef BOARD_C6D4 //not well
|
||||
{
|
||||
.ADC_volt[0].coeff = (6226),
|
||||
.ADC_volt[0].offset = -100075170,
|
||||
@@ -139,10 +144,12 @@ struct _correction{
|
||||
|
||||
.Usercode2DAC[1].coeff = (-178746005),
|
||||
.Usercode2DAC[1].offset = 4789272862069,
|
||||
|
||||
.Usercode2DAC15v = MEGA_15V,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_C771
|
||||
#ifdef BOARD_C771 //not well
|
||||
{
|
||||
.ADC_volt[0].coeff = (6301),
|
||||
.ADC_volt[0].offset = -102184705,
|
||||
@@ -170,37 +177,74 @@ struct _correction{
|
||||
|
||||
.Usercode2DAC[1].coeff = (-179441058),
|
||||
.Usercode2DAC[1].offset = 4807380622351,
|
||||
|
||||
.Usercode2DAC15v = MEGA_15V,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_C604
|
||||
#ifdef BOARD_C724
|
||||
{
|
||||
.ADC_volt[0].coeff = (6194),
|
||||
.ADC_volt[0].offset = -100974071,
|
||||
.ADC_volt[0].coeff = (6251),
|
||||
.ADC_volt[0].offset = -99750397,
|
||||
|
||||
.ADC_volt[1].coeff = (215506),
|
||||
.ADC_volt[1].offset = -3517864544,
|
||||
.ADC_volt[1].coeff = (214419),
|
||||
.ADC_volt[1].offset = -3491659841,
|
||||
|
||||
.ADC_volt[2].coeff = (6243728),
|
||||
.ADC_volt[2].offset = -102012564806,
|
||||
.ADC_volt[2].coeff = (6227737),
|
||||
.ADC_volt[2].offset = -101557618268,
|
||||
|
||||
.ADC_current[0].coeff = 3139436,
|
||||
.ADC_current[0].offset = (-51217085818),
|
||||
.ADC_current[0].coeff = 3138613,
|
||||
.ADC_current[0].offset = (-51149570420),
|
||||
|
||||
.ADC_current[1].coeff = 71622830,
|
||||
.ADC_current[1].offset = (-1168462302473),
|
||||
.ADC_current[1].coeff = 71715555,
|
||||
.ADC_current[1].offset = (-1168777305352),
|
||||
|
||||
.ADC_current[2].coeff = 1462344785,
|
||||
.ADC_current[2].offset = (-23855062972762),
|
||||
.ADC_current[2].coeff = 1455501991,
|
||||
.ADC_current[2].offset = (-23719715469357),
|
||||
|
||||
.ADC_current[3].coeff = 30689232716,
|
||||
.ADC_current[3].offset = (-500670762245868),
|
||||
.ADC_current[3].coeff = 30688298312,
|
||||
.ADC_current[3].offset = (-500150163983795),
|
||||
|
||||
.Usercode2DAC[0].coeff = (-10507403),
|
||||
.Usercode2DAC[0].offset = 582940058695,
|
||||
.Usercode2DAC[0].coeff = (-10540182),
|
||||
.Usercode2DAC[0].offset = 584459109821,
|
||||
|
||||
.Usercode2DAC[1].coeff = (-178479878),
|
||||
.Usercode2DAC[1].offset = 4782895510276,
|
||||
.Usercode2DAC[1].coeff = (-179175265),
|
||||
.Usercode2DAC[1].offset = 4801179734836,
|
||||
|
||||
.Usercode2DAC15v = MEGA_15V,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_C874
|
||||
{
|
||||
.ADC_volt[0].coeff = (6260),
|
||||
.ADC_volt[0].offset = -99787811,
|
||||
|
||||
.ADC_volt[1].coeff = (214494),
|
||||
.ADC_volt[1].offset = -3492178752,
|
||||
|
||||
.ADC_volt[2].coeff = (6231057),
|
||||
.ADC_volt[2].offset = -101591914655,
|
||||
|
||||
.ADC_current[0].coeff = 3148251,
|
||||
.ADC_current[0].offset = (-51277675282),
|
||||
|
||||
.ADC_current[1].coeff = 71859885,
|
||||
.ADC_current[1].offset = (-1170556644217),
|
||||
|
||||
.ADC_current[2].coeff = 1462458824,
|
||||
.ADC_current[2].offset = (-23822062635236),
|
||||
|
||||
.ADC_current[3].coeff = 30748473913,
|
||||
.ADC_current[3].offset = (-500860829105930),
|
||||
|
||||
.Usercode2DAC[0].coeff = (-10570366),
|
||||
.Usercode2DAC[0].offset = 585189864243,
|
||||
|
||||
.Usercode2DAC[1].coeff = (-178920333),
|
||||
.Usercode2DAC[1].offset = 4794801719146,
|
||||
|
||||
.Usercode2DAC15v = 41355,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
+10
@@ -22,6 +22,11 @@ struct _GPT{
|
||||
uint32_t BatteryADCCounter;
|
||||
uint32_t BatteryCheckCounter;
|
||||
uint32_t GptimerMultiple;
|
||||
uint32_t StiCounter;
|
||||
uint32_t LedGCounter;
|
||||
uint32_t LedRCounter;
|
||||
uint32_t Gas0Counter;
|
||||
uint32_t Gas1Counter;
|
||||
}GPT = {0};
|
||||
|
||||
static void InitCT(){
|
||||
@@ -41,5 +46,10 @@ static void InitGPT(){
|
||||
GPT.LeadTimeCounter = 0;
|
||||
GPT.BatteryADCCounter = 0;
|
||||
GPT.BatteryCheckCounter = 0;
|
||||
GPT.StiCounter = 0;
|
||||
GPT.LedGCounter = 0;
|
||||
GPT.LedRCounter = 0;
|
||||
GPT.Gas0Counter = 0;
|
||||
GPT.Gas1Counter = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+170
-32
@@ -75,22 +75,90 @@ struct HEADSTAGE_INSTRUCTION {
|
||||
uint8_t charge;
|
||||
int32_t constantCurrent;
|
||||
int32_t Currentmax;
|
||||
int32_t t1;
|
||||
int32_t t2;
|
||||
int32_t t3;
|
||||
int32_t t4;
|
||||
int32_t t5;
|
||||
int32_t v1;
|
||||
int32_t v2;
|
||||
int32_t v3;
|
||||
int32_t v4;
|
||||
int32_t v5;
|
||||
int32_t t1Time;
|
||||
int32_t t2Time;
|
||||
int32_t t3Time;
|
||||
int32_t t4Time;
|
||||
int32_t t5Time;
|
||||
uint16_t loop;
|
||||
int32_t sti_v1;
|
||||
int32_t sti_v2;
|
||||
int32_t sti_v3;
|
||||
int32_t sti_v4;
|
||||
int32_t sti_v5;
|
||||
int32_t sti_v6;
|
||||
int32_t sti_v7;
|
||||
int32_t sti_t1;
|
||||
int32_t sti_t2;
|
||||
int32_t sti_t3;
|
||||
int32_t sti_t4;
|
||||
int32_t sti_t5;
|
||||
int32_t sti_t6;
|
||||
int32_t sti_t7;
|
||||
uint16_t sti_cy;
|
||||
uint16_t sti_loop;
|
||||
|
||||
uint8_t ledG_sw1;
|
||||
uint8_t ledG_sw2;
|
||||
uint8_t ledG_sw3;
|
||||
uint8_t ledG_sw4;
|
||||
uint8_t ledG_sw5;
|
||||
uint8_t ledG_sw6;
|
||||
uint8_t ledG_sw7;
|
||||
int32_t ledG_t1;
|
||||
int32_t ledG_t2;
|
||||
int32_t ledG_t3;
|
||||
int32_t ledG_t4;
|
||||
int32_t ledG_t5;
|
||||
int32_t ledG_t6;
|
||||
int32_t ledG_t7;
|
||||
uint16_t ledG_cy;
|
||||
uint16_t ledG_loop;
|
||||
|
||||
uint8_t ledR_sw1;
|
||||
uint8_t ledR_sw2;
|
||||
uint8_t ledR_sw3;
|
||||
uint8_t ledR_sw4;
|
||||
uint8_t ledR_sw5;
|
||||
uint8_t ledR_sw6;
|
||||
uint8_t ledR_sw7;
|
||||
int32_t ledR_t1;
|
||||
int32_t ledR_t2;
|
||||
int32_t ledR_t3;
|
||||
int32_t ledR_t4;
|
||||
int32_t ledR_t5;
|
||||
int32_t ledR_t6;
|
||||
int32_t ledR_t7;
|
||||
uint16_t ledR_cy;
|
||||
uint16_t ledR_loop;
|
||||
|
||||
uint8_t gas0_sw1;
|
||||
uint8_t gas0_sw2;
|
||||
uint8_t gas0_sw3;
|
||||
uint8_t gas0_sw4;
|
||||
uint8_t gas0_sw5;
|
||||
uint8_t gas0_sw6;
|
||||
uint8_t gas0_sw7;
|
||||
int32_t gas0_t1;
|
||||
int32_t gas0_t2;
|
||||
int32_t gas0_t3;
|
||||
int32_t gas0_t4;
|
||||
int32_t gas0_t5;
|
||||
int32_t gas0_t6;
|
||||
int32_t gas0_t7;
|
||||
uint16_t gas0_cy;
|
||||
uint16_t gas0_loop;
|
||||
|
||||
uint8_t gas1_sw1;
|
||||
uint8_t gas1_sw2;
|
||||
uint8_t gas1_sw3;
|
||||
uint8_t gas1_sw4;
|
||||
uint8_t gas1_sw5;
|
||||
uint8_t gas1_sw6;
|
||||
uint8_t gas1_sw7;
|
||||
int32_t gas1_t1;
|
||||
int32_t gas1_t2;
|
||||
int32_t gas1_t3;
|
||||
int32_t gas1_t4;
|
||||
int32_t gas1_t5;
|
||||
int32_t gas1_t6;
|
||||
int32_t gas1_t7;
|
||||
uint16_t gas1_cy;
|
||||
uint16_t gas1_loop;
|
||||
|
||||
uint16_t StepTime;
|
||||
|
||||
@@ -137,21 +205,91 @@ static void InitEliteInstruction(){
|
||||
INSTRUCTION.Currentmax = 0;
|
||||
INSTRUCTION.StepTime = STEPTIME_ONE_SEC;
|
||||
INSTRUCTION.AdcChannel = 0;
|
||||
INSTRUCTION.t1 = 0;
|
||||
INSTRUCTION.t2 = 0;
|
||||
INSTRUCTION.t3 = 0;
|
||||
INSTRUCTION.t4 = 0;
|
||||
INSTRUCTION.t5 = 0;
|
||||
INSTRUCTION.t1Time = 0;
|
||||
INSTRUCTION.t2Time = 0;
|
||||
INSTRUCTION.t3Time = 0;
|
||||
INSTRUCTION.t4Time = 0;
|
||||
INSTRUCTION.t5Time = 0;
|
||||
INSTRUCTION.v1 = DAC_ZERO;
|
||||
INSTRUCTION.v2 = DAC_ZERO;
|
||||
INSTRUCTION.v3 = DAC_ZERO;
|
||||
INSTRUCTION.v4 = DAC_ZERO;
|
||||
INSTRUCTION.v5 = DAC_ZERO;
|
||||
INSTRUCTION.loop = 1;
|
||||
|
||||
//pulse mode
|
||||
INSTRUCTION.sti_t1 = 0;
|
||||
INSTRUCTION.sti_t2 = 0;
|
||||
INSTRUCTION.sti_t3 = 0;
|
||||
INSTRUCTION.sti_t4 = 0;
|
||||
INSTRUCTION.sti_t5 = 0;
|
||||
INSTRUCTION.sti_t6 = 0;
|
||||
INSTRUCTION.sti_t7 = 0;
|
||||
INSTRUCTION.sti_v1 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v2 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v3 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v4 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v5 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v6 = DAC_ZERO;
|
||||
INSTRUCTION.sti_v7 = DAC_ZERO;
|
||||
INSTRUCTION.sti_loop = 1;
|
||||
INSTRUCTION.sti_cy = 0;
|
||||
|
||||
INSTRUCTION.ledG_sw1 = false;
|
||||
INSTRUCTION.ledG_sw2 = false;
|
||||
INSTRUCTION.ledG_sw3 = false;
|
||||
INSTRUCTION.ledG_sw4 = false;
|
||||
INSTRUCTION.ledG_sw5 = false;
|
||||
INSTRUCTION.ledG_sw6 = false;
|
||||
INSTRUCTION.ledG_sw7 = false;
|
||||
INSTRUCTION.ledG_t1 = 0;
|
||||
INSTRUCTION.ledG_t2 = 0;
|
||||
INSTRUCTION.ledG_t3 = 0;
|
||||
INSTRUCTION.ledG_t4 = 0;
|
||||
INSTRUCTION.ledG_t5 = 0;
|
||||
INSTRUCTION.ledG_t6 = 0;
|
||||
INSTRUCTION.ledG_t7 = 0;
|
||||
INSTRUCTION.ledG_cy = 0;
|
||||
INSTRUCTION.ledG_loop = 0;
|
||||
|
||||
INSTRUCTION.ledR_sw1 = false;
|
||||
INSTRUCTION.ledR_sw2 = false;
|
||||
INSTRUCTION.ledR_sw3 = false;
|
||||
INSTRUCTION.ledR_sw4 = false;
|
||||
INSTRUCTION.ledR_sw5 = false;
|
||||
INSTRUCTION.ledR_sw6 = false;
|
||||
INSTRUCTION.ledR_sw7 = false;
|
||||
INSTRUCTION.ledR_t1 = 0;
|
||||
INSTRUCTION.ledR_t2 = 0;
|
||||
INSTRUCTION.ledR_t3 = 0;
|
||||
INSTRUCTION.ledR_t4 = 0;
|
||||
INSTRUCTION.ledR_t5 = 0;
|
||||
INSTRUCTION.ledR_t6 = 0;
|
||||
INSTRUCTION.ledR_t7 = 0;
|
||||
INSTRUCTION.ledR_cy = 0;
|
||||
INSTRUCTION.ledR_loop = 0;
|
||||
|
||||
INSTRUCTION.gas0_sw1 = false;
|
||||
INSTRUCTION.gas0_sw2 = false;
|
||||
INSTRUCTION.gas0_sw3 = false;
|
||||
INSTRUCTION.gas0_sw4 = false;
|
||||
INSTRUCTION.gas0_sw5 = false;
|
||||
INSTRUCTION.gas0_sw6 = false;
|
||||
INSTRUCTION.gas0_sw7 = false;
|
||||
INSTRUCTION.gas0_t1 = 0;
|
||||
INSTRUCTION.gas0_t2 = 0;
|
||||
INSTRUCTION.gas0_t3 = 0;
|
||||
INSTRUCTION.gas0_t4 = 0;
|
||||
INSTRUCTION.gas0_t5 = 0;
|
||||
INSTRUCTION.gas0_t6 = 0;
|
||||
INSTRUCTION.gas0_t7 = 0;
|
||||
INSTRUCTION.gas0_cy = 0;
|
||||
INSTRUCTION.gas0_loop = 0;
|
||||
|
||||
INSTRUCTION.gas1_sw1 = false;
|
||||
INSTRUCTION.gas1_sw2 = false;
|
||||
INSTRUCTION.gas1_sw3 = false;
|
||||
INSTRUCTION.gas1_sw4 = false;
|
||||
INSTRUCTION.gas1_sw5 = false;
|
||||
INSTRUCTION.gas1_sw6 = false;
|
||||
INSTRUCTION.gas1_sw7 = false;
|
||||
INSTRUCTION.gas1_t1 = 0;
|
||||
INSTRUCTION.gas1_t2 = 0;
|
||||
INSTRUCTION.gas1_t3 = 0;
|
||||
INSTRUCTION.gas1_t4 = 0;
|
||||
INSTRUCTION.gas1_t5 = 0;
|
||||
INSTRUCTION.gas1_t6 = 0;
|
||||
INSTRUCTION.gas1_t7 = 0;
|
||||
INSTRUCTION.gas1_cy = 0;
|
||||
INSTRUCTION.gas1_loop = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+495
-312
@@ -3,343 +3,526 @@
|
||||
|
||||
#define Vset INSTRUCTION.Vset
|
||||
|
||||
//static uint16_t CV3Curve(CV3Mode *CV3){
|
||||
// static uint16_t DACOutCode;
|
||||
// static int32_t Vin;
|
||||
// static int32_t Vout;
|
||||
// static int32_t DeltaVout;
|
||||
//
|
||||
// Vin = CV3->_measureVin * 200;//[5nV]
|
||||
// if(DACReset){
|
||||
// Vout = Vset + Vin;
|
||||
// DACReset = false;
|
||||
// }else{
|
||||
// DeltaVout = Vset - (Vout - Vin);
|
||||
// Vout = Vout + DeltaVout;
|
||||
// }
|
||||
//
|
||||
// INSTRUCTION.VoltConstant = Vout / 40000 + 25000;//5nV=>usercode
|
||||
// DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.DacVoutAgcLevel, INSTRUCTION.VoltConstant);
|
||||
//
|
||||
// int32_t RealV2;
|
||||
// RealV2 = (int32_t)((Vout - Vin) / 200);//[1uV]
|
||||
// InputNotify(NOTIFY_VOLT, RealV2);
|
||||
//
|
||||
// int32_t RealV;
|
||||
// RealV = (int32_t)(Vout / 200);//[1uV]
|
||||
// InputNotify(NOTIFY_IMPEDANCE, RealV);
|
||||
//
|
||||
// DAC_outputV(DACOutCode);
|
||||
//
|
||||
// return DACOutCode;
|
||||
//}
|
||||
|
||||
//static void PULSE_Vscan(PULSEMode *PULSE){
|
||||
// static uint16_t lastVolt;
|
||||
// if (vscanReset) {
|
||||
// lastVolt = INSTRUCTION.VoltConstant;
|
||||
// if (PULSE->_tflag == 0) {
|
||||
// PULSE->_tflag = PULSE->_t2;
|
||||
// PULSE->_vflag = PULSE->_v2;
|
||||
// }
|
||||
// else {
|
||||
// PULSE->_tflag = PULSE->_t1;
|
||||
// PULSE->_vflag = PULSE->_v1;
|
||||
// }
|
||||
// INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
// if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
// lastVolt = INSTRUCTION.VoltConstant;
|
||||
// DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
// }
|
||||
// vscanReset = false;
|
||||
// }
|
||||
//
|
||||
// if (!vscanReset) {
|
||||
// //vscan counter
|
||||
// if (GPT.VscanRateCounter >= PULSE->_tflag) {
|
||||
// GPT.VscanRateCounter -= PULSE->_tflag; //To get right time
|
||||
// }
|
||||
//
|
||||
// if (PULSE->_loop > 0 && PULSE->_cycleNumber > 0) {
|
||||
// if (PULSE->_tflag == PULSE->_t1) {
|
||||
// PULSE->_tflag = PULSE->_t2;
|
||||
// PULSE->_vflag = PULSE->_v2;
|
||||
// }
|
||||
// else if (PULSE->_tflag == PULSE->_t2) {
|
||||
// PULSE->_tflag = PULSE->_t3;
|
||||
// PULSE->_vflag = PULSE->_v3;
|
||||
// }
|
||||
// else if (PULSE->_tflag == PULSE->_t3) {
|
||||
// PULSE->_cycleNumber -- ;
|
||||
// if (PULSE->_cycleNumber == 0) {
|
||||
// PULSE->_tflag = PULSE->_t4;
|
||||
// PULSE->_vflag = PULSE->_v4;
|
||||
// }
|
||||
// else {
|
||||
// PULSE->_tflag = PULSE->_t2;
|
||||
// PULSE->_vflag = PULSE->_v2;
|
||||
// }
|
||||
// }
|
||||
// INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
// if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
// lastVolt = INSTRUCTION.VoltConstant;
|
||||
// DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
// }
|
||||
// }
|
||||
// else if (PULSE->_loop > 0 && PULSE->_cycleNumber <= 0) {
|
||||
// if (PULSE->_tflag == PULSE->_t1) {
|
||||
// PULSE->_tflag = PULSE->_t4;
|
||||
// PULSE->_vflag = PULSE->_v4;
|
||||
// }
|
||||
// else if (PULSE->_tflag == PULSE->_t4) {
|
||||
// PULSE->_loop -- ;
|
||||
// if (PULSE->_loop > 0) {
|
||||
// PULSE->_cycleNumber = INSTRUCTION.cycleNumber;
|
||||
// PULSE->_tflag = PULSE->_t2;
|
||||
// PULSE->_vflag = PULSE->_v2;
|
||||
// }
|
||||
// else {
|
||||
// PULSE->_tflag = PULSE->_t5;
|
||||
// PULSE->_vflag = PULSE->_v5;
|
||||
// }
|
||||
// }
|
||||
// INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
// if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
// lastVolt = INSTRUCTION.VoltConstant;
|
||||
// DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
// }
|
||||
// }
|
||||
// else if (PULSE->_loop <= 0) {
|
||||
// if (PULSE->_tflag == PULSE->_t5) {
|
||||
// PeriodicEvent = false;
|
||||
// ELITE15_SPI_CLOSE();
|
||||
// ModeLED(NO_EVENT);
|
||||
// }
|
||||
// }
|
||||
// InputNotify(NOTIFY_IMPEDANCE, PULSE->_vflag);
|
||||
// }
|
||||
//// int32_t RealV;
|
||||
//// RealV = (int32_t)(Vset / 500);//[1uV]
|
||||
//// InputNotify(NOTIFY_VOLT, RealV);
|
||||
//}
|
||||
|
||||
static void PULSE_Vscan(PULSEMode *PULSE)
|
||||
{
|
||||
static uint16_t lastVolt;
|
||||
|
||||
if (vscanReset) {
|
||||
if (PULSE->_tflag == 0) {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
static uint16_t testV;
|
||||
if (stiFirstTime) {
|
||||
stiFirstTime = false;
|
||||
lastVolt = 25000;
|
||||
PULSE->_sti_t_flag = 1;
|
||||
PULSE->_sti_v = PULSE->_sti_v1;
|
||||
PULSE->_sti_t = PULSE->_sti_t1;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t1;
|
||||
PULSE->_vflag = PULSE->_v1;
|
||||
} else if(!stiFirstTime) {
|
||||
if (GPT.StiCounter >= PULSE->_sti_t) {
|
||||
GPT.StiCounter -= PULSE->_sti_t; //to get right time
|
||||
|
||||
if (PULSE->_sti_lp > 0) {
|
||||
if (PULSE->_sti_cy > 0) {
|
||||
if (PULSE->_sti_t_flag == 1) {
|
||||
PULSE->_sti_t_flag = 2;
|
||||
PULSE->_sti_v = PULSE->_sti_v2;
|
||||
PULSE->_sti_t = PULSE->_sti_t2;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else if (PULSE->_sti_t_flag == 2) {
|
||||
PULSE->_sti_t_flag = 3;
|
||||
PULSE->_sti_v = PULSE->_sti_v3;
|
||||
PULSE->_sti_t = PULSE->_sti_t3;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else if (PULSE->_sti_t_flag == 3) {
|
||||
PULSE->_sti_cy -- ;
|
||||
if (PULSE->_sti_cy == 0) {
|
||||
PULSE->_sti_t_flag = 4;
|
||||
PULSE->_sti_v = PULSE->_sti_v4;
|
||||
PULSE->_sti_t = PULSE->_sti_t4;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else {
|
||||
PULSE->_sti_t_flag = 2;
|
||||
PULSE->_sti_v = PULSE->_sti_v2;
|
||||
PULSE->_sti_t = PULSE->_sti_t2;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_sti_cy <= 0){
|
||||
if (PULSE->_sti_t_flag == 4) {
|
||||
PULSE->_sti_lp -- ;
|
||||
if (PULSE->_sti_lp > 0) {
|
||||
PULSE->_sti_cy = INSTRUCTION.sti_cy;
|
||||
PULSE->_sti_t_flag = 2;
|
||||
PULSE->_sti_v = PULSE->_sti_v2;
|
||||
PULSE->_sti_t = PULSE->_sti_t2;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else {
|
||||
PULSE->_sti_t_flag = 5;
|
||||
PULSE->_sti_v = PULSE->_sti_v5;
|
||||
PULSE->_sti_t = PULSE->_sti_t5;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_sti_lp <= 0) {
|
||||
if (PULSE->_sti_t_flag == 5) {
|
||||
PULSE->_sti_t_flag = 6;
|
||||
PULSE->_sti_v = PULSE->_sti_v6;
|
||||
PULSE->_sti_t = PULSE->_sti_t6;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else if (PULSE->_sti_t_flag == 6) {
|
||||
PULSE->_sti_t_flag = 7;
|
||||
PULSE->_sti_v = PULSE->_sti_v7;
|
||||
PULSE->_sti_t = PULSE->_sti_t7;
|
||||
if (PULSE->_sti_t == 1) {
|
||||
PULSE->_sti_v = lastVolt;
|
||||
}
|
||||
} else if (PULSE->_sti_t_flag == 7) {
|
||||
PULSE->_sti_v = 25000;
|
||||
PeriodicEvent = false;
|
||||
megaTrigEnable = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
|
||||
if (lastVolt != INSTRUCTION.VoltConstant) {
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
}
|
||||
|
||||
vscanReset = false;
|
||||
}
|
||||
|
||||
if (!vscanReset) {
|
||||
if (GPT.VscanRateCounter >= PULSE->_tflag) {
|
||||
GPT.VscanRateCounter -= PULSE->_tflag; //To get right time
|
||||
}
|
||||
//InputNotify(NOTIFY_IMPEDANCE, testV);
|
||||
|
||||
if (PULSE->_loop > 0 && PULSE->_cycleNumber > 0) {
|
||||
if (PULSE->_tflag == PULSE->_t1) {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
}
|
||||
else if (PULSE->_tflag == PULSE->_t2) {
|
||||
PULSE->_tflag = PULSE->_t3;
|
||||
PULSE->_vflag = PULSE->_v3;
|
||||
}
|
||||
else if (PULSE->_tflag == PULSE->_t3) {
|
||||
PULSE->_cycleNumber -- ;
|
||||
if (PULSE->_cycleNumber == 0) {
|
||||
PULSE->_tflag = PULSE->_t4;
|
||||
PULSE->_vflag = PULSE->_v4;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
}
|
||||
}
|
||||
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
if (lastVolt != INSTRUCTION.VoltConstant) {
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
}
|
||||
}
|
||||
else if (PULSE->_loop > 0 && PULSE->_cycleNumber <= 0) {
|
||||
if (PULSE->_tflag == PULSE->_t1) {
|
||||
PULSE->_tflag = PULSE->_t4;
|
||||
PULSE->_vflag = PULSE->_v4;
|
||||
}
|
||||
else if (PULSE->_tflag == PULSE->_t4) {
|
||||
PULSE->_loop -- ;
|
||||
if (PULSE->_loop > 0) {
|
||||
PULSE->_cycleNumber = INSTRUCTION.cycleNumber;
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t5;
|
||||
PULSE->_vflag = PULSE->_v5;
|
||||
}
|
||||
}
|
||||
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
if (lastVolt != INSTRUCTION.VoltConstant) {
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
}
|
||||
}
|
||||
else if (PULSE->_loop <= 0) {
|
||||
if (PULSE->_tflag == PULSE->_t5) {
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
InputNotify(NOTIFY_IMPEDANCE, PULSE->_vflag);
|
||||
if (lastVolt != PULSE->_sti_v) {
|
||||
lastVolt = PULSE->_sti_v;
|
||||
//if (PULSE->_sti_v == 25000) {
|
||||
// PIN15_setOutputValue(HIGH_Z_MODE, 0); // 1 => close high_z mode
|
||||
//} else {
|
||||
// PIN15_setOutputValue(HIGH_Z_MODE, 1); // 1 => close high_z mode
|
||||
//}
|
||||
DAC_outputV(Usercode_Correction_to_DAC(VOUT_GAIN_240K, PULSE->_sti_v));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(VOUT_GAIN_240K, PULSE->_sti_v));
|
||||
}
|
||||
}
|
||||
|
||||
static void test_Vscan(PULSEMode *PULSE){
|
||||
static uint16_t lastVolt;
|
||||
static uint8_t testV;
|
||||
if(firstTimeReset){
|
||||
firstTimeReset = false;
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
if (PULSE->_tTime == 0) {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
PULSE->_tTime = PULSE->_t2Time;
|
||||
testV = 1;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t1;
|
||||
PULSE->_vflag = PULSE->_v1;
|
||||
PULSE->_tTime = PULSE->_t1Time;
|
||||
testV = 2;
|
||||
}
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(VOUT_GAIN_240K, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(VOUT_GAIN_240K, INSTRUCTION.VoltConstant));
|
||||
}
|
||||
//InputNotify(NOTIFY_IMPEDANCE, testV);
|
||||
}
|
||||
else if(!firstTimeReset){
|
||||
if(GPT.VscanRateCounter >= PULSE->_tTime){
|
||||
GPT.VscanRateCounter -= PULSE->_tTime; //To get right time
|
||||
static void PULSE_ledG(PULSEMode *PULSE)
|
||||
{
|
||||
static bool lastSwitch;
|
||||
|
||||
vscan_flag = true;
|
||||
if(vscan_flag){
|
||||
|
||||
if (PULSE->_loop > 0 && PULSE->_cycleNumber > 0) {
|
||||
if (PULSE->_tflag == PULSE->_t1) {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
PULSE->_tTime = PULSE->_t2Time;
|
||||
testV = 3;
|
||||
}
|
||||
else if (PULSE->_tflag == PULSE->_t2) {
|
||||
PULSE->_tflag = PULSE->_t3;
|
||||
PULSE->_vflag = PULSE->_v3;
|
||||
PULSE->_tTime = PULSE->_t3Time;
|
||||
testV = 4;
|
||||
}
|
||||
else if (PULSE->_tflag == PULSE->_t3) {
|
||||
PULSE->_cycleNumber -- ;
|
||||
if (PULSE->_cycleNumber == 0) {
|
||||
PULSE->_tflag = PULSE->_t4;
|
||||
PULSE->_vflag = PULSE->_v4;
|
||||
PULSE->_tTime = PULSE->_t4Time;
|
||||
if (PULSE->_t4Time == 0) {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
PULSE->_tTime = PULSE->_t2Time;
|
||||
PULSE->_loop--;
|
||||
PULSE->_cycleNumber = INSTRUCTION.cycleNumber;
|
||||
if (PULSE->_loop == 0) {
|
||||
PULSE->_tflag = PULSE->_t5;
|
||||
PULSE->_vflag = PULSE->_v5;
|
||||
PULSE->_tTime = PULSE->_t5Time;
|
||||
if (PULSE->_t5Time == 0) {
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
if (ledGFirstTime) {
|
||||
ledGFirstTime = false;
|
||||
lastSwitch = false;
|
||||
PULSE->_ledG_t_flag = 1;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw1;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t1;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else if(!ledGFirstTime) {
|
||||
if (GPT.LedGCounter >= PULSE->_ledG_t) {
|
||||
GPT.LedGCounter -= PULSE->_ledG_t; //to get right time
|
||||
|
||||
if (PULSE->_ledG_lp > 0) {
|
||||
if (PULSE->_ledG_cy > 0) {
|
||||
if (PULSE->_ledG_t_flag == 1) {
|
||||
PULSE->_ledG_t_flag = 2;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw2;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t2;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledG_t_flag == 2) {
|
||||
PULSE->_ledG_t_flag = 3;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw3;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t3;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledG_t_flag == 3) {
|
||||
PULSE->_ledG_cy -- ;
|
||||
if (PULSE->_ledG_cy == 0) {
|
||||
PULSE->_ledG_t_flag = 4;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw4;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t4;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_ledG_t_flag = 2;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw2;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t2;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
testV = 5;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
PULSE->_tTime = PULSE->_t2Time;
|
||||
testV = 6;
|
||||
}
|
||||
}
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
} else if (PULSE->_ledG_cy <= 0){
|
||||
if (PULSE->_ledG_t_flag == 4) {
|
||||
PULSE->_ledG_lp -- ;
|
||||
if (PULSE->_ledG_lp > 0) {
|
||||
PULSE->_ledG_cy = INSTRUCTION.ledG_cy;
|
||||
PULSE->_ledG_t_flag = 2;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw2;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t2;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_ledG_t_flag = 5;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw5;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t5;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (PULSE->_loop > 0 && PULSE->_cycleNumber <= 0) {
|
||||
if (PULSE->_tflag == PULSE->_t4) {
|
||||
PULSE->_loop -- ;
|
||||
if (PULSE->_loop > 0) {
|
||||
PULSE->_cycleNumber = INSTRUCTION.cycleNumber;
|
||||
PULSE->_tflag = PULSE->_t2;
|
||||
PULSE->_vflag = PULSE->_v2;
|
||||
PULSE->_tTime = PULSE->_t2Time;
|
||||
testV = 8;
|
||||
}
|
||||
else {
|
||||
PULSE->_tflag = PULSE->_t5;
|
||||
PULSE->_vflag = PULSE->_v5;
|
||||
PULSE->_tTime = PULSE->_t5Time;
|
||||
testV = 9;
|
||||
}
|
||||
} else if (PULSE->_ledG_lp <= 0) {
|
||||
if (PULSE->_ledG_t_flag == 5) {
|
||||
PULSE->_ledG_t_flag = 6;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw6;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t6;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
INSTRUCTION.VoltConstant = PULSE->_vflag;
|
||||
if(lastVolt != INSTRUCTION.VoltConstant){
|
||||
lastVolt = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.VoltConstant));
|
||||
} else if (PULSE->_ledG_t_flag == 6) {
|
||||
PULSE->_ledG_t_flag = 7;
|
||||
PULSE->_ledG_sw = PULSE->_ledG_sw7;
|
||||
PULSE->_ledG_t = PULSE->_ledG_t7;
|
||||
if (PULSE->_ledG_t == 1) {
|
||||
PULSE->_ledG_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledG_t_flag == 7) {
|
||||
PULSE->_ledG_sw = false;
|
||||
//PeriodicEvent = false;
|
||||
//megaTrigEnable = false;
|
||||
//ModeLED(NO_EVENT);
|
||||
}
|
||||
else if (PULSE->_loop <= 0) {
|
||||
if (PULSE->_tflag == PULSE->_t5) {
|
||||
testV = 10;
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
//InputNotify(NOTIFY_IMPEDANCE, testV);
|
||||
vscan_flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lastSwitch != PULSE->_ledG_sw) {
|
||||
lastSwitch = PULSE->_ledG_sw;
|
||||
PIN15_setOutputValue(MEGA_G_LED, PULSE->_ledG_sw);
|
||||
}
|
||||
}
|
||||
|
||||
static void PULSE_ledR(PULSEMode *PULSE)
|
||||
{
|
||||
static bool lastSwitch;
|
||||
|
||||
if (ledRFirstTime) {
|
||||
ledRFirstTime = false;
|
||||
lastSwitch = false;
|
||||
PULSE->_ledR_t_flag = 1;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw1;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t1;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else if(!ledRFirstTime) {
|
||||
if (GPT.LedRCounter >= PULSE->_ledR_t) {
|
||||
GPT.LedRCounter -= PULSE->_ledR_t; //to get right time
|
||||
|
||||
if (PULSE->_ledR_lp > 0) {
|
||||
if (PULSE->_ledR_cy > 0) {
|
||||
if (PULSE->_ledR_t_flag == 1) {
|
||||
PULSE->_ledR_t_flag = 2;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw2;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t2;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledR_t_flag == 2) {
|
||||
PULSE->_ledR_t_flag = 3;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw3;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t3;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledR_t_flag == 3) {
|
||||
PULSE->_ledR_cy -- ;
|
||||
if (PULSE->_ledR_cy == 0) {
|
||||
PULSE->_ledR_t_flag = 4;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw4;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t4;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_ledR_t_flag = 2;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw2;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t2;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_ledR_cy <= 0){
|
||||
if (PULSE->_ledR_t_flag == 4) {
|
||||
PULSE->_ledR_lp -- ;
|
||||
if (PULSE->_ledR_lp > 0) {
|
||||
PULSE->_ledR_cy = INSTRUCTION.ledR_cy;
|
||||
PULSE->_ledR_t_flag = 2;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw2;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t2;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_ledR_t_flag = 5;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw5;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t5;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_ledR_lp <= 0) {
|
||||
if (PULSE->_ledR_t_flag == 5) {
|
||||
PULSE->_ledR_t_flag = 6;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw6;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t6;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledR_t_flag == 6) {
|
||||
PULSE->_ledR_t_flag = 7;
|
||||
PULSE->_ledR_sw = PULSE->_ledR_sw7;
|
||||
PULSE->_ledR_t = PULSE->_ledR_t7;
|
||||
if (PULSE->_ledR_t == 1) {
|
||||
PULSE->_ledR_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_ledR_t_flag == 7) {
|
||||
PULSE->_ledR_sw = false;
|
||||
//PeriodicEvent = false;
|
||||
//megaTrigEnable = false;
|
||||
//ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lastSwitch != PULSE->_ledR_sw) {
|
||||
lastSwitch = PULSE->_ledR_sw;
|
||||
PIN15_setOutputValue(MEGA_R_LED, PULSE->_ledR_sw);
|
||||
}
|
||||
}
|
||||
|
||||
static void PULSE_gas0(PULSEMode *PULSE)
|
||||
{
|
||||
static bool lastSwitch;
|
||||
|
||||
if (gas0FirstTime) {
|
||||
gas0FirstTime = false;
|
||||
lastSwitch = false;
|
||||
PULSE->_gas0_t_flag = 1;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw1;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t1;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else if(!gas0FirstTime) {
|
||||
if (GPT.Gas0Counter >= PULSE->_gas0_t) {
|
||||
GPT.Gas0Counter -= PULSE->_gas0_t; //to get right time
|
||||
|
||||
if (PULSE->_gas0_lp > 0) {
|
||||
if (PULSE->_gas0_cy > 0) {
|
||||
if (PULSE->_gas0_t_flag == 1) {
|
||||
PULSE->_gas0_t_flag = 2;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw2;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t2;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas0_t_flag == 2) {
|
||||
PULSE->_gas0_t_flag = 3;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw3;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t3;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas0_t_flag == 3) {
|
||||
PULSE->_gas0_cy -- ;
|
||||
if (PULSE->_gas0_cy == 0) {
|
||||
PULSE->_gas0_t_flag = 4;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw4;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t4;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_gas0_t_flag = 2;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw2;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t2;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_gas0_cy <= 0){
|
||||
if (PULSE->_gas0_t_flag == 4) {
|
||||
PULSE->_gas0_lp -- ;
|
||||
if (PULSE->_gas0_lp > 0) {
|
||||
PULSE->_gas0_cy = INSTRUCTION.gas0_cy;
|
||||
PULSE->_gas0_t_flag = 2;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw2;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t2;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_gas0_t_flag = 5;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw5;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t5;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_gas0_lp <= 0) {
|
||||
if (PULSE->_gas0_t_flag == 5) {
|
||||
PULSE->_gas0_t_flag = 6;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw6;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t6;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas0_t_flag == 6) {
|
||||
PULSE->_gas0_t_flag = 7;
|
||||
PULSE->_gas0_sw = PULSE->_gas0_sw7;
|
||||
PULSE->_gas0_t = PULSE->_gas0_t7;
|
||||
if (PULSE->_gas0_t == 1) {
|
||||
PULSE->_gas0_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas0_t_flag == 7) {
|
||||
PULSE->_gas0_sw = false;
|
||||
//PeriodicEvent = false;
|
||||
//megaTrigEnable = false;
|
||||
//ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lastSwitch != PULSE->_gas0_sw) {
|
||||
lastSwitch = PULSE->_gas0_sw;
|
||||
PIN15_setOutputValue(MEGA_VAL_0, PULSE->_gas0_sw);
|
||||
}
|
||||
}
|
||||
|
||||
static void PULSE_gas1(PULSEMode *PULSE)
|
||||
{
|
||||
static bool lastSwitch;
|
||||
|
||||
if (gas1FirstTime) {
|
||||
gas1FirstTime = false;
|
||||
lastSwitch = true;
|
||||
PULSE->_gas1_t_flag = 1;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw1;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t1;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else if(!gas1FirstTime) {
|
||||
if (GPT.Gas1Counter >= PULSE->_gas1_t) {
|
||||
GPT.Gas1Counter -= PULSE->_gas1_t; //to get right time
|
||||
|
||||
if (PULSE->_gas1_lp > 0) {
|
||||
if (PULSE->_gas1_cy > 0) {
|
||||
if (PULSE->_gas1_t_flag == 1) {
|
||||
PULSE->_gas1_t_flag = 2;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw2;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t2;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas1_t_flag == 2) {
|
||||
PULSE->_gas1_t_flag = 3;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw3;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t3;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas1_t_flag == 3) {
|
||||
PULSE->_gas1_cy -- ;
|
||||
if (PULSE->_gas1_cy == 0) {
|
||||
PULSE->_gas1_t_flag = 4;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw4;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t4;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_gas1_t_flag = 2;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw2;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t2;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_gas1_cy <= 0){
|
||||
if (PULSE->_gas1_t_flag == 4) {
|
||||
PULSE->_gas1_lp -- ;
|
||||
if (PULSE->_gas1_lp > 0) {
|
||||
PULSE->_gas1_cy = INSTRUCTION.gas1_cy;
|
||||
PULSE->_gas1_t_flag = 2;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw2;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t2;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else {
|
||||
PULSE->_gas1_t_flag = 5;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw5;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t5;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (PULSE->_gas1_lp <= 0) {
|
||||
if (PULSE->_gas1_t_flag == 5) {
|
||||
PULSE->_gas1_t_flag = 6;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw6;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t6;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas1_t_flag == 6) {
|
||||
PULSE->_gas1_t_flag = 7;
|
||||
PULSE->_gas1_sw = PULSE->_gas1_sw7;
|
||||
PULSE->_gas1_t = PULSE->_gas1_t7;
|
||||
if (PULSE->_gas1_t == 1) {
|
||||
PULSE->_gas1_sw = lastSwitch;
|
||||
}
|
||||
} else if (PULSE->_gas1_t_flag == 7) {
|
||||
PULSE->_gas1_sw = true;
|
||||
//PeriodicEvent = false;
|
||||
//megaTrigEnable = false;
|
||||
//ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lastSwitch != PULSE->_gas1_sw) {
|
||||
lastSwitch = PULSE->_gas1_sw;
|
||||
PIN15_setOutputValue(MEGA_VAL_1, PULSE->_gas1_sw);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+26
-2
@@ -3,13 +3,25 @@
|
||||
#define ELITERESET
|
||||
|
||||
static void reset() {
|
||||
Mega_PeriodicEvent = false;
|
||||
megaTrigEnable = false;
|
||||
Mega_Trig_receive = false;
|
||||
megaStiEnable = false;
|
||||
megaLedGEnable = false;
|
||||
megaLedREnable = false;
|
||||
megaGas0Enable = false;
|
||||
megaGas1Enable = false;
|
||||
PIN15_setOutputValue(MEGA_G_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_R_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_0, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_1, 1);
|
||||
ModeLED(NO_EVENT);
|
||||
InitEliteFlag();
|
||||
InitFlag();
|
||||
InitCT();
|
||||
InitGPT();
|
||||
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 1); // 0 => open high_z mode
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 0); // 0 => open high_z mode
|
||||
|
||||
VinADCGainControl(VIN_GAIN_AUTO);
|
||||
IinADCGainControl(I_GAIN_AUTO);
|
||||
@@ -40,13 +52,25 @@ static void reset() {
|
||||
}
|
||||
|
||||
static void Eliteinterrupt() {
|
||||
Mega_PeriodicEvent = false;
|
||||
Mega_Trig_receive = false;
|
||||
megaTrigEnable = false;
|
||||
megaStiEnable = false;
|
||||
megaLedGEnable = false;
|
||||
megaLedREnable = false;
|
||||
megaGas0Enable = false;
|
||||
megaGas1Enable = false;
|
||||
PIN15_setOutputValue(MEGA_G_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_R_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_0, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_1, 1);
|
||||
ModeLED(NO_EVENT);
|
||||
InitFlag();
|
||||
InitEliteFlag();
|
||||
InitCT();
|
||||
InitGPT();
|
||||
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 1); // 0 => open high_z mode
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 0); // 0 => open high_z mode
|
||||
|
||||
INSTRUCTION.VoutGainLevel = VOUT_GAIN_15K;
|
||||
VoutGainControl(INSTRUCTION.VoutGainLevel);
|
||||
|
||||
+209
-45
@@ -328,61 +328,225 @@ CVSCANMode * InitCVSCANMode(){
|
||||
/*End of CONSTANT_VSCAN Mode*/
|
||||
|
||||
/* PULSE_MODE Mode(PULSE_MODE)*/
|
||||
typedef struct _PULSEMode{
|
||||
typedef struct _PULSEMode {
|
||||
MEASURE;
|
||||
// int32_t _Vinit;
|
||||
int32_t _Vset;
|
||||
int32_t _t1;
|
||||
int32_t _t2;
|
||||
int32_t _t3;
|
||||
int32_t _t4;
|
||||
int32_t _t5;
|
||||
int32_t _v1;
|
||||
int32_t _v2;
|
||||
int32_t _v3;
|
||||
int32_t _v4;
|
||||
int32_t _v5;
|
||||
int32_t _tflag;
|
||||
int32_t _vflag;
|
||||
uint16_t _cycleNumber;
|
||||
uint16_t _loop;
|
||||
int32_t _t1Time;
|
||||
int32_t _t2Time;
|
||||
int32_t _t3Time;
|
||||
int32_t _t4Time;
|
||||
int32_t _t5Time;
|
||||
int32_t _tTime;
|
||||
}PULSEMode;
|
||||
int32_t _sti_v1;
|
||||
int32_t _sti_v2;
|
||||
int32_t _sti_v3;
|
||||
int32_t _sti_v4;
|
||||
int32_t _sti_v5;
|
||||
int32_t _sti_v6;
|
||||
int32_t _sti_v7;
|
||||
int32_t _sti_t1;
|
||||
int32_t _sti_t2;
|
||||
int32_t _sti_t3;
|
||||
int32_t _sti_t4;
|
||||
int32_t _sti_t5;
|
||||
int32_t _sti_t6;
|
||||
int32_t _sti_t7;
|
||||
int32_t _sti_t;
|
||||
int32_t _sti_v; //output voltage now
|
||||
int32_t _sti_t_flag; //Where's the time stage turn
|
||||
uint16_t _sti_cy;
|
||||
uint16_t _sti_lp;
|
||||
|
||||
PULSEMode * InitPULSEMode(){
|
||||
//ledG
|
||||
uint8_t _ledG_sw1;
|
||||
uint8_t _ledG_sw2;
|
||||
uint8_t _ledG_sw3;
|
||||
uint8_t _ledG_sw4;
|
||||
uint8_t _ledG_sw5;
|
||||
uint8_t _ledG_sw6;
|
||||
uint8_t _ledG_sw7;
|
||||
int32_t _ledG_t1;
|
||||
int32_t _ledG_t2;
|
||||
int32_t _ledG_t3;
|
||||
int32_t _ledG_t4;
|
||||
int32_t _ledG_t5;
|
||||
int32_t _ledG_t6;
|
||||
int32_t _ledG_t7;
|
||||
int32_t _ledG_t;
|
||||
uint8_t _ledG_sw;
|
||||
int32_t _ledG_t_flag;
|
||||
uint16_t _ledG_cy;
|
||||
uint16_t _ledG_lp;
|
||||
|
||||
//ledR
|
||||
uint8_t _ledR_sw1;
|
||||
uint8_t _ledR_sw2;
|
||||
uint8_t _ledR_sw3;
|
||||
uint8_t _ledR_sw4;
|
||||
uint8_t _ledR_sw5;
|
||||
uint8_t _ledR_sw6;
|
||||
uint8_t _ledR_sw7;
|
||||
int32_t _ledR_t1;
|
||||
int32_t _ledR_t2;
|
||||
int32_t _ledR_t3;
|
||||
int32_t _ledR_t4;
|
||||
int32_t _ledR_t5;
|
||||
int32_t _ledR_t6;
|
||||
int32_t _ledR_t7;
|
||||
int32_t _ledR_t;
|
||||
uint8_t _ledR_sw;
|
||||
int32_t _ledR_t_flag;
|
||||
uint16_t _ledR_cy;
|
||||
uint16_t _ledR_lp;
|
||||
|
||||
//gas0
|
||||
uint8_t _gas0_sw1;
|
||||
uint8_t _gas0_sw2;
|
||||
uint8_t _gas0_sw3;
|
||||
uint8_t _gas0_sw4;
|
||||
uint8_t _gas0_sw5;
|
||||
uint8_t _gas0_sw6;
|
||||
uint8_t _gas0_sw7;
|
||||
int32_t _gas0_t1;
|
||||
int32_t _gas0_t2;
|
||||
int32_t _gas0_t3;
|
||||
int32_t _gas0_t4;
|
||||
int32_t _gas0_t5;
|
||||
int32_t _gas0_t6;
|
||||
int32_t _gas0_t7;
|
||||
int32_t _gas0_t;
|
||||
uint8_t _gas0_sw;
|
||||
int32_t _gas0_t_flag;
|
||||
uint16_t _gas0_cy;
|
||||
uint16_t _gas0_lp;
|
||||
|
||||
//gas1
|
||||
uint8_t _gas1_sw1;
|
||||
uint8_t _gas1_sw2;
|
||||
uint8_t _gas1_sw3;
|
||||
uint8_t _gas1_sw4;
|
||||
uint8_t _gas1_sw5;
|
||||
uint8_t _gas1_sw6;
|
||||
uint8_t _gas1_sw7;
|
||||
int32_t _gas1_t1;
|
||||
int32_t _gas1_t2;
|
||||
int32_t _gas1_t3;
|
||||
int32_t _gas1_t4;
|
||||
int32_t _gas1_t5;
|
||||
int32_t _gas1_t6;
|
||||
int32_t _gas1_t7;
|
||||
int32_t _gas1_t;
|
||||
uint8_t _gas1_sw;
|
||||
int32_t _gas1_t_flag;
|
||||
uint16_t _gas1_cy;
|
||||
uint16_t _gas1_lp;
|
||||
} PULSEMode;
|
||||
|
||||
PULSEMode * InitPULSEMode() {
|
||||
PULSEMode *ret = malloc(sizeof(PULSEMode));
|
||||
ret->_measureCurrent = 0;
|
||||
ret->_measureVin = 0;
|
||||
ret->_measureVout = 0;
|
||||
ret->_measureBat = 0;
|
||||
ret->_VoViSwitch = INSTRUCTION.VoViSwitch;
|
||||
// ret->_Vinit = (INSTRUCTION.Vinit - 25000) * 4 * 10000; //[5nV]
|
||||
ret->_Vset = 0;
|
||||
ret->_t1 = INSTRUCTION.t1;
|
||||
ret->_t2 = INSTRUCTION.t2;
|
||||
ret->_t3 = INSTRUCTION.t3;
|
||||
ret->_t4 = INSTRUCTION.t4;
|
||||
ret->_t5 = INSTRUCTION.t5;
|
||||
ret->_v1 = INSTRUCTION.v1;
|
||||
ret->_v2 = INSTRUCTION.v2;
|
||||
ret->_v3 = INSTRUCTION.v3;
|
||||
ret->_v4 = INSTRUCTION.v4;
|
||||
ret->_v5 = INSTRUCTION.v5;
|
||||
ret->_t1Time = INSTRUCTION.t1Time;
|
||||
ret->_t2Time = INSTRUCTION.t2Time;
|
||||
ret->_t3Time = INSTRUCTION.t3Time;
|
||||
ret->_t4Time = INSTRUCTION.t4Time;
|
||||
ret->_t5Time = INSTRUCTION.t5Time;
|
||||
ret->_tTime = INSTRUCTION.t1Time;
|
||||
ret->_tflag = 1;
|
||||
ret->_vflag = INSTRUCTION.v1;
|
||||
ret->_cycleNumber = INSTRUCTION.cycleNumber;
|
||||
ret->_loop = INSTRUCTION.loop;
|
||||
ret->_sti_v1 = INSTRUCTION.sti_v1;
|
||||
ret->_sti_v2 = INSTRUCTION.sti_v2;
|
||||
ret->_sti_v3 = INSTRUCTION.sti_v3;
|
||||
ret->_sti_v4 = INSTRUCTION.sti_v4;
|
||||
ret->_sti_v5 = INSTRUCTION.sti_v5;
|
||||
ret->_sti_v6 = INSTRUCTION.sti_v6;
|
||||
ret->_sti_v7 = INSTRUCTION.sti_v7;
|
||||
ret->_sti_t1 = INSTRUCTION.sti_t1;
|
||||
ret->_sti_t2 = INSTRUCTION.sti_t2;
|
||||
ret->_sti_t3 = INSTRUCTION.sti_t3;
|
||||
ret->_sti_t4 = INSTRUCTION.sti_t4;
|
||||
ret->_sti_t5 = INSTRUCTION.sti_t5;
|
||||
ret->_sti_t6 = INSTRUCTION.sti_t6;
|
||||
ret->_sti_t7 = INSTRUCTION.sti_t7;
|
||||
ret->_sti_t = INSTRUCTION.sti_t1;
|
||||
ret->_sti_v = INSTRUCTION.sti_v1;
|
||||
ret->_sti_t_flag = 1;
|
||||
ret->_sti_cy = INSTRUCTION.sti_cy;
|
||||
ret->_sti_lp = INSTRUCTION.sti_loop;
|
||||
|
||||
//ledG
|
||||
ret->_ledG_sw1 = INSTRUCTION.ledG_sw1;
|
||||
ret->_ledG_sw2 = INSTRUCTION.ledG_sw2;
|
||||
ret->_ledG_sw3 = INSTRUCTION.ledG_sw3;
|
||||
ret->_ledG_sw4 = INSTRUCTION.ledG_sw4;
|
||||
ret->_ledG_sw5 = INSTRUCTION.ledG_sw5;
|
||||
ret->_ledG_sw6 = INSTRUCTION.ledG_sw6;
|
||||
ret->_ledG_sw7 = INSTRUCTION.ledG_sw7;
|
||||
ret->_ledG_t1 = INSTRUCTION.ledG_t1;
|
||||
ret->_ledG_t2 = INSTRUCTION.ledG_t2;
|
||||
ret->_ledG_t3 = INSTRUCTION.ledG_t3;
|
||||
ret->_ledG_t4 = INSTRUCTION.ledG_t4;
|
||||
ret->_ledG_t5 = INSTRUCTION.ledG_t5;
|
||||
ret->_ledG_t6 = INSTRUCTION.ledG_t6;
|
||||
ret->_ledG_t7 = INSTRUCTION.ledG_t7;
|
||||
ret->_ledG_t = INSTRUCTION.ledG_t1;
|
||||
ret->_ledG_sw = INSTRUCTION.ledG_sw1;
|
||||
ret->_ledG_t_flag = 1;
|
||||
ret->_ledG_cy = INSTRUCTION.ledG_cy;
|
||||
ret->_ledG_lp = INSTRUCTION.ledG_loop;
|
||||
|
||||
//ledR
|
||||
ret->_ledR_sw1 = INSTRUCTION.ledR_sw1;
|
||||
ret->_ledR_sw2 = INSTRUCTION.ledR_sw2;
|
||||
ret->_ledR_sw3 = INSTRUCTION.ledR_sw3;
|
||||
ret->_ledR_sw4 = INSTRUCTION.ledR_sw4;
|
||||
ret->_ledR_sw5 = INSTRUCTION.ledR_sw5;
|
||||
ret->_ledR_sw6 = INSTRUCTION.ledR_sw6;
|
||||
ret->_ledR_sw7 = INSTRUCTION.ledR_sw7;
|
||||
ret->_ledR_t1 = INSTRUCTION.ledR_t1;
|
||||
ret->_ledR_t2 = INSTRUCTION.ledR_t2;
|
||||
ret->_ledR_t3 = INSTRUCTION.ledR_t3;
|
||||
ret->_ledR_t4 = INSTRUCTION.ledR_t4;
|
||||
ret->_ledR_t5 = INSTRUCTION.ledR_t5;
|
||||
ret->_ledR_t6 = INSTRUCTION.ledR_t6;
|
||||
ret->_ledR_t7 = INSTRUCTION.ledR_t7;
|
||||
ret->_ledR_t = INSTRUCTION.ledR_t1;
|
||||
ret->_ledR_sw = INSTRUCTION.ledR_sw1;
|
||||
ret->_ledR_t_flag = 1;
|
||||
ret->_ledR_cy = INSTRUCTION.ledR_cy;
|
||||
ret->_ledR_lp = INSTRUCTION.ledR_loop;
|
||||
|
||||
//gas0
|
||||
ret->_gas0_sw1 = INSTRUCTION.gas0_sw1;
|
||||
ret->_gas0_sw2 = INSTRUCTION.gas0_sw2;
|
||||
ret->_gas0_sw3 = INSTRUCTION.gas0_sw3;
|
||||
ret->_gas0_sw4 = INSTRUCTION.gas0_sw4;
|
||||
ret->_gas0_sw5 = INSTRUCTION.gas0_sw5;
|
||||
ret->_gas0_sw6 = INSTRUCTION.gas0_sw6;
|
||||
ret->_gas0_sw7 = INSTRUCTION.gas0_sw7;
|
||||
ret->_gas0_t1 = INSTRUCTION.gas0_t1;
|
||||
ret->_gas0_t2 = INSTRUCTION.gas0_t2;
|
||||
ret->_gas0_t3 = INSTRUCTION.gas0_t3;
|
||||
ret->_gas0_t4 = INSTRUCTION.gas0_t4;
|
||||
ret->_gas0_t5 = INSTRUCTION.gas0_t5;
|
||||
ret->_gas0_t6 = INSTRUCTION.gas0_t6;
|
||||
ret->_gas0_t7 = INSTRUCTION.gas0_t7;
|
||||
ret->_gas0_t = INSTRUCTION.gas0_t1;
|
||||
ret->_gas0_sw = INSTRUCTION.gas0_sw1;
|
||||
ret->_gas0_t_flag = 1;
|
||||
ret->_gas0_cy = INSTRUCTION.gas0_cy;
|
||||
ret->_gas0_lp = INSTRUCTION.gas0_loop;
|
||||
|
||||
//gas1
|
||||
ret->_gas1_sw1 = INSTRUCTION.gas1_sw1;
|
||||
ret->_gas1_sw2 = INSTRUCTION.gas1_sw2;
|
||||
ret->_gas1_sw3 = INSTRUCTION.gas1_sw3;
|
||||
ret->_gas1_sw4 = INSTRUCTION.gas1_sw4;
|
||||
ret->_gas1_sw5 = INSTRUCTION.gas1_sw5;
|
||||
ret->_gas1_sw6 = INSTRUCTION.gas1_sw6;
|
||||
ret->_gas1_sw7 = INSTRUCTION.gas1_sw7;
|
||||
ret->_gas1_t1 = INSTRUCTION.gas1_t1;
|
||||
ret->_gas1_t2 = INSTRUCTION.gas1_t2;
|
||||
ret->_gas1_t3 = INSTRUCTION.gas1_t3;
|
||||
ret->_gas1_t4 = INSTRUCTION.gas1_t4;
|
||||
ret->_gas1_t5 = INSTRUCTION.gas1_t5;
|
||||
ret->_gas1_t6 = INSTRUCTION.gas1_t6;
|
||||
ret->_gas1_t7 = INSTRUCTION.gas1_t7;
|
||||
ret->_gas1_t = INSTRUCTION.gas1_t1;
|
||||
ret->_gas1_sw = INSTRUCTION.gas1_sw1;
|
||||
ret->_gas1_t_flag = 1;
|
||||
ret->_gas1_cy = INSTRUCTION.gas1_cy;
|
||||
ret->_gas1_lp = INSTRUCTION.gas1_loop;
|
||||
return ret;
|
||||
}
|
||||
/*End of PULSE_MODE Mode*/
|
||||
|
||||
+12
@@ -61,6 +61,13 @@
|
||||
#define enable_10v LOAD1, D5
|
||||
#define enable_5v LOAD1, D6
|
||||
|
||||
/* Megafly control */
|
||||
#define MEGA_G_LED LOAD1, D0
|
||||
#define MEGA_R_LED LOAD1, D1
|
||||
#define MEGA_VAL_0 LOAD1, D2
|
||||
#define MEGA_VAL_1 LOAD1, D3
|
||||
#define MEGA_TRIG IOID_0
|
||||
|
||||
PIN_Handle pin_handle;
|
||||
static PIN_State ZM_rst;
|
||||
|
||||
@@ -79,6 +86,7 @@ const PIN_Config BLE_IO[] = {
|
||||
LOAD2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
|
||||
switch_on | PIN_INPUT_EN | PIN_PULLDOWN, // to sense switch
|
||||
MEGA_TRIG | PIN_GPIO_OUTPUT_DIS | PIN_INPUT_EN | PIN_PULLDOWN,
|
||||
|
||||
PIN_TERMINATE
|
||||
};
|
||||
@@ -99,9 +107,13 @@ static void add_elite_pin() {
|
||||
// }
|
||||
}
|
||||
|
||||
static void megafly_trig_callback(PIN_Handle handle, PIN_Id pinId);
|
||||
|
||||
static void remove_elite_pin() {
|
||||
PIN_close(pin_handle);
|
||||
pin_handle = PIN_open(&ZM_rst, BLE_IO);
|
||||
PIN_registerIntCb(pin_handle, megafly_trig_callback);
|
||||
PIN_setInterrupt(pin_handle, MEGA_TRIG | PIN_IRQ_NEGEDGE);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
+17
-1
@@ -56,6 +56,21 @@
|
||||
#define ReadADCVolt(x) ((x==0)? ReadADCVout(spi_ADC_rxbuf) : ReadADCVin(spi_ADC_rxbuf))
|
||||
#define PARA_1 0x01
|
||||
#define PARA_2 0x02
|
||||
#define PARA_3 0x03
|
||||
#define PARA_4 0x04
|
||||
#define PARA_5 0x05
|
||||
#define PARA_6 0x06
|
||||
#define PARA_7 0x07
|
||||
#define PARA_8 0x08
|
||||
#define PARA_9 0x09
|
||||
#define PARA_10 0x0A
|
||||
#define PARA_11 0x0B
|
||||
#define PARA_12 0x0C
|
||||
#define PARA_13 0x0D
|
||||
#define PARA_14 0x0E
|
||||
#define PARA_15 0x0F
|
||||
#define PARA_16 0x10
|
||||
#define PARA_17 0x11
|
||||
|
||||
//Elite LED
|
||||
#define COLOR_BLACK 0x00
|
||||
@@ -81,5 +96,6 @@
|
||||
#define WORKING 0x04
|
||||
#define POST_WORK 0x05
|
||||
|
||||
|
||||
#define MEGA_15V 41406
|
||||
#define VALUE_ZERO_TO_ONE(_v) (_v == 0) ? 1 : _v
|
||||
#endif
|
||||
|
||||
+18
-6
@@ -602,6 +602,7 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
static int32_t ADCValueSUM = 0;
|
||||
int32_t ADCValueAVG = 0;
|
||||
int16_t ADCValueAVG_RAW = 0;
|
||||
static uint16_t cali_count_max = 1000;
|
||||
|
||||
if(ADCSwitch == 0){ /**read Iin(buffer)**/
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
@@ -614,6 +615,11 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
record_flag = false;
|
||||
}
|
||||
}
|
||||
if(INSTRUCTION.ADCGainLevel == 0) {
|
||||
cali_count_max = 5000;
|
||||
} else {
|
||||
cali_count_max = 1000;
|
||||
}
|
||||
|
||||
if(record_flag == false){
|
||||
static int recordCount = 0;
|
||||
@@ -624,7 +630,7 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
}
|
||||
}else{
|
||||
static uint16_t cali_count = 0;
|
||||
if(cali_count >= 5000){
|
||||
if(cali_count >= cali_count_max){
|
||||
ADCValueAVG = ADCValueSUM / cali_count;
|
||||
|
||||
InputNotify(NOTIFY_CURRENT, ADCValueAVG);
|
||||
@@ -642,13 +648,12 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
|
||||
}else{
|
||||
cali_count++;
|
||||
ADCValueSUM = ADCValueSUM + CURRENT_MODE->_measureCurrent;
|
||||
// InputNotify(NOTIFY_CURRENT, CURRENT_MODE->_measureCurrent);
|
||||
// InputNotify(NOTIFY_VOLT, ADCValueSUM);
|
||||
// InputNotify(NOTIFY_IMPEDANCE, (int32_t)cali_count);
|
||||
InputNotify(NOTIFY_CURRENT, CURRENT_MODE->_measureCurrent);
|
||||
InputNotify(NOTIFY_VOLT, ADCValueSUM);
|
||||
InputNotify(NOTIFY_IMPEDANCE, (int32_t)cali_count);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -720,6 +725,7 @@ static void cali_VT_plot(WorkMode *WorkModeData) {
|
||||
static int32_t ADCValueSUM = 0;
|
||||
int32_t ADCValueAVG = 0;
|
||||
int16_t ADCValueAVG_RAW = 0;
|
||||
static uint16_t cali_count_max = 1000;
|
||||
|
||||
if(ADCSwitch == 0){ /**read Iin(buffer)**/
|
||||
if(CURRENT_MODE->_VoViSwitch == 0x01 || CURRENT_MODE->_VoViSwitch == 0x02){
|
||||
@@ -736,6 +742,12 @@ static void cali_VT_plot(WorkMode *WorkModeData) {
|
||||
}
|
||||
VoltData = CURRENT_MODE->_measureVin;
|
||||
}
|
||||
|
||||
if(INSTRUCTION.VinADCGainLevel == 0) {
|
||||
cali_count_max = 5000;
|
||||
} else {
|
||||
cali_count_max = 1000;
|
||||
}
|
||||
// else if(CURRENT_MODE->_VoViSwitch == 0x00){
|
||||
// ReadADCVolt(CURRENT_MODE->_VoViSwitch);
|
||||
// CURRENT_MODE->_measureVout = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_DAC, spi_ADC_rxbuf);
|
||||
@@ -751,7 +763,7 @@ static void cali_VT_plot(WorkMode *WorkModeData) {
|
||||
}
|
||||
}else{
|
||||
static uint16_t cali_count = 0;
|
||||
if(cali_count >= 1000){
|
||||
if(cali_count >= cali_count_max){
|
||||
ADCValueAVG = ADCValueSUM / cali_count;
|
||||
|
||||
InputNotify(NOTIFY_VOLT, ADCValueAVG);
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@
|
||||
#define VERSION_DATE
|
||||
|
||||
#define VERSION_DATE_YEAR 20
|
||||
#define VERSION_DATE_MONTH 11
|
||||
#define VERSION_DATE_DAY 26
|
||||
#define VERSION_DATE_HOUR 22
|
||||
#define VERSION_DATE_MINUTE 48
|
||||
#define VERSION_DATE_MONTH 12
|
||||
#define VERSION_DATE_DAY 11
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 20
|
||||
|
||||
// this is NOT the version hash !!
|
||||
// it's the last version hash
|
||||
|
||||
+816
-688
File diff suppressed because it is too large
Load Diff
+66
-15
@@ -38,6 +38,15 @@ static void elite_gptimer_callback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_In
|
||||
GPT.GptimerCounter++;
|
||||
}
|
||||
|
||||
static void megafly_trig_callback(PIN_Handle handle, PIN_Id pinId) {
|
||||
// bool trig = 1;
|
||||
// trig = PIN_getInputValue(MEGA_TRIG);
|
||||
if (INSTRUCTION.eliteFxn == PULSE_MODE && megaTrigEnable){
|
||||
Mega_PeriodicEvent = true;
|
||||
Mega_Trig_receive = true;
|
||||
}
|
||||
// PIN15_setOutputValue(MEGA_G_LED, 1);
|
||||
}
|
||||
|
||||
static void ZM_update_instruction_callback(uint8_t ins_type, uint8_t chip_ID, uint8_t *ins);
|
||||
|
||||
@@ -46,12 +55,21 @@ static void ZM_init() {
|
||||
|
||||
// initialize
|
||||
pin_handle = PIN_open(&ZM_rst, BLE_IO);
|
||||
// PIN_registerIntCb(pin_handle, megafly_trig_callback);
|
||||
// PIN_setInterrupt(pin_handle, MEGA_TRIG | PIN_IRQ_NEGEDGE);
|
||||
|
||||
Init_Elite15_PIN();
|
||||
ELITE15_SPI_HOLD();
|
||||
|
||||
PIN15_setOutputValue(shutdown_6994, 1); // OFF = 1 => turn off 6994
|
||||
PIN15_setOutputValue(enable_10v, 0); // enable 10V
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 1); // HIGH Z MODE // 1 => close high_z mode
|
||||
PIN15_setOutputValue(HIGH_Z_MODE, 0); // HIGH Z MODE // 1 => close high_z mode
|
||||
|
||||
/* Turn off Megafly output pin */
|
||||
PIN15_setOutputValue(MEGA_G_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_R_LED, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_0, 0);
|
||||
PIN15_setOutputValue(MEGA_VAL_1, 1);
|
||||
|
||||
InitEliteInstruction();
|
||||
IinADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
@@ -119,7 +137,6 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
EliteWorkReset = false;
|
||||
batteryADC_flag = false;
|
||||
record_flag = true;
|
||||
firstTimeReset = true;
|
||||
VinADCGainControl(INSTRUCTION.VinADCGainLevel);
|
||||
IinADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
VoutGainControl(INSTRUCTION.VoutGainLevel);
|
||||
@@ -171,7 +188,7 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
|
||||
uint16_t bat = ((uint16_t)(NotifyVoltBat[2]) << 8 & 0xFF00 ) | ((uint16_t)(NotifyVoltBat[3]) & 0x00FF);
|
||||
if( bat < 768 && bat > 20){
|
||||
PIN15_setOutputValue(enable_5v, 0);
|
||||
// PIN15_setOutputValue(enable_5v, 0);
|
||||
}
|
||||
|
||||
//ADC counter
|
||||
@@ -202,7 +219,7 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
|
||||
// EliteDone();
|
||||
}
|
||||
else if (INSTRUCTION.eliteFxn == PULSE_MODE){
|
||||
else if (INSTRUCTION.eliteFxn == PULSE_MODE) {
|
||||
/** Periodic Event **/
|
||||
// Default working flow is vscan -> ADC read -> send notify
|
||||
// We will need a flag to control vscan, ADC and notify
|
||||
@@ -215,17 +232,28 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
EliteWorkReset = false;
|
||||
batteryADC_flag = false;
|
||||
record_flag = true;
|
||||
firstTimeReset = true;
|
||||
//pulsemode variable
|
||||
stiFirstTime = true;
|
||||
ledGFirstTime = true; //green led
|
||||
ledRFirstTime = true; //red led
|
||||
gas0FirstTime = true; //gas0
|
||||
gas1FirstTime = true; //gas1
|
||||
VinADCGainControl(INSTRUCTION.VinADCGainLevel);
|
||||
IinADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
VoutGainControl(INSTRUCTION.VoutGainLevel);
|
||||
if( Ve1MatchVe2Mode() ){
|
||||
if (Ve1MatchVe2Mode()) {
|
||||
if (INSTRUCTION.Ve1 == INSTRUCTION.Ve2) {
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, INSTRUCTION.Ve1));
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
} else if (INSTRUCTION.eliteFxn == PULSE_MODE) {
|
||||
if(!megaStiEnable && !megaLedGEnable && !megaLedREnable && !megaGas0Enable && !megaGas1Enable){
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -241,15 +269,37 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
leadTimeReset = false;
|
||||
}
|
||||
|
||||
//vscan counter
|
||||
GPT.VscanRateCounter = GPT.VscanRateCounter + GPT.DeltaGptimerCounter;
|
||||
//pulse mode counter
|
||||
GPT.StiCounter = GPT.StiCounter + GPT.DeltaGptimerCounter;
|
||||
GPT.LedGCounter = GPT.LedGCounter + GPT.DeltaGptimerCounter;
|
||||
GPT.LedRCounter = GPT.LedRCounter + GPT.DeltaGptimerCounter;
|
||||
GPT.Gas0Counter = GPT.Gas0Counter + GPT.DeltaGptimerCounter;
|
||||
GPT.Gas1Counter = GPT.Gas1Counter + GPT.DeltaGptimerCounter;
|
||||
|
||||
if (vscanReset) {
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, 25000));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, 25000));
|
||||
//vscanReset = false;
|
||||
}else{
|
||||
test_Vscan(WorkModeData->PULSE);
|
||||
if (megaStiEnable) {
|
||||
PULSE_Vscan(WorkModeData->PULSE);
|
||||
}
|
||||
|
||||
if (megaLedGEnable){
|
||||
PULSE_ledG(WorkModeData->PULSE);
|
||||
}
|
||||
|
||||
if (megaLedREnable){
|
||||
PULSE_ledR(WorkModeData->PULSE);
|
||||
}
|
||||
|
||||
if (megaGas0Enable){
|
||||
PULSE_gas0(WorkModeData->PULSE);
|
||||
}
|
||||
|
||||
if (megaGas1Enable){
|
||||
PULSE_gas1(WorkModeData->PULSE);
|
||||
}
|
||||
}
|
||||
|
||||
// if(GPT.VscanRateCounter >= INSTRUCTION.VsetRate){
|
||||
@@ -276,7 +326,7 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
|
||||
uint16_t bat = ((uint16_t)(NotifyVoltBat[2]) << 8 & 0xFF00 ) | ((uint16_t)(NotifyVoltBat[3]) & 0x00FF);
|
||||
if( bat < 768 && bat > 20){
|
||||
PIN15_setOutputValue(enable_5v, 0);
|
||||
// PIN15_setOutputValue(enable_5v, 0);
|
||||
}
|
||||
|
||||
//ADC counter
|
||||
@@ -299,16 +349,17 @@ static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
if(vscanReset){
|
||||
notify_flag = false;
|
||||
}
|
||||
if(notify_flag){
|
||||
if(notify_flag && megaStiEnable){
|
||||
InputNotify(NOTIFY_IMPEDANCE, Mega_Trig_receive);
|
||||
SendNotify();
|
||||
Mega_Trig_receive = false;
|
||||
notify_flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
// EliteDone();
|
||||
}
|
||||
// EliteDone();
|
||||
}
|
||||
else if(INSTRUCTION.eliteFxn == VOLT_OUTPUT){
|
||||
VoutGainControl(INSTRUCTION.VoutGainLevel);
|
||||
WorkModeData->VO->_Vset = INSTRUCTION.VoltConstant;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoutGainLevel, WorkModeData->VO->_Vset)); //UserCode -> DAC code -> DAC out
|
||||
FreeWorkMode(WorkModeData);
|
||||
@@ -421,7 +472,7 @@ static void EliteVscanControl(WorkMode *WorkModeData) {
|
||||
break;
|
||||
}
|
||||
case PULSE_MODE:{
|
||||
PULSE_Vscan(WorkModeData->PULSE);
|
||||
// PULSE_Vscan(WorkModeData->PULSE);
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
|
||||
+25
-9
@@ -617,28 +617,44 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
events &= ~SBP_PERIODIC_EVT;
|
||||
if (!PeriodicEvent) { // if there is no periodic event
|
||||
key = PIN_getInputValue(switch_on);
|
||||
|
||||
if (EliteOn) {
|
||||
if (counter6994 < CLOCK_ONE_SECOND*5) { // counter6994 enable a IC after 35 counts
|
||||
if (counter6994 < CLOCK_ONE_SECOND/2) { // counter6994 enable a IC after 35 counts
|
||||
counter6994++;
|
||||
} else if (counter6994 == CLOCK_ONE_SECOND*5) {
|
||||
PIN15_setOutputValue(shutdown_6994, 0); // OFF = 1 => turn off 6994
|
||||
} else if (counter6994 == CLOCK_ONE_SECOND/2) {
|
||||
PIN15_setOutputValue(shutdown_6994, 1); // OFF = 1 => turn off 6994
|
||||
counter6994++;
|
||||
} else if (counter6994 > CLOCK_ONE_SECOND*5) {
|
||||
counter6994 = 0;
|
||||
}
|
||||
EliteKeyPress(key);
|
||||
|
||||
if(key != 0){ //detect Elite battery power when no periodic event
|
||||
measureBat();
|
||||
}
|
||||
// if(key != 0){ //detect Elite battery power when no periodic event
|
||||
// measureBat();
|
||||
// }
|
||||
if(Free_Work_Mode){
|
||||
FreeWorkMode(WorkModeData);
|
||||
InitEliteInstruction();
|
||||
Free_Work_Mode = false;
|
||||
}
|
||||
/* Megafly trigger */
|
||||
// trig = PIN_getInputValue(MEGA_TRIG); // trigger: 1 -> 0
|
||||
if (Mega_PeriodicEvent) {
|
||||
Mega_PeriodicEvent = false;
|
||||
PeriodicEvent = true;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
EliteOn = TurnOnElite(key);
|
||||
// EliteOn = TurnOnElite(key);
|
||||
headstage_battery_volt();
|
||||
uint16_t bat = ((uint16_t)(NotifyVoltBat[2]) << 8 & 0xFF00 ) |
|
||||
((uint16_t)(NotifyVoltBat[3]) & 0x00FF);
|
||||
PIN15_setOutputValue(enable_5v, 1); // enable 5V
|
||||
TurnOn10V();
|
||||
ModeLED(BT_WAIT);
|
||||
EliteOn = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else { // if there is periodic event
|
||||
if(InitPeriodicEvent){
|
||||
|
||||
Reference in New Issue
Block a user