Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 646650ddee | |||
| cb335af011 | |||
| fcc89f3e1c | |||
| ed222d73cf | |||
| e5ad26aac2 | |||
| 779b7a12b8 | |||
| 29b9ba4d9b | |||
| 6707ef752f | |||
| ec08a5963b | |||
| 4cb79ef397 | |||
| b85750fa98 | |||
| 341988a20c | |||
| 38264f809b | |||
| 476ffa4714 | |||
| b3a37db2b5 | |||
| d25c49001c | |||
| ed0d0f0c32 | |||
| 39bb06ee62 | |||
| 7b8ef106f3 | |||
| 9781ffaae0 | |||
| 87ddc852d5 | |||
| 4ddb378a4b | |||
| a6a7a7a98d | |||
| 801a9a89f1 | |||
| 6bd5ed1fdf | |||
| 073c13782f | |||
| 4c17c08cc4 | |||
| f8265791bb | |||
| e45b5d46cb | |||
| c0133c2597 | |||
| a802b91a5b | |||
| e5b90bcd7d | |||
| 06819baf8b | |||
| 1c0ae3875a | |||
| 609e4165ce | |||
| 55d124009e | |||
| 6d6a8ac809 | |||
| 9420f7f3b3 | |||
| f5b252a52d | |||
| 64a8e00dbb | |||
| 40ab6e563a | |||
| 2fd739339a | |||
| 3d3594105a | |||
| 7c9aca9d3d | |||
| 8432c4f98f | |||
| c56c42c4f8 | |||
| 276738d93b | |||
| 9f1bf4ee19 | |||
| c5319d9ff7 | |||
| f0bd1200ce | |||
| 2239768e82 | |||
| 4eae2bc3d0 | |||
| d513ef1c49 | |||
| 83c2b31313 | |||
| 064b28c081 | |||
| a45a7f1105 | |||
| 1b845035e1 | |||
| 8ce11489ae | |||
| 76e4043810 | |||
| ffa6beaa5f | |||
| 007ffcbe85 | |||
| e4f9ba5ba3 | |||
| d9b611a72a | |||
| 4014526e94 | |||
| 9b39f8d9a6 | |||
| 420b016e55 | |||
| c64d88bb1a | |||
| aa26bd2095 | |||
| 9469edb747 | |||
| d00073e790 | |||
| 4b778c1976 | |||
| d9904e2bb1 | |||
| ff6351483c | |||
| 69452da545 | |||
| 1959767107 | |||
| 2cf61acef2 | |||
| 580cde7cf6 | |||
| d85d98a78c | |||
| 57285258b9 | |||
| 0c89f42463 | |||
| 84bebeded7 | |||
| 1c14375948 | |||
| c1cedcb9c2 | |||
| 271a80766b | |||
| efb7df7c33 | |||
| 0471fa43dc | |||
| aa0c14c588 | |||
| 2543fd1238 | |||
| c01d6a3899 | |||
| 79e5a480ec | |||
| e3bb56f38b | |||
| 77cc277ba9 | |||
| 0bb8d7788d | |||
| fcb35d7b91 | |||
| 970d2adf73 | |||
| 3d1779ad81 | |||
| 05bbb46400 | |||
| b1dae861fc | |||
| b9a0acffea | |||
| 765326df98 | |||
| 394b959ae5 | |||
| 09ab588e06 | |||
| ad4898e0f0 | |||
| 535f2a2f7d | |||
| a2235da1fd | |||
| f9e281ea4a | |||
| 8a64684247 | |||
| 290af2a77c | |||
| 99ceee42f6 | |||
| 6bc11ba56a | |||
| 704253a9e8 | |||
| efe3678d55 | |||
| 3347d31297 | |||
| d84d8666c5 | |||
| b9e839ff41 | |||
| 24634276aa | |||
| 8e691ba69e | |||
| 30aa17dd0e | |||
| f0fbe52296 | |||
| 48f61c564f | |||
| 1e67263010 | |||
| 9cf1e8f268 | |||
| ceb15a9af1 | |||
| fe0c6093d5 | |||
| a231b33ef8 | |||
| ccacc34bd0 | |||
| 111d593567 | |||
| 65eb3ab488 | |||
| ad65de63fe | |||
| 135c7aaac4 | |||
| 881e0ced01 | |||
| e79a73588f | |||
| 2c03a95d28 | |||
| 17177af681 | |||
| bda081de95 |
+2
-1
@@ -6,4 +6,5 @@ ccsv8/
|
||||
simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/
|
||||
|
||||
# CSS build files
|
||||
FlashROM/
|
||||
FlashROM/
|
||||
/Elite_test.txt
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
MAC 18:04:ED:37:C6:6A .
|
||||
. coeff offset
|
||||
ADC_C1 311760871.760443 -50619.5024488329
|
||||
ADC_C2 0.065484773376246 -1061.19682828209
|
||||
ADC_C3 0.003142283837061 -50.9228211021286
|
||||
DAC -1.05569320115838 -0.000624379961454
|
||||
ADC_V1 56126.9201379636 10.1198174952741
|
||||
@@ -0,0 +1,23 @@
|
||||
no device y=ax+b MAC a+ b+ a- b- avg
|
||||
1 c6be c6be 1804ED37C6BE 2270 -7040 2259 -14129 4.15063496100114
|
||||
2 8cd0 8cd0 0081F9E48CD0 2199 -4616 2162 -16396 4.67288597901671
|
||||
3 c694 c694 1804ED37C694 2354 -12824 2354 -11216 4.34663132771076
|
||||
4 c6c7 c6c7 1804ED37C6C7 2199 -7238 2221 -15702 4.63164432837751
|
||||
5 9b97 9b97 0081F9E49B97 2227 -9846 2151 -26609 4.75015860006776
|
||||
6 c6df c6df 1804ED37C6DF 2132 -3844 2054 -21545 4.89066238118665
|
||||
7 c652 c652 18:04:ED:37:C6:52 2024 -7687 2086 -11283 4.88850143182858
|
||||
8 c5ed c5ed 18:04:ED:37:C5:ED 2231 -1711 2353 -70845 4.45265043545859
|
||||
9 9bef 9bef 0081F9E49BEF 2383 -8585 2415 -20347 4.2758539244186
|
||||
10 8b50 8b50 00:81:F9:E4:8B:50 2369 -11005 2360 -11797 4.30475635707671
|
||||
11 c641 c641 18:04:ED:37:C6:41 2090 4616 1997 -40665 5.07591391714942
|
||||
12 E8E6 E8E6 A4:DA:32:D4:E8:E6 2306 -88454 2418 -15140 4.2686494968089
|
||||
13 E73B E73B A4:DA:32:D4:E7:3B 2262 -564 2298 44746 4.35551198222141
|
||||
14 EEE2 EEE2 A4:DA:32:D4:EE:E2 2057 5980 2096 -21411 4.82094019052184
|
||||
15 E871 E871 A4:DA:32:D4:E8:71 2175 -4549 2220 31468 4.60684608395208
|
||||
16 EFC4 EFC4 A4:DA:32:D4:EF:C4 2348 -4371 2374 -26606 4.45106768611704
|
||||
17 EF85 EF85 A4:DA:32:D4:EF:85 2136 -3339 2189 -30040 4.61909624778354
|
||||
18 E7DA E7DA A4:DA:32:D4:E7:DA 2081 -3015 2122 -21543 4.79766509652981
|
||||
19 E6EA E6EA A4:DA:32:D4:E6:EA 2039 -262 2127 -47259 4.79384458739747
|
||||
20 EEDB EEDB A4:DA:32:D4:EE:DB 2214 -1170 2351 -24636 4.44485358085645
|
||||
21 E73A E73A A4:DA:32:D4:E7:3A 2210 -4855 2339 -16434 4.47776494604746
|
||||
22 E6CF E6CF A4:DA:32:D4:E6:CF 2135 -5206 2193 -30885 4.73462680884304
|
||||
+5
@@ -17,6 +17,11 @@
|
||||
<property Type="choicelist" Value="1" id="XDS110 Aux Port"/>
|
||||
</choice>
|
||||
</property>
|
||||
<property Type="choicelist" Value="1" id="Debug Probe Selection">
|
||||
<choice Name="Select by serial number" value="0">
|
||||
<property Type="stringfield" Value="L1000537" id="-- Enter the serial number"/>
|
||||
</choice>
|
||||
</property>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="CC2650F128_0" href="devices/cc2650f128.xml" id="CC2650F128_0" xml="cc2650f128.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
<linkerCommandFile value="cc26x0f128.cmd"/>
|
||||
<rts value="libc.a"/>
|
||||
<createSlaveProjects value=""/>
|
||||
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
|
||||
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
|
||||
<isTargetManual value="false"/>
|
||||
</projectOptions>
|
||||
|
||||
+236
-120
@@ -14,130 +14,246 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Default.1209999684" name="FlashROM" parent="com.ti.ccstudio.buildDefinitions.TMS470.Default" postannouncebuildStep="" postbuildStep="${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out;${TOOLS_BLE}/frontier/frontier.exe ccs ${PROJECT_LOC}/${ConfigName}/${ProjName}_linkInfo.xml ${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg ${ORG_PROJ_DIR}/../../ccs/config/ccs_linker_defines.cmd" preannouncebuildStep="" prebuildStep=""${TOOLS_BLE}/lib_search/lib_search.exe" ${ORG_PROJ_DIR}/build_config.opt "${TOOLS_BLE}/lib_search/params_split_cc2640.xml" ${SRC_BLE_CORE}/../blelib "${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd"">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.1209999684." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.929750171" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1008890994">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1479696404" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC2650F128"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_ble_stack.cmd;"/>
|
||||
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.201372544" name="Compiler version" 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.1951196199" 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.20903631" keepEnvironmentInBuildfile="false" name="GNU Make" 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.1176131016" 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.647279085" 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.1443871767" 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.227818129" 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.784155377" 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.494285153" 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.581550859" 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.1288777730" name="Add dir to #include search path (--include_path, -I)" 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="${SRC_EX}/examples/simple_peripheral/cc26xx/stack"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target/_common"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target/_common/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/osal/src/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv"/>
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.1209999684." name="/"
|
||||
resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1245523372"
|
||||
name="TI Build Tools"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
|
||||
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1451981696">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.905558853"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC2650F128"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
|
||||
<listOptionValue builtIn="false"
|
||||
value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_ble_stack.cmd;"/>
|
||||
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.690267428"
|
||||
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.703901656"
|
||||
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.578715889"
|
||||
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.124004045"
|
||||
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.1471387206"
|
||||
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.1989883015"
|
||||
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.26908680"
|
||||
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.161170469"
|
||||
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.202178130"
|
||||
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.477462079"
|
||||
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.2135144875"
|
||||
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="${SRC_EX}/examples/simple_peripheral/cc26xx/stack"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target/_common"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target"/>
|
||||
<listOptionValue builtIn="false"
|
||||
value="${SRC_COMMON}/hal/src/target/_common/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/osal/src/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/saddr"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/icall/src/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/controller/cc26xx/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/aes/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/npi/src"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx/npi/stack"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.986125825" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CC26XX"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="GATT_NO_CLIENT"/>
|
||||
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
|
||||
<listOptionValue builtIn="false" value="CC26XXWARE"/>
|
||||
<listOptionValue builtIn="false" value="DATA="/>
|
||||
<listOptionValue builtIn="false" value="EXT_HAL_ASSERT"/>
|
||||
<listOptionValue builtIn="false" value="FLASH_ROM_BUILD"/>
|
||||
<listOptionValue builtIn="false" value="INCLUDE_AES_DECRYPT"/>
|
||||
<listOptionValue builtIn="false" value="NEAR_FUNC="/>
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/controller/cc26xx/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/aes/cc26xx"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_COMMON}/npi/src"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx/npi/stack"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1493730349"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE"
|
||||
valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CC26XX"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="GATT_NO_CLIENT"/>
|
||||
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
|
||||
<listOptionValue builtIn="false" value="CC26XXWARE"/>
|
||||
<listOptionValue builtIn="false" value="DATA="/>
|
||||
<listOptionValue builtIn="false" value="EXT_HAL_ASSERT"/>
|
||||
<listOptionValue builtIn="false" value="FLASH_ROM_BUILD"/>
|
||||
<listOptionValue builtIn="false" value="INCLUDE_AES_DECRYPT"/>
|
||||
<listOptionValue builtIn="false" value="NEAR_FUNC="/>
|
||||
<listOptionValue builtIn="false" value="OSAL_CBTIMER_NUM_TASKS=1"/>
|
||||
<listOptionValue builtIn="false" value="OSAL_SNV=1"/>
|
||||
<listOptionValue builtIn="false" value="USE_ICALL"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_ENC"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_GPIO"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_SW_TRACE"/>
|
||||
<listOptionValue builtIn="false" value="xPM_DISABLE_PWRDOWN"/>
|
||||
<listOptionValue builtIn="false" value="xTESTMODES"/>
|
||||
<listOptionValue builtIn="false" value="xTEST_BLEBOARD"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.372638078" 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.DIAG_SUPPRESS.201347726" name="Suppress diagnostic <id> (--diag_suppress, -pds)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="48"/>
|
||||
<listOptionValue builtIn="false" value="16004"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.73314177" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" 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.1126279750" 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.1492280006" 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.CMD_FILE.538453952" name="Read options from specified file (--cmd_file, -@)" 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"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.313905687" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1129729173" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.156783227" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.538375181" 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.1008890994" 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.1873600405" 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.1359172875" 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.1355177509" 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.829303802" 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.1078356909" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd"/>
|
||||
<listOptionValue builtIn="false" value="${ROM}/ble_rom_releases/04242014/ble_rom_patch.symbols"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1707930214" name="Add <dir> to library search path (--search_path, -i)" 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.59164041" name="Suppress diagnostic <id> (--diag_suppress)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="16002-D"/>
|
||||
<listOptionValue builtIn="false" value="10247-D"/>
|
||||
<listOptionValue builtIn="false" value="10325-D"/>
|
||||
<listOptionValue builtIn="false" value="10229-D"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.11567165" 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.1727810233" 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.1385277262" 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.ENTRY_POINT.1153340314" name="Specify program entry point for the output module (--entry_point, -e)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT" value="startup_entry" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.450995330" 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.1827942626" 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"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1279238428" 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.526125450" 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.581803256" 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.947560992" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1295209583" 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.110293046" 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.1122561921" 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"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
<listOptionValue builtIn="false" value="OSAL_SNV=1"/>
|
||||
<listOptionValue builtIn="false" value="USE_ICALL"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_ENC"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_GPIO"/>
|
||||
<listOptionValue builtIn="false" value="xDEBUG_SW_TRACE"/>
|
||||
<listOptionValue builtIn="false" value="xPM_DISABLE_PWRDOWN"/>
|
||||
<listOptionValue builtIn="false" value="xTESTMODES"/>
|
||||
<listOptionValue builtIn="false" value="xTEST_BLEBOARD"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.1032660795"
|
||||
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.DIAG_SUPPRESS.1680463954"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS"
|
||||
valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="48"/>
|
||||
<listOptionValue builtIn="false" value="16004"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1766518960"
|
||||
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.1804087261"
|
||||
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.733166450"
|
||||
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.CMD_FILE.1033506009"
|
||||
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"/>
|
||||
</option>
|
||||
<inputType
|
||||
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.1352027396"
|
||||
name="C Sources"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
|
||||
<inputType
|
||||
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1465774058"
|
||||
name="C++ Sources"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType
|
||||
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.1739768713"
|
||||
name="Assembly Sources"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType
|
||||
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.79045750"
|
||||
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.1451981696"
|
||||
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.816733227"
|
||||
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.1515084002"
|
||||
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.1765940845"
|
||||
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.272429594"
|
||||
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.2076163355"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY"
|
||||
valueType="libs">
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
<listOptionValue builtIn="false"
|
||||
value="${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd"/>
|
||||
<listOptionValue builtIn="false"
|
||||
value="${ROM}/ble_rom_releases/04242014/ble_rom_patch.symbols"/>
|
||||
<listOptionValue builtIn="false"
|
||||
value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1967226591"
|
||||
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.17239932"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS"
|
||||
valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="16002-D"/>
|
||||
<listOptionValue builtIn="false" value="10247-D"/>
|
||||
<listOptionValue builtIn="false" value="10325-D"/>
|
||||
<listOptionValue builtIn="false" value="10229-D"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.773340389"
|
||||
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.2126747201"
|
||||
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.1785926765"
|
||||
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.ENTRY_POINT.683577056"
|
||||
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT"
|
||||
value="startup_entry" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.1312810581"
|
||||
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.1324674660"
|
||||
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.1903606010"
|
||||
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.872286488"
|
||||
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.1603687860"
|
||||
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.1441542763"
|
||||
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.210948887"
|
||||
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.514543379"
|
||||
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.2135898037"
|
||||
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>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="cc26x0f128.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
|
||||
+15
-14
@@ -1,19 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe_0" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe_0" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
|
||||
<property Type="choicelist" Value="2" id="The Converter Usage">
|
||||
<choice Name="Generate 1149.7 2-pin advanced modes" value="enable">
|
||||
<property Type="choicelist" Value="1" id="The Converter 1149.7 Frequency">
|
||||
<choice Name="Overclock with user specified value" value="unused">
|
||||
<property Type="choicelist" Value="5" id="-- Choose a value from 1.0MHz to 50.0MHz"/>
|
||||
</choice>
|
||||
</property>
|
||||
<property Type="choicelist" Value="5" id="The Target Scan Format"/>
|
||||
<configuration XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe_0" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe_0" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
|
||||
<instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
|
||||
<property Type="choicelist" Value="1" id="Power Selection">
|
||||
<choice Name="Probe supplied power" value="1">
|
||||
<property Type="stringfield" Value="3.3" id="Voltage Level"/>
|
||||
</choice>
|
||||
</property>
|
||||
<property Type="choicelist" Value="0" id="JTAG Signal Isolation"/>
|
||||
<property Type="choicelist" Value="4" id="SWD Mode Settings">
|
||||
<choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable">
|
||||
<property Type="choicelist" Value="1" id="XDS110 Aux Port"/>
|
||||
</choice>
|
||||
</property>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
+25
-8
@@ -56,10 +56,10 @@ instruction operator
|
||||
| VIS_INT | 0x60 | interrupt device |
|
||||
| | 0x70 | not used |
|
||||
| | 0x80 | not used |
|
||||
| VIS_FUH | 0x90 | not used |
|
||||
| VIS_STI | 0x90 | en/disable stimulation |
|
||||
| VIS_CAL | 0xA0 | not used |
|
||||
| | 0xB0 | not used |
|
||||
| VIS_STI | 0xC0 | device start working |
|
||||
| VIS_START| 0xC0 | device start working |
|
||||
| | 0xD0 | not used |
|
||||
| | 0xE0 | not used |
|
||||
| VIS_RST | 0xF0 | device reset |
|
||||
@@ -93,6 +93,19 @@ instruction operator
|
||||
#include <ti/sysbios/knl/Semaphore.h>
|
||||
#include "simple_gatt_profile.h"
|
||||
|
||||
/*========================
|
||||
==== Global Variable ====
|
||||
=========================*/
|
||||
|
||||
static bool STI = false;
|
||||
static bool IsFirstData = true;
|
||||
static uint8_t spi_state_counter = 0;
|
||||
static bool ConnectState = false;
|
||||
static bool ErrorRestart = false;
|
||||
static bool turn_off_sti = false;
|
||||
static uint8_t SPICallBack = 0;
|
||||
static uint32_t data_counter = 0;
|
||||
|
||||
/*======================
|
||||
==== event control ====
|
||||
=====================*/
|
||||
@@ -182,12 +195,14 @@ extern ICall_Semaphore semaphore;
|
||||
#define INS_TYPE_CIS 0x70
|
||||
|
||||
// VIS operator
|
||||
#define VIS_ASK 0x30
|
||||
#define VIS_INT 0x60
|
||||
#define VIS_FUH 0x90
|
||||
#define VIS_CAL 0xA0
|
||||
#define VIS_STI 0xC0
|
||||
#define VIS_RST 0xF0
|
||||
#define VIS_ASK 0x30
|
||||
#define VIS_INT 0x60
|
||||
#define VIS_STI 0x90
|
||||
#define VIS_CAL 0xA0
|
||||
#define VIS_START 0xC0
|
||||
#define VIS_RST 0xF0
|
||||
#define VIS_STOP_STI 0x01
|
||||
|
||||
|
||||
// CIS operator
|
||||
#define CIS_NOP 0x00
|
||||
@@ -370,6 +385,8 @@ static void headstage_update_instruction(uint8_t *instruction) {
|
||||
uint8_t ins_oper = instruction[1] & 0xF0;
|
||||
uint8_t ins_len = instruction[1] & 0x0F;
|
||||
|
||||
|
||||
|
||||
switch (ins_type) {
|
||||
case INS_TYPE_RIS: {
|
||||
headstage_update_ris_instruction(ins_len, instruction + 2);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ static uint8_t headstage_battery_percent() {
|
||||
}
|
||||
|
||||
|
||||
static uint8_t battery_volt = 256;
|
||||
static uint8_t battery_volt;
|
||||
static uint8_t headstage_battery_volt1() {
|
||||
uint8_t internal_battery_percent;
|
||||
uint32_t internal_batt_sense = AONBatMonBatteryVoltageGet();
|
||||
|
||||
+1
-2
@@ -23,8 +23,7 @@ static void CaliTable2u8(uint8_t* cali){
|
||||
* - .......
|
||||
*/
|
||||
static void SendCaliValue(uint8_t CaliNumber){
|
||||
uint8_t ch, gain_offset;
|
||||
uint8_t cdr_buf[10];
|
||||
uint8_t ch, cdr_buf[10];
|
||||
|
||||
ch = 2 * (CaliNumber % 4);
|
||||
uint8_t gain_level = CaliNumber / 4; // 0:gain, 1:offset
|
||||
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
|
||||
#ifndef NEU_CALI_STI_H
|
||||
#define NEU_CALI_STI_H
|
||||
|
||||
#include "headstage_cali_table.h"
|
||||
|
||||
typedef struct _StiCali{
|
||||
uint16_t coefficient;
|
||||
int16_t offset;
|
||||
}StiCali;
|
||||
|
||||
struct _StiCaliStiTable{
|
||||
StiCali p_ch;
|
||||
StiCali n_ch;
|
||||
}StiCaliTable =
|
||||
|
||||
#ifdef BOARD_TEST
|
||||
{
|
||||
.p_ch.coefficient = 10000,
|
||||
.p_ch.offset = 0,
|
||||
.n_ch.coefficient = 10000,
|
||||
.n_ch.offset = 0
|
||||
};
|
||||
|
||||
#elif defined(BOARD_00_81_F9_E4_8C_D0)
|
||||
{
|
||||
.p_ch.coefficient = 2199,
|
||||
.p_ch.offset = -4615,
|
||||
.n_ch.coefficient = 2162,
|
||||
.n_ch.offset = -16395
|
||||
};
|
||||
|
||||
#elif defined(BOARD_18_04_ED_37_C6_BE)
|
||||
{
|
||||
.p_ch.coefficient = 2270,
|
||||
.p_ch.offset = -7039,
|
||||
.n_ch.coefficient = 2259,
|
||||
.n_ch.offset = -14128
|
||||
};
|
||||
|
||||
#elif defined(BOARD_18_04_ED_37_C6_41)
|
||||
{
|
||||
.p_ch.coefficient = 2090,
|
||||
.p_ch.offset = 4616,
|
||||
.n_ch.coefficient = 1997,
|
||||
.n_ch.offset = -40664
|
||||
};
|
||||
|
||||
#elif defined(BOARD_18_04_ED_37_C6_DF)
|
||||
{
|
||||
.p_ch.coefficient = 2132,
|
||||
.p_ch.offset = -3843,
|
||||
.n_ch.coefficient = 2054,
|
||||
.n_ch.offset = -21544
|
||||
};
|
||||
|
||||
#elif defined(BOARD_18_04_ED_37_C6_C7)
|
||||
{
|
||||
.p_ch.coefficient = 2199,
|
||||
.p_ch.offset = -7237,
|
||||
.n_ch.coefficient = 2221,
|
||||
.n_ch.offset = -15701
|
||||
};
|
||||
|
||||
#elif defined(BOARD_00_81_F9_E4_8B_50)
|
||||
{
|
||||
.p_ch.coefficient = 2369,
|
||||
.p_ch.offset = -11004,
|
||||
.n_ch.coefficient = 2360,
|
||||
.n_ch.offset = -11796
|
||||
};
|
||||
|
||||
#elif defined(BOARD_00_81_F9_E4_9B_97)
|
||||
{
|
||||
.p_ch.coefficient = 2227,
|
||||
.p_ch.offset = -9845,
|
||||
.n_ch.coefficient = 2151,
|
||||
.n_ch.offset = -26608
|
||||
};
|
||||
|
||||
#elif defined(BOARD_18_04_ED_37_C6_52)
|
||||
{
|
||||
.p_ch.coefficient = 2024,
|
||||
.p_ch.offset = -7686,
|
||||
.n_ch.coefficient = 2086,
|
||||
.n_ch.offset = -11282
|
||||
};
|
||||
|
||||
#elif defined(BOARD_00_81_F9_E4_9B_EF)
|
||||
{
|
||||
.p_ch.coefficient = 2383,
|
||||
.p_ch.offset = -8584,
|
||||
.n_ch.coefficient = 2415,
|
||||
.n_ch.offset = -20346
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E8_E6)
|
||||
{
|
||||
.p_ch.coefficient = 2306,
|
||||
.p_ch.offset = -88454,
|
||||
.n_ch.coefficient = 2418,
|
||||
.n_ch.offset = -15140
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E7_3B)
|
||||
{
|
||||
.p_ch.coefficient = 2262,
|
||||
.p_ch.offset = -564,
|
||||
.n_ch.coefficient = 2298,
|
||||
.n_ch.offset = 44746
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_EE_E2)
|
||||
{
|
||||
.p_ch.coefficient = 2057,
|
||||
.p_ch.offset = 5980,
|
||||
.n_ch.coefficient = 2096,
|
||||
.n_ch.offset = -21411
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E8_71)
|
||||
{
|
||||
.p_ch.coefficient = 2175,
|
||||
.p_ch.offset = -4549,
|
||||
.n_ch.coefficient = 2220,
|
||||
.n_ch.offset = 31468
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_EF_C4)
|
||||
{
|
||||
.p_ch.coefficient = 2348,
|
||||
.p_ch.offset = -5830,
|
||||
.n_ch.coefficient = 2374,
|
||||
.n_ch.offset = -26403
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_EF_85)
|
||||
{
|
||||
.p_ch.coefficient = 2136,
|
||||
.p_ch.offset = -3339,
|
||||
.n_ch.coefficient = 2189,
|
||||
.n_ch.offset = -30040
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E7_DA)
|
||||
{
|
||||
.p_ch.coefficient = 2081,
|
||||
.p_ch.offset = -3015,
|
||||
.n_ch.coefficient = 2122,
|
||||
.n_ch.offset = -21543
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E6_EA)
|
||||
{
|
||||
.p_ch.coefficient = 2039,
|
||||
.p_ch.offset = -262,
|
||||
.n_ch.coefficient = 2127,
|
||||
.n_ch.offset = -47259
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_EE_DB)
|
||||
{
|
||||
.p_ch.coefficient = 2214,
|
||||
.p_ch.offset = -1170,
|
||||
.n_ch.coefficient = 2351,
|
||||
.n_ch.offset = -24636
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E7_3A)
|
||||
{
|
||||
.p_ch.coefficient = 2210,
|
||||
.p_ch.offset = -4855,
|
||||
.n_ch.coefficient = 2339,
|
||||
.n_ch.offset = -16434
|
||||
};
|
||||
|
||||
#elif defined(BOARD_A4_DA_32_D4_E6_CF)
|
||||
{
|
||||
.p_ch.coefficient = 2135,
|
||||
.p_ch.offset = -5206,
|
||||
.n_ch.coefficient = 2193,
|
||||
.n_ch.offset = -30885
|
||||
};
|
||||
|
||||
#else
|
||||
{
|
||||
.p_ch.coefficient = 10000,
|
||||
.p_ch.offset = 0,
|
||||
.n_ch.coefficient = 10000,
|
||||
.n_ch.offset = 0
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1595
File diff suppressed because it is too large
Load Diff
+1
-5
@@ -9,13 +9,9 @@ static uint8_t check_ins(uint16_t trans_ins){
|
||||
uint16_t recv_ins;
|
||||
recv_ins = spi_rxbuf[1] << 8 | spi_rxbuf[2];
|
||||
|
||||
if(trans_ins == recv_ins){
|
||||
return 1; // instruction write correctly
|
||||
}
|
||||
return 0; // resend all instruction
|
||||
return (trans_ins == recv_ins);
|
||||
}
|
||||
|
||||
|
||||
static void check_register(uint8_t register_to_check, uint16_t instruction_to_fit, uint8_t next_state){
|
||||
if(spi_state_counter < 6){
|
||||
SPICallBack = CONTINUOUS_TRANS;
|
||||
|
||||
+5
-6
@@ -2,6 +2,10 @@
|
||||
#ifndef NEU_INSTRUCTION
|
||||
#define NEU_INSTRUCTION
|
||||
|
||||
/** amounts of channel */
|
||||
#define NEU_STI_CHANNEL_COUNTS 9 // channel 0~7 is current sti; channel 8 = voltage sti
|
||||
#define NEU_REC_CHANNEL_COUNTS 16 /**< recording channel counts */
|
||||
|
||||
struct HEADSTAGE_PARAMETER_TABLE {
|
||||
uint8_t current_sti_cycle[NEU_STI_CHANNEL_COUNTS]; /** stimulation times will be executed. */
|
||||
|
||||
@@ -77,16 +81,11 @@ struct HEADSTAGE_PARAMETER_TABLE {
|
||||
* manage which operation to be conducted
|
||||
*/
|
||||
struct HEADSTAGE_STATE {
|
||||
uint8_t state;
|
||||
uint16_t state;
|
||||
|
||||
uint8_t config_type;
|
||||
|
||||
uint8_t index;
|
||||
} NEULIVE_STATE = {0};
|
||||
|
||||
static bool STI = false;
|
||||
static uint8_t spi_state_counter = 0;
|
||||
static bool ConnectState = false;
|
||||
static bool IsFirstData = true;
|
||||
|
||||
#endif
|
||||
|
||||
+5
-1
@@ -82,6 +82,7 @@ static uint16_t headstage_led_set_buffer(uint16_t *ins_buf, uint8_t repeat, LEDP
|
||||
#define COLOR_BLUE 5
|
||||
#define COLOR_CYAN 6
|
||||
#define COLOR_MAGENTA 7
|
||||
#define COLOR_PURPLE 8
|
||||
#define COLOR_WHITE 9
|
||||
// clang-format on
|
||||
|
||||
@@ -93,7 +94,7 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x00, .blue = 0x00};
|
||||
break;
|
||||
case COLOR_ORANGE:
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x03, .blue = 0x00};
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x98, .blue = 0x00};
|
||||
break;
|
||||
case COLOR_YELLOW:
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x0F, .green = 0x0F, .blue = 0x00};
|
||||
@@ -113,6 +114,9 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
|
||||
case COLOR_WHITE:
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x0F, .green = 0x7F, .blue = 0x1F};
|
||||
break;
|
||||
case COLOR_PURPLE:
|
||||
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x7F, .green = 0x0F, .blue = 0x7F};
|
||||
break;
|
||||
default:
|
||||
case COLOR_BLACK:
|
||||
parameter = (LEDParameter){.luminance = 0x00, .red = 0x00, .green = 0x00, .blue = 0x00};
|
||||
|
||||
+235
-203
@@ -160,7 +160,7 @@ static void FlushNotify();
|
||||
#define NEU_REC_PARAM 0x20
|
||||
#define NEU_MULTI_STI 0x40
|
||||
#define NEU_TEST_INS 0x60
|
||||
#define NEU_GET_REGISTER 0x80
|
||||
#define RIS_STOP_STI 0x80
|
||||
|
||||
/** event */
|
||||
#define EVT_NEU_SPI 0x0001 /**< spi transaction event */
|
||||
@@ -174,12 +174,7 @@ static void FlushNotify();
|
||||
#define NEU_SPI_FREQ NEU_SYS_CLK/10 /**< 1Mhz */ // should be NEU_SYS_CLK/10
|
||||
//#define NEU_LED_FREQ 1000000 /**< 1Mhz */
|
||||
|
||||
/** amounts of channel */
|
||||
#define NEU_STI_CHANNEL_COUNTS 9 // channel 0~7 is current sti; channel 8 = voltage sti
|
||||
#define NEU_REC_CHANNEL_COUNTS 16 /**< recording channel counts */
|
||||
|
||||
/** State for SPI (SPI callback to do task) **/
|
||||
static uint8_t SPICallBack = 0;
|
||||
#define CLOSE_SPI 0x01 // close SPI after MISO transmit
|
||||
#define CONTINUOUS_TRANS 0x02 // transmit DBS data
|
||||
#define FLUSH_BUFFER 0x03 // clean SPI buffer, used after a "write" SPI instruction (MISO)
|
||||
@@ -193,16 +188,24 @@ static uint8_t SPICallBack = 0;
|
||||
/** state for CC2650 to control DBS */
|
||||
#define NEU_WRITE_INSTRUCTION 0 /**< write instruction into register table by spi interface */
|
||||
#define NEU_READ_DATA 1 /**< read amplifier data by spi interface */
|
||||
#define NEU_SINGLE_INS_READ 2
|
||||
#define NEU_STI_LED 2
|
||||
#define NEU_CHECK_REGISTER 3
|
||||
#define NEU_RECEIVE_PARAM 4
|
||||
#define NEU_PREPARE_READ 5
|
||||
#define NEU_CHECK_REC_CH 6
|
||||
#define NEU_CHECK_AMP_GAIN 7
|
||||
#define NEU_CHECK_SAMPLE_RATE 8
|
||||
#define NEU_CHECK_STI_CH 9
|
||||
#define NEU_SEND_SAMPLE_RATE_BEFORE_READ 6
|
||||
#define NEU_CHECK_REC_CH 7
|
||||
#define NEU_CHECK_AMP_GAIN 8
|
||||
#define NEU_CHECK_SAMPLE_RATE 9
|
||||
#define NEU_CHECK_GENERAL_EN 10
|
||||
#define NEU_IDLE 15
|
||||
#define NEU_CHECK_STI_POL 11
|
||||
#define NEU_CHECK_STI_MODE 12
|
||||
#define NEU_CHECK_STI_CLK 13
|
||||
#define NEU_CHECK_POS_AMP 14
|
||||
#define NEU_CHECK_NEG_AMP 15
|
||||
#define NEU_CHECK_STI_CH 16
|
||||
#define NEU_START_STI 17
|
||||
#define NEU_START_STI_TWICE 18
|
||||
#define NEU_IDLE 19
|
||||
|
||||
/** macros for build up DBS instruction */
|
||||
#define NEU_LNA_BIAS_ONE 0x0210 /**< vgrp(1_0000) left shift 5bits | vgrn(1_0000) */
|
||||
@@ -252,6 +255,10 @@ static uint8_t SPICallBack = 0;
|
||||
#define BIAS_ONE 0x90
|
||||
#define BIAS_TWO 0xA0
|
||||
|
||||
// macro for sti cali
|
||||
#define POSITIVE_CHANNEL 1
|
||||
#define NEGATIVE_CHANNEL 0
|
||||
|
||||
// clang-format on
|
||||
|
||||
/*****************
|
||||
@@ -279,6 +286,8 @@ static uint8_t SPICallBack = 0;
|
||||
#include "headstage_version.h"
|
||||
#include "headstage_check_ins.h"
|
||||
#include "headstage_power.h"
|
||||
#include "headstage_sti_cali.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -324,7 +333,7 @@ static bool build_sti_cur_instruction(uint8_t sti_channel, uint32_t* value) {
|
||||
op_neu = 1;
|
||||
*value = (0x00 << 23) | (op_neu << 16) | 1;
|
||||
INSTRUCTION.ins_opcode = T_ST;
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
case T_ST: {
|
||||
op_neu = sti_channel * 4 + 1;
|
||||
@@ -369,11 +378,11 @@ static bool build_sti_cur_instruction(uint8_t sti_channel, uint32_t* value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (odd_even){
|
||||
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel - 1]);
|
||||
if (!odd_even){
|
||||
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel + 1] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel]);
|
||||
}
|
||||
else{
|
||||
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel + 1] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel]);
|
||||
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel - 1]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -458,6 +467,14 @@ static void headstage_init() {
|
||||
headstage_cpu_delay_ms(1);
|
||||
headstage_pin_output(PIN_EN_ADC_SPI_CLK, 1);
|
||||
headstage_pin_output(PIN_RESET, 1);
|
||||
|
||||
// turn off neulive if battery too low
|
||||
#define THREE_POINT_THREE_VOLT 845
|
||||
if (AONBatMonBatteryVoltageGet() < THREE_POINT_THREE_VOLT){
|
||||
headstage_led_color(COLOR_BLACK);
|
||||
headstage_power_shutdown();
|
||||
}
|
||||
#undef THREE_POINT_THREE_VOLT
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -471,7 +488,7 @@ static void headstage_neu_append_notify_data() {
|
||||
// close-reopen SPI, if the first channel received is invalid
|
||||
if(IsFirstData){
|
||||
// start record
|
||||
if(CHANNEL_VALID && (channel < 16)){
|
||||
if((INSTRUCTION.recording_channel & (0x0001 << channel)) && (channel < 16)){
|
||||
IsFirstData = false;
|
||||
}
|
||||
// restart SPI
|
||||
@@ -479,11 +496,13 @@ static void headstage_neu_append_notify_data() {
|
||||
SPI_close(headstage_spi_handle);
|
||||
ReopenSPI();
|
||||
IsFirstData = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// discard illegal channel
|
||||
if(!CHANNEL_VALID || (channel > 15)){
|
||||
// uint16_t valid_channel = INSTRUCTION.recording_channel & (0x0001 << channel);
|
||||
if(!(INSTRUCTION.recording_channel & (0x0001 << channel)) || (channel > 15)){
|
||||
// illegal channel
|
||||
return;
|
||||
}
|
||||
@@ -499,7 +518,6 @@ static void headstage_neu_append_notify_data() {
|
||||
uint8_t data_size = headstage_notify_append_data(not_buf);
|
||||
|
||||
if (data_size >= BLE_NOT_BUFF_SIZE) {
|
||||
// headstage_led_color(COLOR_YELLOW);
|
||||
headstage_notify_flip_buffer();
|
||||
headstage_notify_send();
|
||||
}
|
||||
@@ -528,6 +546,7 @@ static void headstage_neu_event() {
|
||||
}
|
||||
|
||||
if (flag_mask(EVT_DISCONNECTED)) {
|
||||
ConnectState = false;
|
||||
headstage_update_vis_instruction(VIS_INT);
|
||||
}
|
||||
}
|
||||
@@ -589,7 +608,6 @@ static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transacti
|
||||
|
||||
case CLOSE_SPI:{
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
OpenSPI = true;
|
||||
SPI_close(headstage_spi_handle);
|
||||
break;
|
||||
}
|
||||
@@ -613,22 +631,23 @@ static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transacti
|
||||
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instruction) {
|
||||
switch (instruction[0] & 0xE0) {
|
||||
case NEU_STI_PARAM: {
|
||||
STI = true; // user using STI?
|
||||
|
||||
bool sti_volt_curr_sel = (instruction[0] & 0b00001000);
|
||||
// bool sti_volt_curr_sel = (instruction[0] & 0b00001000);
|
||||
INSTRUCTION.sti_mode = (instruction[0] & 0b00000100);
|
||||
INSTRUCTION.sti_h_bridge = (instruction[0] & 0b00000010);
|
||||
INSTRUCTION.sti_ref = (instruction[0] & 0b00000001);
|
||||
|
||||
INSTRUCTION.sti_amplitude_h = (instruction[2] << 8) | instruction[3];
|
||||
INSTRUCTION.sti_amplitude_l = (instruction[4] << 8) | instruction[5];
|
||||
INSTRUCTION.sti_clock_ratio = (instruction[6] << 8) | instruction[7];
|
||||
INSTRUCTION.sti_amplitude_h = (instruction[1] << 8) | instruction[2];
|
||||
INSTRUCTION.sti_amplitude_l = (instruction[3] << 8) | instruction[4];
|
||||
INSTRUCTION.sti_clock_ratio = (instruction[5] << 8) | instruction[6];
|
||||
|
||||
// decide channel is positive or negative
|
||||
INSTRUCTION.current_sti_polarity = (instruction[8] << 8) | instruction[9];
|
||||
INSTRUCTION.current_sti_polarity = (instruction[7] << 8) | instruction[8];
|
||||
|
||||
// stimulate channel enable
|
||||
INSTRUCTION.sti_channel = (instruction[10] << 8) | instruction[11];
|
||||
INSTRUCTION.sti_channel = (instruction[9] << 8) | instruction[10];
|
||||
if(INSTRUCTION.sti_channel){
|
||||
STI = true; // user using STI?
|
||||
}
|
||||
|
||||
INSTRUCTION.arbitrary_en = 0;
|
||||
INSTRUCTION.arbitrary_index = 0;
|
||||
@@ -639,7 +658,6 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
|
||||
case NEU_MULTI_STI: {
|
||||
uint8_t ch = instruction[1];
|
||||
// uint8_t n_ch = (instruction[1] & 0x0F);
|
||||
uint8_t sti_cycles = instruction[2];
|
||||
INSTRUCTION.sti_t1[ch] = (instruction[3] << 8) | instruction[4];
|
||||
INSTRUCTION.sti_t2[ch] = (instruction[5] << 8) | instruction[6];
|
||||
@@ -679,8 +697,6 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.sys_clk_ratio = sys_clk_ratio;
|
||||
INSTRUCTION.amplifier_gain = amplifier_gain; /**< control shift*/
|
||||
INSTRUCTION.chopper_ratio = chopper_ratio;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -691,7 +707,7 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.vgr_intn = 16;
|
||||
INSTRUCTION.vgr_int_old = 16;
|
||||
INSTRUCTION.recording_channel = 0b0000000001000010;
|
||||
INSTRUCTION.adc_clock_ratio = 100;
|
||||
INSTRUCTION.adc_clock_ratio = 50;
|
||||
INSTRUCTION.sys_clk_ratio = 10;
|
||||
INSTRUCTION.sti_clock_ratio = 10;
|
||||
INSTRUCTION.amplifier_gain = 0;
|
||||
@@ -720,8 +736,12 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.sti_h_bridge = 0; // voltage sti must use H-bridge
|
||||
INSTRUCTION.sti_ref = 1; // 1 = GND; 0 = Vref
|
||||
|
||||
// the first byte decide current sti polarity
|
||||
// last byte, 0bxxxxXXXX, decide voltage sti p & n channel; xxxx is p-channel (16 choose 1), XXXX is n-channel
|
||||
/* the first byte decide current sti polarity */
|
||||
// e.g. 0b0000_0101 => ch0, ch2 positive, others negative
|
||||
|
||||
/* the second byte decide voltage sti polarity */
|
||||
// for the second byte, 0bxxxx_XXXX, decide voltage sti p & n channel;
|
||||
// xxxx is p-channel (16 choose 1), XXXX is n-channel
|
||||
INSTRUCTION.current_sti_polarity = 0b1111000100000000;
|
||||
INSTRUCTION.sti_amplitude_h = 0x01FF; // it's t1 amplitude
|
||||
INSTRUCTION.sti_amplitude_l = 0x01FF; // it's t3 amplitude
|
||||
@@ -732,16 +752,6 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
headstage_led_color(COLOR_MAGENTA);
|
||||
break;
|
||||
}
|
||||
case NEU_GET_REGISTER:{
|
||||
// get register value
|
||||
|
||||
SPICallBack = READ_REG;
|
||||
spi_txbuf[0] = 0x28;
|
||||
spi_txbuf[1] = 0x28;
|
||||
spi_txbuf[2] = 0x28;
|
||||
headstage_spi_transaction(3);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
@@ -765,10 +775,10 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
/**< stop spi transaction */
|
||||
break; /**< reset all the parameter */
|
||||
}
|
||||
case VIS_STI: {
|
||||
for(int i=0 ; i<12 ; i++){
|
||||
FlushNotify();
|
||||
}
|
||||
case VIS_START: {
|
||||
// for(int i=0 ; i<12 ; i++){
|
||||
// FlushNotify();
|
||||
// }
|
||||
|
||||
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
|
||||
NEULIVE_STATE.config_type = NEU_SET_STI_CUR;
|
||||
@@ -783,6 +793,13 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
flag_notify(EVT_NEU_SPI);
|
||||
break; /**< start to operate */
|
||||
}
|
||||
|
||||
case VIS_STOP_STI:{
|
||||
STI = false;
|
||||
turn_off_sti = true;
|
||||
flag_notify(EVT_NEU_SPI);
|
||||
}
|
||||
|
||||
case VIS_INT: {
|
||||
// headstage_spi_transaction_cancel(headstage_spi_handle);
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
@@ -790,9 +807,9 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
STI = false;
|
||||
Neu2Reset();
|
||||
|
||||
for(int i=0 ; i<12 ; i++){
|
||||
FlushNotify();
|
||||
}
|
||||
// for(int i=0 ; i<12 ; i++){
|
||||
// FlushNotify();
|
||||
// }
|
||||
/**< stop stimulation and recording */
|
||||
break; /**< interrupt the operation */
|
||||
}
|
||||
@@ -823,11 +840,12 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
|
||||
#define THREE_VOLT 845
|
||||
if (AONBatMonBatteryVoltageGet() < THREE_VOLT){
|
||||
#define THREE_POINT_THREE_VOLT 845
|
||||
if (AONBatMonBatteryVoltageGet() < THREE_POINT_THREE_VOLT){
|
||||
headstage_led_color(COLOR_BLACK);
|
||||
headstage_power_shutdown();
|
||||
}
|
||||
#undef THREE_VOLT
|
||||
#undef THREE_POINT_THREE_VOLT
|
||||
break;
|
||||
// uint8_t status = headstage_update_vis_volt(ins_len, instruction + 2, cdr_buf + 2);
|
||||
//
|
||||
@@ -848,11 +866,6 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
// break;
|
||||
// }
|
||||
//#endif
|
||||
// case CIS_READ_PARAM: {
|
||||
// NEULIVE_STATE.state = NEU_SINGLE_INS_READ;
|
||||
// flag_notify(EVT_NEU_SPI);
|
||||
// break;
|
||||
// }
|
||||
|
||||
case CIS_VERSION:{
|
||||
cdr_buf[0] = VERSION_DATE_YEAR;
|
||||
@@ -861,6 +874,19 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
cdr_buf[3] = VERSION_DATE_HOUR;
|
||||
cdr_buf[4] = VERSION_DATE_MINUTE;
|
||||
|
||||
uint8_t mac_int[4];
|
||||
if( strncmp(CaliTable.DeviceName, "BOARD_TEST", 25)){
|
||||
// has a specific cali data
|
||||
get_board_name(CaliTable.DeviceName, mac_int, 4);
|
||||
cdr_buf[5] = mac_int[0];
|
||||
cdr_buf[6] = mac_int[1];
|
||||
}
|
||||
else{
|
||||
// this board use default cali setting
|
||||
cdr_buf[5] = 0xAB;
|
||||
cdr_buf[6] = 0xCD;
|
||||
}
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
@@ -875,104 +901,6 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn headstage_data_append_notify_buffer
|
||||
*
|
||||
* description: append data into notify buffer
|
||||
*/
|
||||
|
||||
static void headstage_data_append_notify_buffer(uint8_t* dat_buf) {}
|
||||
|
||||
/**
|
||||
* @fn read_neu_ins_config
|
||||
*/
|
||||
//static void read_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
// uint8_t opcode;
|
||||
// switch (config_type) {
|
||||
// case NEU_SET_STI_CUR: {
|
||||
// uint8_t channel = get_sti_channel(INSTRUCTION.sti_channel);
|
||||
// opcode = channel * 4 + 1;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_STI_VOLT: {
|
||||
// opcode = 0x25;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_POLARITY: {
|
||||
// opcode = 0x28;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_STI_CHANNEL: {
|
||||
// opcode = 0x2A;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_GENERAL_EN: {
|
||||
// opcode = 0x2F;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_REC_CHANNEL: {
|
||||
// opcode = 0x30;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_AMP_GAIN: {
|
||||
// opcode = 0x31;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_SYS_CLK: {
|
||||
// opcode = 0x32;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_ADC_CLK: {
|
||||
// opcode = 0x33;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_STI_CLK: {
|
||||
// opcode = 0x34;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_ARBITRARY: {
|
||||
// opcode = 0x36;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_ARB_INDEX: {
|
||||
// opcode = 0x37;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_STI_MODE: {
|
||||
// opcode = 0x38;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_AMP_BIAS: {
|
||||
// opcode = 0x39;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// case NEU_SET_CHOPPER: {
|
||||
// opcode = 0x3B;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// opcode = 0x33;
|
||||
// *value = opcode << 16;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/**
|
||||
* @fn build_neu_ins_config
|
||||
*
|
||||
@@ -1003,13 +931,17 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
uint8_t sti_channel = get_sti_channel(INSTRUCTION.sti_channel, INSTRUCTION.sti_ch_config_done);
|
||||
|
||||
if (sti_channel == ALL_STI_CH_CONFIG_DONE) {
|
||||
INSTRUCTION.sti_ch_config_done = 0;
|
||||
|
||||
INSTRUCTION.ins_opcode = HIGH_SIDE;
|
||||
// return NEU_SET_POLARITY;
|
||||
|
||||
// get correct sti code
|
||||
INSTRUCTION.sti_amplitude_h = UserCode2StiCode(INSTRUCTION.sti_amplitude_h, POSITIVE_CHANNEL);
|
||||
INSTRUCTION.sti_amplitude_l = UserCode2StiCode(INSTRUCTION.sti_amplitude_l, NEGATIVE_CHANNEL);
|
||||
return NEU_SET_STI_VOLT;
|
||||
} else {
|
||||
single_ch_config_done = build_sti_cur_instruction(sti_channel, value);
|
||||
if(single_ch_config_done){ INSTRUCTION.sti_ch_config_done++; }
|
||||
// return NEU_SETUP_DONE;
|
||||
return NEU_SET_STI_CUR;
|
||||
}
|
||||
}
|
||||
@@ -1027,7 +959,7 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
}
|
||||
case NEU_SET_STI_CLK: {
|
||||
*value = (0x01 << 23) | (0x34 << 16) | INSTRUCTION.sti_clock_ratio;
|
||||
*value = (0x01 << 23) | (0x34 << 16) | 100;
|
||||
*value = (0x01 << 23) | (0x34 << 16) | 2;
|
||||
return NEU_SET_STI_MODE;
|
||||
}
|
||||
// case NEU_SET_ARBITRARY: {
|
||||
@@ -1041,12 +973,12 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
case NEU_SET_STI_MODE: {
|
||||
*value = (0x01 << 23) | (0x38 << 16) | (INSTRUCTION.sti_mode << 2) | (INSTRUCTION.sti_h_bridge << 1) | (INSTRUCTION.sti_ref);
|
||||
// return NEU_SET_GENERAL_EN;
|
||||
return NEU_SET_STI_CHANNEL;
|
||||
}
|
||||
// enable stimulate
|
||||
case NEU_SET_STI_CHANNEL: {
|
||||
*value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
|
||||
return NEU_SETUP_DONE;
|
||||
if(INSTRUCTION.recording_channel){
|
||||
return NEU_WARM_UP;
|
||||
}
|
||||
else{
|
||||
return NEU_SETUP_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
/* These are recording parameter */
|
||||
@@ -1073,7 +1005,7 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
}
|
||||
case NEU_SET_AMP_GAIN: {
|
||||
*value = (0x01 << 23) | (0x31 << 16) | INSTRUCTION.amplifier_gain;
|
||||
return NEU_SET_ADC_CLK;
|
||||
return NEU_SET_AMP_BIAS;
|
||||
}
|
||||
// case NEU_SET_SYS_CLK: {
|
||||
// *value = (0x01 << 23) | (0x32 << 16) | INSTRUCTION.sys_clk_ratio;
|
||||
@@ -1090,17 +1022,13 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
case NEU_SET_AMP_BIAS: {
|
||||
done = build_amp_bias(value);
|
||||
if (done){
|
||||
if(STI){
|
||||
return NEU_SET_STI_CHANNEL;
|
||||
}
|
||||
else{
|
||||
return NEU_SETUP_DONE;
|
||||
}
|
||||
return NEU_SETUP_DONE;
|
||||
}
|
||||
else{
|
||||
return NEU_SET_AMP_BIAS;
|
||||
}
|
||||
}
|
||||
|
||||
// case NEU_SET_CHOPPER: {
|
||||
// *value = (0x01 << 23) | (0x3B << 16) | INSTRUCTION.chopper_ratio;
|
||||
// return NEU_SETUP_DONE;
|
||||
@@ -1121,7 +1049,12 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
#define REC_AMP_GAIN 0x31
|
||||
#define REC_SAMPLE_RATE 0x33
|
||||
#define REC_CHECK_GENERAL_EN 0x2F
|
||||
#define STI_POLARITY_REG 0x28
|
||||
#define STI_AMP_POS_REG 0x25
|
||||
#define STI_AMP_NEG_REG 0x26
|
||||
#define STI_CHANNEL_REG 0x2E
|
||||
#define STI_MODE_REG 0x38
|
||||
#define STI_CLK_REG 0x34
|
||||
static void headstage_neu_state_spi() {
|
||||
uint32_t value = 0;
|
||||
uint8_t nxt_ins = 0;
|
||||
@@ -1132,9 +1065,13 @@ static void headstage_neu_state_spi() {
|
||||
NEULIVE_STATE.config_type = nxt_ins;
|
||||
|
||||
if (nxt_ins == NEU_SETUP_DONE) {
|
||||
// go to read ADC data
|
||||
// NEULIVE_STATE.state = NEU_PREPARE_READ;
|
||||
NEULIVE_STATE.state = NEU_CHECK_REC_CH;
|
||||
// check write register success or not
|
||||
if(STI){
|
||||
NEULIVE_STATE.state = NEU_CHECK_STI_POL;
|
||||
}
|
||||
else{
|
||||
NEULIVE_STATE.state = NEU_CHECK_REC_CH;
|
||||
}
|
||||
} else {
|
||||
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
|
||||
}
|
||||
@@ -1145,32 +1082,103 @@ static void headstage_neu_state_spi() {
|
||||
}
|
||||
|
||||
case NEU_CHECK_REC_CH:{
|
||||
if(STI){
|
||||
check_register(REC_CHANNEL_REG, INSTRUCTION.recording_channel, NEU_CHECK_STI_CH);
|
||||
}
|
||||
else{
|
||||
check_register(REC_CHANNEL_REG, INSTRUCTION.recording_channel, NEU_CHECK_AMP_GAIN);
|
||||
}
|
||||
check_register(REC_CHANNEL_REG, INSTRUCTION.recording_channel, NEU_CHECK_AMP_GAIN);
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_AMP_GAIN:{
|
||||
check_register(REC_AMP_GAIN, INSTRUCTION.amplifier_gain, NEU_CHECK_SAMPLE_RATE);
|
||||
check_register(REC_AMP_GAIN, INSTRUCTION.amplifier_gain, NEU_CHECK_GENERAL_EN);
|
||||
break;
|
||||
}
|
||||
case NEU_CHECK_GENERAL_EN:{
|
||||
if(STI){
|
||||
check_register(REC_CHECK_GENERAL_EN, NEU_GENERAL_EN, NEU_START_STI);
|
||||
}
|
||||
else{
|
||||
check_register(REC_CHECK_GENERAL_EN, NEU_GENERAL_EN, NEU_SEND_SAMPLE_RATE_BEFORE_READ);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_STI_POL:{
|
||||
check_register(STI_POLARITY_REG, INSTRUCTION.current_sti_polarity, NEU_CHECK_STI_MODE);
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_STI_MODE:{
|
||||
uint32_t instruction_to_fit = (INSTRUCTION.sti_mode << 2) | (INSTRUCTION.sti_h_bridge << 1) | (INSTRUCTION.sti_ref);
|
||||
check_register(STI_MODE_REG, instruction_to_fit, NEU_CHECK_STI_CLK);
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_STI_CLK:{
|
||||
check_register(STI_CLK_REG, 2, NEU_CHECK_POS_AMP);
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_POS_AMP:{
|
||||
check_register(STI_AMP_POS_REG, INSTRUCTION.sti_amplitude_h, NEU_CHECK_NEG_AMP);
|
||||
break;
|
||||
}
|
||||
case NEU_CHECK_NEG_AMP:{
|
||||
if(INSTRUCTION.recording_channel){
|
||||
check_register(STI_AMP_NEG_REG, INSTRUCTION.sti_amplitude_l, NEU_CHECK_REC_CH);
|
||||
}
|
||||
else{
|
||||
check_register(STI_AMP_NEG_REG, INSTRUCTION.sti_amplitude_l, NEU_START_STI);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_START_STI:{
|
||||
// enable stimulate
|
||||
value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
|
||||
AppendSPITX(0, value);
|
||||
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
NEULIVE_STATE.state = NEU_START_STI_TWICE;
|
||||
headstage_spi_transaction(3);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_START_STI_TWICE:{
|
||||
// ensure we assign register successfully
|
||||
value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
|
||||
AppendSPITX(0, value);
|
||||
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
NEULIVE_STATE.state = NEU_CHECK_STI_CH;
|
||||
headstage_spi_transaction(3);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_STI_CH:{
|
||||
if(INSTRUCTION.recording_channel){
|
||||
check_register(STI_CHANNEL_REG, INSTRUCTION.sti_channel, NEU_SEND_SAMPLE_RATE_BEFORE_READ);
|
||||
}
|
||||
else{
|
||||
check_register(STI_CHANNEL_REG, INSTRUCTION.sti_channel, NEU_STI_LED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_SEND_SAMPLE_RATE_BEFORE_READ:{
|
||||
if(INSTRUCTION.adc_clock_ratio < 28){
|
||||
INSTRUCTION.adc_clock_ratio = 28;
|
||||
}
|
||||
value = (0x01 << 23) | (0x33 << 16) | INSTRUCTION.adc_clock_ratio;
|
||||
AppendSPITX(0, value);
|
||||
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
NEULIVE_STATE.state = NEU_CHECK_SAMPLE_RATE;
|
||||
headstage_spi_transaction(3);
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_CHECK_SAMPLE_RATE:{
|
||||
check_register(REC_SAMPLE_RATE, INSTRUCTION.adc_clock_ratio, NEU_CHECK_GENERAL_EN);
|
||||
break;
|
||||
}
|
||||
case NEU_CHECK_GENERAL_EN:{
|
||||
check_register(REC_CHECK_GENERAL_EN, NEU_GENERAL_EN, NEU_PREPARE_READ);
|
||||
break;
|
||||
}
|
||||
// NEU_CHECK_SAMPLE_RATE
|
||||
|
||||
case NEU_CHECK_STI_CH:{
|
||||
headstage_led_color(COLOR_RED);
|
||||
check_register(REC_SAMPLE_RATE, INSTRUCTION.adc_clock_ratio, NEU_PREPARE_READ);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1185,7 +1193,14 @@ static void headstage_neu_state_spi() {
|
||||
else{
|
||||
SPICallBack = READ_MOSI;
|
||||
NEULIVE_STATE.state = NEU_READ_DATA;
|
||||
headstage_led_color(COLOR_BLUE);
|
||||
|
||||
if(STI){
|
||||
headstage_led_color(COLOR_PURPLE);
|
||||
}
|
||||
else{
|
||||
headstage_led_color(COLOR_BLUE);
|
||||
}
|
||||
|
||||
spi_state_counter = 0;
|
||||
AppendSPITX(0, 0);
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE);
|
||||
@@ -1194,18 +1209,26 @@ static void headstage_neu_state_spi() {
|
||||
}
|
||||
case NEU_READ_DATA: {
|
||||
headstage_neu_append_notify_data();
|
||||
// SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, SPI_BUFFER_SIZE, spi_rxbuf);
|
||||
if(turn_off_sti){
|
||||
turn_off_sti = false;
|
||||
value = (0x01 << 23) | (0x2E << 16) | 0;
|
||||
AppendSPITX(0, value);
|
||||
}
|
||||
else{
|
||||
AppendSPITX(0, 0);
|
||||
}
|
||||
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE);
|
||||
break;
|
||||
}
|
||||
case NEU_SINGLE_INS_READ: {
|
||||
// read_neu_ins_config(NEULIVE_STATE.config_type, &value);
|
||||
spi_txbuf[0] = 0x28;
|
||||
spi_txbuf[1] = 0;
|
||||
spi_txbuf[2] = 0;
|
||||
case NEU_STI_LED: {
|
||||
turn_off_sti = false;
|
||||
headstage_led_color(COLOR_ORANGE);
|
||||
headstage_spi_transaction(3);
|
||||
headstage_led_color(COLOR_GREEN);
|
||||
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
NEULIVE_STATE.state = NEU_IDLE;
|
||||
AppendSPITX(0, 0);
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE);
|
||||
break;
|
||||
}
|
||||
case NEU_RECEIVE_PARAM: {
|
||||
@@ -1222,6 +1245,15 @@ static void headstage_neu_state_spi() {
|
||||
break;
|
||||
}
|
||||
case NEU_IDLE: {
|
||||
if(turn_off_sti){
|
||||
turn_off_sti = false;
|
||||
value = (0x01 << 23) | (0x2E << 16) | 0;
|
||||
AppendSPITX(0, value);
|
||||
}
|
||||
else{
|
||||
AppendSPITX(0, 0);
|
||||
}
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE);
|
||||
break; /**< the other state will return to this and wait for next event.*/
|
||||
}
|
||||
default: {
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
#include <ti/drivers/Power.h>
|
||||
#include <ti/drivers/power/PowerCC26XX.h>
|
||||
|
||||
#define headstage_power_shutdown() Power_shutdown(0, 0)
|
||||
#define headstage_power_shutdown() Power_shutdown(NULL, 0)
|
||||
|
||||
#endif // HEADSTAGE_POWER_H
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef STI_CALI_H
|
||||
#define STI_CALI_H
|
||||
|
||||
#include "headstage_cali_sti.h"
|
||||
|
||||
static uint16_t UserCode2StiCode(uint16_t amp, uint8_t positive_ch){
|
||||
// get real current value (uA)
|
||||
uint32_t sti_code, real_amp = amp * 5;
|
||||
|
||||
if(StiCaliTable.p_ch.coefficient == 10000 && StiCaliTable.p_ch.offset == 0){
|
||||
return amp;
|
||||
}
|
||||
if(StiCaliTable.n_ch.coefficient == 10000 && StiCaliTable.n_ch.offset == 0){
|
||||
return amp;
|
||||
}
|
||||
|
||||
// trans into sti code
|
||||
if(positive_ch){
|
||||
sti_code = StiCaliTable.p_ch.coefficient * real_amp + StiCaliTable.p_ch.offset;
|
||||
}
|
||||
else{
|
||||
sti_code = StiCaliTable.n_ch.coefficient * real_amp + StiCaliTable.n_ch.offset;
|
||||
}
|
||||
|
||||
sti_code = sti_code / 10000;
|
||||
return (uint16_t) (sti_code);
|
||||
}
|
||||
|
||||
#endif
|
||||
+33
-5
@@ -3,14 +3,42 @@
|
||||
#define VERSION_DATE
|
||||
|
||||
#define VERSION_DATE_YEAR 20
|
||||
#define VERSION_DATE_MONTH 3
|
||||
#define VERSION_DATE_DAY 23
|
||||
#define VERSION_DATE_HOUR 15
|
||||
#define VERSION_DATE_MINUTE 25
|
||||
#define VERSION_DATE_MONTH 5
|
||||
#define VERSION_DATE_DAY 6
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 17
|
||||
|
||||
// this is NOT the version hash !!
|
||||
// it's the last version hash
|
||||
#define VERSION_HASH 3d1de663a8f58dc1db835feea11ed4d72214f99f
|
||||
#define VERSION_HASH fcc89f3e1cbef6348808c6a076ee86909b02eeda
|
||||
#define VERSION_GIT_BRANCH Neulive2.0_developement
|
||||
|
||||
static void get_board_name(char *board_name_ch, uint8 *board_name_int, uint8 name_size){
|
||||
uint8 name_offset = 18;
|
||||
|
||||
for(int i=0, k=0; i<name_size+1 ; i++){
|
||||
if('0' <= board_name_ch[name_offset + i] && board_name_ch[name_offset + i] <= '9'){
|
||||
board_name_int[k++] = board_name_ch[name_offset + i] - '0';
|
||||
}
|
||||
else if('A' <= board_name_ch[name_offset + i] && board_name_ch[name_offset + i] <= 'F'){
|
||||
board_name_int[k++] = board_name_ch[name_offset + i] - 'A' + 10;
|
||||
}
|
||||
else if(board_name_ch[name_offset + i] == '_'){
|
||||
continue;
|
||||
}
|
||||
else{
|
||||
// error occur
|
||||
for(int j=0 ; j<name_size/2 ; j++){
|
||||
board_name_int[j] = 0xFF;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0 ; i<name_size/2 ; i++){
|
||||
board_name_int[i] = (board_name_int[2*i] << 4) | (board_name_int[2*i + 1]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ static void headstage_notify_set_timestamp() {
|
||||
static void headstage_notify_flip_buffer() {
|
||||
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 3;
|
||||
|
||||
headstage_notify_buffer[0] = CHIP_ID;
|
||||
headstage_notify_buffer[0] = data_counter ++;
|
||||
headstage_notify_buffer[1] = data_count;
|
||||
|
||||
not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
|
||||
+9
-3
@@ -12,7 +12,10 @@ static void MCUReset(){
|
||||
ResetINSTRUCTION();
|
||||
|
||||
// global variable reset
|
||||
STI = false;
|
||||
turn_off_sti = false;
|
||||
IsFirstData = true;
|
||||
data_counter = 0;
|
||||
|
||||
// SPI reset
|
||||
SPI_close(headstage_spi_handle);
|
||||
@@ -41,7 +44,10 @@ static void MCUReset(){
|
||||
not_time_stamp = 0;
|
||||
|
||||
|
||||
if(ConnectState){
|
||||
if(ErrorRestart){
|
||||
headstage_led_color(COLOR_RED);
|
||||
}
|
||||
else if(ConnectState){
|
||||
headstage_led_color(COLOR_CYAN);
|
||||
}
|
||||
else{
|
||||
@@ -94,8 +100,8 @@ static void ResetINSTRUCTION(){
|
||||
INSTRUCTION.ins_opcode = BIAS_ONE;
|
||||
INSTRUCTION.sti_ch_config_done = 0;
|
||||
|
||||
uint8_t voltage_sti_channel = 0;
|
||||
uint8_t voltage_sti_amplitude = 0;
|
||||
// uint8_t voltage_sti_channel = 0;
|
||||
// uint8_t voltage_sti_amplitude = 0;
|
||||
|
||||
for(int i=0 ; i<NEU_STI_CHANNEL_COUNTS ; i++){
|
||||
INSTRUCTION.current_sti_cycle[i] = 0;
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ static SPI_Handle headstage_spi_handle = NULL;
|
||||
static SPI_Transaction headstage_spi_transaction;
|
||||
|
||||
static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transaction);
|
||||
static bool OpenSPI = false;
|
||||
|
||||
// SPI parameters initialize
|
||||
#define headstage_spi_open() \
|
||||
|
||||
+29
-3
@@ -115,20 +115,28 @@
|
||||
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 6
|
||||
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
|
||||
|
||||
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
|
||||
// parameter update request is enabled
|
||||
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
|
||||
|
||||
#else //! FEATURE_OAD
|
||||
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
|
||||
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
|
||||
|
||||
// Maximum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
|
||||
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 25
|
||||
|
||||
#endif // FEATURE_OAD
|
||||
|
||||
#define SBP_PERIODIC_EVT_PERIOD DEFAULT_DESIRED_MIN_CONN_INTERVAL + 2
|
||||
|
||||
// Slave latency to use if automatic parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
|
||||
|
||||
@@ -160,6 +168,7 @@
|
||||
#define SBP_STATE_CHANGE_EVT 0x0001
|
||||
#define SBP_CHAR_CHANGE_EVT 0x0002
|
||||
#define SBP_CONN_EVT_END_EVT 0x0004
|
||||
#define SBP_PERIODIC_EVT 0x0008
|
||||
// clang-format on
|
||||
|
||||
/*********************************************************************
|
||||
@@ -603,6 +612,15 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
headstage_event_handle();
|
||||
}
|
||||
|
||||
// if (events & SBP_PERIODIC_EVT) {
|
||||
// events &= ~SBP_PERIODIC_EVT;
|
||||
//
|
||||
// // Util_startClock(&periodicClock);
|
||||
//
|
||||
// // Perform periodic application task
|
||||
// SimpleBLEPeripheral_performPeriodicTask();
|
||||
// }
|
||||
|
||||
#ifdef FEATURE_OAD
|
||||
while (!Queue_empty(oad_queue_handle)) {
|
||||
oadTargetWrite_t *oadWriteEvt = Queue_get(oad_queue_handle);
|
||||
@@ -827,8 +845,10 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
|
||||
numActive = linkDB_NumActive();
|
||||
|
||||
uint16_t cxnHandle;
|
||||
|
||||
// requestedPDUSize = LL payload = L2CAP_header + ATT header + BLE_NOT_BUFF_SIZE = 7 + BLE_NOT_BUFF_SIZE
|
||||
uint16_t requestedPDUSize = 251;
|
||||
uint16_t requestTxTime = 2120;
|
||||
uint16_t requestTxTime = 2120; // (LL payload + 14) * 8
|
||||
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
|
||||
|
||||
if (SUCCESS == HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestTxTime)) {
|
||||
@@ -849,16 +869,22 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
|
||||
// Device is started but not advertising, is in waiting period before advertising again
|
||||
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
|
||||
ConnectState = false;
|
||||
headstage_led_color(COLOR_GREEN);
|
||||
if(ErrorRestart){
|
||||
headstage_led_color(COLOR_RED);
|
||||
}
|
||||
else{
|
||||
headstage_led_color(COLOR_GREEN);
|
||||
}
|
||||
break;
|
||||
|
||||
case GAPROLE_WAITING_AFTER_TIMEOUT:
|
||||
// Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
|
||||
// disconnected
|
||||
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
|
||||
headstage_led_color(COLOR_RED);
|
||||
ErrorRestart = true;
|
||||
CONNECT_HANDLE = 0xFFFF;
|
||||
flag_notify(EVT_DISCONNECTED);
|
||||
headstage_led_color(COLOR_RED);
|
||||
break;
|
||||
case GAPROLE_ERROR: // Error occurred - invalid state
|
||||
headstage_led_color(COLOR_RED);
|
||||
|
||||
+289
@@ -0,0 +1,289 @@
|
||||
/******************************************************************************
|
||||
|
||||
@file main.c
|
||||
|
||||
@brief main entry of the BLE stack sample application.
|
||||
|
||||
Group: WCS, BTS
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
Copyright (c) 2013-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
******************************************************************************
|
||||
Release Name: ble_sdk_2_02_02_25
|
||||
Release Date: 2018-04-02 18:03:35
|
||||
*****************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
|
||||
#include <xdc/runtime/Error.h>
|
||||
|
||||
#include <ti/drivers/Power.h>
|
||||
#include <ti/drivers/power/PowerCC26XX.h>
|
||||
#include <ti/sysbios/BIOS.h>
|
||||
|
||||
#include "icall.h"
|
||||
#include "hal_assert.h"
|
||||
#include "central.h"
|
||||
#include "simple_central.h"
|
||||
|
||||
/* Header files required to enable instruction fetch cache */
|
||||
#include <inc/hw_memmap.h>
|
||||
#include <driverlib/vims.h>
|
||||
|
||||
#ifndef USE_DEFAULT_USER_CFG
|
||||
|
||||
#include "ble_user_config.h"
|
||||
|
||||
// BLE user defined configuration
|
||||
bleUserCfg_t user0Cfg = BLE_USER_CFG;
|
||||
|
||||
#endif // USE_DEFAULT_USER_CFG
|
||||
|
||||
#include <ti/mw/display/Display.h>
|
||||
|
||||
#ifdef USE_FPGA
|
||||
#include <inc/hw_prcm.h>
|
||||
#endif // USE_FPGA
|
||||
|
||||
/*******************************************************************************
|
||||
* MACROS
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
#if defined( USE_FPGA )
|
||||
#define RFC_MODE_BLE PRCM_RFCMODESEL_CURR_MODE1
|
||||
#define RFC_MODE_ANT PRCM_RFCMODESEL_CURR_MODE4
|
||||
#define RFC_MODE_EVERYTHING_BUT_ANT PRCM_RFCMODESEL_CURR_MODE5
|
||||
#define RFC_MODE_EVERYTHING PRCM_RFCMODESEL_CURR_MODE6
|
||||
//
|
||||
#define SET_RFC_BLE_MODE(mode) HWREG( PRCM_BASE + PRCM_O_RFCMODESEL ) = (mode)
|
||||
#endif // USE_FPGA
|
||||
|
||||
/*******************************************************************************
|
||||
* TYPEDEFS
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* LOCAL VARIABLES
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* EXTERNS
|
||||
*/
|
||||
|
||||
extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);
|
||||
|
||||
extern Display_Handle dispHandle;
|
||||
|
||||
/*******************************************************************************
|
||||
* @fn Main
|
||||
*
|
||||
* @brief Application Main
|
||||
*
|
||||
* input parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* output parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
#if defined( USE_FPGA )
|
||||
HWREG(PRCM_BASE + PRCM_O_PDCTL0) &= ~PRCM_PDCTL0_RFC_ON;
|
||||
HWREG(PRCM_BASE + PRCM_O_PDCTL1) &= ~PRCM_PDCTL1_RFC_ON;
|
||||
#endif // USE_FPGA
|
||||
|
||||
/* Register Application callback to trap asserts raised in the Stack */
|
||||
RegisterAssertCback(AssertHandler);
|
||||
|
||||
PIN_init(BoardGpioInitTable);
|
||||
|
||||
#if defined( USE_FPGA )
|
||||
// set RFC mode to support BLE
|
||||
// Note: This must be done before the RF Core is released from reset!
|
||||
SET_RFC_BLE_MODE(RFC_MODE_BLE);
|
||||
#endif // USE_FPGA
|
||||
|
||||
// Enable iCache prefetching
|
||||
VIMSConfigure(VIMS_BASE, TRUE, TRUE);
|
||||
|
||||
// Enable cache
|
||||
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
|
||||
|
||||
#if !defined( POWER_SAVING ) || defined( USE_FPGA )
|
||||
/* Set constraints for Standby, powerdown and idle mode */
|
||||
// PowerCC26XX_SB_DISALLOW may be redundant
|
||||
Power_setConstraint(PowerCC26XX_SB_DISALLOW);
|
||||
Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
|
||||
#endif // POWER_SAVING | USE_FPGA
|
||||
|
||||
/* Initialize ICall module */
|
||||
ICall_init();
|
||||
|
||||
/* Start tasks of external images - Priority 5 */
|
||||
ICall_createRemoteTasks();
|
||||
|
||||
/* Kick off profile - Priority 3 */
|
||||
GAPCentralRole_createTask();
|
||||
|
||||
/* Kick off application - Priority 1 */
|
||||
SimpleBLECentral_createTask();
|
||||
|
||||
/* enable interrupts and start SYS/BIOS */
|
||||
BIOS_start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* @fn AssertHandler
|
||||
*
|
||||
* @brief This is the Application's callback handler for asserts raised
|
||||
* in the stack. When EXT_HAL_ASSERT is defined in the Stack
|
||||
* project this function will be called when an assert is raised,
|
||||
* and can be used to observe or trap a violation from expected
|
||||
* behavior.
|
||||
*
|
||||
* As an example, for Heap allocation failures the Stack will raise
|
||||
* HAL_ASSERT_CAUSE_OUT_OF_MEMORY as the assertCause and
|
||||
* HAL_ASSERT_SUBCAUSE_NONE as the assertSubcause. An application
|
||||
* developer could trap any malloc failure on the stack by calling
|
||||
* HAL_ASSERT_SPINLOCK under the matching case.
|
||||
*
|
||||
* An application developer is encouraged to extend this function
|
||||
* for use by their own application. To do this, add hal_assert.c
|
||||
* to your project workspace, the path to hal_assert.h (this can
|
||||
* be found on the stack side). Asserts are raised by including
|
||||
* hal_assert.h and using macro HAL_ASSERT(cause) to raise an
|
||||
* assert with argument assertCause. the assertSubcause may be
|
||||
* optionally set by macro HAL_ASSERT_SET_SUBCAUSE(subCause) prior
|
||||
* to asserting the cause it describes. More information is
|
||||
* available in hal_assert.h.
|
||||
*
|
||||
* input parameters
|
||||
*
|
||||
* @param assertCause - Assert cause as defined in hal_assert.h.
|
||||
* @param assertSubcause - Optional assert subcause (see hal_assert.h).
|
||||
*
|
||||
* output parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
void AssertHandler(uint8 assertCause, uint8 assertSubcause)
|
||||
{
|
||||
// Open the display if the app has not already done so
|
||||
if ( !dispHandle )
|
||||
{
|
||||
dispHandle = Display_open(Display_Type_LCD, NULL);
|
||||
}
|
||||
|
||||
Display_print0(dispHandle, 0, 0, ">>>STACK ASSERT");
|
||||
|
||||
// check the assert cause
|
||||
switch (assertCause)
|
||||
{
|
||||
case HAL_ASSERT_CAUSE_OUT_OF_MEMORY:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> OUT OF MEMORY!");
|
||||
break;
|
||||
|
||||
case HAL_ASSERT_CAUSE_INTERNAL_ERROR:
|
||||
// check the subcause
|
||||
if (assertSubcause == HAL_ASSERT_SUBCAUSE_FW_INERNAL_ERROR)
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL FW ERROR!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL ERROR!");
|
||||
}
|
||||
break;
|
||||
|
||||
case HAL_ASSERT_CAUSE_ICALL_ABORT:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> ICALL ABORT!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
break;
|
||||
|
||||
default:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> DEFAULT SPINLOCK!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* @fn smallErrorHook
|
||||
*
|
||||
* @brief Error handler to be hooked into TI-RTOS.
|
||||
*
|
||||
* input parameters
|
||||
*
|
||||
* @param eb - Pointer to Error Block.
|
||||
*
|
||||
* output parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
void smallErrorHook(Error_Block *eb)
|
||||
{
|
||||
for (;;);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*/
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
/******************************************************************************
|
||||
|
||||
@file main.c
|
||||
|
||||
@brief main entry of the BLE stack sample application.
|
||||
|
||||
Group: WCS, BTS
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
Copyright (c) 2013-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
******************************************************************************
|
||||
Release Name: ble_sdk_2_02_02_25
|
||||
Release Date: 2018-04-02 18:03:35
|
||||
*****************************************************************************/
|
||||
|
||||
/*================
|
||||
==== include ====
|
||||
===============*/
|
||||
|
||||
// clang-format off
|
||||
#include <xdc/runtime/Error.h>
|
||||
|
||||
#include <ti/drivers/PIN.h>
|
||||
#include <ti/drivers/Power.h>
|
||||
#include <ti/drivers/power/PowerCC26XX.h>
|
||||
#include <ti/sysbios/BIOS.h>
|
||||
|
||||
#include "icall.h"
|
||||
#include "bcomdef.h"
|
||||
#include "peripheral.h"
|
||||
|
||||
#include "simple_peripheral.h"
|
||||
|
||||
/* Header files required to enable instruction fetch cache */
|
||||
#include <inc/hw_memmap.h>
|
||||
#include <driverlib/vims.h>
|
||||
// clang-format on
|
||||
|
||||
#ifndef USE_DEFAULT_USER_CFG
|
||||
|
||||
#include "ble_user_config.h"
|
||||
|
||||
// BLE user defined configuration
|
||||
bleUserCfg_t user0Cfg = BLE_USER_CFG;
|
||||
|
||||
#endif // USE_DEFAULT_USER_CFG
|
||||
|
||||
extern const PIN_Config BoardGpioInitTable[];
|
||||
|
||||
/**
|
||||
* @fn Main
|
||||
*
|
||||
* @brief Application Main
|
||||
*
|
||||
* input parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* output parameters
|
||||
*
|
||||
* @param None.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
int main() {
|
||||
PIN_init(BoardGpioInitTable);
|
||||
|
||||
// Enable iCache prefetching
|
||||
VIMSConfigure(VIMS_BASE, TRUE, TRUE);
|
||||
|
||||
// Enable cache
|
||||
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
|
||||
|
||||
/* Initialize ICall module */
|
||||
ICall_init();
|
||||
|
||||
/* Start tasks of external images - Priority 5 */
|
||||
ICall_createRemoteTasks();
|
||||
|
||||
/* Kick off profile - Priority 3 */
|
||||
GAPRole_createTask();
|
||||
|
||||
SimpleBLEPeripheral_createTask();
|
||||
|
||||
/* enable interrupts and start SYS/BIOS */
|
||||
BIOS_start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
folder=$(basename "$(pwd)")
|
||||
|
||||
if [ "$folder" == "bioprocc2650" ]; then
|
||||
|
||||
input="./Neulive_sti_cali.txt"
|
||||
output="./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_cali_sti.h"
|
||||
|
||||
#variable
|
||||
declare -i current_line=96
|
||||
declare -i col_index=0
|
||||
declare -i row_index=0
|
||||
|
||||
#constant
|
||||
declare -i COL_MAX=8
|
||||
declare -i START_ROW=23
|
||||
declare -i UN_USED_ROW=$START_ROW-1
|
||||
|
||||
MAC="MAC"
|
||||
|
||||
while read -r line; do
|
||||
for word in $line; do
|
||||
# get device MAC
|
||||
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 3 ];then
|
||||
MAC=$word
|
||||
sed -i "${current_line} i \\\n#elif defined(BOARD_${MAC})\\n{" "$output"
|
||||
sed -i 's/:/_/g' "$output"
|
||||
current_line=$current_line+3
|
||||
fi
|
||||
|
||||
# get device positive channel coeff and offset
|
||||
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 4 ];then
|
||||
sed -i "${current_line} i \ .p_ch.coefficient = $word," "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
|
||||
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 5 ];then
|
||||
sed -i "${current_line} i \ .p_ch.offset = $word," "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
|
||||
# get device negative channel coeff and offset
|
||||
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 6 ];then
|
||||
sed -i "${current_line} i \ .n_ch.coefficient = $word," "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
|
||||
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 7 ];then
|
||||
sed -i "${current_line} i \ .n_ch.offset = $word" "$output"
|
||||
current_line=$current_line+1
|
||||
sed -i "${current_line} i };" "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
|
||||
#update index
|
||||
if [ $col_index -lt $COL_MAX ];then
|
||||
col_index=$col_index+1
|
||||
else
|
||||
col_index=0
|
||||
row_index=$row_index+1
|
||||
fi
|
||||
done
|
||||
done < $input
|
||||
|
||||
else
|
||||
echo "This script should be executed on CC2650 periperal only"
|
||||
fi
|
||||
Reference in New Issue
Block a user