Compare commits

...

84 Commits

Author SHA1 Message Date
yichin ad1a5d25ac test data rate 10k 2020-05-06 20:53:31 +08:00
yichin 2424f31806 test data rate 10k 2020-05-06 20:41:06 +08:00
yichin d70b64a1f9 test data rate 2020-05-06 19:41:05 +08:00
yichin ed59a6502c test data rate 2020-05-06 19:12:08 +08:00
yichin 9b2ab7809f test data rate 2020-05-06 18:55:54 +08:00
yichin 5557f73416 test data rate 2020-05-06 18:35:31 +08:00
yichin 6ba1b1c347 test data rate 2020-05-06 18:18:19 +08:00
yichin e972859c1a pdu: 207 -> 251 2020-04-24 18:06:12 +08:00
yichin 597514a1cc attempt to config all register 2020-04-24 18:05:42 +08:00
yichin 9e278ac83a attempt to config all register 2020-04-24 17:49:30 +08:00
yichin 8df9c5d3dc attempt to config all register 2020-04-24 17:01:28 +08:00
weiting2 66e09591b4 attempt to use full function 2020-04-24 11:53:42 +08:00
weiting2 404d8d8d9d attempt to use full function neu with high DR 2020-04-23 18:13:44 +08:00
yichin 884b38b4a9 [semi stable] check sti_ch register 2020-04-23 15:35:35 +08:00
yichin 5a7604cad0 7.14k sample rate 2020-04-22 12:30:08 +08:00
yichin 06be551603 4K sample / sec 2020-04-22 11:39:09 +08:00
yichin 5d1aab1a17 2K sample / sec 2020-04-22 11:04:01 +08:00
yichin 7a88c4ea94 2K sample / sec 2020-04-22 10:38:47 +08:00
weiting2 071ee6d057 throughput test in neu2.1 2020-04-22 10:31:15 +08:00
yichin 7a3c746547 4K sample / sec 2020-04-21 18:30:47 +08:00
yichin 8e21db3440 what's wrong with the fucking connection interval 2020-04-21 17:19:19 +08:00
yichin 21be0d0286 counting data rate 2020-04-21 15:53:39 +08:00
yichin 8fdf51afea counting data rate 2020-04-21 12:41:44 +08:00
weiting2 ab98ad66a9 throughput test in neu2.1 2020-04-21 12:17:57 +08:00
yichin 14319151b3 attempt to call GATT_Notification 2020-04-21 11:55:10 +08:00
yichin 898478b485 attempt to construct clock 2020-04-21 11:12:54 +08:00
yichin 5923833fa1 check MTU update 2020-04-20 18:57:24 +08:00
yichin fd1d10b8e1 check MTU update 2020-04-20 18:07:10 +08:00
yichin b718cbfca3 throughput example 2020-04-20 12:18:38 +08:00
weiting2 a891741e98 throughput test in neu2.1 2020-04-20 11:46:47 +08:00
weiting2 1c14375948 throughput test in neu2.1 2020-04-17 17:00:27 +08:00
weiting2 c1cedcb9c2 add main in throughput example 2020-04-17 10:41:16 +08:00
yichin 271a80766b PDU = 207, connection interval = 14~25 * 8 2020-04-16 18:24:04 +08:00
yichin efb7df7c33 PDU = 207, connection interval = 14~25 * 8 2020-04-16 17:00:16 +08:00
yichin 0471fa43dc Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-16 15:48:51 +08:00
weiting2 aa0c14c588 update pdu and request_tx_time 2020-04-16 15:48:39 +08:00
yichin 2543fd1238 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-16 15:40:52 +08:00
weiting2 c01d6a3899 update pdu and request_tx_time 2020-04-16 15:40:29 +08:00
yichin 79e5a480ec connection interval = 20~25 * 1.25ms 2020-04-16 13:34:32 +08:00
weiting2 e3bb56f38b update connection interval 2020-04-16 11:57:54 +08:00
weiting2 77cc277ba9 [semi stable] enable fast settling 2020-04-16 10:56:40 +08:00
weiting2 0bb8d7788d [semi stable] disable fast settling 2020-04-16 10:27:38 +08:00
weiting2 fcb35d7b91 [semi stable] should be no problem 2020-04-16 10:12:22 +08:00
weiting2 970d2adf73 [semi stable] should be no problem 2020-04-15 21:32:43 +08:00
weiting2 3d1779ad81 STI can work without REC? 2020-04-15 21:32:11 +08:00
weiting2 05bbb46400 STI can work without REC? 2020-04-15 21:23:05 +08:00
yichin b1dae861fc REC STI push low while working 2020-04-15 21:22:38 +08:00
weiting2 b9a0acffea STI can work without REC? 2020-04-15 18:02:48 +08:00
weiting2 765326df98 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-15 16:26:56 +08:00
weiting2 394b959ae5 combine rec and sti 2020-04-15 16:26:46 +08:00
yichin 09ab588e06 REC STI combine 2020-04-15 16:17:32 +08:00
weiting2 ad4898e0f0 combine rec and sti 2020-04-15 16:13:40 +08:00
weiting2 535f2a2f7d combine rec and sti 2020-04-14 17:21:44 +08:00
yichin a2235da1fd combine REC STI 2020-04-14 16:43:55 +08:00
weiting2 f9e281ea4a combine rec and sti 2020-04-14 14:36:44 +08:00
yichin 8a64684247 combine sti and rec 2020-04-14 14:31:01 +08:00
weiting2 290af2a77c [semi-stable] sti_clk updated, rec/sti can not co-work 2020-04-10 11:37:43 +08:00
yichin 99ceee42f6 sti clk = 2 2020-04-10 11:35:02 +08:00
yichin 6bc11ba56a [debug] test central memory 2020-04-09 17:30:56 +08:00
yichin 704253a9e8 [debug] test central memory 2020-04-09 17:21:56 +08:00
weiting2 efe3678d55 update sti_clk ratio 2020-04-08 19:03:04 +08:00
weiting2 3347d31297 [debug] check battery voltage during init 2020-04-08 17:47:49 +08:00
weiting2 d84d8666c5 [debug] turn off LED before shutdown 2020-04-08 16:51:49 +08:00
weiting2 b9e839ff41 [debug] turn off LED before shutdown 2020-04-08 16:48:37 +08:00
weiting2 24634276aa [debug] device should shutdown if battery below 4.2V 2020-04-08 16:36:27 +08:00
yichin 8e691ba69e Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-08 16:31:04 +08:00
weiting2 30aa17dd0e update sti_clock ratio 2020-04-08 16:28:42 +08:00
yichin f0fbe52296 update cali table 2020-04-07 15:23:23 +08:00
yichin 48f61c564f update cali table 2020-04-07 10:56:30 +08:00
weiting2 1e67263010 recording data has wrong channel (last time select channel)
attempt to solve it
2020-04-06 18:37:16 +08:00
weiting2 9cf1e8f268 check STI register (polarity & amplitude) 2020-04-06 18:08:30 +08:00
yichin ceb15a9af1 red-purple if default RIS 2020-04-01 19:28:20 +08:00
weiting2 fe0c6093d5 check STI register (polarity & amplitude) 2020-04-01 10:04:33 +08:00
weiting2 a231b33ef8 check STI register (channel & amplitude) 2020-03-31 18:40:34 +08:00
weiting2 ccacc34bd0 check STI register (channel & amplitude) 2020-03-31 18:14:26 +08:00
weiting2 111d593567 check STI register (channel & amplitude) 2020-03-31 17:55:40 +08:00
weiting2 65eb3ab488 check STI register (channel & amplitude) 2020-03-31 17:31:56 +08:00
weiting2 ad65de63fe check STI register (channel & amplitude) 2020-03-31 15:11:13 +08:00
weiting2 135c7aaac4 update STT flag = true condition 2020-03-26 16:48:57 +08:00
weiting2 881e0ced01 orange LED when STI 2020-03-25 17:52:54 +08:00
weiting2 e79a73588f fix sti ins bug 2020-03-25 11:32:55 +08:00
weiting2 2c03a95d28 update comment 2020-03-25 11:14:46 +08:00
weiting2 17177af681 update comment 2020-03-24 17:50:11 +08:00
weiting2 bda081de95 update comment 2020-03-24 14:56:27 +08:00
20 changed files with 1675 additions and 339 deletions
+2 -1
View File
@@ -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
+7
View File
@@ -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
@@ -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>
@@ -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>
@@ -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="&quot;${TOOLS_BLE}/lib_search/lib_search.exe&quot; ${ORG_PROJ_DIR}/build_config.opt &quot;${TOOLS_BLE}/lib_search/params_split_cc2640.xml&quot; ${SRC_BLE_CORE}/../blelib &quot;${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd&quot;">
<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.832046861"
name="TI Build Tools"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1662665503">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.361513614"
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.1409784186"
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.1097216259"
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.988453068"
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.772298983"
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.1310942383"
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.746618886"
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.1515548706"
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.607163911"
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.318297824"
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.631719280"
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.1577402438"
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.257493390"
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 &lt;id&gt; (--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 &lt;id&gt; 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 &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" 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 &lt;dir&gt; 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 &lt;id&gt; (--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 &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" 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.174341808"
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.368319864"
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.1796876384"
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.1202072403"
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.746142779"
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.2057721302"
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.193620484"
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.1071304751"
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.1900538416"
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.1395617758"
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.1662665503"
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.1043297041"
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.30321841"
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.1098985537"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE"
value="&quot;${ProjName}.map&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.207849780"
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.1730405570"
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.1642862213"
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.931842322"
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.628793954"
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.1795637117"
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.1568690558"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO"
value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT.790669318"
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.636942967"
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.1245052655"
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.1776037702"
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.2125995458"
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.1674943097"
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.1597342378"
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1896669298"
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.2112595558"
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.1916629122"
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=""/>
@@ -12,6 +12,7 @@
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:simple_peripheral_cc2650em_stack}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/simple_peripheral_cc2650em_stack"/>
</listAttribute>
@@ -1,19 +1,25 @@
<?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>
<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">
@@ -0,0 +1,106 @@
#ifndef HEAD_BLAST_DATA
#define HEAD_BLAST_DATA
// L2CAP Header(2) + L2CAP CID(2) + ATT Opcode(1) + ATT handle(2)
#define TOTAL_PACKET_OVERHEAD 7
static void SimpleBLEPeripheral_performPeriodicTask();
/*********************************************************************
* @fn SimpleBLEPeripheral_blastData
*
* @brief Sends ATT notifications in a tight while loop to demo
* throughput
*
* @param none
*
* @return none
*/
static void SimpleBLEPeripheral_blastData() {
// Subtract the total packet overhead of ATT and L2CAP layer from notification payload
uint16_t len = MAX_PDU_SIZE - TOTAL_PACKET_OVERHEAD;
attHandleValueNoti_t noti;
bStatus_t status;
noti.handle = 0x27;
noti.len = len;
uint32_t not_time_stamp;
// Store hte connection handle for future reference
uint16_t connectionHandle;
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connectionHandle);
// If RTOS queue is not empty, process app message.
// We need to process the app message here in the case of a keypress
while (!Queue_empty(appMsgQueue)) {
sbpEvt_t *pMsg = (sbpEvt_t *)Util_dequeueMsg(appMsgQueue);
if (pMsg) {
// Process message.
SimpleBLEPeripheral_processAppMsg(pMsg);
// Free the space from the message.
ICall_free(pMsg);
}
}
not_time_stamp = Timestamp_get32() / 2;
noti.pValue = (uint8 *)GATT_bm_alloc(connectionHandle, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len);
if (noti.pValue != NULL) // if allocated
{
// Place index
noti.pValue[2] = not_time_stamp & 0xFF;
noti.pValue[3] = (not_time_stamp >> 8) & 0xFF;
noti.pValue[4] = (not_time_stamp >> 16) & 0xFF;
noti.pValue[5] = (not_time_stamp >> 24) & 0xFF;
noti.pValue[6] = 100;
noti.pValue[7] = 0;
// Attempt to send the notification
status = GATT_Notification(connectionHandle, &noti, GATT_NO_AUTHENTICATION);
if (status != SUCCESS) // if noti not sent
{
// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_ON);
GATT_bm_free((gattMsg_t *)&noti, ATT_HANDLE_VALUE_NOTI);
} else {
// Notification is successfully sent, increment counters
// Display_print0(dispHandle, 4, 0, "success");
// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_ON);
msg_counter++;
}
} else {
// bleNoResources was returned
asm(" NOP ");
}
// Reset debug pins
// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_OFF);
// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_OFF);
}
static void SimpleBLEPeripheral_performPeriodicTask(){
SimpleBLEPeripheral_blastData();
}
/*********************************************************************
* @fn SimpleBLEPeripheral_clockHandler
*
* @brief Handler function for clock timeouts.
*
* @param arg - event type
*
* @return None.
*/
static void SimpleBLEPeripheral_clockHandler(UArg arg) {
// Store the event.
events |= arg;
// Wake up the application.
Semaphore_post(sem);
}
#endif
@@ -148,6 +148,211 @@ struct _CaliTable{
.Ch[7].Gain[3] = 2890,
.Ch[7].Offset[3] = -41
};
#elif defined(BOARD_18_04_ED_37_C5_ED)
{
.Ch[0].Gain[0] = 95,
.Ch[0].Offset[0] = 2013,
.Ch[1].Gain[0] = 48,
.Ch[1].Offset[0] = -10,
.Ch[2].Gain[0] = 48,
.Ch[2].Offset[0] = -15,
.Ch[3].Gain[0] = 48,
.Ch[3].Offset[0] = -26,
.Ch[4].Gain[0] = 48,
.Ch[4].Offset[0] = -18,
.Ch[5].Gain[0] = 48,
.Ch[5].Offset[0] = -23,
.Ch[6].Gain[0] = 45,
.Ch[6].Offset[0] = -23,
.Ch[7].Gain[0] = 45,
.Ch[7].Offset[0] = -35,
.Ch[0].Gain[1] = 355,
.Ch[0].Offset[1] = 9,
.Ch[1].Gain[1] = 356,
.Ch[1].Offset[1] = 57,
.Ch[2].Gain[1] = 355,
.Ch[2].Offset[1] = 25,
.Ch[3].Gain[1] = 357,
.Ch[3].Offset[1] = -70,
.Ch[4].Gain[1] = 356,
.Ch[4].Offset[1] = -1,
.Ch[5].Gain[1] = 354,
.Ch[5].Offset[1] = -39,
.Ch[6].Gain[1] = 345,
.Ch[6].Offset[1] = -37,
.Ch[7].Gain[1] = 334,
.Ch[7].Offset[1] = -130,
.Ch[0].Gain[2] = 1540,
.Ch[0].Offset[2] = 60,
.Ch[1].Gain[2] = 1542,
.Ch[1].Offset[2] = 314,
.Ch[2].Gain[2] = 1529,
.Ch[2].Offset[2] = 174,
.Ch[3].Gain[2] = 1539,
.Ch[3].Offset[2] = -199,
.Ch[4].Gain[2] = 1541,
.Ch[4].Offset[2] = 50,
.Ch[5].Gain[2] = 1521,
.Ch[5].Offset[2] = -97,
.Ch[6].Gain[2] = 1480,
.Ch[6].Offset[2] = -92,
.Ch[7].Gain[2] = 1485,
.Ch[7].Offset[2] = -497,
.Ch[0].Gain[3] = 3310,
.Ch[0].Offset[3] = 222,
.Ch[1].Gain[3] = 3164,
.Ch[1].Offset[3] = 690,
.Ch[2].Gain[3] = 3220,
.Ch[2].Offset[3] = 467,
.Ch[3].Gain[3] = 3255,
.Ch[3].Offset[3] = -401,
.Ch[4].Gain[3] = 3311,
.Ch[4].Offset[3] = 160,
.Ch[5].Gain[3] = 3232,
.Ch[5].Offset[3] = 78,
.Ch[6].Gain[3] = 3253,
.Ch[6].Offset[3] = -178,
.Ch[7].Gain[3] = 2667,
.Ch[7].Offset[3] = -985
};
#elif defined(BOARD_00_81_F9_E4_9B_EF)
{
.Ch[0].Gain[0] = 48,
.Ch[0].Offset[0] = 98,
.Ch[1].Gain[0] = 47,
.Ch[1].Offset[0] = 85,
.Ch[2].Gain[0] = 47,
.Ch[2].Offset[0] = 76,
.Ch[3].Gain[0] = 47,
.Ch[3].Offset[0] = 95,
.Ch[4].Gain[0] = 47,
.Ch[4].Offset[0] = 81,
.Ch[5].Gain[0] = 47,
.Ch[5].Offset[0] = 64,
.Ch[6].Gain[0] = 45,
.Ch[6].Offset[0] = 65,
.Ch[7].Gain[0] = 1,
.Ch[7].Offset[0] = 79,
.Ch[0].Gain[1] = 353,
.Ch[0].Offset[1] = 206,
.Ch[1].Gain[1] = 353,
.Ch[1].Offset[1] = 106,
.Ch[2].Gain[1] = 353,
.Ch[2].Offset[1] = 31,
.Ch[3].Gain[1] = 354,
.Ch[3].Offset[1] = 176,
.Ch[4].Gain[1] = 355,
.Ch[4].Offset[1] = 73,
.Ch[5].Gain[1] = 351,
.Ch[5].Offset[1] = -50,
.Ch[6].Gain[1] = 343,
.Ch[6].Offset[1] = -45,
.Ch[7].Gain[1] = 222,
.Ch[7].Offset[1] = -44,
.Ch[0].Gain[2] = 1467,
.Ch[0].Offset[2] = 573,
.Ch[1].Gain[2] = 1469,
.Ch[1].Offset[2] = 160,
.Ch[2].Gain[2] = 1448,
.Ch[2].Offset[2] = -130,
.Ch[3].Gain[2] = 1468,
.Ch[3].Offset[2] = 495,
.Ch[4].Gain[2] = 1480,
.Ch[4].Offset[2] = 40,
.Ch[5].Gain[2] = 1444,
.Ch[5].Offset[2] = -444,
.Ch[6].Gain[2] = 1407,
.Ch[6].Offset[2] = -442,
.Ch[7].Gain[2] = 5736,
.Ch[7].Offset[2] = -592,
.Ch[0].Gain[3] = 2698,
.Ch[0].Offset[3] = 1047,
.Ch[1].Gain[3] = 3016,
.Ch[1].Offset[3] = 251,
.Ch[2].Gain[3] = 2915,
.Ch[2].Offset[3] = -327,
.Ch[3].Gain[3] = 2852,
.Ch[3].Offset[3] = 868,
.Ch[4].Gain[3] = 3035,
.Ch[4].Offset[3] = -19,
.Ch[5].Gain[3] = 2518,
.Ch[5].Offset[3] = -938,
.Ch[6].Gain[3] = 2387,
.Ch[6].Offset[3] = -936,
.Ch[7].Gain[3] = 11166,
.Ch[7].Offset[3] = -656
};
#elif defined(BOARD_00_81_F9_E4_9B_97)
{
.Ch[0].Gain[0] = 48,
.Ch[0].Offset[0] = 34,
.Ch[1].Gain[0] = 48,
.Ch[1].Offset[0] = 25,
.Ch[2].Gain[0] = 48,
.Ch[2].Offset[0] = 31,
.Ch[3].Gain[0] = 47,
.Ch[3].Offset[0] = 44,
.Ch[4].Gain[0] = 48,
.Ch[4].Offset[0] = 29,
.Ch[5].Gain[0] = 47,
.Ch[5].Offset[0] = 40,
.Ch[6].Gain[0] = 45,
.Ch[6].Offset[0] = 10,
.Ch[7].Gain[0] = 45,
.Ch[7].Offset[0] = 12,
.Ch[0].Gain[1] = 349,
.Ch[0].Offset[1] = 67,
.Ch[1].Gain[1] = 349,
.Ch[1].Offset[1] = -7,
.Ch[2].Gain[1] = 350,
.Ch[2].Offset[1] = 37,
.Ch[3].Gain[1] = 350,
.Ch[3].Offset[1] = 133,
.Ch[4].Gain[1] = 351,
.Ch[4].Offset[1] = 30,
.Ch[5].Gain[1] = 350,
.Ch[5].Offset[1] = 102,
.Ch[6].Gain[1] = 331,
.Ch[6].Offset[1] = -114,
.Ch[7].Gain[1] = 339,
.Ch[7].Offset[1] = -100,
.Ch[0].Gain[2] = 1443,
.Ch[0].Offset[2] = 181,
.Ch[1].Gain[2] = 1439,
.Ch[1].Offset[2] = -140,
.Ch[2].Gain[2] = 1445,
.Ch[2].Offset[2] = 54,
.Ch[3].Gain[2] = 1417,
.Ch[3].Offset[2] = 457,
.Ch[4].Gain[2] = 1442,
.Ch[4].Offset[2] = 38,
.Ch[5].Gain[2] = 1443,
.Ch[5].Offset[2] = 338,
.Ch[6].Gain[2] = 1377,
.Ch[6].Offset[2] = -558,
.Ch[7].Gain[2] = 1364,
.Ch[7].Offset[2] = -514,
.Ch[0].Gain[3] = 2914,
.Ch[0].Offset[3] = 323,
.Ch[1].Gain[3] = 2877,
.Ch[1].Offset[3] = -320,
.Ch[2].Gain[3] = 2910,
.Ch[2].Offset[3] = 73,
.Ch[3].Gain[3] = 2655,
.Ch[3].Offset[3] = 865,
.Ch[4].Gain[3] = 2884,
.Ch[4].Offset[3] = 44,
.Ch[5].Gain[3] = 2863,
.Ch[5].Offset[3] = 659,
.Ch[6].Gain[3] = 2282,
.Ch[6].Offset[3] = -1079,
.Ch[7].Gain[3] = 2420,
.Ch[7].Offset[3] = -1034
};
#elif defined(BOARD_00_81_F9_E4_8B_50)
{
.Ch[0].Gain[0] = 50,
@@ -352,6 +557,346 @@ struct _CaliTable{
.Ch[7].Offset[3] = -38
};
#elif defined(BOARD_18_04_ED_37_C6_BE)
{
.Ch[0].Gain[0] = 48,
.Ch[0].Offset[0] = 21,
.Ch[1].Gain[0] = 48,
.Ch[1].Offset[0] = 11,
.Ch[2].Gain[0] = 48,
.Ch[2].Offset[0] = 25,
.Ch[3].Gain[0] = 48,
.Ch[3].Offset[0] = 24,
.Ch[4].Gain[0] = 48,
.Ch[4].Offset[0] = 8,
.Ch[5].Gain[0] = 48,
.Ch[5].Offset[0] = 20,
.Ch[6].Gain[0] = 46,
.Ch[6].Offset[0] = 10,
.Ch[7].Gain[0] = 46,
.Ch[7].Offset[0] = 37,
.Ch[0].Gain[1] = 356,
.Ch[0].Offset[1] = -11,
.Ch[1].Gain[1] = 357,
.Ch[1].Offset[1] = -88,
.Ch[2].Gain[1] = 357,
.Ch[2].Offset[1] = 8,
.Ch[3].Gain[1] = 357,
.Ch[3].Offset[1] = 5,
.Ch[4].Gain[1] = 358,
.Ch[4].Offset[1] = -112,
.Ch[5].Gain[1] = 356,
.Ch[5].Offset[1] = -17,
.Ch[6].Gain[1] = 342,
.Ch[6].Offset[1] = -94,
.Ch[7].Gain[1] = 345,
.Ch[7].Offset[1] = 106,
.Ch[0].Gain[2] = 1518,
.Ch[0].Offset[2] = -146,
.Ch[1].Gain[2] = 1507,
.Ch[1].Offset[2] = -454,
.Ch[2].Gain[2] = 1504,
.Ch[2].Offset[2] = -50,
.Ch[3].Gain[2] = 1515,
.Ch[3].Offset[2] = -55,
.Ch[4].Gain[2] = 1500,
.Ch[4].Offset[2] = -575,
.Ch[5].Gain[2] = 1517,
.Ch[5].Offset[2] = -165,
.Ch[6].Gain[2] = 1431,
.Ch[6].Offset[2] = -480,
.Ch[7].Gain[2] = 1479,
.Ch[7].Offset[2] = 376,
.Ch[0].Gain[3] = 3186,
.Ch[0].Offset[3] = -338,
.Ch[1].Gain[3] = 2732,
.Ch[1].Offset[3] = -941,
.Ch[2].Gain[3] = 3115,
.Ch[2].Offset[3] = -125,
.Ch[3].Gain[3] = 3140,
.Ch[3].Offset[3] = -150,
.Ch[4].Gain[3] = 2359,
.Ch[4].Offset[3] = -1136,
.Ch[5].Gain[3] = 3175,
.Ch[5].Offset[3] = -397,
.Ch[6].Gain[3] = 2533,
.Ch[6].Offset[3] = -979,
.Ch[7].Gain[3] = 2889,
.Ch[7].Offset[3] = 741
};
#elif defined(BOARD_18_04_ED_37_C6_DF)
{
.Ch[0].Gain[0] = 50,
.Ch[0].Offset[0] = 17,
.Ch[1].Gain[0] = 50,
.Ch[1].Offset[0] = 24,
.Ch[2].Gain[0] = 49,
.Ch[2].Offset[0] = 47,
.Ch[3].Gain[0] = 50,
.Ch[3].Offset[0] = 33,
.Ch[4].Gain[0] = 50,
.Ch[4].Offset[0] = 27,
.Ch[5].Gain[0] = 12,
.Ch[5].Offset[0] = 48,
.Ch[6].Gain[0] = 48,
.Ch[6].Offset[0] = 21,
.Ch[7].Gain[0] = 48,
.Ch[7].Offset[0] = 28,
.Ch[0].Gain[1] = 371,
.Ch[0].Offset[1] = -70,
.Ch[1].Gain[1] = 371,
.Ch[1].Offset[1] = -24,
.Ch[2].Gain[1] = 370,
.Ch[2].Offset[1] = 143,
.Ch[3].Gain[1] = 372,
.Ch[3].Offset[1] = 37,
.Ch[4].Gain[1] = 374,
.Ch[4].Offset[1] = 2,
.Ch[5].Gain[1] = 90,
.Ch[5].Offset[1] = 150,
.Ch[6].Gain[1] = 355,
.Ch[6].Offset[1] = -41,
.Ch[7].Gain[1] = 353,
.Ch[7].Offset[1] = 4,
.Ch[0].Gain[2] = 3167,
.Ch[0].Offset[2] = 1231,
.Ch[1].Gain[2] = 1585,
.Ch[1].Offset[2] = -210,
.Ch[2].Gain[2] = 1566,
.Ch[2].Offset[2] = 520,
.Ch[3].Gain[2] = 1589,
.Ch[3].Offset[2] = 51,
.Ch[4].Gain[2] = 1592,
.Ch[4].Offset[2] = -96,
.Ch[5].Gain[2] = 391,
.Ch[5].Offset[2] = 552,
.Ch[6].Gain[2] = 1512,
.Ch[6].Offset[2] = -281,
.Ch[7].Gain[2] = 1544,
.Ch[7].Offset[2] = -80,
.Ch[0].Gain[3] = 3062,
.Ch[0].Offset[3] = -884,
.Ch[1].Gain[3] = 3340,
.Ch[1].Offset[3] = -474,
.Ch[2].Gain[3] = 2885,
.Ch[2].Offset[3] = 1009,
.Ch[3].Gain[3] = 3336,
.Ch[3].Offset[3] = 78,
.Ch[4].Gain[3] = 3372,
.Ch[4].Offset[3] = -229,
.Ch[5].Gain[3] = 745,
.Ch[5].Offset[3] = 1118,
.Ch[6].Gain[3] = 3103,
.Ch[6].Offset[3] = -634,
.Ch[7].Gain[3] = 3195,
.Ch[7].Offset[3] = -205
};
#elif defined(BOARD_18_04_ED_37_C7_6F)
{
.Ch[0].Gain[0] = 49,
.Ch[0].Offset[0] = -15,
.Ch[1].Gain[0] = 48,
.Ch[1].Offset[0] = -38,
.Ch[2].Gain[0] = 49,
.Ch[2].Offset[0] = -13,
.Ch[3].Gain[0] = 49,
.Ch[3].Offset[0] = -5,
.Ch[4].Gain[0] = 48,
.Ch[4].Offset[0] = -24,
.Ch[5].Gain[0] = 48,
.Ch[5].Offset[0] = -27,
.Ch[6].Gain[0] = 46,
.Ch[6].Offset[0] = -32,
.Ch[7].Gain[0] = 0,
.Ch[7].Offset[0] = -44,
.Ch[0].Gain[1] = 358,
.Ch[0].Offset[1] = -31,
.Ch[1].Gain[1] = 357,
.Ch[1].Offset[1] = -74,
.Ch[2].Gain[1] = 359,
.Ch[2].Offset[1] = 29,
.Ch[3].Gain[1] = 359,
.Ch[3].Offset[1] = 96,
.Ch[4].Gain[1] = 358,
.Ch[4].Offset[1] = -49,
.Ch[5].Gain[1] = 357,
.Ch[5].Offset[1] = -80,
.Ch[6].Gain[1] = 346,
.Ch[6].Offset[1] = -119,
.Ch[7].Gain[1] = 341,
.Ch[7].Offset[1] = -118,
.Ch[0].Gain[2] = 1517,
.Ch[0].Offset[2] = -73,
.Ch[1].Gain[2] = 1496,
.Ch[1].Offset[2] = -255,
.Ch[2].Gain[2] = 1500,
.Ch[2].Offset[2] = 177,
.Ch[3].Gain[2] = 1497,
.Ch[3].Offset[2] = 459,
.Ch[4].Gain[2] = 1496,
.Ch[4].Offset[2] = -151,
.Ch[5].Gain[2] = 1495,
.Ch[5].Offset[2] = -283,
.Ch[6].Gain[2] = 1438,
.Ch[6].Offset[2] = -436,
.Ch[7].Gain[2] = 0,
.Ch[7].Offset[2] = -24,
.Ch[0].Gain[3] = 3171,
.Ch[0].Offset[3] = -127,
.Ch[1].Gain[3] = 3054,
.Ch[1].Offset[3] = -501,
.Ch[2].Gain[3] = 3061,
.Ch[2].Offset[3] = 387,
.Ch[3].Gain[3] = 2702,
.Ch[3].Offset[3] = 920,
.Ch[4].Gain[3] = 3046,
.Ch[4].Offset[3] = -303,
.Ch[5].Gain[3] = 3035,
.Ch[5].Offset[3] = -551,
.Ch[6].Gain[3] = 2782,
.Ch[6].Offset[3] = -879,
.Ch[7].Gain[3] = 0,
.Ch[7].Offset[3] = -23
};
#elif defined(BOARD_00_81_F9_E4_8C_D0)
{
.Ch[0].Gain[0] = 49,
.Ch[0].Offset[0] = -52,
.Ch[1].Gain[0] = 49,
.Ch[1].Offset[0] = -40,
.Ch[2].Gain[0] = 49,
.Ch[2].Offset[0] = -23,
.Ch[3].Gain[0] = 49,
.Ch[3].Offset[0] = -32,
.Ch[4].Gain[0] = 13,
.Ch[4].Offset[0] = -21,
.Ch[5].Gain[0] = 49,
.Ch[5].Offset[0] = -14,
.Ch[6].Gain[0] = 47,
.Ch[6].Offset[0] = -45,
.Ch[7].Gain[0] = 47,
.Ch[7].Offset[0] = -47,
.Ch[0].Gain[1] = 363,
.Ch[0].Offset[1] = -174,
.Ch[1].Gain[1] = 363,
.Ch[1].Offset[1] = -90,
.Ch[2].Gain[1] = 363,
.Ch[2].Offset[1] = 43,
.Ch[3].Gain[1] = 364,
.Ch[3].Offset[1] = -39,
.Ch[4].Gain[1] = 95,
.Ch[4].Offset[1] = 61,
.Ch[5].Gain[1] = 363,
.Ch[5].Offset[1] = 109,
.Ch[6].Gain[1] = 349,
.Ch[6].Offset[1] = -122,
.Ch[7].Gain[1] = 352,
.Ch[7].Offset[1] = -132,
.Ch[0].Gain[2] = 1512,
.Ch[0].Offset[2] = -644,
.Ch[1].Gain[2] = 1519,
.Ch[1].Offset[2] = -412,
.Ch[2].Gain[2] = 1530,
.Ch[2].Offset[2] = 292,
.Ch[3].Gain[2] = 1520,
.Ch[3].Offset[2] = -58,
.Ch[4].Gain[2] = 399,
.Ch[4].Offset[2] = 367,
.Ch[5].Gain[2] = 1498,
.Ch[5].Offset[2] = 559,
.Ch[6].Gain[2] = 1491,
.Ch[6].Offset[2] = -403,
.Ch[7].Gain[2] = 1457,
.Ch[7].Offset[2] = -451,
.Ch[0].Gain[3] = 2194,
.Ch[0].Offset[3] = -1174,
.Ch[1].Gain[3] = 3091,
.Ch[1].Offset[3] = -536,
.Ch[2].Gain[3] = 3000,
.Ch[2].Offset[3] = 614,
.Ch[3].Gain[3] = 3130,
.Ch[3].Offset[3] = -90,
.Ch[4].Gain[3] = 784,
.Ch[4].Offset[3] = 791,
.Ch[5].Gain[3] = 2205,
.Ch[5].Offset[3] = 1071,
.Ch[6].Gain[3] = 2802,
.Ch[6].Offset[3] = -766,
.Ch[7].Gain[3] = 2731,
.Ch[7].Offset[3] = -856
};
#elif defined(BOARD_18_04_ED_37_C6_C7)
{
.Ch[0].Gain[0] = 48,
.Ch[0].Offset[0] = -21,
.Ch[1].Gain[0] = 48,
.Ch[1].Offset[0] = -21,
.Ch[2].Gain[0] = 48,
.Ch[2].Offset[0] = -20,
.Ch[3].Gain[0] = 48,
.Ch[3].Offset[0] = -40,
.Ch[4].Gain[0] = 48,
.Ch[4].Offset[0] = -37,
.Ch[5].Gain[0] = 48,
.Ch[5].Offset[0] = -45,
.Ch[6].Gain[0] = 46,
.Ch[6].Offset[0] = -62,
.Ch[7].Gain[0] = 46,
.Ch[7].Offset[0] = -37,
.Ch[0].Gain[1] = 360,
.Ch[0].Offset[1] = 41,
.Ch[1].Gain[1] = 360,
.Ch[1].Offset[1] = 45,
.Ch[2].Gain[1] = 361,
.Ch[2].Offset[1] = 55,
.Ch[3].Gain[1] = 361,
.Ch[3].Offset[1] = -99,
.Ch[4].Gain[1] = 362,
.Ch[4].Offset[1] = -64,
.Ch[5].Gain[1] = 358,
.Ch[5].Offset[1] = -144,
.Ch[6].Gain[1] = 346,
.Ch[6].Offset[1] = -261,
.Ch[7].Gain[1] = 341,
.Ch[7].Offset[1] = -81,
.Ch[0].Gain[2] = 1536,
.Ch[0].Offset[2] = 359,
.Ch[1].Gain[2] = 1535,
.Ch[1].Offset[2] = 293,
.Ch[2].Gain[2] = 1535,
.Ch[2].Offset[2] = 387,
.Ch[3].Gain[2] = 1539,
.Ch[3].Offset[2] = -317,
.Ch[4].Gain[2] = 1545,
.Ch[4].Offset[2] = -151,
.Ch[5].Gain[2] = 1512,
.Ch[5].Offset[2] = -515,
.Ch[6].Gain[2] = 1349,
.Ch[6].Offset[2] = -994,
.Ch[7].Gain[2] = 1457,
.Ch[7].Offset[2] = -245,
.Ch[0].Gain[3] = 3027,
.Ch[0].Offset[3] = 729,
.Ch[1].Gain[3] = 3125,
.Ch[1].Offset[3] = 650,
.Ch[2].Gain[3] = 3006,
.Ch[2].Offset[3] = 794,
.Ch[3].Gain[3] = 3159,
.Ch[3].Offset[3] = -621,
.Ch[4].Gain[3] = 3237,
.Ch[4].Offset[3] = -314,
.Ch[5].Gain[3] = 2751,
.Ch[5].Offset[3] = -993,
.Ch[6].Gain[3] = 992,
.Ch[6].Offset[3] = -1615,
.Ch[7].Gain[3] = 3141,
.Ch[7].Offset[3] = -490
};
// gain=1, offset = 0, if any channel has no calibration data
#else
{
@@ -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;
@@ -36,14 +32,16 @@ static void check_register(uint8_t register_to_check, uint16_t instruction_to_fi
// resend instruction
SPI_close(headstage_spi_handle);
DBSReset();
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
NEULIVE_STATE.config_type = NEU_SET_STI_CUR;
if(STI){
INSTRUCTION.ins_opcode = T_ZE;
}
else{
INSTRUCTION.ins_opcode = BIAS_ONE;
}
// NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
// NEULIVE_STATE.config_type = NEU_SET_STI_CUR;
// if(STI){
// INSTRUCTION.ins_opcode = T_ZE;
// }
// else{
// INSTRUCTION.ins_opcode = BIAS_ONE;
// }
NEULIVE_STATE.state = NEU_DATA_RATE_TEST;
SPICallBack = ONE_SHOT_SPI;
ReopenSPI();
}
@@ -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. */
@@ -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 = 0x98, .green = 0x33, .blue = 0xFA};
break;
default:
case COLOR_BLACK:
parameter = (LEDParameter){.luminance = 0x00, .red = 0x00, .green = 0x00, .blue = 0x00};
@@ -169,15 +169,11 @@ static void FlushNotify();
#define EVT_NEU_REG_SPI 0x0008 /** register spi event */
/** clock setting */
#define NEU_SYS_CLK 2000000 /**< 10Mhz */
#define NEU_SYS_CLK 4000000 /**< 10Mhz */
#define NEU_POLY_R_CLK 1000 /**< 1khz */
#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
@@ -194,14 +190,16 @@ static uint8_t SPICallBack = 0;
#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_CHECK_REGISTER 3
#define NEU_RECEIVE_PARAM 4
#define NEU_DATA_RATE_TEST 3
#define NEU_DATA_RATE_TEST_READ 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_CHECK_STI_POL 9
#define NEU_CHECK_GENERAL_EN 10
#define NEU_CHECK_STI_AMP 11
#define NEU_START_STI 12
#define NEU_IDLE 15
/** macros for build up DBS instruction */
@@ -279,7 +277,9 @@ static uint8_t SPICallBack = 0;
#include "headstage_version.h"
#include "headstage_check_ins.h"
#include "headstage_power.h"
//#include "headstage_blastData.h"
#include "ble_user_config.h"
/*
* todo: need to define some procedure to detect this device status
@@ -369,11 +369,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 +458,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
}
/**
@@ -468,7 +476,7 @@ static void headstage_neu_append_notify_data() {
uint8_t channel = spi_rxbuf[0];
// close-reopen SPI, if the first channel received is invalid
// // close-reopen SPI, if the first channel received is invalid
if(IsFirstData){
// start record
if(CHANNEL_VALID && (channel < 16)){
@@ -479,14 +487,15 @@ static void headstage_neu_append_notify_data() {
SPI_close(headstage_spi_handle);
ReopenSPI();
IsFirstData = true;
return;
}
}
//
// discard illegal channel
if(!CHANNEL_VALID || (channel > 15)){
// illegal channel
return;
}
// if(!CHANNEL_VALID || (channel > 15)){
// // illegal channel
// return;
// }
uint8_t not_buf[3];
not_buf[0] = channel; // ch
@@ -499,7 +508,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();
}
@@ -573,6 +581,7 @@ static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transacti
break;
}
case READ_MOSI:{
flag_notify(EVT_NEU_SPI);
break;
@@ -613,22 +622,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);
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 +649,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 +688,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 +698,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 = 40;
INSTRUCTION.sys_clk_ratio = 10;
INSTRUCTION.sti_clock_ratio = 10;
INSTRUCTION.amplifier_gain = 0;
@@ -720,8 +727,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
@@ -770,16 +781,15 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
FlushNotify();
}
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
NEULIVE_STATE.config_type = NEU_SET_STI_CUR;
// NEULIVE_STATE.state = NEU_READ_DATA;
SPICallBack = ONE_SHOT_SPI;
if(STI){
INSTRUCTION.ins_opcode = T_ZE;
}
else{
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
// if(STI){
// INSTRUCTION.ins_opcode = T_ZE;
// }
// else{
INSTRUCTION.ins_opcode = BIAS_ONE;
}
// }
flag_notify(EVT_NEU_SPI);
break; /**< start to operate */
}
@@ -823,11 +833,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);
//
@@ -883,95 +894,6 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
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 +925,13 @@ 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;
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 +949,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 +963,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 +995,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 +1012,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;
@@ -1112,6 +1030,9 @@ static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
}
}
static uint8_t data_rate_counter = 0;
static void SimpleBLEPeripheral_blastData();
/**
* @fn headstage_neu_state_spi()
*
@@ -1121,7 +1042,8 @@ 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_CHANNEL_REG 0x2E
#define STI_POLARITY_REG 0x28
#define STI_AMP_REG 0x25
static void headstage_neu_state_spi() {
uint32_t value = 0;
uint8_t nxt_ins = 0;
@@ -1133,8 +1055,12 @@ static void headstage_neu_state_spi() {
if (nxt_ins == NEU_SETUP_DONE) {
// go to read ADC data
// NEULIVE_STATE.state = NEU_PREPARE_READ;
NEULIVE_STATE.state = NEU_CHECK_REC_CH;
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 +1071,60 @@ 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_SAMPLE_RATE:{
check_register(REC_SAMPLE_RATE, INSTRUCTION.adc_clock_ratio, NEU_CHECK_GENERAL_EN);
check_register(REC_SAMPLE_RATE, INSTRUCTION.adc_clock_ratio, NEU_PREPARE_READ);
break;
}
case NEU_CHECK_GENERAL_EN:{
check_register(REC_CHECK_GENERAL_EN, NEU_GENERAL_EN, NEU_PREPARE_READ);
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_DATA_RATE_TEST);
}
break;
}
// NEU_CHECK_SAMPLE_RATE
case NEU_CHECK_STI_CH:{
headstage_led_color(COLOR_RED);
case NEU_CHECK_STI_POL:{
check_register(STI_POLARITY_REG, INSTRUCTION.current_sti_polarity, NEU_CHECK_STI_AMP);
break;
}
case NEU_CHECK_STI_AMP:{
if(INSTRUCTION.recording_channel){
check_register(STI_AMP_REG, INSTRUCTION.sti_amplitude_h, NEU_CHECK_REC_CH);
}
else{
check_register(STI_AMP_REG, INSTRUCTION.sti_amplitude_h, 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;
if(INSTRUCTION.recording_channel){
NEULIVE_STATE.state = NEU_PREPARE_READ;
headstage_spi_transaction(3);
}
else{
NEULIVE_STATE.state = NEU_IDLE;
headstage_spi_transaction(3);
headstage_led_color(COLOR_ORANGE);
}
break;
}
@@ -1185,7 +1139,15 @@ static void headstage_neu_state_spi() {
else{
SPICallBack = READ_MOSI;
NEULIVE_STATE.state = NEU_READ_DATA;
headstage_led_color(COLOR_BLUE);
// NEULIVE_STATE.state = NEU_DATA_RATE_TEST_READ;
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,6 +1156,11 @@ static void headstage_neu_state_spi() {
}
case NEU_READ_DATA: {
headstage_neu_append_notify_data();
// for(int i=0 ; i<BLE_NOT_BUFF_SIZE ; i++ ){
// headstage_notify_buffer[i] = i/256;
// }
// headstage_notify_send();
AppendSPITX(0, 0);
// SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, SPI_BUFFER_SIZE, spi_rxbuf);
headstage_spi_transaction(SPI_BUFFER_SIZE);
break;
@@ -1208,20 +1175,37 @@ static void headstage_neu_state_spi() {
headstage_led_color(COLOR_GREEN);
break;
}
case NEU_RECEIVE_PARAM: {
case NEU_DATA_RATE_TEST: {
NEULIVE_STATE.state = NEU_CHECK_SAMPLE_RATE;
uint32_t value = (0x01 << 23) | (0x33 << 16) | INSTRUCTION.adc_clock_ratio;
AppendSPITX(0, value);
headstage_spi_transaction(3);
NEULIVE_STATE.state = NEU_CHECK_REGISTER;
break;
}
case NEU_CHECK_REGISTER: {
cdr_buf[0] = spi_rxbuf[1];
cdr_buf[1] = spi_rxbuf[2];
// cdr_buf[2] = _B_4b4b(CIS_READ_PARAM, CHIP_ID);
cdr_buf[3] = _B_4b4b(CDR_SUCCESS, 0);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
case NEU_DATA_RATE_TEST_READ: {
SPICallBack = READ_MOSI;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0;
}
if(data_rate_counter >= 64){
data_rate_counter = 0;
SimpleBLEPeripheral_blastData();
}
else{
headstage_notify_buffer[6 + 3*data_rate_counter] = spi_rxbuf[0];
headstage_notify_buffer[6 + 3*data_rate_counter+1] = spi_rxbuf[1];
headstage_notify_buffer[6 + 3*data_rate_counter+2] = spi_rxbuf[2];
}
data_rate_counter ++;
headstage_spi_transaction(3);
break;
}
case NEU_IDLE: {
SPICallBack = ONE_SHOT_SPI;
NEULIVE_STATE.state = NEU_IDLE;
AppendSPITX(0, 0);
headstage_spi_transaction(SPI_BUFFER_SIZE);
break; /**< the other state will return to this and wait for next event.*/
}
default: {
@@ -1230,4 +1214,87 @@ static void headstage_neu_state_spi() {
}
}
// L2CAP Header(2) + L2CAP CID(2) + ATT Opcode(1) + ATT handle(2)
#define TOTAL_PACKET_OVERHEAD 7
#define GATT_NO_AUTHENTICATION 0
static uint32 msg_counter = 1;
/*********************************************************************
* @fn SimpleBLEPeripheral_blastData
*
* @brief Sends ATT notifications in a tight while loop to demo
* throughput
*
* @param none
*
* @return none
*/
static void SimpleBLEPeripheral_blastData() {
uint32_t not_time_stamp = headstage_time_stamp_us();
headstage_notify_buffer[0] = msg_counter & 0xFF;
headstage_notify_buffer[1] = (msg_counter >> 8) & 0xFF;
headstage_notify_buffer[2] = (msg_counter >> 16) & 0xFF;
headstage_notify_buffer[3] = (msg_counter >> 24) & 0xFF;
headstage_notify_buffer[4] = 0xFB;
headstage_notify_buffer[5] = not_time_stamp & 0xFF;
headstage_notify_buffer[6] = (not_time_stamp >> 8) & 0xFF;
headstage_notify_buffer[7] = (not_time_stamp >> 16) & 0xFF;
headstage_notify_buffer[8] = (not_time_stamp >> 24) & 0xFF;
headstage_notify_buffer[9] = 0;
msg_counter++;
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
// Subtract the total packet overhead of ATT and L2CAP layer from notification payload
// uint16_t len = MAX_PDU_SIZE - TOTAL_PACKET_OVERHEAD;
// attHandleValueNoti_t noti;
// bStatus_t status;
// noti.handle = 0x27;
// noti.len = len;
//
// uint32_t not_time_stamp;
//
// // Store hte connection handle for future reference
// uint16_t connectionHandle;
// GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connectionHandle);
//
// not_time_stamp = Timestamp_get32() / 2;
// noti.pValue = (uint8 *)GATT_bm_alloc(connectionHandle, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len);
//
// if (noti.pValue != NULL) // if allocated
// {
// // Place index
// noti.pValue[2] = not_time_stamp & 0xFF;
// noti.pValue[3] = (not_time_stamp >> 8) & 0xFF;
// noti.pValue[4] = (not_time_stamp >> 16) & 0xFF;
// noti.pValue[5] = (not_time_stamp >> 24) & 0xFF;
// noti.pValue[6] = 100;
// noti.pValue[7] = 0;
//
// // Attempt to send the notification
// status = GATT_Notification(connectionHandle, &noti, GATT_NO_AUTHENTICATION);
// if (status != SUCCESS) // if noti not sent
// {
//// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_ON);
// headstage_led_color(COLOR_RED);
// headstage_led_color(COLOR_BLACK);
// GATT_bm_free((gattMsg_t *)&noti, ATT_HANDLE_VALUE_NOTI);
// } else {
// // Notification is successfully sent, increment counters
//// Display_print0(dispHandle, 4, 0, "success");
//// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_ON);
// headstage_led_color(COLOR_BLUE);
// headstage_led_color(COLOR_BLACK);
// msg_counter++;
// }
// } else {
// // bleNoResources was returned
// asm(" NOP ");
// }
// Reset debug pins
// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_OFF);
// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_OFF);
}
#endif
@@ -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
@@ -3,14 +3,14 @@
#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 4
#define VERSION_DATE_DAY 24
#define VERSION_DATE_HOUR 11
#define VERSION_DATE_MINUTE 53
// this is NOT the version hash !!
// it's the last version hash
#define VERSION_HASH 3d1de663a8f58dc1db835feea11ed4d72214f99f
#define VERSION_GIT_BRANCH Neulive2.0_developement
#define VERSION_HASH 404d8d8d9d0b04eb9ed6fcc656ba52180d13d8c8
#define VERSION_GIT_BRANCH neulive20_blastData
#endif
@@ -12,14 +12,21 @@
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static uint32_t data_counter = 0;
static void headstage_notify_set_timestamp() {
not_time_stamp = headstage_time_stamp_us();
headstage_notify_buffer[2] = not_time_stamp & 0xFF;
headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
headstage_notify_buffer[4] = (not_time_stamp >> 16) & 0xFF;
headstage_notify_buffer[5] = (not_time_stamp >> 24) & 0xFF;
// headstage_notify_buffer[2] = not_time_stamp & 0xFF;
// headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
// headstage_notify_buffer[4] = (not_time_stamp >> 16) & 0xFF;
// headstage_notify_buffer[5] = (not_time_stamp >> 24) & 0xFF;
headstage_notify_buffer[5] = data_counter & 0xFF;
headstage_notify_buffer[4] = (data_counter >> 8) & 0xFF;
headstage_notify_buffer[3] = (data_counter >> 16) & 0xFF;
headstage_notify_buffer[2] = (data_counter >> 24) & 0xFF;
data_counter ++;
}
static void headstage_notify_flip_buffer() {
@@ -13,6 +13,7 @@ static void MCUReset(){
// global variable reset
IsFirstData = true;
STI = false;
// SPI reset
SPI_close(headstage_spi_handle);
@@ -114,21 +114,30 @@
#ifndef FEATURE_OAD
// 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 6
// 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
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 320
#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 80
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 8
// 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 80
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 16
#endif // FEATURE_OAD
//#define SBP_PERIODIC_EVT_PERIOD DEFAULT_DESIRED_MIN_CONN_INTERVAL*1.25 + 2
#define SBP_PERIODIC_EVT_PERIOD 8
// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
@@ -160,6 +169,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
/*********************************************************************
@@ -179,12 +189,16 @@ typedef struct {
* LOCAL VARIABLES
*/
// Entity ID globally used to check for source and/or destination of messages
static ICall_EntityID self;
// Semaphore globally used to post events to the application thread
ICall_Semaphore semaphore;
// Clock instances for internal periodic events.
static Clock_Struct periodicClock;
// Queue object used for app messages
static Queue_Struct application_message;
static Queue_Handle application_message_queue;
@@ -195,6 +209,9 @@ static Queue_Struct oad_queue;
static Queue_Handle oad_queue_handle;
#endif // FEATURE_OAD
// events flag for internal application events.
static uint16_t events;
// Task configuration
Task_Struct sbpTask;
Char sbpTaskStack[SBP_TASK_STACK_SIZE];
@@ -221,6 +238,10 @@ static void SimpleBLEPeripheral_freeAttRsp(uint8_t status);
static void SimpleBLEPeripheral_stateChangeCB(gaprole_States_t newState);
static void SimpleBLEPeripheral_enqueueMsg(uint8_t event, uint8_t state);
static void SimpleBLEPeripheral_performPeriodicTask(void);
static void SimpleBLEPeripheral_clockHandler(UArg arg);
#ifndef FEATURE_OAD_ONCHIP
static void SimpleBLEPeripheral_charValueChangeCB(uint8_t paramID);
#endif //! FEATURE_OAD_ONCHIP
@@ -315,6 +336,9 @@ static void SimpleBLEPeripheral_init(void) {
// Create an RTOS queue for message from profile to be sent to app.
application_message_queue = Util_constructQueue(&application_message);
// Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT);
// Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler, 100, 0, false, SBP_PERIODIC_EVT);
// Setup the GAP
GAP_SetParamValue(TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL);
@@ -407,9 +431,9 @@ static void SimpleBLEPeripheral_init(void) {
// Register for GATT local events and ATT Responses pending for transmission
GATT_RegisterForMsgs(self);
// HCI_LE_ReadMaxDataLenCmd();
HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
//
// HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
HCI_LE_ReadMaxDataLenCmd();
}
@@ -603,6 +627,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);
@@ -681,6 +714,7 @@ static uint8_t SimpleBLEPeripheral_processGATTMsg(gattMsgEvent_t *message) {
} else if (message->method == ATT_MTU_UPDATED_EVENT) {
// MTU size updated
} else if (message->method == ATT_HANDLE_VALUE_CFM) {
// quick pass
}
@@ -767,6 +801,7 @@ static void SimpleBLEPeripheral_processAppMsg(sbpEvt_t *message) {
break;
case SBP_CHAR_CHANGE_EVT:
// Util_startClock(&periodicClock);
headstage_characteristic_updated(message->hdr.state);
break;
}
@@ -827,13 +862,15 @@ 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)) {
ConnectState = true;
headstage_led_color(COLOR_CYAN);
// headstage_led_color(COLOR_CYAN);
}
// Use numActive to determine the connection handle of the last
// connection
@@ -943,3 +980,25 @@ static void SimpleBLEPeripheral_enqueueMsg(uint8_t event, uint8_t state) {
Util_enqueueMsg(application_message_queue, semaphore, (uint8 *)message);
}
}
static void SimpleBLEPeripheral_performPeriodicTask(){
SimpleBLEPeripheral_blastData();
}
/*********************************************************************
* @fn SimpleBLEPeripheral_clockHandler
*
* @brief Handler function for clock timeouts.
*
* @param arg - event type
*
* @return None.
*/
static void SimpleBLEPeripheral_clockHandler(UArg arg) {
// Store the event.
events |= arg;
// Wake up the application.
Semaphore_post(semaphore);
}
@@ -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 (;;);
}
/*******************************************************************************
*/
@@ -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;
}