Compare commits

...

137 Commits

Author SHA1 Message Date
105042004 f678680f1d push 2019-08-28 11:36:09 +08:00
105042004 0de37ed924 merge 2019-08-28 11:30:53 +08:00
105042004 5f2b3c55bb arrange correction data 2019-08-28 11:22:42 +08:00
alan f7f5e550c9 Elite 1.4-re notify include mode & gain infomation 2019-08-28 10:48:50 +08:00
alan 24db728a6c Elite 1.4-re move DAC correction to correction.h 2019-08-28 10:37:36 +08:00
alan 1f2ddc7829 Elite 1.4-re ADC gain macro 2019-08-28 10:36:35 +08:00
alan 77d22be8fa Elite 1.4-re notify format 2019-08-28 10:32:08 +08:00
alan 691bd9a10f Merge remote-tracking branch 'origin/Elite_IVtest' into Elite_IVtest 2019-08-28 10:09:59 +08:00
alan f5165cc78b Elite 1.4-re Correction array 2019-08-28 10:09:47 +08:00
105042004 6cb687d8b6 IV curve count current average 2019-08-28 02:34:13 +08:00
alan 80dd042021 Merge remote-tracking branch 'origin/Elite_IVtest' into Elite_IVtest 2019-08-27 17:59:24 +08:00
alan 3b43cd1e74 Elite 1.4-re Correction array 2019-08-27 17:59:07 +08:00
105042004 289b0ad94c change to chao i 2019-08-27 17:12:58 +08:00
105042004 e1469d96d8 delete current 2019-08-27 17:01:37 +08:00
105042004 93f106dc30 push chao i 2019-08-27 16:36:03 +08:00
105042004 73913197df push 2019-08-27 16:33:51 +08:00
105042004 4ec017a68f add tri correction 2019-08-27 16:33:42 +08:00
105042004 284891f73a Merge branch 'Elite_IVtest' of https://gitlab.com/bioproscientific/bioprocc2650 into Elite_IVtest 2019-08-27 14:08:27 +08:00
105042004 5a1b69d29b 29 21 ADC volt correction 2019-08-27 14:06:47 +08:00
Benny Liu 0699a7edf7 fix 2019-08-26 15:02:18 +08:00
Benny Liu 14c21694ec fix 2019-08-26 12:22:26 +08:00
Benny Liu 5f95225d00 auto shifting tesst 2019-08-26 12:08:37 +08:00
Benny Liu c1b25aa3ef update calibration data 2019-08-26 10:37:40 +08:00
105042004 237f6a820c move DAC reset parameter 2019-08-23 16:21:32 +08:00
105042004 7ba3aa560b move IV current average 2019-08-23 16:03:52 +08:00
105042004 405b599562 push 2019-08-23 15:01:32 +08:00
105042004 1dae858671 fix 2019-08-23 14:54:05 +08:00
105042004 aee139e154 push 2019-08-23 14:23:56 +08:00
105042004 b80f977e16 fix ADC current samplerate 2019-08-23 14:13:12 +08:00
105042004 e6e8b255ba Merge branch 'Elite_IVtest' of https://gitlab.com/s880782002/bioprocc2650 into Elite_IVtest 2019-08-23 11:17:40 +08:00
105042004 0aca212f53 commit 2019-08-23 11:17:28 +08:00
alan 7f64e9b9c7 Elite 1.4-re clock with event mask 2019-08-23 11:16:51 +08:00
alan 8953c51f9a Elite 1.4-re AVG notify current & V 2019-08-23 10:48:38 +08:00
105042004 72d97ad288 Elite change IV curve samplerate to average 2019-08-23 10:26:50 +08:00
105042004 43cb1a278b change iv curve sample rate 2019-08-22 18:09:59 +08:00
105042004 ccc1becc87 push 2019-08-22 11:34:46 +08:00
105042004 8b55122225 fix IV curve/instruction 2019-08-22 11:18:29 +08:00
alan 776fe53178 Elite 1.4-re periodic event flag 2019-08-21 10:24:19 +08:00
alan 003b115067 Elite 1.4-re ADC w/r delay time 2019-08-21 09:57:56 +08:00
alan bcf682e116 Elite 1.4-re clock callback 2019-08-21 09:50:34 +08:00
alan ad4fab1aa6 Elite 1.4-re clock callback 2019-08-21 00:18:25 +08:00
alan 80d89e7b87 Elite 1.4-re IT fix display output V 2019-08-20 23:55:19 +08:00
alan 46bbbc8ac7 Elite 1.4-re IT fix display output V 2019-08-20 23:22:04 +08:00
alan cd43385573 Elite 1.4-re IT fix display output V 2019-08-20 23:14:15 +08:00
YiChin 63b4c19d67 ADC Gain level instructino 2019-08-20 22:50:53 +08:00
YiChin 837055cc29 ADC Gain level instructino 2019-08-20 22:05:04 +08:00
alan 053718f7f2 Elite 1.4-re IT over/under flow check 2019-08-20 21:49:34 +08:00
Benny Liu 9d18f7c67f manual shift 2019-08-20 21:34:48 +08:00
YiChin f32ac10e94 ADC Gain level instructino 2019-08-20 21:22:09 +08:00
alan aaa3f62f62 Elite 1.4-re try to fix IV plot 2019-08-20 21:01:07 +08:00
alan c68f34a48a Elite 1.4-re try to fix IV plot 2019-08-20 20:37:14 +08:00
alan c39075eff8 Elite 1.4-re try to fix IV plot 2019-08-20 20:03:18 +08:00
YiChin 53c28fed5d Elite 1.4-re try to DAC 2019-08-20 19:24:08 +08:00
YiChin 112e177928 Elite 1.4-re try to DAC 2019-08-20 19:14:15 +08:00
105042004 449201e3ea change steptime 2019-08-20 18:48:05 +08:00
105042004 c7c9e75c17 test steptime 2019-08-20 18:40:00 +08:00
105042004 2bdbe91c7e test steptime 2019-08-20 18:27:55 +08:00
YiChin 58c3f8fd22 Elite 1.4-re try to DAC 2019-08-20 17:11:03 +08:00
YiChin ad7063eea2 Elite 1.4-re try to DAC 2019-08-20 16:35:10 +08:00
YiChin 34b3524533 Elite 1.4-re try to DAC 2019-08-20 16:33:53 +08:00
YiChin f63d991df4 Elite 1.4-re try to fix IV zero Notify problem 2019-08-20 15:24:30 +08:00
YiChin 10a640bac6 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo 2019-08-20 15:15:14 +08:00
YiChin e4bd49e6ae Elite 1.4-re try to fix IV zero Notify problem 2019-08-20 15:13:58 +08:00
Benny Liu c14d4a9f6b don't care 2019-08-20 15:13:29 +08:00
YiChin 596897ccd7 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h
2019-08-20 14:39:58 +08:00
YiChin b304f03a7a Elite 1.4-re try to fix IV zero Notify problem 2019-08-20 14:39:13 +08:00
105042004 2c9f467939 push 2019-08-20 14:37:37 +08:00
105042004 31f6c9d43c fix DAC correction 2019-08-20 14:36:50 +08:00
Benny Liu 91e5f2f43f error fix 2019-08-20 14:35:37 +08:00
Benny Liu f4f5c18a95 Merge branch 'Elite_14re_demo' of https://gitlab.com/s880782002/bioprocc2650 into Elite_14re_demo 2019-08-20 14:33:00 +08:00
alan 08b1bd4ce6 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDAC.h
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h
2019-08-20 14:32:28 +08:00
Benny Liu 61934cee51 Merge branch 'Elite_14re_demo' of https://gitlab.com/s880782002/bioprocc2650 into Elite_14re_demo 2019-08-20 14:32:18 +08:00
Benny Liu ae560e8923 Gain Boundary for CHAO-I 2019-08-20 14:31:29 +08:00
alan d0f1cb5db0 Elite 1.4-re try to fix IV plot 2019-08-20 14:31:02 +08:00
YiChin 18b1279fe6 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo 2019-08-20 14:06:38 +08:00
YiChin dd541ef1d0 Elite 1.4-re try to fix IV zero Notify problem 2019-08-20 14:05:55 +08:00
Benny Liu d3c3135775 add calibration data for CHAO-I. 2019-08-20 14:04:07 +08:00
alan 317305dbcd Elite 1.4-re try to fix IV plot 2019-08-20 13:48:18 +08:00
105042004 d889aee9df gix bug 2019-08-20 13:32:38 +08:00
105042004 0d2ef231d7 fix CV curve function 2019-08-20 11:16:37 +08:00
105042004 52036a6c4b merge 2019-08-20 11:04:33 +08:00
105042004 fc44b2be44 add Notify_IV( ) 2019-08-20 11:03:27 +08:00
alan 48fcbe8de8 Elite 1.4-re move ADC overflow to correction.h 2019-08-20 10:48:55 +08:00
alan 8a2bb2a8a4 Elite 1.4-re fix reset (but failed) 2019-08-20 10:32:44 +08:00
YiChin 37480a0c6e Elite 1.4-re add correction comment of #0 board 2019-08-20 10:26:45 +08:00
YiChin 332b49de31 Elite 1.4-re LED 2019-08-19 19:14:16 +08:00
YiChin 3fa9abecd9 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h
2019-08-19 18:03:56 +08:00
YiChin 25c964ee37 Elite 1.4-re LED 2019-08-19 18:02:39 +08:00
105042004 5b471539e9 push 2019-08-19 18:01:43 +08:00
105042004 1739a4ebd2 Merge branch 'Elite_14re_demo' of https://gitlab.com/s880782002/bioprocc2650 into Elite_14re_demo 2019-08-19 17:43:49 +08:00
105042004 dfde53e893 adjust clock 2019-08-19 17:43:35 +08:00
YiChin a9066d91fc Elite 1.4-re LED 2019-08-19 17:43:16 +08:00
105042004 e3aff9e394 Merge branch 'Elite_14re_demo' of https://gitlab.com/s880782002/bioprocc2650 into Elite_14re_demo 2019-08-19 16:37:44 +08:00
105042004 68ea183e52 test samperate 2019-08-19 16:37:20 +08:00
alan 78bafd54f3 Elite 1.4-re ADC auto switch 2019-08-19 16:07:20 +08:00
YiChin 429ccd3254 Elite 1.4-re LED 2019-08-19 15:53:10 +08:00
YiChin 4d181df5b8 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo 2019-08-19 15:32:53 +08:00
YiChin e8d8b7730e Elite 1.4-re LED 2019-08-19 15:32:40 +08:00
105042004 04e649ce0b merge 2019-08-19 15:31:02 +08:00
105042004 b54d1c3b2b Elite 1.4 adjust steptime 2019-08-19 15:28:41 +08:00
105042004 ec58058e00 Elite 1.4 adjust sampling rate 2019-08-19 15:24:58 +08:00
alan a8bc5a22d5 Elite 1.4-re push 2019-08-19 15:00:24 +08:00
alan ddf5a59ee9 Elite 1.4-re push 2019-08-19 14:59:56 +08:00
alan 19ed1b1444 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo 2019-08-19 14:56:44 +08:00
alan 0c08992214 Elite 1.4-re push 2019-08-19 14:56:27 +08:00
105042004 c48f570877 Elite 1.4 adjust samplerate_counter 2019-08-19 14:56:14 +08:00
105042004 95dc465f45 fix samplerate 2019-08-19 14:44:30 +08:00
105042004 65b49cdd11 fix EliteADCControl 2019-08-19 14:40:47 +08:00
105042004 a18cabfa33 fix EliteADCControl 2019-08-19 14:40:17 +08:00
105042004 9d86f9f1f9 fix 2019-08-19 14:34:15 +08:00
105042004 adca6987b4 Elite 1.4 move IT_plot() 2019-08-19 14:25:40 +08:00
105042004 cf5d09d0d1 fix bug 2019-08-19 14:07:55 +08:00
105042004 b4075c14fd Elite 1.4 fix sample rate 2019-08-19 14:00:31 +08:00
105042004 06717ad552 merge 2019-08-19 12:51:32 +08:00
105042004 e4b4b3e0e5 Elite1.4 Seperate DAC and ADC / add Sampling rate 2019-08-19 12:48:22 +08:00
alan e51a0adf12 Elite 1.4-re error fix 2019-08-19 12:29:00 +08:00
YiChin 3bdba2ad71 Elite 1.4-re error fix 2019-08-19 11:48:09 +08:00
alan 89e7935cd6 Elite 1.4-re error fix 2019-08-19 11:30:34 +08:00
YiChin 935e3fea4d Elite 1.4-re error fix 2019-08-19 11:24:09 +08:00
YiChin e1f4c20fd7 Elite 1.4-re error fix 2019-08-19 11:11:18 +08:00
alan 226c822fcf Elite 1.4-re clock 0.05s ->0.01s | samplerate 2019-08-19 11:09:42 +08:00
alan 7905d25c2f Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteADC.h
2019-08-19 10:57:23 +08:00
alan 941d508859 Elite 1.4-re clock 0.05s ->0.01s | samplerate 2019-08-19 10:56:23 +08:00
alan 2230a78ad1 Elite 1.4-re clock 0.05s ->0.01s | samplerate 2019-08-19 10:50:40 +08:00
Benny Liu 95ec664c9c Merge branch 'Elite_14re_demo' of https://gitlab.com/s880782002/bioprocc2650 into Elite_14re_demo 2019-08-19 10:46:55 +08:00
Benny Liu ef894ae441 calibration coefficient value 2019-08-19 10:46:34 +08:00
YiChin f887abbf66 Elite 1.4-re new world 2019-08-19 10:30:03 +08:00
alan d51b9839c2 Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 19:09:11 +08:00
alan fb08b5638d Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 19:03:54 +08:00
alan c09ec1b3e1 Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 18:47:50 +08:00
alan b77104baa8 Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 18:34:37 +08:00
alan 60beceb0a4 Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 18:12:43 +08:00
alan 36810bbf53 Merge remote-tracking branch 'origin/Elite_14re_demo' into Elite_14re_demo 2019-08-16 18:07:14 +08:00
alan 5f62559811 Elite 1.4-re clock 0.05s ->0.01s 2019-08-16 18:07:01 +08:00
Benny Liu bb521437db auto shift bug fix 2019-08-16 17:56:14 +08:00
Benny Liu c31bbef8f5 auto shift 2019-08-16 17:47:16 +08:00
Benny Liu ca5203848d DAC output voltage correction 2019-08-16 17:01:59 +08:00
19 changed files with 1181 additions and 980 deletions
@@ -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>
@@ -18,8 +18,8 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.rtsc.XDCtools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137" name="FlashROM" parent="com.ti.ccstudio.buildDefinitions.TMS470.Default" postbuildStep="${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out" prebuildStep="">
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137." name="/" resourcePath="">
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1908313898" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.386599542">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.836926385" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1369151231" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.223507680">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732777020" 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"/>
@@ -34,17 +34,17 @@
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.122716742" 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.1735152675" 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.1517137938" 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.1013466299" 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.396590895" 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.262043189" 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.254163999" 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.381645511" 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.1216668029" 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.1214157007" 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.468937421" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.579299287" 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.2112816025" 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.1418617668" 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.1368914557" 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.872349905" 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.1023813954" 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.1674413144" 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.184317276" 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.1068578615" 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.1943600764" 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.644525479" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
<listOptionValue builtIn="false" value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
<listOptionValue builtIn="false" value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
@@ -70,7 +70,7 @@
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1137328477" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1330623088" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
@@ -86,71 +86,71 @@
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1789637681" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.2082096800" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.1554315956" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1848633962" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1308360247" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.504235202" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.105967788" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.698913237" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
<listOptionValue builtIn="false" value="48"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.480730772" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1399241416" 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.178571272" 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.338764900" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.1956079968" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.2028584467" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.867926379" 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.980626282" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.374992114" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1890491357" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.2035192044" 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.1517879760" 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.1697794062" 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.201373433" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.263445006" 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.1235873701" 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.207268648" 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.1068957263" 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.386599542" 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.1224573433" 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.948723823" 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.1985734106" 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.1743500897" 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.541343209" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.223507680" 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.698430423" 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.402182782" 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.1628689699" 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.2141951901" 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.679112687" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value="libc.a"/>
<listOptionValue builtIn="false" value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
<listOptionValue builtIn="false" value="${ROM}/common_rom_releases/03282014/common_rom.symbols"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1291624254" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.650613345" 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.1592780619" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.782343525" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
<listOptionValue builtIn="false" value="10247-D"/>
<listOptionValue builtIn="false" value="16002-D"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1218213371" 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.776879740" 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.131905523" 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.COMPRESS_DWARF.1323842668" 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.1293587957" 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.1830409084" 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.269002188" 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.2047351004" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1555270082" 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.16105060" 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.1713299511" 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.COMPRESS_DWARF.68776981" 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.1860389255" 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.152379533" 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.158095632" 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.978853236" 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.1441212378" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.870893049" 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.1008247221" 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.1456819213" 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 id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.2015106526" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1270425102" 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.16813235" 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.318851558" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
</tool>
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1587885823" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1887629154" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.927640565" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1908494509" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
<listOptionValue builtIn="false" value="${COM_TI_RTSC_TIRTOSCC13XX_CC26XX_REPOS}"/>
<listOptionValue builtIn="false" value="${TARGET_CONTENT_BASE}"/>
</option>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.380082739" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1123991861" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.781131062" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.2139588547" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1692895039" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.1555119371" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value="&quot;${COMPILER_FLAGS}&quot;" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1746187707" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.884959194" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.943624305" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1521167272" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1901654533" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.138005453" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value="&quot;${COMPILER_FLAGS}&quot;" valueType="string"/>
</tool>
</toolChain>
</folderInfo>
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe_0" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe_0" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="2" id="The Converter Usage">
<choice Name="Generate 1149.7 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="The Converter 1149.7 Frequency">
<choice Name="Overclock with user specified value" value="unused">
<property Type="choicelist" Value="5" id="-- Choose a value from 1.0MHz to 50.0MHz"/>
</choice>
</property>
<property Type="choicelist" Value="5" id="The Target Scan Format"/>
<configuration XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe_0" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe_0" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="1" id="Power Selection">
<choice Name="Probe supplied power" value="1">
<property Type="stringfield" Value="3.3" id="Voltage Level"/>
</choice>
</property>
<property Type="choicelist" Value="0" id="JTAG Signal Isolation"/>
<property Type="choicelist" Value="4" id="SWD Mode Settings">
<choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="XDS110 Aux Port"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
@@ -16,7 +16,7 @@
# sources were generated) is:
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\src
#
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
GEN_SRC_DIR ?= ../../config/src
ifeq (,$(wildcard $(GEN_SRC_DIR)))
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
@@ -1,12 +1,12 @@
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
XOPTS = -I"C:/ti/xdctools_3_32_02_25_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
vpath %.c C:/ti/xdctools_3_32_02_25_core/packages/
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
XDC_ROOT = C:/ti/xdctools_3_32_02_25_core/packages/
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
@@ -16,14 +16,14 @@ BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/pa
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armar rq
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armar rq
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
define RM
$(if $(wildcard $1),$(DEL) $1,:)
@@ -121,67 +121,4 @@ static void ADCChannelSelect(uint8_t ADCChannel){
}
}
// this function turn ADC measure value (0xXXXX) into real voltage
// unit should be mV
static int32_t DecodeADCVolt(uint16_t ADC_measure){
int32_t ADCRealVolt = 0;
int32_t coeff = (-629), offset = 15447740;
ADCRealVolt = (coeff * ADC_measure + offset);
ADCRealVolt = ADCRealVolt / 1000;
return ADCRealVolt;
}
// this function turn ADC measure value (0xXXXX) into real current
// unit should be pA
static int32_t DecodeADCCurrent(uint8_t ADCGain, uint16_t ADC_measure){
int32_t ADCRealCurrent = 0;
int32_t coeff[3] = {0}, offset[3] = {0};
coeff[0] = 3056;
coeff[1] = 65461;
coeff[2] = 3369;
offset[0] = -74771591;
offset[1] = -1601786957;
offset[2] = -82598293;
ADCRealCurrent = (coeff[ADCGain] * ADC_measure + offset[ADCGain]);
return ADCRealCurrent;
}
// Decode ADC measure value (could be a volt or current) and put it into notify buffer
static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_raw){
uint16_t ADC_measure = (uint16_t) (ADC_raw[0] << 8) | (uint16_t) (ADC_raw[1]);
int32_t ret = 0, ADCRealCurrent = 0, ADCRealVolt = 0;
// return real volt to controller
if(ADCChannel == ADC_CH_VOLT){
ADCRealVolt = DecodeADCVolt(ADC_measure);
NotifyVolt[0] = (uint8_t) (ADCRealVolt >> 24);
NotifyVolt[1] = (uint8_t) ((ADCRealVolt & 0x00FF0000) >> 16);
NotifyVolt[2] = (uint8_t) ((ADCRealVolt & 0x0000FF00) >> 8);
NotifyVolt[3] = (uint8_t) (ADCRealVolt & 0x000000FF);
ret = ADCRealVolt;
}
// return real current to controller
else if(ADCChannel == ADC_CH_CURRENT){
ADCRealCurrent = DecodeADCCurrent(ADCGain, ADC_measure);
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent >> 24);
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF);
ret = ADCRealCurrent;
}
else{
// not support AIN2 / AIN3 yet
}
return ret;
}
#endif
@@ -3,6 +3,10 @@
#define EliteDAC
static bool DACreset = true;
/* DAC reset parameter */
#define DACzero 0x85B2
#define DACposMax 0x0000
#define DACnegMax 0xFFFF
#ifdef ELITE_VERSION_1_3
#define DACOUT 0x30
@@ -55,23 +59,4 @@ static void DAC_outputV(uint16_t voltLV) {
#endif
// User will enter -5V~+5V in UI.
// websever and controler use 0~50000 represent -5~+5V
// this function should turn 0~50000 into DACcode which output the exactly voltage user want
static uint16_t DACCorrectionDecode(uint16_t usercode)
{
// DACcode to real_voltage correction function
int32_t usercode_32;
uint16_t DACcode = 0;
int16_t coeff = (-1054), offset = 60597718;
usercode_32 = (int32_t)(usercode);
DACcode = (uint16_t) (coeff * usercode_32 + offset)/1000;
return DACcode;
}
#endif
@@ -2,10 +2,291 @@
#ifndef EliteCorrection
#define EliteCorrection
#include "EliteDAC.h"
#include "EliteADC.h"
/* DAC reset parameter */
#define DACzero 0x7FFF
#define DACzero 0x85A2
#define DACposMax 0x0000
#define DACnegMax 0xFFFF
typedef struct _formula{
int32_t coeff = 0;
int32_t offset = 0;
}Formula;
typedef struct _correction{
Formula ADC_volt = 0;
Formula ADC_current[3] = 0;
uint32_t Gain0Boundary[2] = {0, 0};
uint32_t Gain1BoundARY[2] = {0, 0};
}Correction_data;
/*
* Correction Array include all the correction coeff and offset
*
* Correction formula format is " RealValue = coeff * code + offset "
* RealValue can be RealCurrent, RealVolt, or RealResister ...
* code is the code we read from ADC buffer
*
* ADC measure Voltage
* Correction[0] = ADC Volt coeff
* Correction[1] = ADC Volt offset => RealVolt = Correction[0] * code + Correction[1]
*
* ADC measure Current
* Correctino[2] = ADC gain_lv0 coeff
* Correction[3] = ADC gain_lv0 offset => RealCurrent = Correction[2] * code + Correction[3]
* Correctino[4] = ADC gain_lv1 coeff
* Correction[5] = ADC gain_lv1 offset => RealCurrent = Correction[4] * code + Correction[5]
* Correctino[6] = ADC gain_lv2 coeff
* Correction[7] = ADC gain_lv2 offset => RealCurrent = Correction[6] * code + Correction[7]
*
* DAC output Voltage
* Correction[8] = DAC coeff
* Correction[9] = DAC offset => RealVolt = Correction[8] * DACcode + Correction[9]
*
*/
#define BORAD_Chao_I
#ifdef BORAD_CLASS_LEADER
static Correction_data Correction;
Correction.ADC_volt.coeff = (-629);
Correction.ADC_volt.offset = 15447740;
Correction.ADC_current_200k.coeff = 3056;
Correction.ADC_current_200k.offset = -74771591;
Correction.ADC_current_10K.coeff = 65461;
Correction.ADC_current_10K.offset = -1601786957;
Correction.ADC_current_200R.coeff = 3369;
Correction.ADC_current_200R.offset = -82598293;
Correction.Gain0Boundary[0] = 0x5F75;
Correction.Gain0Boundary[1] = 0x5FB2;
Correction.Gain1Boundary[0] = 0x5999;
Correction.Gain1Boundary[1] = 0x6589;
#endif
#ifdef BORAD_TRICERATOPS
static Correction_data Correction;
Correction.ADC_volt.coeff = (-626);
Correction.ADC_volt.offset = 15065046;
Correction.ADC_current_200k.coeff = 0;
Correction.ADC_current_200k.offset = 0;
Correction.ADC_current_10K.coeff = 0;
Correction.ADC_current_10K.offset = 0;
Correction.ADC_current_200R.coeff = 0;
Correction.ADC_current_200R.offset = 0;
Correction.Gain0Boundary[0] = 0;
Correction.Gain0Boundary[1] = 0;
Correction.Gain1Boundary[0] = 0;
Correction.Gain1Boundary[1] = 0;
#endif
#ifdef BORAD_Chao_I
static Correction_data Correction;
Correction.ADC_volt.coeff = (-627);
Correction.ADC_volt.offset = 15122868;
Correction.ADC_current_200k.coeff = 3091;
Correction.ADC_current_200k.offset = (-74147760);
Correction.ADC_current_10K.coeff = 66127;
Correction.ADC_current_10K.offset = (-1586449560);
Correction.ADC_current_200R.coeff = 3118;
Correction.ADC_current_200R.offset = (74817847);
Correction.Gain0Boundary[0] = 0x5D96;
Correction.Gain0Boundary[1] = 0x5DD9;
Correction.Gain1Boundary[0] = 0x57CD;
Correction.Gain1Boundary[1] = 0x639F;
#endif
#ifdef BOARD_TWENTY_ONE
static Correction_data Correction;
Correction.ADC_volt.coeff = (-625);
Correction.ADC_volt.offset = 15221058;
Correction.ADC_current[0].coeff = 3002;
Correction.ADC_current[0].offset = -72955265;
Correction.ADC_current[1].coeff = 65840;
Correction.ADC_current[1].offset = -1600149874;
Correction.ADC_current[2].coeff = 3090;
Correction.ADC_current[2].offset = -75102578;
Correction.Gain0Boundary[0] = 0x5ECD;
Correction.Gain0Boundary[1] = 0x5F0D;
Correction.Gain1Boundary[0] = 0x5900;
Correction.Gain1Boundary[1] = 0x64DD;
#endif
// this function turn ADC measure value (0xXXXX) into real voltage
// unit should be mV
static int32_t DecodeADCVolt(uint16_t ADC_measure){
int32_t ADCRealVolt = 0;
ADCRealVolt = (Correction.ADC_volt.coeff * ADC_measure + Correction.ADC_volt.offset);
ADCRealVolt = ADCRealVolt / 1000;
return ADCRealVolt;
}
// this function turn ADC measure value (0xXXXX) into real current
// unit should be pA
/* Decode ADC current for twenty-one */
static int32_t DecodeADCCurrent(uint8_t ADCGain, uint16_t ADC_measure){
int32_t ADCRealCurrent = 0;
int32_t coeff[3] = {0}, offset[3] = {0};
ADCRealCurrent = (Correction.ADC_current[ADCGain].coeff * ADC_measure + Correction.ADC_current[ADCGain].offset)/1000;
return ADCRealCurrent;
}
// Decode ADC measure value (could be a volt or current) and put it into notify buffer
static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_raw){
uint16_t ADC_measure = (uint16_t) (ADC_raw[0] << 8) | (uint16_t) (ADC_raw[1]);
int32_t ADCRealVolt = 0, ret = 0;
// return real volt to controller
if(ADCChannel == ADC_CH_VOLT){
ADCRealVolt = DecodeADCVolt(ADC_measure);
NotifyVolt[0] = (uint8_t) (ADCRealVolt >> 24);
NotifyVolt[1] = (uint8_t) ((ADCRealVolt & 0x00FF0000) >> 16);
NotifyVolt[2] = (uint8_t) ((ADCRealVolt & 0x0000FF00) >> 8);
NotifyVolt[3] = (uint8_t) (ADCRealVolt & 0x000000FF);
ret = ADCRealVolt;
}
// return real current to controller
else if(ADCChannel == ADC_CH_CURRENT){
if (INSTRUCTION.eliteFxn == IVCurve) {
ADCRealCurrent += DecodeADCCurrent(ADCGain, ADC_measure);
if ((SampleRate_counter % 10) == 0) {
ADCRealCurrent = ADCRealCurrent / 10;
if (avg_number > 2) { // to discard the first 20 current sample data
ADCRealCurrent_avg = (ADCRealCurrent + ADCRealCurrent_avg*(avg_number - 3)) / (avg_number - 2);
}
avg_number ++;
ADCRealCurrent = 0;
}
if (StepTimeCounter == StepTime - 1) {
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent_avg >> 24);
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent_avg & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent_avg & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent_avg & 0x000000FF);
avg_number = 1;
ADCRealCurrent_avg = 0;
}
}
else {
ADCRealCurrent = DecodeADCCurrent(ADCGain, ADC_measure);
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent >> 24);
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF);
ret = ADCRealCurrent;
}
}
else{
// not support AIN2 / AIN3 yet
}
return ret;
}
// #0 board, (0x5f75 <= rawdata) && (rawdata <= 0x5fb2)
// ((0x5f97 < rawdata) && (rawdata < 0x6589)) || ((0x5999 < rawdata) && (rawdata < 0x5f93))
static void ADC_overflow(uint8_t gain, uint8_t *rawdata){
// Gain boundary defines different ADC gain level working area
// Gain0Boundary = {lowerbound, upperbound}, is the lower and upper bound of gain level 0 working area.
uint16_t U16Rawdata = 0;
U16Rawdata = (((uint16_t) (rawdata[0]))<<8) | ((uint16_t) (rawdata[1]));
if(gain == GAIN_200K){
if( U16Rawdata <= Correction.Gain0Boundary[0]){
rawdata[0] = Correction.Gain0Boundary[0] >> 4;
rawdata[1] = (uint8_t) (Correction.Gain0Boundary[0] & 0x00FF);
}
else if(U16Rawdata >= Correction.Gain0Boundary[1]){
rawdata[0] = (uint8_t) (Correction.Gain0Boundary[1] >> 4);
rawdata[1] = (uint8_t) (Correction.Gain0Boundary[1] & 0x00FF);
}
}
else if(gain == GAIN_10K){
if( U16Rawdata <= Correction.Gain1Boundary[0]){
rawdata[0] = Correction.Gain1Boundary[0] >> 4;
rawdata[1] = (uint8_t) (Correction.Gain1Boundary[0] & 0x00FF);
}
else if(U16Rawdata >= Correction.Gain1Boundary[1]){
rawdata[0] = (uint8_t) (Correction.Gain1Boundary[1] >> 4);
rawdata[1] = (uint8_t) (Correction.Gain1Boundary[1] & 0x00FF);
}
}
}
// User will enter -5V~+5V in UI.
// websever and controler use 0~50000 represent -5~+5V
// this function should turn 0~50000 into DACcode which output the exactly voltage user want
static uint16_t Usercode_Correction_to_DAC(uint16_t usercode)
{
// DACcode to real_voltage correction function
//DACcode = -1.0548523(usercode) + 60597.718
int32_t usercode_32;
uint16_t DACcode = 0;
int32_t coeff = (-1054), offset = 60597718;
usercode_32 = (int32_t)(usercode);
DACcode = (uint16_t) ((coeff * usercode_32 + offset)/1000);
return DACcode;
}
static int32_t DAC_to_realV(uint16_t DACcode)
{
//volt = (DAC -6.4893275)/(-0.0001896)
int32_t RealV = 0;
int32_t volt_32 = 0;
int32_t coeff = (-1896), offset = 64893275;//*10e7
volt_32 = DACcode;
// RealV = (volt_32 - offset) / coeff;
RealV = (-1896) * volt_32 + offset;
RealV = RealV / 10e3; //(mV)
return RealV;
}
#endif
@@ -2,6 +2,8 @@
#ifndef ELITENOTIFY
#define ELITENOTIFY
#include "headstage.h"
/**
* notify data buffer.
* the length equals to the characteristic 4 which value is 20 bytes.
@@ -48,8 +48,6 @@ const PIN_Config BLE_IO[] = {
Turnon100R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
Turnon10K | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
switch_on | PIN_INPUT_EN | PIN_PULLDOWN,
Turnon100R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
Turnon10K | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
PIN_TERMINATE
};
@@ -16,18 +16,6 @@
#define HEADSTAGE_H_H
#define IMPEDANCE_METER_H_
// product information
#define DEVICE_NAME "Elite-ZM-v1.2-30"
#define MAJOR_PRODUCT_NUMBER 0
#define MINOR_PRODUCT_NUMBER 2
#define MAJOR_VERSION_NUMBER 1
#define MINOR_VERSION_NUMBER 2
// ADC, DAC reset
#define ADC_reset 0x058B
#define DAC_reset 0xAF
// header
#include <ti/drivers/PIN.h>
#include "board.h"
@@ -120,13 +108,13 @@ static void VoltScan(){
}
}*/
static void VoltScan(){
static uint16_t VoltScan(){
uint16_t Voltage;
if(VoltOrigin == VoltFinal){
uint8_t ramp0 = (uint8_t) (VoltOrigin & 0x00FF); //get right byte
uint8_t ramp1 = (uint8_t) ((VoltOrigin>>8) & 0x00FF); // get left byte
//DAC_outputV(DACOUT, VoltOrigin); //delete 'command' parameter
DAC_outputV(VoltOrigin);
Voltage = VoltOrigin;
// record the output voltage
/*
@@ -142,21 +130,36 @@ static void VoltScan(){
*/
PeriodicEvent = false;
}
else if (INSTRUCTION.eliteFxn == squarewavevoltammetry) {
SWVCurve();
else if (INSTRUCTION.eliteFxn == SquareWaveVoltammetry) {
Voltage = SWVCurve();
}
else if (INSTRUCTION.eliteFxn == differentialpulsevoltammetry) {
DPVCurve();
else if (INSTRUCTION.eliteFxn == DifferentialPulseVoltammetry) {
Voltage = DPVCurve();
}
else if (INSTRUCTION.eliteFxn == cyclicVoltammetry){
CVCurve();
else if (INSTRUCTION.eliteFxn == CyclicVoltammetry){
Voltage = CVCurve();
}
// IV plot mode
else if(VoltOrigin < VoltFinal){
IVCurve_T();
Voltage = IVCurve_T();
}
else{
IVCurve_T2();
Voltage = IVCurve_T2();
}
return Voltage;
}
static void Notify_IV(uint16_t Voltage)
{
int32_t RealV;
int32_t RealC;
RealV = DAC_to_realV(Voltage);
NotifyVolt[0] = (uint8_t) (RealV >> 24);
NotifyVolt[1] = (uint8_t) ((RealV & 0x00FF0000) >> 16);
NotifyVolt[2] = (uint8_t) ((RealV & 0x0000FF00) >> 8);
NotifyVolt[3] = (uint8_t) (RealV & 0x000000FF);
}
static void fxn_Gen() {}
@@ -174,69 +177,31 @@ static void VT_Plot() {
// read ADC volt
ADCChannelSelect(ADC_CH_VOLT);
CPUdelay(16000);
CPUdelay(10);
ADC_read(spi_ADC_rxbuf);
// decode ADC value and put it into notify buffer
DecodeADCValue(ADCGain, ADC_CH_VOLT, spi_ADC_rxbuf);
}
static void IT_Plot() {
static int32_t IT_Plot() {
// ADC gain is don't care when measuring voltage
uint8_t ADCGain = 1;
ADC_read(spi_ADC_rxbuf);
uint16_t rawdata = ((spi_ADC_rxbuf[0] & 0xff00 ) | (spi_ADC_rxbuf[1] & 0x00ff));
// shift ADC gain level
if( (0x5f75 <= rawdata) && (rawdata <= 0x5fb2) ){
ADCGain = 0;
}
else if(((0x5fb2 < rawdata) && (rawdata < 0x60d6)) || ((0x5e56 < rawdata) && (rawdata < 0x5f75))) {
ADCGain = 1;
}
else {
ADCGain = 2;
}
// read ADC volt
ADCGainControl(ADCGain);
int32_t Real_Current = 0;
ADCGainControl(ADCGainLevel);
ADCChannelSelect(ADC_CH_CURRENT);
CPUdelay(16000);
CPUdelay(10);
ADC_read(spi_ADC_rxbuf);
// check if ADC over/under flow
// let the output saturate if over/under flow
ADC_overflow(ADCGainLevel, spi_ADC_rxbuf);
// decode ADC value and put it into notify buffer
DecodeADCValue(ADCGain, ADC_CH_CURRENT, spi_ADC_rxbuf);
}
Real_Current = DecodeADCValue(ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
static void ramp_test(){
// DAC instruction
// 0b0011 = Command (Write to and Update (Power-Up) DAC Register)
// 0bXXXX = don't care
// data (16 bits) = last 4bits / 6 bits / 8 bits are don't care
/*spi_DACtxbuf[0] = 0x3011;
spi_DACtxbuf[1] = 0x1100;
for (int i = 2; i < SPI_DAC_SIZE; i++) {
spi_DACtxbuf[i] = 0;
}
PIN_setOutputValue(pin_handle, DAC_CS, 0); // DAC_CS LOW
ZM_spi_transaction(SPI_DAC_SIZE, spi_DACtxbuf, spi_rxbuf);
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
*/
uint8_t ramp0 = 0;
uint8_t ramp1 = 0;
for(ramp0 = 0x00 ; ; ramp0 = ramp0 + 0x10){
if(ramp0 >= 0xF0){
ramp1 ++;
ramp0 = 0x00;
}
//DAC_outputV(DACOUT, 0x0000); //delete 'command' parameter
DAC_outputV(0x0000);
CPUdelay(16000000);
}
return Real_Current;
}
@@ -262,104 +227,7 @@ static void SimpleBLEPeripheral_clockHandler(UArg arg) {
Semaphore_post(semaphore); // send samaphore to jump out of infinite waiting(simple_peripheral.c line570)
}
static void SimpleBLEPeripheral_performPeriodicTask() {
switch (INSTRUCTION.eliteFxn) {
case IVCurve: { //IV curve
// output a certain voltage
VoltScan();
// read the current
IT_Plot();
SendNotify();
break;
}
case cyclicVoltammetry:{ //CV curve
uint16_t temp = 0;
// output a certain voltage
VoltScan();
// read the current
IT_Plot();
// send notify
SendNotify();
break;
}
case differentialpulsevoltammetry: {
// output a certain voltage
VoltScan();
// read the current
IT_Plot();
SendNotify();
break;
}
case squarewavevoltammetry: {
// output a certain voltage
VoltScan();
// read the current
IT_Plot();
SendNotify();
break;
}
case fxnGen: {
break;
}
case ZTCurve: {
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
break;
}
case VTCurve: {
// read volt through ADC and put it into notify buffer
VT_Plot();
// output notify
SendNotify();
break;
}
case ITCurve: {
IT_Plot();
SendNotify();
break;
}
case VIS_RST: {
break;
}
case RAMP_GENERATE: {
static uint16_t voltLV = 0xFFFF;
//DAC_outputV(DACOUT, voltLV); //delete 'command' parameter
DAC_outputV(voltLV);
voltLV --;
if(voltLV <= 0x0001){
PeriodicEvent = false;
}
break;
}
case ADCTEST: {
// ADC_Test();
// SendNotify();
break;
}
default: {
LED_color(DARKLED, 0x0E, 0x0E, 0x0E);
break;
}
}
}
static void SWVCurve(){
static uint16_t SWVCurve(){
static uint8_t counter;
static uint16_t outputV;
static uint16_t Volt;
@@ -375,7 +243,7 @@ static void SWVCurve(){
counter = 1;
DACreset = false;
}
if( counter == 2*PulseWidth ) counter = 1;
else counter ++;
@@ -383,11 +251,11 @@ static void SWVCurve(){
// output a certain volt
outputV = Volt;
DAC_outputV(outputV);
// record the output voltage
int32_t Vout = 0;
int16_t decode = outputV;
int16_t decode = outputV;
VoltValue = decode * (-2.9780379) + 5920.324416;
Vout = (int32_t) (VoltValue / 1);
// VoltValue = (ramp1*16 + ramp0/16) * 3.05;
@@ -411,11 +279,12 @@ static void SWVCurve(){
else if( counter == 2*PulseWidth ) Volt = Volt + (Amplitude - Step);
else Volt = Volt;
}
return outputV;
}
static void DPVCurve(){
static uint16_t DPVCurve(){
static uint8_t counter;
static uint16_t Volt1;
static uint16_t Volt2;
@@ -425,7 +294,7 @@ static void DPVCurve(){
// reset origin volt at the begin
if (DACreset){
if ( VoltOrigin < VoltFinal ) direction_up = true;
else direction_up = false;
@@ -436,27 +305,23 @@ static void DPVCurve(){
counter = 1;
DACreset = false;
}
if(counter == PulsePeriod) counter = 1;
else counter ++;
// output a certain volt
if( counter <= (PulsePeriod - PulseWidth) ) {
LED_color(DARKLED, 0x3A, 0x17, 0xff); //blue
outputV = Volt1;
DAC_outputV(Volt1);
}
else {
LED_color(DARKLED, 0xF0, 0xE7, 0x26); //yellow
outputV = Volt2;
DAC_outputV(Volt2);
}
// record the output voltage
int32_t Vout = 0;
int16_t decode = outputV;
int16_t decode = outputV;
VoltValue = decode * (-2.9780379) + 5920.324416;
Vout = (int32_t) (VoltValue / 1);
// VoltValue = (ramp1*16 + ramp0/16) * 3.05;
@@ -483,69 +348,21 @@ static void DPVCurve(){
else Volt2 = Volt2 - Step;
}
if( counter+1 <= (PulsePeriod - PulseWidth) ) {
return Volt1;
}
else {
return Volt2;
}
}
/*
static void DPVCurve(){
static uint8_t counter;
static uint16_t Volt1;
static uint16_t Volt2;
static uint16_t outputV;
static bool direction_up;
float VoltValue;
// reset origin volt at the begin
if (DACreset){
Volt1 = VoltOrigin;
Volt2 = 0x0000;
DACreset = false;
}
if(counter == PulsePeriod) counter = 1;
else counter ++;
// output a certain volt
if( counter <= (PulsePeriod - PulseWidth)) outputV = Volt1;
else outputV = Volt2;
DAC_outputV(outputV);
// record the output voltage
int32_t Vout = 0;
int16_t decode = outputV;
VoltValue = decode * (-2.9780379) + 5920.324416;
Vout = (int32_t) (VoltValue / 1);
// VoltValue = (ramp1*16 + ramp0/16) * 3.05;
// check if we reach the final volt
if ( (( outputV >= VoltFinal) && direction_up ) || (( outputV <= VoltFinal) && !direction_up)) {
PeriodicEvent = false;
DACreset = true;
return;
}
if(Volt1 >= VoltFinal){
PeriodicEvent = false;
DACreset = true;
return;
}
//check overflow/underflow and prepare for next output
Volt1 = Volt1 + Amplitude;
}
*/
static void CVCurve(){
static uint16_t CVCurve(){
static uint8_t ramp0;
static uint8_t ramp1;
static uint16_t outputV;
static uint8_t counter;
static bool direction_up;
static bool current_direction_up;
float VoltValue;
@@ -564,7 +381,7 @@ static void CVCurve(){
ramp0 = (uint8_t) (VoltOrigin & 0x00FF); //right byte
ramp1 = (uint8_t) ((VoltOrigin>>8) & 0x00FF); //left byte
DACreset = false;
}
// output a certain volt
@@ -586,7 +403,7 @@ static void CVCurve(){
PeriodicEvent = false; //periodic event end
DACreset = true;
return;
}
}
INSTRUCTION.CycleNumber--;
}
}
@@ -600,12 +417,12 @@ static void CVCurve(){
PeriodicEvent = false; //periodic event end
DACreset = true;
return;
}
}
INSTRUCTION.CycleNumber--;
}
}
if(current_direction_up) {
@@ -617,14 +434,13 @@ static void CVCurve(){
else outputV = outputV - Step;
}
return outputV;
}
static void IVCurve_T(){
static uint16_t IVCurve_T(){
static uint8_t ramp0;
static uint8_t ramp1;
uint16_t ramp = 0;
float VoltValue;
// reset origin volt at the begin
if (DACreset){
@@ -635,7 +451,7 @@ static void IVCurve_T(){
// output a certain volt
//DAC_outputV(DACOUT, 0x0000); //delete 'command' parameter
ramp = (int16_t)(ramp1 << 8) | (uint16_t)(ramp0);
ramp = (uint16_t)(ramp1 << 8) | (uint16_t)(ramp0);
DAC_outputV(ramp);
// record the output voltage
@@ -673,9 +489,12 @@ static void IVCurve_T(){
}
}
ramp0 = ramp0 - Step;
ramp = (uint16_t)(ramp1 << 8) | (uint16_t)(ramp0);
return ramp;
}
static void IVCurve_T2(){
static uint16_t IVCurve_T2(){
static uint8_t ramp0;
static uint8_t ramp1;
uint16_t ramp = 0;
@@ -691,7 +510,7 @@ static void IVCurve_T2(){
// output a certain volt
//DAC_outputV(DACOUT, 0x0000); //delete 'command' parameter
ramp = (int16_t)(ramp1 << 8) | (uint16_t)(ramp0);
ramp = (uint16_t)(ramp1 << 8) | (uint16_t)(ramp0);
DAC_outputV(ramp);
// record the output voltage
@@ -729,6 +548,8 @@ static void IVCurve_T2(){
}
}
ramp0 = ramp0 - Step;
ramp = (uint16_t)(ramp1 << 8) | (uint16_t)(ramp0);
return ramp;
}
#define WORKLED() LED_color(0xE2, 0x00, 0x40, 0x40)
@@ -738,15 +559,15 @@ static void WorkModeLED(){
WORKLED();
break;
}
case cyclicVoltammetry:{
case CyclicVoltammetry:{
WORKLED();
break;
}
case differentialpulsevoltammetry:{
case DifferentialPulseVoltammetry:{
WORKLED();
break;
}
case squarewavevoltammetry:{
case SquareWaveVoltammetry:{
WORKLED();
break;
}
@@ -771,10 +592,6 @@ static void WorkModeLED(){
LEDPowerON();
break;
}
case RAMP_GENERATE:{
WORKLED();
break;
}
case ADCTEST:{
WORKLED();
break;
@@ -796,15 +613,15 @@ static void KeyWorkModeLED(){
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
break;
}
case cyclicVoltammetry:{
case CyclicVoltammetry:{
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
break;
}
case differentialpulsevoltammetry:{
case DifferentialPulseVoltammetry:{
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
break;
}
case squarewavevoltammetry:{
case SquareWaveVoltammetry:{
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
break;
}
@@ -846,44 +663,13 @@ static void KeyWorkModeLED(){
*/
}
static void CleanBuffer(){
PeriodicEvent = false;
VoltOrigin = DACzero;
VoltFinal = DACposMax;
Step = 10; // 10 = 0x0A ~= 3.05 mv ~= 3 mv
StepTime = 24; // 0x30 = 2'd48 ~= 2 second, 24 = 0x18
PeriodicCounter = 0;
for(int i=0 ; i<SPI_LED_SIZE ; i++){
spi_LEDtxbuf[i] = 0;
spi_LEDrxbuf[i] = 0;
}
for(int i=0 ; i<SPI_DAC_SIZE ; i++){
spi_DACtxbuf[i] = 0;
spi_rxbuf[i] = 0;
}
for(int i=0 ; i<SPI_ADC_SIZE ; i++){
spi_ADC_txbuf[i] = 0;
spi_ADC_rxbuf[i] = 0;
}
for(int i=0 ; i<BLE_DAT_BUFF_SIZE ; i++){
not_buf[i] = 0;
}
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
CPUdelay(8000);
}
static bool TurnOnElite(uint8_t key){
static uint8_t TurnOnCounter = 0;
if(key == 0){
// press 1 sec, power on LED
if(TurnOnCounter >= 15){
if(TurnOnCounter >= 75){
PIN_setOutputValue(pin_handle, enable_5v, 1); // enable 5V
TurnOn10V();
LEDPowerON();
@@ -908,20 +694,16 @@ static void EliteKeyPress(uint8_t key){
if(key == 0){
// key = 0 if press
// press key => bight LED
if(ShutDownCounter > 4 && ShutDownCounter <25){
if(ShutDownCounter > 30 && ShutDownCounter <=40){
KeyWorkModeLED();
}
// press 3~4 sec, shutdown 2650
if(ShutDownCounter >= 25){
else if(ShutDownCounter > 40){
LED_color(DARKLED, 0xFF, 0xFF, 0x00);
PIN_setOutputValue(pin_handle, enable_5v, 0); // disable 5V
}
else{
ShutDownCounter ++;
}
ShutDownCounter ++;
}
else{
if(OriginEliteFxn == INSTRUCTION.eliteFxn){ //old function == currunt instruction
@@ -948,7 +730,12 @@ static void reset(){
VoltFinal = DACposMax;
Step = 10; // 10 = 0x0A ~= 3.05 mv ~= 3 mv
StepTime = 24; // 0x30 = 2'd48 ~= 2 second, 24 = 0x18
PeriodicCounter = 0;
StepTimeCounter = 1;
SampleRate = 1;
SampleRate_counter = 1;
avg_number = 1;
ADCRealCurrent = 0;
ADCRealCurrent_avg = 0;
LEDPowerON();
for(int i=0 ; i<BLE_INS_BUFF_SIZE ; i++){
@@ -976,7 +763,7 @@ static void reset(){
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
CPUdelay(8000);
CPUdelay(1600);
}
static void Eliteinterrupt(){
@@ -985,7 +772,12 @@ static void Eliteinterrupt(){
VoltFinal = DACposMax;
Step = 10; // 10 = 0x0A ~= 3.05 mv ~= 3 mv
StepTime = 24; // 0x30 = 2'd48 ~= 2 second, 24 = 0x18
PeriodicCounter = 0;
StepTimeCounter = 1;
SampleRate = 1;
SampleRate_counter = 1;
avg_number = 1;
ADCRealCurrent = 0;
ADCRealCurrent_avg = 0;
LEDPowerON();
for(int i=0 ; i<BLE_INS_BUFF_SIZE ; i++){
@@ -1013,10 +805,43 @@ static void Eliteinterrupt(){
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
CPUdelay(8000);
// CPUdelay(8000);
}
static void CleanBuffer(){
PeriodicEvent = false;
VoltOrigin = DACzero;
VoltFinal = DACposMax;
Step = 0x9E; // 10 = 0x0A ~= 3.05 mv ~= 3 mv
StepTime = 0x02; // 0x30 = 2'd48 ~= 2 second, 24 = 0x18
StepTimeCounter = 1;
avg_number = 1;
ADCRealCurrent = 0;
ADCRealCurrent_avg = 0;
for(int i=0 ; i<SPI_LED_SIZE ; i++){
spi_LEDtxbuf[i] = 0;
spi_LEDrxbuf[i] = 0;
}
for(int i=0 ; i<SPI_DAC_SIZE ; i++){
spi_DACtxbuf[i] = 0;
spi_rxbuf[i] = 0;
}
for(int i=0 ; i<SPI_ADC_SIZE ; i++){
spi_ADC_txbuf[i] = 0;
spi_ADC_rxbuf[i] = 0;
}
for(int i=0 ; i<BLE_DAT_BUFF_SIZE ; i++){
not_buf[i] = 0;
}
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
// CPUdelay(8000);
}
static void TurnOn10V(){
If10Von = true;
@@ -1024,7 +849,80 @@ static void TurnOn10V(){
CPUdelay(8000);
}
static void SimpleBLEPeripheral_performPeriodicTask() {
if (INSTRUCTION.eliteFxn == fxnGen) {
return;
}
else if (INSTRUCTION.eliteFxn == ZTCurve) {
return;
}
else if (INSTRUCTION.eliteFxn == ADCTEST) {
// ADC_Test();
// SendNotify();
return;
}
else if (INSTRUCTION.eliteFxn == VIS_RST) {
return;
}
else {
if (StepTimeCounter == StepTime) StepTimeCounter = 1;
else StepTimeCounter ++;
if (SampleRate_counter == SampleRate) SampleRate_counter = 1;
else SampleRate_counter ++;
// In IV, CV, and func-gen mode, DAC will output voltage
// else DAC do nothing.
EliteDACControl();
// Control ADC to sample rate
EliteADCControl();
// Notify control, check if we need to send notify
EliteNotifyControl();
}
}
static void EliteDACControl(){
uint16_t OutputV;
if (INSTRUCTION.eliteFxn == ITCurve) { return; }
if (INSTRUCTION.eliteFxn == VTCurve) { return; }
if (StepTimeCounter == StepTime) {
OutputV = VoltScan(); // output a certain voltage
Notify_IV(OutputV);
}
}
static void EliteADCControl(){
if (SampleRate_counter == SampleRate) {
switch (INSTRUCTION.eliteFxn)
{
case VTCurve:
// read volt through ADC and put it into notify buffer
VT_Plot();
break;
default:
IT_Plot();
break;
}
}
}
static void EliteNotifyControl(){
if ((INSTRUCTION.eliteFxn == IVCurve) && (StepTimeCounter == StepTime - 1)) {
SendNotify();
}
else if (StepTimeCounter == StepTime) {
SendNotify();
}
}
/*
* Notify format
*
@@ -1034,11 +932,16 @@ static void TurnOn10V(){
-----------------------------------------------------------------
| header |
| current |
| voltage |
| impedance |
| voltage or impedance |
| mode & gain |
| time stamp |
| cycle number |
mode & gain
this byte include Elite working mode and ADC gain level
we use "(mode & 0xF0) | (gain & 0x0F)" to encode these two information
cycle number
for cyclic voltammetry use, we save it as channel number.
0xFF
@@ -1049,27 +952,69 @@ static void TurnOn10V(){
*
*
*/
static void SendNotify(){
not_buf[0] = INSTRUCTION.chip_id;
for(int i=0 ; i<4 ; i++){
not_buf[i+1] = NotifyCurrent[i];
not_buf[i+5] = NotifyVolt[i];
not_buf[i+9] = NotifyImpedance[i];
if(INSTRUCTION.eliteFxn == ZTCurve){
not_buf[i+5] = NotifyImpedance[i];
}
else{
not_buf[i+5] = NotifyVolt[i];
}
}
not_buf[9] = (INSTRUCTION.eliteFxn & 0xF0) | (ADCGainLevel & 0x0F);
// 1 Timestamp = 32 usec; 31 Timestamp ~= 1 msec
not_time_stamp = (Timestamp_get32())/31; // msec
not_buf[13] = not_time_stamp & 0xff;
not_buf[14] = (not_time_stamp >> 8) & 0xff;
not_buf[15] = (not_time_stamp >> 16) & 0xff;
not_buf[16] = (not_time_stamp >> 24) & 0xff;
not_buf[10] = not_time_stamp & 0xff;
not_buf[11] = (not_time_stamp >> 8) & 0xff;
not_buf[12] = (not_time_stamp >> 16) & 0xff;
not_buf[13] = (not_time_stamp >> 24) & 0xff;
// cyclic voltametry cycle number
not_buf[17] = INSTRUCTION.CycleNumber;
not_buf[14] = INSTRUCTION.CycleNumber;
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
}
// "va": "(VOLT_ORIGIN + 1) * 0x0010",
// "vb": "(VOLT_FINAL + 1) * 0x0010",
//
static uint16_t OldDAC2UserCode(uint16_t OldDAC){
uint16_t UserCode = 0;
UserCode = (OldDAC / 0x0010) *1000;
return UserCode;
}
static uint8_t OldStep2NewStep(uint8_t OldStep){
uint8_t NewStep = 0;
NewStep = (OldStep / 0x12) * 0x9E;
return NewStep;
}
static uint8_t OldStep2NewStepTime(uint8_t StepTime){
switch(StepTime){
case 0:{
return 0x02;
}
case 1:{
return 0x05;
}
case 2:{
return 0x06;
}
case 3:{
return 0x09;
}
default:{
return 0x05;
}
}
}
#endif /* IMPEDANCE_METER_H_ */
@@ -150,7 +150,7 @@
// Whether to enable automatic parameter update request when a connection is
// formed
#define DEFAULT_ENABLE_UPDATE_REQUEST GAPROLE_LINK_PARAM_UPDATE_INITIATE_BOTH_PARAMS // in throughput peripheral , this is false
#define DEFAULT_ENABLE_UPDATE_REQUEST GAPROLE_LINK_PARAM_UPDATE_INITIATE_BOTH_PARAMS // in throughput peripheral , this is false
// in throughput project , the periodic event will repeat every 102ms
@@ -172,23 +172,22 @@
// Internal Events for RTOS application
#ifndef RTOSPARA
#define RTOSPARA
#define SBP_STATE_CHANGE_EVT 0x0001
#define SBP_CHAR_CHANGE_EVT 0x0002
#define SBP_PERIODIC_EVT 0x0004
#define SBP_CONN_EVT_END_EVT 0x0008
#define SBP_KEY_CHANGE_EVT 0x0010
#define SBP_STATE_CHANGE_EVT 0x0001
#define SBP_CHAR_CHANGE_EVT 0x0002
#define SBP_PERIODIC_EVT 0x0004
#define SBP_CONN_EVT_END_EVT 0x0008
#define SBP_KEY_CHANGE_EVT 0x0010
#endif
// data length extension parameter
#define APP_SUGGESTED_PDU_SIZE 251
#define APP_SUGGESTED_TX_TIME 2120
#define APP_SUGGESTED_TX_TIME 2120
#define DLE_MAX_PDU_SIZE 251
#define DLE_MAX_TX_TIME 2120
#define DLE_MAX_TX_TIME 2120
#define DEFAULT_PDU_SIZE 27
#define DEFAULT_TX_TIME 328
#define DEFAULT_TX_TIME 328
// GATT notification don't need authenticated link
#define GATT_NO_AUTHENTICATION
@@ -272,8 +271,8 @@ static gattMsgEvent_t *pAttRsp = NULL;
static uint8_t rspTxRetry = 0;
// Vars to keep track of active packet length settings
//static uint16_t txOctets = DEFAULT_PDU_SIZE;
//static uint16_t txTime = DEFAULT_TX_TIME;
// static uint16_t txOctets = DEFAULT_PDU_SIZE;
// static uint16_t txTime = DEFAULT_TX_TIME;
/*********************************************************************
* LOCAL FUNCTIONS
@@ -368,7 +367,7 @@ void SimpleBLEPeripheral_createTask(void) {
*
* @return None.
*/
// Clock instances for internal periodic events.
// Clock instances for internal periodic events.
static void SimpleBLEPeripheral_clockHandler(UArg arg);
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
@@ -376,7 +375,7 @@ static void SimpleBLEPeripheral_clockHandler(UArg arg);
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
// How often to perform periodic event (in msec)
#define SBP_PERIODIC_EVT_PERIOD 42 // 802 ~= 1 sec
#define SBP_PERIODIC_EVT_PERIOD 10 // 802 ~= 1 sec
static void SimpleBLEPeripheral_init(void) {
// ******************************************************************
@@ -386,7 +385,6 @@ static void SimpleBLEPeripheral_init(void) {
// so that the application can send and receive messages.
ICall_registerApp(&selfEntity, &semaphore);
#ifdef USE_RCOSC
RCOSC_enableCalibration();
#endif // USE_RCOSC
@@ -437,7 +435,7 @@ static void SimpleBLEPeripheral_init(void) {
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initialAdvertEnable);
GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t), &advertOffTime);
// GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(SCAN_RESP_DATA), SCAN_RESP_DATA);
// GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(SCAN_RESP_DATA), SCAN_RESP_DATA);
GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);
GAPRole_SetParameter(GAPROLE_PARAM_UPDATE_ENABLE, sizeof(uint8_t), &enableUpdateRequest);
@@ -448,7 +446,7 @@ static void SimpleBLEPeripheral_init(void) {
}
// Set the GAP Characteristics
// GGS_SetParameter(GGS_DEVICE_NAME_ATT, sizeof(DEVICE_NAME), DEVICE_NAME);
// GGS_SetParameter(GGS_DEVICE_NAME_ATT, sizeof(DEVICE_NAME), DEVICE_NAME);
// Set advertising interval
{
@@ -538,25 +536,24 @@ static void SimpleBLEPeripheral_init(void) {
*
* @return None.
*/
//static Clock_Struct detectKeyClock;
//static void detectKey_clockHandler(UArg arg);
// static Clock_Struct detectKeyClock;
// static void detectKey_clockHandler(UArg arg);
static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
// Initialize application
SimpleBLEPeripheral_init();
headstage_init_device_info();
// headstage_gptimer_init();
// headstage_gptimer_init();
ZM_init();
Elite_SPI_init();
uint8_t key = 0;
uint8_t key = 0;
uint8_t counter6994 = 0;
bool EliteOn = 0;
bool EliteOn = 0;
Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT); //create a clock clockduration = 42(~=0.05 sec)
Util_startClock(&periodicClock); // start the clock, timeup => call SimpleBLEPeripheral_clockHandler => wake up the device
Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT); // create a clock clockduration = 42(~=0.01 sec)
Util_startClock(&periodicClock); // start the clock, timeup => call SimpleBLEPeripheral_clockHandler => wake up the device
// Application main loops
for (;;) {
@@ -564,16 +561,16 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
// Note that the semaphore associated with a thread is signaled when a
// message is queued to the message receive queue of the thread or when
// ICall_signal() function is called onto the semaphore.
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER); //let errno wait for infinite time, if periodicClock time up then execute below code
if (errno == ICALL_ERRNO_SUCCESS) {
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER); // let errno wait for infinite time, if periodicClock time up then execute below code
if (errno == ICALL_ERRNO_SUCCESS) {
ICall_EntityID dest;
ICall_ServiceEnum src;
ICall_HciExtEvt * pMsg = NULL;
if (ICall_fetchServiceMsg(&src, &dest, (void **)&pMsg) == ICALL_ERRNO_SUCCESS) { //if successfully retreived a meaasage from who?
if (ICall_fetchServiceMsg(&src, &dest, (void **)&pMsg) == ICALL_ERRNO_SUCCESS) { // if successfully retreived a meaasage from who?
uint8 safeToDealloc = TRUE;
if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity)) { //src: source id who sent the massage; dest: entity id of the destination of the massage
if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity)) { // src: source id who sent the massage; dest: entity id of the destination of the massage
ICall_Stack_Event *pEvt = (ICall_Stack_Event *)pMsg;
// Check for BLE stack events first
@@ -591,15 +588,14 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
if (pMsg && safeToDealloc) {
ICall_freeMsg(pMsg);
}
}
// If RTOS queue is not empty, process app message. //RTOS is the OS on Elite
while (!Queue_empty(appMsgQueue)){
while (!Queue_empty(appMsgQueue)) {
sbpEvt_t *pMsg = (sbpEvt_t *)Util_dequeueMsg(appMsgQueue);
if (pMsg) {
// Process message.
// LED_color(0xf8, 0xfa, 0xfa, 0x0a); // orange LED
// LED_color(0xf8, 0xfa, 0xfa, 0x0a); // orange LED
SimpleBLEPeripheral_processAppMsg(pMsg);
// Free the space from the message.
@@ -607,54 +603,53 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
}
}
if(!PeriodicEvent){ //if there is no periodic event
Util_startClock(&periodicClock); //manually restart the clock
if (!PeriodicEvent) { // if there is no periodic event
Util_startClock(&periodicClock); // manually restart the clock
key = PIN_getInputValue(switch_on);
if(EliteOn){
if(counter6994 < 35){ //counter6994 enable a IC after 35 counts
counter6994 ++;
}
else if(counter6994 == 35){
if (EliteOn) {
if (counter6994 < 175) { // counter6994 enable a IC after 35 counts
counter6994++;
} else if (counter6994 == 175) {
PIN_setOutputValue(pin_handle, shutdown_6994, 1); // OFF = 1 => turn off 6994
// #ifdef ELITE_VERSION_1_4
// SPI_close(spiHandle0);
// I2Cinit();
// I2C_close(I2Chandle);
// spiHandle0 = SPI_open(Board_SPI0, &spiParams0); // LED SPI
// #endif
counter6994 ++;
// #ifdef ELITE_VERSION_1_4
// SPI_close(spiHandle0);
// I2Cinit();
// I2C_close(I2Chandle);
// spiHandle0 = SPI_open(Board_SPI0, &spiParams0); // LED SPI
// #endif
counter6994++;
}
EliteKeyPress(key);
}
else{
} else {
EliteOn = TurnOnElite(key);
}
//if(DAC_reset) DAC_outputV(0x0000); //set DAC to 0v when no periodic event
}
else{ // if there is periodic event
Util_startClock(&periodicClock); //manually restart the clock
if(PeriodicCounter >= StepTime){
SimpleBLEPeripheral_performPeriodicTask();
PeriodicCounter = 0;
}
key = PIN_getInputValue(switch_on);
EliteKeyPress(key); //onPress=> key = 0; 1.lighten LED 2.long press shut down 2650
PeriodicCounter ++;
}
// if(DAC_reset) DAC_outputV(0x0000); //set DAC to 0v when no periodic event
} else { // if there is periodic event
Util_startClock(&periodicClock); // manually restart the clock
SimpleBLEPeripheral_performPeriodicTask();
key = PIN_getInputValue(switch_on);
EliteKeyPress(key); // onPress=> key = 0; 1.lighten LED 2.long press shut down 2650
}
}
// if(events & SBP_PERIODIC_EVT){
// Util_startClock(&periodicClock);
// events &= ~SBP_PERIODIC_EVT;
// if (events & SBP_PERIODIC_EVT)
// {
// events &= ~SBP_PERIODIC_EVT;
// Util_startClock(&periodicClock);
// Perform periodic application task
// SimpleBLEPeripheral_performPeriodicTask();
// }
// // Perform periodic application task
// SimpleBLEPeripheral_performPeriodicTask();
// }
// if (events & SBP_PERIODIC_EVT)
// {
// events &= ~SBP_PERIODIC_EVT;
// Util_startClock(&periodicClock);
// Perform periodic application task
// SimpleBLEPeripheral_performPeriodicTask();
// }
// headstage_gptimer_main_handle();
// headstage_gptimer_main_handle();
#ifdef FEATURE_OAD
while (!Queue_empty(hOadQ)) {
@@ -689,30 +684,30 @@ static uint8_t SimpleBLEPeripheral_processStackMsg(ICall_Hdr *pMsg) {
uint8_t safeToDealloc = TRUE;
switch (pMsg->event) {
case GATT_MSG_EVENT:
// Process GATT message
safeToDealloc = SimpleBLEPeripheral_processGATTMsg((gattMsgEvent_t *)pMsg);
break;
case GATT_MSG_EVENT:
// Process GATT message
safeToDealloc = SimpleBLEPeripheral_processGATTMsg((gattMsgEvent_t *)pMsg);
break;
case HCI_GAP_EVENT_EVENT: {
// Process HCI message
switch (pMsg->status) {
case HCI_COMMAND_COMPLETE_EVENT_CODE:
// Process HCI Command Complete Event
break;
case HCI_BLE_HARDWARE_ERROR_EVENT_CODE: {
AssertHandler(HAL_ASSERT_CAUSE_HARDWARE_ERROR, 0);
break;
}
default:
break;
}
case HCI_GAP_EVENT_EVENT: {
// Process HCI message
switch (pMsg->status) {
case HCI_COMMAND_COMPLETE_EVENT_CODE:
// Process HCI Command Complete Event
break;
}
case HCI_BLE_HARDWARE_ERROR_EVENT_CODE: {
AssertHandler(HAL_ASSERT_CAUSE_HARDWARE_ERROR, 0);
break;
}
default:
// do nothing
break;
}
break;
}
default:
// do nothing
break;
}
return (safeToDealloc);
@@ -825,23 +820,22 @@ static void SimpleBLEPeripheral_freeAttRsp(uint8_t status) {
* @return None.
*/
static void SimpleBLEPeripheral_processAppMsg(sbpEvt_t *pMsg) {
// LED_color(0xFA, 0xF0, 0x00, 0xE0);
// LED_color(0xFA, 0xF0, 0x00, 0xE0);
switch (pMsg->hdr.event) {
case SBP_STATE_CHANGE_EVT:
SimpleBLEPeripheral_processStateChangeEvt((gaprole_States_t)pMsg->hdr.state);
break;
case SBP_STATE_CHANGE_EVT:
SimpleBLEPeripheral_processStateChangeEvt((gaprole_States_t)pMsg->hdr.state);
break;
case SBP_CHAR_CHANGE_EVT:
// headstage_instruction_update_handle(pMsg->hdr.state);
// LED_color(0xE6, 0xFF, 0xFA, 0x0A);
ZM_instruction_update_handle(pMsg->hdr.state);
case SBP_CHAR_CHANGE_EVT:
// headstage_instruction_update_handle(pMsg->hdr.state);
// LED_color(0xE6, 0xFF, 0xFA, 0x0A);
ZM_instruction_update_handle(pMsg->hdr.state);
break;
break;
default:
// Do nothing.
break;
default:
// Do nothing.
break;
}
}