Compare commits

...

268 Commits

Author SHA1 Message Date
borshin_chang@gapp.nthu.edu.tw 8cc4ebea74 C6:52 Channel_3
threshold setting 115,000 always 1

so change it to 11,500,000 can do it
2021-03-29 13:44:11 +08:00
borshin_chang@gapp.nthu.edu.tw 81b99ce4b1 first_version of 16-point FFT on offline
with refer to MATLAB code cc6250_emulation_closed_loop.m
2021-03-29 11:05:49 +08:00
Borshin Chang 78720a9a7e RawData can transfer to RealData with difference CaliTable an userDefineGain
remove bugs in FFT_step (not infulence)

golden data specified !! Good result but 45,000 threshold is little bit high
2020-12-01 16:25:14 +08:00
Borshin Chang baeeafd002 RawData can transfer to RealData with difference CaliTable an userDefineGain
remove bugs in FFT_step (not infulence)
2020-12-01 15:05:19 +08:00
Borshin Chang be9084d8f1 LED can light central cDBS for "* flower" 2020-12-01 12:06:01 +08:00
Borshin Chang da1e1a54ac cDBS as central verision for "* flower" 2020-12-01 10:40:01 +08:00
weiting2 1cde4cfe02 update sti_cali data 2020-10-26 17:03:38 +08:00
weiting2 764bd9364d amp_gain does not on change 2020-10-13 18:09:20 +08:00
weiting2 b5e0026f2e amp_gain does not on change 2020-10-13 18:09:09 +08:00
weiting2 823016d4b7 support fast settle now 2020-09-25 18:36:10 +08:00
weiting2 bee57486e0 support fast settle now 2020-09-25 18:35:55 +08:00
weiting2 214222cb1e TODO: support fast settle 2020-09-25 17:48:52 +08:00
weiting2 38572e128d increase data throughput by modify notify format 2020-09-25 16:37:27 +08:00
weiting2 9e19642081 increase data throughput by modify notify format 2020-09-25 15:57:41 +08:00
weiting2 5f2a258f49 increase data throughput by modify notify format 2020-09-25 11:56:25 +08:00
weiting2 d5158775b8 [semi-stable] TODO: increase data throughput by modify notify format 2020-09-25 11:46:16 +08:00
weiting2 282b8077a7 update central 2020-09-18 20:21:15 +08:00
weiting2 5b6430cec9 update central 2020-09-18 18:13:00 +08:00
weiting2 9484008d1e update central 2020-09-18 18:09:28 +08:00
weiting2 bd0c282d25 using central feature CIS 2020-09-16 15:26:26 +08:00
weiting2 acd590de44 sti on change is done; TODO: disable sti before every on change 2020-09-16 10:59:22 +08:00
weiting2 b8d96c32b0 sti on change is done; TODO: disable sti before every on change 2020-09-15 17:41:46 +08:00
weiting2 c3ab78e16a sti on change has some bug 2020-09-14 17:21:30 +08:00
weiting2 fde824ee34 sti on change has some bug 2020-09-14 12:54:23 +08:00
weiting2 fc3adb450c sti on change has some bug 2020-09-14 11:10:42 +08:00
weiting2 747752640a sti on change has some bug 2020-09-14 09:55:26 +08:00
weiting2 7a73097666 add sti, stop, ... etc function 2020-09-10 18:41:29 +08:00
weiting2 8a95874b0b "on change" can work; TODO: add sti, stop, ... etc function 2020-09-09 17:01:35 +08:00
weiting2 9db0984a92 attempt to support "on change" for every register 2020-09-09 10:26:13 +08:00
weiting2 b9c9cc0bbc attempt to support "on change" for every register 2020-09-08 18:06:17 +08:00
weiting2 cd44c2ecaa attempt to support "on change" for every register 2020-09-08 17:47:12 +08:00
weiting2 3bb5cee129 attempt to support "on change" for every register 2020-09-08 17:42:08 +08:00
weiting2 2480d7775f attempt to support "on change" for every register 2020-09-08 17:19:13 +08:00
weiting2 3b9e972397 attempt to support "on change" for every register 2020-09-04 16:28:34 +08:00
weiting2 36df3abed1 attempt to support "on change" for every register 2020-09-02 19:19:05 +08:00
weiting2 918584c915 attempt to support "on change" for every register 2020-09-02 17:16:00 +08:00
weiting2 cc0a21c364 attempt to support "on change" for every register 2020-09-02 11:56:12 +08:00
weiting2 388c06efe7 attempt to support "on change" for every register 2020-08-31 16:35:12 +08:00
weiting2 8bcb4cd27e attempt to support "on change" for every register 2020-08-31 11:34:45 +08:00
weiting2 5d88871e58 attempt to support "on change" for every register 2020-08-28 18:25:02 +08:00
weiting2 8635b1b878 attempt to support "on change" for every register 2020-08-28 18:24:56 +08:00
weiting2 6e9acfda78 [on sell] modify get_date script for linux version CCS 2020-07-20 17:48:14 +08:00
weiting2 81d5d86890 [on sell] TODO: modify get_date script for linux version CCS 2020-07-20 17:42:35 +08:00
weiting2 0c8c92dc83 [on sell] TODO: modify get_date script for linux version CCS 2020-07-20 17:17:50 +08:00
weiting2 308de54833 Merge remote-tracking branch 'origin/Neulive20_developement_linux' into Neulive20_developement_linux 2020-07-20 17:17:34 +08:00
weiting2 e4c999b8c7 [on sell] TODO: modify get_date script for linux version CCS 2020-07-20 17:17:22 +08:00
weiting2 5c0c2cc9a5 [WARNING] do NOT use linux version CCS on simple central.
DLE can not enable on linux CCS
2020-07-20 16:12:17 +08:00
weiting2 127b5ff4ca linux version CCS 2020-07-15 17:56:53 +08:00
weiting2 d78b0372a5 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-07-09 17:07:54 +08:00
weiting2 d648e23b12 sti same pattern; add version number 2020-07-09 17:07:46 +08:00
yichin 2a6cd49748 sti ins send t1~t5 only one time (every ch use same pattern) 2020-07-09 17:06:01 +08:00
weiting2 b19b818927 [stable] solve "can not close STI" issue; TODO: add PIN_IRQ for STI clock 2020-07-09 11:05:52 +08:00
weiting2 8876319987 [debug] separate prepare_read and check_reg counter 2020-07-09 10:56:39 +08:00
weiting2 8ae2e1771c [debug] separate prepare_read and check_reg counter 2020-07-09 10:16:15 +08:00
weiting2 549db3f6d4 separate prepare_read and check_reg counter 2020-07-08 18:31:04 +08:00
weiting2 54dd4bc643 separate prepare_read and check_reg counter 2020-07-08 18:30:58 +08:00
weiting2 435acb745b separate prepare_read and check_reg counter 2020-07-08 18:13:55 +08:00
weiting2 3cf2bb99f7 [debug] debug version, VIS_EN_ADC_CLK 2020-07-07 17:29:18 +08:00
weiting2 93cdfd00f2 add fast settle function 2020-07-03 16:03:52 +08:00
yichin b10ee4de65 error fix 2020-07-03 15:33:14 +08:00
weiting2 1d3068ac7c add VIS_FAST_SET function 2020-07-03 10:57:26 +08:00
weiting2 a84cf4edc3 [on sell] fix bug: we can enable eight sti channels now 2020-06-16 15:21:37 +08:00
yichin fce3f53b40 error fix 2020-06-16 15:20:22 +08:00
weiting2 f91359ec3e [on sell] update cali data 2020-06-15 17:34:11 +08:00
weiting2 7255be0ea5 [on sell] update cali data 2020-06-12 18:46:58 +08:00
weiting2 66c183dee9 central setup 2020-06-12 11:19:04 +08:00
weiting2 f749706574 modify connection interval 2020-06-11 17:10:06 +08:00
weiting2 67725e67f6 modify connection interval 2020-06-11 17:09:49 +08:00
weiting2 2efed4fdf7 modify connection interval 2020-06-10 14:38:15 +08:00
weiting2 0c3fb07ab2 [on sell] update cali data 2020-06-10 13:34:11 +08:00
weiting2 a57eec5a0f [on sell] update cali data 2020-06-08 19:04:49 +08:00
weiting2 a0dfc60003 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-06-08 18:55:48 +08:00
weiting2 f442e1dc12 [on sell] update cali data 2020-06-08 18:55:34 +08:00
weiting2 b09b14e59f attempt to use central on 2650 ma 2020-06-08 18:54:37 +08:00
weiting2 959ea08e70 [on sell] update cali data 2020-05-27 11:02:52 +08:00
weiting2 30a2e14e95 [on sell] update cali data 2020-05-27 10:49:59 +08:00
yichin 1f8136579a error fix 2020-05-27 10:49:07 +08:00
weiting2 f91864a24c [on sell] update cali data 2020-05-27 10:43:30 +08:00
weiting2 5419995d45 [on sell] update cali data 2020-05-27 10:25:37 +08:00
weiting2 8cc8a28136 [on sell] update cali data 2020-05-26 19:02:25 +08:00
weiting2 4974e89ce7 [on sell] update cali data 2020-05-26 18:30:15 +08:00
weiting2 b3b955dfbb [on sell] update cali data 2020-05-25 19:01:03 +08:00
weiting2 2754301a3b [on sell] neulive should be reset correctly 2020-05-25 18:53:50 +08:00
weiting2 6af22653a9 [on sell] update cali data 2020-05-25 11:20:18 +08:00
weiting2 b4dc9f1256 [on sell] update cali data 2020-05-25 11:13:36 +08:00
weiting2 f6099ca1c9 I think we can sell it 2020-05-21 18:15:54 +08:00
weiting2 c2bdd4bc6d I think it's stable 2020-05-21 17:32:27 +08:00
weiting2 6439a17239 I think it's stable 2020-05-21 17:31:20 +08:00
weiting2 f86f84bdb6 I think it's stable 2020-05-21 17:25:04 +08:00
weiting2 f8639d94b0 attempt to support Vgrp/n 2020-05-21 17:19:37 +08:00
yichin a4a15cfefd error fix 2020-05-21 17:00:20 +08:00
weiting2 7b5368ca7d attempt to support Vgrp/n 2020-05-21 16:58:15 +08:00
weiting2 2dbf8a4534 add vgrp config ; t1~t5 register no problem? 2020-05-21 15:25:42 +08:00
weiting2 923f1b1d0f add vgrp config ; t1~t5 register no problem? 2020-05-21 14:33:20 +08:00
yichin f7ce2ebe1d warning fix 2020-05-21 12:29:31 +08:00
yichin 65019ca235 warning fix 2020-05-21 12:27:15 +08:00
weiting2 c4a910ad79 add vgrp config ; t1~t5 register no problem? 2020-05-21 12:24:22 +08:00
yichin 11a66d2ea8 error fix 2020-05-21 12:21:05 +08:00
weiting2 f728bb7260 add vgrp config ; t1~t5 register no problem? 2020-05-21 12:18:00 +08:00
weiting2 84e4e45a33 t1~t5 and amp register no problem? 2020-05-21 10:31:33 +08:00
weiting2 2bf3827b3d [semi-stable] check t1~t5 and sti-cycle; amplitude should be correct now 2020-05-20 10:12:51 +08:00
weiting2 0fd20324bf [semi-stable] check t1~t5 and sti-cycle; amplitude should be correct now 2020-05-19 18:15:16 +08:00
weiting2 3951752ab9 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-05-19 18:14:43 +08:00
weiting2 5ea0b8609f [semi-stable] check t1~t5 and sti-cycle; amplitude should be correct now 2020-05-19 18:14:36 +08:00
yichin cf4f503d3d error fix 2020-05-19 18:04:05 +08:00
weiting2 6d6c0e2ef9 attempt to check t1~t5 2020-05-19 17:56:10 +08:00
weiting2 e5166d7f46 attempt to check t1~t5 2020-05-19 17:53:11 +08:00
yichin 4ac60f0c44 error fix 2020-05-19 17:08:39 +08:00
weiting2 e14618fb74 attempt to check t1~t5 2020-05-19 16:53:16 +08:00
weiting2 6f166a4655 prevent cali amplitude more than one time 2020-05-19 12:42:51 +08:00
weiting2 7f706d1e29 update cali data 2020-05-15 15:33:18 +08:00
weiting2 af6f83f0fc update cali data 2020-05-15 15:32:21 +08:00
weiting2 2a68967aa6 update NEU_WORK_STATE 2020-05-14 18:45:21 +08:00
weiting2 647c641a47 update NEU_WORK_STATE 2020-05-14 18:40:38 +08:00
weiting2 7e59455f00 [semi-stable] separate "REC", "STI"; update cali cdr format 2020-05-13 15:31:25 +08:00
yichin 81e12c0e1b [semi-stable] update cali format 2020-05-13 15:29:57 +08:00
yichin af62590ca7 extend cdr_buf 2020-05-13 12:03:27 +08:00
yichin ed7aeea405 "REC", "STI" separate seems no problem 2020-05-13 11:32:48 +08:00
weiting2 20fd9f3efe single rec-stop has a bug 2020-05-13 10:07:10 +08:00
yichin fef94f8d10 rec single restart has a bug 2020-05-12 18:04:36 +08:00
yichin 6baa7991e8 error fix; send sti_en only one time 2020-05-12 16:30:13 +08:00
weiting2 368c761009 fix led display bug 2020-05-12 11:49:32 +08:00
weiting2 390c7b1cf4 [stable] update LED color 2020-05-11 11:49:37 +08:00
weiting2 3f9c45517c [stable] attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-11 10:34:25 +08:00
yichin 3fbdfa2c7c error fix 2020-05-11 10:33:41 +08:00
weiting2 3d551dcd4a attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-08 18:17:54 +08:00
yichin 65347973dc error fix 2020-05-08 18:16:48 +08:00
yichin 963ad75b4c debug 2020-05-08 17:52:34 +08:00
weiting2 b727da5901 attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-08 17:37:54 +08:00
weiting2 fa6d474409 attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-08 17:37:50 +08:00
weiting2 a1afffd0e8 attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-08 17:33:47 +08:00
yichin 57641a2e4c error fix 2020-05-08 17:33:26 +08:00
weiting2 eee659d320 attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-08 17:26:22 +08:00
yichin 7f988bdbe4 update cali data 2020-05-08 12:02:43 +08:00
weiting2 cb335af011 [stable] should be sold at 5/7 2020-05-06 17:18:22 +08:00
weiting2 fcc89f3e1c send start sti twice 2020-05-06 16:12:46 +08:00
weiting2 ed222d73cf update sti cali data 2020-05-06 14:54:20 +08:00
weiting2 e5ad26aac2 update sti cali data 2020-05-06 13:08:17 +08:00
weiting2 779b7a12b8 update sti cali data 2020-05-06 12:53:55 +08:00
weiting2 29b9ba4d9b update sti cali data 2020-05-06 12:48:58 +08:00
weiting2 6707ef752f add sti cali-data fill in script 2020-05-06 12:25:52 +08:00
weiting2 ec08a5963b add sti fill in script 2020-05-06 12:13:00 +08:00
weiting2 4cb79ef397 [stable] update cali table 2020-05-06 10:39:15 +08:00
weiting2 b85750fa98 [stable] update cali table 2020-05-06 10:30:05 +08:00
weiting2 341988a20c [stable] update cali table 2020-05-06 09:57:31 +08:00
weiting2 38264f809b [stable] we can get cali-data name now 2020-05-05 16:46:51 +08:00
weiting2 476ffa4714 [stable] we can get cali-data name now 2020-05-05 16:45:58 +08:00
yichin b3a37db2b5 we can get cali-data name now 2020-05-05 16:44:49 +08:00
weiting2 d25c49001c [test] attempt to get board name 2020-05-05 16:35:16 +08:00
weiting2 ed0d0f0c32 [stable] interval 6~6; can not ask board name; reopen SPI if channel wrong 2020-05-05 16:26:02 +08:00
yichin 39bb06ee62 [stable] reopen SPI if channel error 2020-05-05 16:25:19 +08:00
weiting2 7b8ef106f3 [stable] interval 6~6; can not ask board name 2020-05-05 12:35:53 +08:00
yichin 9781ffaae0 interval 6~6; enable sti cali fxn 2020-05-05 12:34:32 +08:00
yichin 87ddc852d5 sti calibration function 2020-05-05 12:31:20 +08:00
weiting2 4ddb378a4b attempt to add cali_board name in CIS_VERSION 2020-05-05 11:22:56 +08:00
weiting2 a6a7a7a98d attempt to add cali_board name in CIS_VERSION 2020-05-05 11:19:52 +08:00
weiting2 801a9a89f1 attempt to add cali_board name in CIS_VERSION 2020-05-05 11:15:48 +08:00
weiting2 6bd5ed1fdf attempt to add cali_board name in CIS_VERSION 2020-05-04 19:06:55 +08:00
yichin 073c13782f attempt to return board name 2020-05-04 18:46:19 +08:00
weiting2 4c17c08cc4 attempt to add cali_board name in CIS_VERSION 2020-05-04 18:20:16 +08:00
weiting2 f8265791bb attempt to add cali_board name in CIS_VERSION 2020-05-04 17:58:55 +08:00
weiting2 e45b5d46cb attempt to add cali_board name in CIS_VERSION 2020-05-04 17:45:54 +08:00
yichin c0133c2597 [stable] should be no problem 2020-05-04 17:27:37 +08:00
weiting2 a802b91a5b attempt to improve date rate 2020-05-04 12:24:21 +08:00
yichin e5b90bcd7d [debug] notify 200 -> 110 2020-05-04 11:46:34 +08:00
yichin 06819baf8b [debug] notify 200 -> 110 2020-05-04 11:44:43 +08:00
yichin 1c0ae3875a can we improve sample rate? 2020-05-04 11:37:48 +08:00
weiting2 609e4165ce [semi stable] connection interval 14~25 => 6~6 2020-05-04 10:33:19 +08:00
yichin 55d124009e Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-05-04 10:30:17 +08:00
yichin 6d6a8ac809 [semi-stable] connection interval = 6, seems resolved disconnect issue 2020-05-04 10:29:23 +08:00
weiting2 9420f7f3b3 [debug] notify 200 -> 110 2020-04-30 19:40:45 +08:00
yichin f5b252a52d [debug] notify 200 -> 110 2020-04-30 19:39:06 +08:00
yichin 64a8e00dbb append notify without channel check; error/timeout => red LED 2020-04-30 15:02:33 +08:00
weiting2 40ab6e563a [semi-stable] append notify without channel check; timeout disconnect => RED LED 2020-04-29 10:37:27 +08:00
yichin 2fd739339a append notify without channel check; error/timeout => red LED 2020-04-29 10:36:39 +08:00
weiting2 3d3594105a [semi-stable] append notify without channel check; timeout disconnect => RED LED 2020-04-28 18:22:51 +08:00
weiting2 7c9aca9d3d [semi-stable] append notify without channel check; timeout disconnect => RED LED 2020-04-28 17:27:49 +08:00
yichin 8432c4f98f append notify without channel check 2020-04-28 17:24:52 +08:00
yichin c56c42c4f8 delete garbage comment 2020-04-28 16:00:48 +08:00
yichin 276738d93b error fix 2020-04-28 15:52:37 +08:00
weiting2 9f1bf4ee19 simplify notify task 2020-04-28 15:35:39 +08:00
weiting2 c5319d9ff7 timeout: red->cyan => red->green 2020-04-28 12:34:30 +08:00
weiting2 f0bd1200ce timeout 15s -> 10s 2020-04-28 12:34:02 +08:00
weiting2 2239768e82 timeout 10s -> 15s 2020-04-28 12:26:44 +08:00
weiting2 4eae2bc3d0 update sti cali data 2020-04-27 22:00:16 +08:00
weiting2 d513ef1c49 disable notify flush 2020-04-27 21:43:44 +08:00
weiting2 83c2b31313 disable notify flush 2020-04-27 18:48:37 +08:00
weiting2 064b28c081 disable notify flush after STOP 2020-04-27 18:46:29 +08:00
weiting2 a45a7f1105 update sti cali data 2020-04-27 17:46:19 +08:00
weiting2 1b845035e1 update sti cali data 2020-04-27 17:23:23 +08:00
weiting2 8ce11489ae update sti cali data 2020-04-27 17:22:26 +08:00
weiting2 76e4043810 update sti cali data 2020-04-27 17:20:15 +08:00
weiting2 ffa6beaa5f sti cali do NOT use number less than 1 2020-04-27 16:08:44 +08:00
weiting2 007ffcbe85 sti cali do NOT use number less than 1 2020-04-27 13:21:43 +08:00
weiting2 e4f9ba5ba3 update sti cali script 2020-04-27 12:20:46 +08:00
weiting2 d9b611a72a update sti cali script 2020-04-27 12:20:35 +08:00
weiting2 4014526e94 update sti cali script 2020-04-27 12:04:04 +08:00
weiting2 9b39f8d9a6 update sti cali data 2020-04-27 11:35:17 +08:00
weiting2 420b016e55 sti cali function 2020-04-27 11:14:06 +08:00
yichin c64d88bb1a error fix 2020-04-27 11:13:44 +08:00
weiting2 aa26bd2095 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-27 10:45:53 +08:00
weiting2 9469edb747 sti cali function 2020-04-27 10:45:37 +08:00
yichin d00073e790 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-24 12:05:51 +08:00
weiting2 4b778c1976 sti cali function 2020-04-24 10:44:37 +08:00
weiting2 d9904e2bb1 sti cali function 2020-04-23 18:39:36 +08:00
yichin ff6351483c Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-04-23 11:02:32 +08:00
weiting2 69452da545 [semi stable] 99% no problem 2020-04-23 11:02:08 +08:00
yichin 1959767107 [semi stable] check sti_ch register 2020-04-23 11:00:41 +08:00
weiting2 2cf61acef2 [semi stable] STI can not co-work with REC 2020-04-23 10:32:20 +08:00
weiting2 580cde7cf6 [semi stable] update purple 2020-04-22 18:35:31 +08:00
weiting2 d85d98a78c [semi stable] check sti_ch register 2020-04-22 18:30:42 +08:00
weiting2 57285258b9 [semi stable] check sti_ch register 2020-04-22 17:56:40 +08:00
yichin 0c89f42463 [semi stable] check sti_ch register 2020-04-22 17:56:08 +08:00
weiting2 84bebeded7 check sti_ch register 2020-04-22 17:45:06 +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
58 changed files with 5320 additions and 934 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
+29
View File
@@ -0,0 +1,29 @@
no device y=ax+b MAC a+ b+ a- b- avg
1 c6be c6be 1804ED37C6BE 2270 -7040 2259 -14129 4.15063496100114
2 8cd0 8cd0 0081F9E48CD0 2199 -4616 2162 -16396 4.67288597901671
3 c694 c694 1804ED37C694 2354 -12824 2354 -11216 4.34663132771076
4 c6c7 c6c7 1804ED37C6C7 2199 -7238 2221 -15702 4.63164432837751
5 9b97 9b97 0081F9E49B97 2227 -9846 2151 -26609 4.75015860006776
6 c6df c6df 1804ED37C6DF 2132 -3844 2054 -21545 4.89066238118665
7 c652 c652 18:04:ED:37:C6:52 2024 -7687 2086 -11283 4.88850143182858
8 c5ed c5ed 18:04:ED:37:C5:ED 2231 -1711 2353 -70845 4.45265043545859
9 9bef 9bef 0081F9E49BEF 2383 -8585 2415 -20347 4.2758539244186
10 8b50 8b50 00:81:F9:E4:8B:50 2366 -5223 2402 -14971 4.35162291666667
11 c641 c641 18:04:ED:37:C6:41 2090 4616 1997 -40665 5.07591391714942
12 E8E6 E8E6 A4:DA:32:D4:E8:E6 2306 -88454 2418 -15140 4.2686494968089
13 E73B E73B A4:DA:32:D4:E7:3B 2262 -564 2298 44746 4.35551198222141
14 EEE2 EEE2 A4:DA:32:D4:EE:E2 2057 5980 2096 -21411 4.82094019052184
15 E871 E871 A4:DA:32:D4:E8:71 2175 -4549 2220 31468 4.60684608395208
16 EFC4 EFC4 A4:DA:32:D4:EF:C4 2348 -4371 2374 -26606 4.45106768611704
17 EF85 EF85 A4:DA:32:D4:EF:85 2136 -3339 2189 -30040 4.61909624778354
18 E7DA E7DA A4:DA:32:D4:E7:DA 2081 -3015 2122 -21543 4.79766509652981
19 E6EA E6EA A4:DA:32:D4:E6:EA 2039 -262 2127 -47259 4.79384458739747
20 EEDB EEDB A4:DA:32:D4:EE:DB 2214 -1170 2351 -24636 4.44485358085645
21 E73A E73A A4:DA:32:D4:E7:3A 2210 -4855 2339 -16434 4.47776494604746
22 E6CF E6CF A4:DA:32:D4:E6:CF 2135 -5206 2193 -30885 4.73462680884304
23 E76A E76A A4:DA:32:D4:E7:6A 2076 1154 2096 -1073 4.840805202
24 F0AC F0AC A4:DA:32:D4:F0:AC 2125 -6660 2170 -439 4.667508288
25 E87C E87C A4:DA:32:D4:E8:7C 2265 6685 2230 2124 4.529796387
26 EF39 EF39 A4:DA:32:D4:EF:39 1976 6641 2035 2834 5.071840495
27 E91D E91D A4:DA:32:D4:E9:1D 2075 6344 2002 -5562 5.036438558
28 E87A E87A A4:DA:32:D4:E8:7A 2180 6651 2254 136 4.60339152
+1 -1
View File
@@ -4,7 +4,7 @@
#folder=$($path | awk -F"/" '{$NF}')
folder=$(basename "$(pwd)")
if [ "$folder" == "bioprocc2650" ]; then
if [ "$folder" == "ti" ] ; then
year=$(date +%-y)
month=$(date +%-m)
day=$(date +%-d)
@@ -2,17 +2,17 @@
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\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\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\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\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\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\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.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\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/simple_peripheral_cc2650em_app"/>
</listAttribute>
@@ -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="L1000628" 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>
@@ -3,6 +3,6 @@
* step by the lib_search utility
*/
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\host\host_pxxx.a"
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\ctrl\cc2640\cc2640_ctrl_pxxx_ext.a"
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\hci_tl\cc26xx\cc26xx_hci_tl_none_v41_v42.a"
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/host/host_pxxx.a"
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/ctrl/cc2640/cc2640_ctrl_pxxx_ext.a"
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/hci_tl/cc26xx/cc26xx_hci_tl_none_v41_v42.a"
@@ -1,6 +1,6 @@
#
# This file was generated based on the configuration script:
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\app_ble.cfg
# /home/alan/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg
#
# This makefile may be included in other makefiles that need to build
# the libraries containing the compiled source files generated as
@@ -14,9 +14,9 @@
#
# The absolute path to the generated source directory (at the time the
# sources were generated) is:
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\src
# /home/alan/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
#
GEN_SRC_DIR ?= ../../config/src
GEN_SRC_DIR ?= ../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
ifeq (,$(wildcard $(GEN_SRC_DIR)))
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
@@ -1,29 +1,29 @@
XOPTS = -I"C:/ti/xdctools_3_32_02_25_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
XOPTS = -I"/home/alan/ti/xdctools_3_32_01_22_core/packages/" -Dxdc_target_types__=/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
vpath %.c C:/ti/xdctools_3_32_02_25_core/packages/
vpath % /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
vpath %.c /home/alan/ti/xdctools_3_32_01_22_core/packages/
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
XDC_ROOT = C:/ti/xdctools_3_32_02_25_core/packages/
XDC_ROOT = /home/alan/ti/xdctools_3_32_01_22_core/packages/
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
BIOS_ROOT = /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_knl_Task_moduleStateCheckFlag__D=FALSE -Dti_sysbios_knl_Task_objectCheckFlag__D=FALSE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=6 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=6 -Dti_sysbios_knl_Task_checkStackFlag__D=FALSE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_DYNAMIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=FALSE -Dxdc_runtime_Assert_DISABLE_ALL -Dxdc_runtime_Log_DISABLE_ALL
BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
BIOS_INC = -I"/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
TARGET_INC = -I"/home/alan/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.5.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="/home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -I/home/alan/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.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armar rq
CC = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl -c $(CCOPTS) -I /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include
ASM = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl -c $(CCOPTS) -I /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include
AR = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armar rq
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
DEL = rm -f
CP = cp -f
define RM
$(if $(wildcard $1),$(DEL) $1,:)
@@ -100,8 +100,8 @@ rom_sysbios.obj: BIOS.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/
rom_sysbios.aem3: rom_sysbios.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj
@-$(call RM, $@)
@echo arem3 $^ ...
@$(AR) $@ $^ C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
@$(AR) $@ $^ /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
clean:
@$(DEL) ..\makefile.libs
@$(DEL) ../makefile.libs
@-$(call RM, *)
@@ -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.1245523372"
name="TI Build Tools"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1451981696">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.905558853"
superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC2650F128"/>
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
<listOptionValue builtIn="false"
value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_ble_stack.cmd;"/>
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.690267428"
superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION"
value="18.1.4.LTS" valueType="string"/>
<targetPlatform
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.703901656"
name="Platform"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug"/>
<builder buildPath="${BuildDirectory}"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.578715889"
name="GNU Make.FlashROM" parallelBuildOn="true" parallelizationNumber="optimal"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.124004045"
name="ARM Compiler"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.1471387206"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.1989883015"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.26908680"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.161170469"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN"
value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.202178130"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.477462079"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.2135144875"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH"
valueType="includePath">
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
<listOptionValue builtIn="false"
value="${SRC_EX}/examples/simple_peripheral/cc26xx/stack"/>
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target/_common"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target"/>
<listOptionValue builtIn="false"
value="${SRC_COMMON}/hal/src/target/_common/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/inc"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/osal/src/inc"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/nv"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/saddr"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/icall/src/inc"/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/inc"/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/controller/cc26xx/inc"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/aes/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/npi/src"/>
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx/npi/stack"/>
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.986125825" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CC26XX"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="GATT_NO_CLIENT"/>
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
<listOptionValue builtIn="false" value="CC26XXWARE"/>
<listOptionValue builtIn="false" value="DATA="/>
<listOptionValue builtIn="false" value="EXT_HAL_ASSERT"/>
<listOptionValue builtIn="false" value="FLASH_ROM_BUILD"/>
<listOptionValue builtIn="false" value="INCLUDE_AES_DECRYPT"/>
<listOptionValue builtIn="false" value="NEAR_FUNC="/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/controller/cc26xx/inc"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/services/src/aes/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/npi/src"/>
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx/npi/stack"/>
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1493730349"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE"
valueType="definedSymbols">
<listOptionValue builtIn="false" value="CC26XX"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="GATT_NO_CLIENT"/>
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
<listOptionValue builtIn="false" value="CC26XXWARE"/>
<listOptionValue builtIn="false" value="DATA="/>
<listOptionValue builtIn="false" value="EXT_HAL_ASSERT"/>
<listOptionValue builtIn="false" value="FLASH_ROM_BUILD"/>
<listOptionValue builtIn="false" value="INCLUDE_AES_DECRYPT"/>
<listOptionValue builtIn="false" value="NEAR_FUNC="/>
<listOptionValue builtIn="false" value="OSAL_CBTIMER_NUM_TASKS=1"/>
<listOptionValue builtIn="false" value="OSAL_SNV=1"/>
<listOptionValue builtIn="false" value="USE_ICALL"/>
<listOptionValue builtIn="false" value="xDEBUG"/>
<listOptionValue builtIn="false" value="xDEBUG_ENC"/>
<listOptionValue builtIn="false" value="xDEBUG_GPIO"/>
<listOptionValue builtIn="false" value="xDEBUG_SW_TRACE"/>
<listOptionValue builtIn="false" value="xPM_DISABLE_PWRDOWN"/>
<listOptionValue builtIn="false" value="xTESTMODES"/>
<listOptionValue builtIn="false" value="xTEST_BLEBOARD"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.372638078" name="C Dialect" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.201347726" name="Suppress diagnostic &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.1032660795"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1680463954"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS"
valueType="stringList">
<listOptionValue builtIn="false" value="48"/>
<listOptionValue builtIn="false" value="16004"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1766518960"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING"
valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.1804087261"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.733166450"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER"
value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1033506009"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE"
valueType="stringList">
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
</option>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.1352027396"
name="C Sources"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1465774058"
name="C++ Sources"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.1739768713"
name="Assembly Sources"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.79045750"
name="Assembly Sources"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1451981696"
name="ARM Linker"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.816733227"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE"
value="256" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.1515084002"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE"
value="0" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1765940845"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE"
value="&quot;${ProjName}.map&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.272429594"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE"
value="${ProjName}.out" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.2076163355"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY"
valueType="libs">
<listOptionValue builtIn="false" value="libc.a"/>
<listOptionValue builtIn="false"
value="${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd"/>
<listOptionValue builtIn="false"
value="${ROM}/ble_rom_releases/04242014/ble_rom_patch.symbols"/>
<listOptionValue builtIn="false"
value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1967226591"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH"
valueType="libPaths">
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.17239932"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS"
valueType="stringList">
<listOptionValue builtIn="false" value="16002-D"/>
<listOptionValue builtIn="false" value="10247-D"/>
<listOptionValue builtIn="false" value="10325-D"/>
<listOptionValue builtIn="false" value="10229-D"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.773340389"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.2126747201"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER"
value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.1785926765"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO"
value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT.683577056"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT"
value="startup_entry" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.1312810581"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1324674660"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on"
valueType="enumerated"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1903606010"
name="Linker Command Files"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.872286488"
name="Linker Command Files"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS"/>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.1603687860"
name="Generated Linker Command Files"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.1441542763"
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.210948887"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8"
valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.514543379"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8"
valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.2135898037"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL"
valueType="enumerated"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="cc26x0f128.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
@@ -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">
@@ -146,6 +146,7 @@ extern const PIN_Config BoardGpioInitTable[];
#define Board_GLED PIN_UNASSIGNED /* Green LED */
#define Board_RLED PIN_UNASSIGNED /* Red LED */
/* UART Board */
#define Board_UART_TX Board_BP_UART_Rx /* RXD */
#define Board_UART_RX Board_BP_UART_Tx /* TXD */
@@ -106,7 +106,7 @@
*/
#ifdef USE_ICALL
#include <ICall.h>
#include <icall.h>
typedef ICall_CSState halIntState_t;
@@ -55,7 +55,7 @@
#include <inc/hw_aon_rtc.h>
#include <driverlib/aon_rtc.h>
#include <driverlib/aon_event.h>
#include "ICall.h"
#include "icall.h"
/*******************************************************************************
* MACROS
@@ -48,7 +48,7 @@
#include <stdint.h>
#include "ICall.h"
#include "icall.h"
#ifdef __cplusplus
extern "C" {
@@ -55,7 +55,7 @@ extern "C"
// includes
// ****************************************************************************
#include "hal_types.h"
#include "OSAL.h"
#include "osal.h"
// ****************************************************************************
// defines
@@ -75,7 +75,7 @@
#ifdef ICALL_JT
#include "icall_JT.h"
#else
#include <ICall.h>
#include <icall.h>
#endif /* ICALL_JT */
#endif /* USE_ICALL */
@@ -405,7 +405,7 @@ uint32 osal_build_uint32( uint8 *swapped, uint8 len )
unsigned char * _ltoa(unsigned long l, unsigned char *buf, unsigned char radix)
{
#if defined (__TI_COMPILER_VERSION) || defined (__TI_COMPILER_VERSION__)
return ( (unsigned char*)ltoa( l, (char *)buf ) );
return ( (unsigned char*)ltoa( l, (char *)buf, radix ) );
#elif defined( __GNUC__ )
return ( (char*)ltoa( l, buf, radix ) );
#else
@@ -47,8 +47,8 @@
Release Date: 2018-04-02 18:03:35
*****************************************************************************/
#include "OSAL.h"
#include "OSAL_Tasks.h"
#include "osal.h"
#include "osal_tasks.h"
#include "hal_mcu.h"
#include "osal_cbtimer.h"
@@ -51,13 +51,13 @@
*/
#include "comdef.h"
#include "OSAL.h"
#include "OSAL_Memory.h"
#include "osal.h"
#include "osal_memory.h"
#ifdef ICALL_JT
#include "icall_JT.h"
#else
#include <ICall.h>
#include <icall.h>
#endif /* ICALL_JT */
/**************************************************************************************************
@@ -59,7 +59,7 @@
#ifdef ICALL_JT
#include "icall_JT.h"
#else
#include <ICall.h>
#include <icall.h>
#endif /* ICALL_JT */
#endif /* USE_ICALL */
@@ -62,11 +62,11 @@ extern "C"
#include <limits.h>
#include "comdef.h"
#include "OSAL_Memory.h"
#include "OSAL_Timers.h"
#include "osal_memory.h"
#include "osal_timers.h"
#ifdef USE_ICALL
#include <ICall.h>
#include <icall.h>
#endif /* USE_ICALL */
/*********************************************************************
@@ -80,7 +80,7 @@ the last entry in the page (higher memory address).
#include "hal_flash.h"
#include "hal_types.h"
#include "pwrmon.h"
#include "OSAL.h"
#include "osal.h"
#include "osal_snv.h"
#include "hal_assert.h"
#include <driverlib/vims.h>
@@ -52,7 +52,7 @@
#include <inc/hw_fcfg1.h>
#include "Board.h"
#include "board.h"
// RF Driver
#include <ti/drivers/rf/RF.h>
@@ -23,7 +23,7 @@ Instruction Specification
file defined:
Bio_Pro_Sci / / Pi3/DataServer / CC2650 / CC2650
Bio_Pro_Sci / / Pi3/DataServer / CC2650 / CC2650嚙踐垓
```
struct instruction {
@@ -56,10 +56,10 @@ instruction operator
| VIS_INT | 0x60 | interrupt device |
| | 0x70 | not used |
| | 0x80 | not used |
| VIS_FUH | 0x90 | not used |
| VIS_STI | 0x90 | en/disable stimulation |
| VIS_CAL | 0xA0 | not used |
| | 0xB0 | not used |
| VIS_STI | 0xC0 | device start working |
| VIS_START| 0xC0 | device start working |
| | 0xD0 | not used |
| | 0xE0 | not used |
| VIS_RST | 0xF0 | device reset |
@@ -93,6 +93,63 @@ instruction operator
#include <ti/sysbios/knl/Semaphore.h>
#include "simple_gatt_profile.h"
/** State for SPI (SPI callback to do task) **/
typedef enum {
CLOSE_SPI, // close SPI after MISO transmit
CONTINUOUS_TRANS, // transmit DBS data
FLUSH_BUFFER, // clean SPI buffer, used after a "write" SPI instruction (MISO)
FLUSH_BUFFER2, // clean SPI buffer twice
READ_REG, // read DBS register value, used after a "read" SPI instruction (MISO)
READ_REG2, // read DBS register value, used after a "read" SPI instruction (MISO)
END_TRANSMIT, // read DBS register value, used after a "read" SPI instruction (MISO)
ONE_SHOT_SPI, // end spi instruction
READ_MOSI
} SPI_CB_MODE;
/*========================
==== Global Variable ====
=========================*/
static bool STI = false;
static bool IsFirstData = true;
static uint8_t spi_state_counter = 0;
static uint8_t check_reg_counter = 0;
static bool ConnectState = false;
static bool ErrorRestart = false;
static SPI_CB_MODE SPICallBack;
static uint8 adc_spi_en_switch = 1;
/*
* Let C = command, S = status;
* StiCommand = 0b00CC_00SS
* The first C is record command, the second is sti
* The first S is record status, the second is sti
*
* rec_sti_command | meaning |
* 0x00 | command = interrupt; status = idle |
* 0x01 | command = interrupt; status = sti without rec |
* 0x02 | command = interrupt; status = rec without sti |
* 0x03 | command = interrupt; status = sti & rec |
* 0x10 | command = start rec; status = idle |
* 0x11 | command = start rec; status = sti without rec |
* 0x12 | command = start rec; status = rec without sti |
* 0x13 | command = start rec; status = sti & rec |
* 0x20 | command = start sti; status = idle |
* 0x21 | command = start sti; status = sti without rec |
* 0x22 | command = start sti; status = rec without sti |
* 0x23 | command = start sti; status = sti & rec |
* 0x30 | command = rec & sti; status = idle |
* 0x31 | command = rec & sti; status = sti without rec |
* 0x32 | command = rec & sti; status = rec without sti |
* 0x33 | command = rec & sti; status = sti & rec |
*/
#define ENABLE_REC 0x20
#define ENABLE_STI 0x10
#define STATUS_REC 0x02
#define STATUS_STI 0x01
static uint8_t rec_sti_command = 0x00; // 0=NOP; 0x01=stop; 2=start;
/*======================
==== event control ====
=====================*/
@@ -157,6 +214,7 @@ extern ICall_Semaphore semaphore;
// command return characteristic
#define BLE_CDR_BUFF_CHAR SIMPLEPROFILE_CHAR2
#define BLE_CDR_BUFF_SIZE SIMPLEPROFILE_CHAR2_LEN
#define BLE_CDR_SMALL_SIZE 10
// instruction input characteristic
#define BLE_INS_BUFF_CHAR SIMPLEPROFILE_CHAR3
@@ -182,12 +240,18 @@ extern ICall_Semaphore semaphore;
#define INS_TYPE_CIS 0x70
// VIS operator
#define VIS_ASK 0x30
#define VIS_INT 0x60
#define VIS_FUH 0x90
#define VIS_CAL 0xA0
#define VIS_STI 0xC0
#define VIS_RST 0xF0
#define VIS_REC 0x10
#define VIS_STI 0x20
#define VIS_STOP_REC 0x30
#define VIS_STOP_STI 0x40
#define VIS_ASK 0x50
#define VIS_INT 0x60
#define VIS_FAST_SET 0x70
#define VIS_EN_ADC_CLK 0x80
#define VIS_CAL 0xA0
#define VIS_START 0xC0
#define VIS_RST 0xF0
// CIS operator
#define CIS_NOP 0x00
@@ -292,7 +356,7 @@ static uint16_t CONNECT_HANDLE = 0;
/**
* command instruction buffer
*/
static uint8_t cdr_buf[BLE_CDR_BUFF_SIZE] = {0};
static uint8_t cdr_buf[BLE_CDR_SMALL_SIZE] = {0};
/*====================
==== event table ====
@@ -370,6 +434,8 @@ static void headstage_update_instruction(uint8_t *instruction) {
uint8_t ins_oper = instruction[1] & 0xF0;
uint8_t ins_len = instruction[1] & 0x0F;
switch (ins_type) {
case INS_TYPE_RIS: {
headstage_update_ris_instruction(ins_len, instruction + 2);
@@ -18,7 +18,7 @@ static uint8_t headstage_battery_percent() {
}
static uint8_t battery_volt = 256;
static uint8_t battery_volt;
static uint8_t headstage_battery_volt1() {
uint8_t internal_battery_percent;
uint32_t internal_batt_sense = AONBatMonBatteryVoltageGet();
@@ -23,26 +23,28 @@ static void CaliTable2u8(uint8_t* cali){
* - .......
*/
static void SendCaliValue(uint8_t CaliNumber){
uint8_t ch, gain_offset;
uint8_t cdr_buf[10];
uint8_t ch, cali_buf[BLE_CDR_BUFF_SIZE];
ch = 2 * (CaliNumber % 4);
uint8_t gain_level = CaliNumber / 4; // 0:gain, 1:offset
// ch = 2 * (CaliNumber % 4);
// uint8_t gain_level = CaliNumber / 4; // 0:gain, 1:offset
uint8_t channel_number = 8, index = 2;
uint8_t gain_level = 0;
cdr_buf[0] = CHIP_ID;
if(CaliNumber < 4){
gain_level = CaliNumber;
}
cdr_buf[1] = (uint8_t) (CaliTable.Ch[ch].Gain[gain_level] >> 8) & 0xFF;
cdr_buf[2] = (uint8_t) CaliTable.Ch[ch].Gain[gain_level] & 0x00FF;
cdr_buf[3] = (uint8_t) (CaliTable.Ch[ch].Offset[gain_level] >> 8) & 0xFF;
cdr_buf[4] = (uint8_t) CaliTable.Ch[ch].Offset[gain_level] & 0x00FF;
cdr_buf[5] = (uint8_t) (CaliTable.Ch[ch+1].Gain[gain_level] >> 8) & 0xFF;
cdr_buf[6] = (uint8_t) CaliTable.Ch[ch+1].Gain[gain_level] & 0x00FF;
cdr_buf[7] = (uint8_t) (CaliTable.Ch[ch+1].Offset[gain_level] >> 8) & 0xFF;
cdr_buf[8] = (uint8_t) CaliTable.Ch[ch+1].Offset[gain_level] & 0x00FF;
cali_buf[1] = CHIP_ID;
for(int i=0 ; i<channel_number ; i++){
cali_buf[index++] = (uint8_t) (CaliTable.Ch[i].Gain[gain_level] >> 8) & 0xFF;
cali_buf[index++] = (uint8_t) CaliTable.Ch[i].Gain[gain_level] & 0x00FF;
cali_buf[index++] = (uint8_t) (CaliTable.Ch[i].Offset[gain_level] >> 8) & 0xFF;
cali_buf[index++] = (uint8_t) CaliTable.Ch[i].Offset[gain_level] & 0x00FF;
}
cdr_buf[9] = 0; // don't care
cali_buf[0] = index - 1;
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, index, cali_buf);
}
#endif
@@ -0,0 +1,243 @@
#ifndef NEU_CALI_STI_H
#define NEU_CALI_STI_H
#include "headstage_cali_table.h"
typedef struct _StiCali{
uint16_t coefficient;
int16_t offset;
}StiCali;
struct _StiCaliStiTable{
StiCali p_ch;
StiCali n_ch;
}StiCaliTable =
#ifdef BOARD_TEST
{
.p_ch.coefficient = 10000,
.p_ch.offset = 0,
.n_ch.coefficient = 10000,
.n_ch.offset = 0
};
#elif defined(BOARD_00_81_F9_E4_8C_D0)
{
.p_ch.coefficient = 2199,
.p_ch.offset = -4615,
.n_ch.coefficient = 2162,
.n_ch.offset = -16395
};
#elif defined(BOARD_18_04_ED_37_C6_BE)
{
.p_ch.coefficient = 2270,
.p_ch.offset = -7039,
.n_ch.coefficient = 2259,
.n_ch.offset = -14128
};
#elif defined(BOARD_18_04_ED_37_C6_41)
{
.p_ch.coefficient = 2090,
.p_ch.offset = 4616,
.n_ch.coefficient = 1997,
.n_ch.offset = -40664
};
#elif defined(BOARD_18_04_ED_37_C6_DF)
{
.p_ch.coefficient = 2132,
.p_ch.offset = -3843,
.n_ch.coefficient = 2054,
.n_ch.offset = -21544
};
#elif defined(BOARD_18_04_ED_37_C6_C7)
{
.p_ch.coefficient = 2199,
.p_ch.offset = -7237,
.n_ch.coefficient = 2221,
.n_ch.offset = -15701
};
#elif defined(BOARD_00_81_F9_E4_8B_50)
{
.p_ch.coefficient = 2369,
.p_ch.offset = -11004,
.n_ch.coefficient = 2360,
.n_ch.offset = -11796
};
#elif defined(BOARD_00_81_F9_E4_9B_97)
{
.p_ch.coefficient = 2227,
.p_ch.offset = -9845,
.n_ch.coefficient = 2151,
.n_ch.offset = -26608
};
#elif defined(BOARD_18_04_ED_37_C6_52)
{
.p_ch.coefficient = 2024,
.p_ch.offset = -7686,
.n_ch.coefficient = 2086,
.n_ch.offset = -11282
};
#elif defined(BOARD_00_81_F9_E4_9B_EF)
{
.p_ch.coefficient = 2383,
.p_ch.offset = -8584,
.n_ch.coefficient = 2415,
.n_ch.offset = -20346
};
#elif defined(BOARD_A4_DA_32_D4_E9_1D)
{
.p_ch.coefficient = 2075,
.p_ch.offset = 6344,
.n_ch.coefficient = 2002,
.n_ch.offset = -5562
};
#elif defined(BOARD_A4_DA_32_D4_E8_7A)
{
.p_ch.coefficient = 2180,
.p_ch.offset = 6651,
.n_ch.coefficient = 2254,
.n_ch.offset = 136
};
#elif defined(BOARD_A4_DA_32_D4_F0_AC)
{
.p_ch.coefficient = 2125,
.p_ch.offset = -6660,
.n_ch.coefficient = 2170,
.n_ch.offset = -439
};
#elif defined(BOARD_A4_DA_32_D4_E8_7C)
{
.p_ch.coefficient = 2265,
.p_ch.offset = 6685,
.n_ch.coefficient = 2230,
.n_ch.offset = 2124
};
#elif defined(BOARD_A4_DA_32_D4_EF_39)
{
.p_ch.coefficient = 1976,
.p_ch.offset = 6641,
.n_ch.coefficient = 2035,
.n_ch.offset = 2834
};
#elif defined(BOARD_A4_DA_32_D4_E7_6A)
{
.p_ch.coefficient = 2076,
.p_ch.offset = 1154,
.n_ch.coefficient = 2096,
.n_ch.offset = -1073
};
#elif defined(BOARD_A4_DA_32_D4_E8_E6)
{
.p_ch.coefficient = 2306,
.p_ch.offset = -88454,
.n_ch.coefficient = 2418,
.n_ch.offset = -15140
};
#elif defined(BOARD_A4_DA_32_D4_E7_3B)
{
.p_ch.coefficient = 2262,
.p_ch.offset = -564,
.n_ch.coefficient = 2298,
.n_ch.offset = 44746
};
#elif defined(BOARD_A4_DA_32_D4_EE_E2)
{
.p_ch.coefficient = 2057,
.p_ch.offset = 5980,
.n_ch.coefficient = 2096,
.n_ch.offset = -21411
};
#elif defined(BOARD_A4_DA_32_D4_E8_71)
{
.p_ch.coefficient = 2175,
.p_ch.offset = -4549,
.n_ch.coefficient = 2220,
.n_ch.offset = 31468
};
#elif defined(BOARD_A4_DA_32_D4_EF_C4)
{
.p_ch.coefficient = 2348,
.p_ch.offset = -5830,
.n_ch.coefficient = 2374,
.n_ch.offset = -26403
};
#elif defined(BOARD_A4_DA_32_D4_EF_85)
{
.p_ch.coefficient = 2136,
.p_ch.offset = -3339,
.n_ch.coefficient = 2189,
.n_ch.offset = -30040
};
#elif defined(BOARD_A4_DA_32_D4_E7_DA)
{
.p_ch.coefficient = 2081,
.p_ch.offset = -3015,
.n_ch.coefficient = 2122,
.n_ch.offset = -21543
};
#elif defined(BOARD_A4_DA_32_D4_E6_EA)
{
.p_ch.coefficient = 2039,
.p_ch.offset = -262,
.n_ch.coefficient = 2127,
.n_ch.offset = -47259
};
#elif defined(BOARD_A4_DA_32_D4_EE_DB)
{
.p_ch.coefficient = 2214,
.p_ch.offset = -1170,
.n_ch.coefficient = 2351,
.n_ch.offset = -24636
};
#elif defined(BOARD_A4_DA_32_D4_E7_3A)
{
.p_ch.coefficient = 2210,
.p_ch.offset = -4855,
.n_ch.coefficient = 2339,
.n_ch.offset = -16434
};
#elif defined(BOARD_A4_DA_32_D4_E6_CF)
{
.p_ch.coefficient = 2135,
.p_ch.offset = -5206,
.n_ch.coefficient = 2193,
.n_ch.offset = -30885
};
#else
{
.p_ch.coefficient = 10000,
.p_ch.offset = 0,
.n_ch.coefficient = 10000,
.n_ch.offset = 0
};
#endif
#endif
@@ -1,6 +1,7 @@
#ifndef NEU_CHECK_INSTRUCTION
#define NEU_CHECK_INSTRUCTION
#include "headstage_instruction.h"
#include "neu/headstage_spi.h"
#include "neu/headstage_reset.h"
@@ -9,41 +10,66 @@ 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){
static void check_register(uint8_t register_to_check, uint16_t instruction_to_fit, NEU_WORK_STATE next_state){
if(check_reg_counter < 6){
SPICallBack = CONTINUOUS_TRANS;
spi_txbuf[0] = register_to_check;
spi_txbuf[1] = register_to_check;
spi_txbuf[2] = register_to_check;
spi_txbuf[0] = register_to_check & 0x7F;
spi_txbuf[1] = rec_sti_command;
spi_txbuf[2] = check_reg_counter;
spi_state_counter ++;
check_reg_counter ++;
headstage_spi_transaction(3);
}
else{
spi_state_counter = 0;
check_reg_counter = 0;
if(check_ins(instruction_to_fit)){
NEULIVE_STATE.state = next_state;
SPICallBack = ONE_SHOT_SPI;
// update rec_sti_command
if(!(rec_sti_command & ENABLE_STI)){
// close STI success
rec_sti_command &= ~STATUS_STI;
}
// if(rec_sti_command & ENABLE_STI){
// rec_sti_command |= STATUS_STI;
// }
}
else{
// 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;
// DBSReset();
// start recording failed
if( (rec_sti_command & ENABLE_REC) && !(rec_sti_command & STATUS_REC) ){
NEULIVE_STATE.state = NEU_WRITE_REC_INS;
NEULIVE_STATE.config_type = NEU_WARM_UP;
INSTRUCTION.ins_opcode = BIAS_ONE;
}
else{
INSTRUCTION.ins_opcode = BIAS_ONE;
// start sti failed
else if( (rec_sti_command & ENABLE_STI) && !(rec_sti_command & STATUS_STI) ){
NEULIVE_STATE.state = NEU_WRITE_STI_INS;
NEULIVE_STATE.config_type = NEU_WARM_UP;
INSTRUCTION.ins_opcode = T_ZE;
// make sure rec can restart
not_buf_offset = NOT_BUF_OFFSET_INIT;
IsFirstData = true;
}
// stop sti failed
else if( !(rec_sti_command & ENABLE_STI) && (rec_sti_command & STATUS_STI) ){
NEULIVE_STATE.state = NEU_STI_INT;
// make sure rec can restart
not_buf_offset = NOT_BUF_OFFSET_INIT;
IsFirstData = true;
}
SPICallBack = ONE_SHOT_SPI;
ReopenSPI();
}
@@ -51,4 +77,115 @@ static void check_register(uint8_t register_to_check, uint16_t instruction_to_fi
}
}
static uint8_t check_sti_register(uint8_t address, uint16_t instruction_to_fit);
static void check_sti_t1_t5(NEU_WORK_STATE next_state){
// get sti channel
uint8_t index, sti_channel[9];
for(index=0 ; index<9 ; index++){
sti_channel[index] = 0xFF;
}
// sti_channel will be [active_ch1, active_ch2, ..., 0xFF, 0xFF]
// where active_ch is the sti channel; 0xFF is used as an EOF
index = 0;
for(int i=0 ; i<8 ; i++){
if( (1 << i) & INSTRUCTION.sti_channel ){
sti_channel[index++] = i;
}
}
uint8_t register_address[5], register_index, success; // this is t1~t5 and sti_cycle number register address
uint16_t value_to_fit;
// check every active channel alternatively
for(index = 0 ; sti_channel[index]!=0xFF ; index++){
// check t1~t5 and sti-cycle register
for(register_index = 0 ; register_index < 5 ; register_index++){
// get register address
if(register_index < 4){
register_address[register_index] = sti_channel[index] * 4 + register_index + 1;
}
else{
register_address[register_index] = (sti_channel[index] / 2) + 42; // sti_cycle address
}
// get value to fit
if(register_index == 0){
uint16_t t1 = INSTRUCTION.sti_t1[sti_channel[index]];
uint16_t t21 = (INSTRUCTION.sti_t2[sti_channel[index]] & 0x003F) << 10;
value_to_fit = (t21) | (t1);
}
else if(register_index == 1){
uint16_t t22 = (INSTRUCTION.sti_t2[sti_channel[index]] >> 6) & 0x000F;
uint16_t t3 = INSTRUCTION.sti_t3[sti_channel[index]] << 4;
uint16_t t41 = (INSTRUCTION.sti_t4[sti_channel[index]] & 0x03) << 14;
value_to_fit = t41 | t3 | t22;
}
else if(register_index == 2){
uint16_t t42 = (INSTRUCTION.sti_t4[sti_channel[index]] >> 2) & 0xFFFF;
value_to_fit = t42;
}
else if(register_index == 3){
uint16_t t5 = (INSTRUCTION.sti_t5[sti_channel[index]]) & 0x03FF;
value_to_fit = t5;
}
else{
uint8_t odd_even = sti_channel[index] % 2;
if (!odd_even){
value_to_fit = (INSTRUCTION.current_sti_cycle[sti_channel[index] + 1] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel[index]]);
}
else{
value_to_fit = (INSTRUCTION.current_sti_cycle[sti_channel[index]] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel[index] - 1]);
}
}
success = check_sti_register(register_address[register_index], value_to_fit);
if(!success){
break;
}
}
if(!success){
break;
}
}
if(!success){
SPI_close(headstage_spi_handle);
NEULIVE_STATE.state = NEU_WRITE_STI_INS;
NEULIVE_STATE.config_type = NEU_WARM_UP;
INSTRUCTION.ins_opcode = T_ZE;
// make sure rec can restart
not_buf_offset = NOT_BUF_OFFSET_INIT;
IsFirstData = true;
ReopenSPI();
}
else{
NEULIVE_STATE.state = next_state;
}
SPICallBack = ONE_SHOT_SPI;
headstage_spi_transaction(3);
}
static uint8_t check_sti_register(uint8_t address, uint16_t instruction_to_fit){
check_reg_counter = 0;
while(check_reg_counter < 6){
SPICallBack = READ_REG;
spi_txbuf[0] = address & 0x7F;
spi_txbuf[1] = address;
spi_txbuf[2] = address;
headstage_spi_transaction(3); // check_reg_counter++ would be executed in SPI callback
}
check_reg_counter = 0;
// success = 1; failed = 0
return check_ins(instruction_to_fit);
}
#endif
@@ -0,0 +1,164 @@
#ifndef DBS_OBJECT_H
#define DBS_OBJECT_H
#include "neu/headstage_spi.h"
#define SYS_RESERVED_INDEX 0
#define SYS_GENERAL_ENABLE_INDEX 1
#define SYS_LNA_BIOS1_INDEX 2
#define SYS_LNA_BIOS2_INDEX 3
#define REC_CHANNEL_INDEX 0
#define REC_GAIN_INDEX 1
#define REC_ADC_CLOCK_INDEX 2
#define STI_ENABLE_INDEX 0
#define STI_AMP_POS_INDEX 1
#define STI_AMP_NEG_INDEX 2
#define STI_POLARITY_INDEX 3
#define STI_CYCLE_CH01_INDEX 4
#define STI_CYCLE_CH23_INDEX 5
#define STI_CYCLE_CH45_INDEX 6
#define STI_CYCLE_CH67_INDEX 7
#define STI_CLK_RATIO_INDEX 8
#define STI_ARBITRARY_EN_INDEX 9
#define STI_MODE_INDEX 10
#define STI_DURATION0_INDEX 11
#define STI_DURATION1_INDEX 12
#define STI_DURATION2_INDEX 13
#define STI_DURATION3_INDEX 14
//#define DBS_REGISTER \
// uint8_t address; \
// void (*write_reg) (DBSRegister *self, uint32_t reg_value); \
// uint32_t (*read_reg) (DBSRegister *self)
typedef struct _DBSRegister{
uint8_t address;
bool WriteRegister, CheckRegister;
void (*write_reg) (struct _DBSRegister *self, uint16_t reg_value);
void (*read_reg) (struct _DBSRegister *self);
}DBSRegister;
void write_reg(DBSRegister *self, uint16_t reg_value){
spi_txbuf[0] = 0x80 | self->address;
spi_txbuf[1] = (reg_value >> 8) & 0xFF ;
spi_txbuf[2] = reg_value & 0xFF;
SPICallBack = ONE_SHOT_SPI;
headstage_spi_transaction(SPI_BUFFER_SIZE);
}
void read_reg(DBSRegister *self){
spi_txbuf[0] = 0x7F & self->address;
spi_txbuf[1] = 0x7F & self->address; // it's don't care actually
spi_txbuf[2] = 0x7F & self->address; // it's don't care actually
SPICallBack = READ_REG;
headstage_spi_transaction(SPI_BUFFER_SIZE);
}
static uint16_t sys_register_default_value[4] = {
0x0000,
0x40F2,
0x0210,
0x4210
};
static uint16_t rec_register_value[3];
static uint16_t sti_register_value[43];
static DBSRegister sys_register[4];
static DBSRegister rec_register[3];
static DBSRegister sti_register[43];
static void InitSysRegister(){
sys_register[SYS_RESERVED_INDEX].address = 0x00;
sys_register[SYS_GENERAL_ENABLE_INDEX].address = 47; // general enable
sys_register[SYS_LNA_BIOS1_INDEX].address = 57;
sys_register[SYS_LNA_BIOS2_INDEX].address = 58;
for(int i=0 ; i<sizeof(sys_register)/sizeof(DBSRegister) ; i++){
sys_register[i].WriteRegister = false;
sys_register[i].CheckRegister = false;
sys_register[i].write_reg = &write_reg;
sys_register[i].read_reg = &read_reg;
}
}
static void InitRecRegister(){
rec_register[REC_CHANNEL_INDEX].address = 48;
rec_register[REC_GAIN_INDEX].address = 49;
rec_register[REC_ADC_CLOCK_INDEX].address = 51; // sampling rate
for(int i=0 ; i<sizeof(rec_register)/sizeof(DBSRegister) ; i++){
rec_register[i].WriteRegister = false;
rec_register[i].CheckRegister = false;
rec_register[i].write_reg = &write_reg;
rec_register[i].read_reg = &read_reg;
}
}
static void InitStiRegister(){
sti_register[STI_ENABLE_INDEX].address = 46;
sti_register[STI_AMP_POS_INDEX].address = 37;
sti_register[STI_AMP_NEG_INDEX].address = 38;
sti_register[STI_POLARITY_INDEX].address = 40;
sti_register[STI_CYCLE_CH01_INDEX].address = 42;
sti_register[STI_CYCLE_CH23_INDEX].address = 43;
sti_register[STI_CYCLE_CH45_INDEX].address = 44;
sti_register[STI_CYCLE_CH67_INDEX].address = 45;
sti_register[STI_CLK_RATIO_INDEX].address = 52;
sti_register[STI_ARBITRARY_EN_INDEX].address = 54;
sti_register[STI_MODE_INDEX].address = 56;
for(int ch=0 ; ch<8 ; ch++){
sti_register[ch*4 + STI_DURATION0_INDEX].address = ch*4 + 1;
sti_register[ch*4 + STI_DURATION1_INDEX].address = ch*4 + 2;
sti_register[ch*4 + STI_DURATION2_INDEX].address = ch*4 + 3;
sti_register[ch*4 + STI_DURATION3_INDEX].address = ch*4 + 4;
}
for(int i=0 ; i<sizeof(sti_register)/sizeof(DBSRegister) ; i++){
sti_register[i].WriteRegister = false;
sti_register[i].CheckRegister = false;
sti_register[i].write_reg = &write_reg;
sti_register[i].read_reg = &read_reg;
}
}
static void InitDBSRegister(){
InitSysRegister();
InitRecRegister();
InitStiRegister();
// for(int i=1 ; i<sizeof(sys_register)/sizeof(DBSRegister) ; i++){
for(int i=1 ; i<4 ; i++){
sys_register[i].WriteRegister = true;
}
flag_notify(EVT_NEU_SPI);
}
static void ResetDBSRegister(){
for(int i=0 ; i<sizeof(sys_register)/sizeof(DBSRegister) ; i++){
sys_register[i].WriteRegister = false;
sys_register[i].CheckRegister = false;
sys_register[i].write_reg = &write_reg;
sys_register[i].read_reg = &read_reg;
}
for(int i=0 ; i<sizeof(rec_register)/sizeof(DBSRegister) ; i++){
rec_register[i].WriteRegister = false;
rec_register[i].CheckRegister = false;
rec_register[i].write_reg = &write_reg;
rec_register[i].read_reg = &read_reg;
}
for(int i=0 ; i<sizeof(sti_register)/sizeof(DBSRegister) ; i++){
sti_register[i].WriteRegister = false;
sti_register[i].CheckRegister = false;
sti_register[i].write_reg = &write_reg;
sti_register[i].read_reg = &read_reg;
}
}
#endif
@@ -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. */
@@ -40,11 +44,11 @@ struct HEADSTAGE_PARAMETER_TABLE {
* -----------
*/
/**< these parameter define the bias voltage of amplifier. */
uint8_t vgrp;
uint8_t vgrn;
uint8_t vgr_int_old;
uint8_t vgr_intp;
uint8_t vgr_intn;
uint16_t vgrp;
uint16_t vgrn;
uint16_t vgr_int_old;
uint16_t vgr_intp;
uint16_t vgr_intn;
uint8_t ins_opcode; /**< check instruction opcode which is transmitted to DBS. */
@@ -58,6 +62,9 @@ struct HEADSTAGE_PARAMETER_TABLE {
uint16_t sti_amplitude_h; /**< positive side amplitude. */
uint16_t sti_amplitude_l; /**< negative side amplitude. */
uint16_t sti_amplitude_h_cali;
uint16_t sti_amplitude_l_cali;
uint16_t sys_clk_ratio; /**< frequency divider ratio for digital core clock. */
uint16_t adc_clock_ratio; /**< frequency divider ratio for adc clock. */
uint16_t sti_clock_ratio; /**< frequency divider ratio for stimulation clock. */
@@ -77,16 +84,11 @@ struct HEADSTAGE_PARAMETER_TABLE {
* manage which operation to be conducted
*/
struct HEADSTAGE_STATE {
uint8_t state;
NEU_WORK_STATE state;
uint8_t config_type;
NEU_CONFIG_TYPE config_type;
uint8_t index;
} NEULIVE_STATE = {0};
static bool STI = false;
static uint8_t spi_state_counter = 0;
static bool ConnectState = false;
static bool IsFirstData = true;
} NEULIVE_STATE={NEU_IDLE, NEU_WARM_UP, 0};
#endif
@@ -82,6 +82,7 @@ static uint16_t headstage_led_set_buffer(uint16_t *ins_buf, uint8_t repeat, LEDP
#define COLOR_BLUE 5
#define COLOR_CYAN 6
#define COLOR_MAGENTA 7
#define COLOR_PURPLE 8
#define COLOR_WHITE 9
// clang-format on
@@ -93,7 +94,7 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x00, .blue = 0x00};
break;
case COLOR_ORANGE:
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x03, .blue = 0x00};
parameter = (LEDParameter){.luminance = 0xE1, .red = 0xFF, .green = 0x98, .blue = 0x00};
break;
case COLOR_YELLOW:
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x0F, .green = 0x0F, .blue = 0x00};
@@ -113,6 +114,9 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
case COLOR_WHITE:
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x0F, .green = 0x7F, .blue = 0x1F};
break;
case COLOR_PURPLE:
parameter = (LEDParameter){.luminance = 0xE1, .red = 0x7F, .green = 0x0F, .blue = 0x7F};
break;
default:
case COLOR_BLACK:
parameter = (LEDParameter){.luminance = 0x00, .red = 0x00, .green = 0x00, .blue = 0x00};
@@ -129,7 +133,7 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
#ifdef HEADSTAGE_LED_USE_SPI
#include <Board.h>
#include <board.h>
#include <ti/drivers/SPI.h>
#include <ti/drivers/dma/UDMACC26XX.h>
#include <ti/drivers/spi/SPICC26XXDMA.h>
@@ -224,4 +228,29 @@ static void headstage_led_spi_color(uint8_t color) {
#endif // HEADSTAGE_LED_USE_GPIO
static void headstage_led_control(){
if( (rec_sti_command & STATUS_REC) && (rec_sti_command & STATUS_STI) ){
headstage_led_color(COLOR_MAGENTA);
}
else if((rec_sti_command & STATUS_REC)){
headstage_led_color(COLOR_BLUE);
}
else if((rec_sti_command & STATUS_STI)){
headstage_led_color(COLOR_ORANGE);
}
else{
if(ErrorRestart){
headstage_led_color(COLOR_RED);
}
else if(ConnectState){
headstage_led_color(COLOR_CYAN);
}
else{
headstage_led_color(COLOR_GREEN); // color green
}
}
}
#endif // HEADSTAGE_LED_H
@@ -3,7 +3,7 @@
#ifndef HEADSTAGE_PIN_H
#define HEADSTAGE_PIN_H
#include <Board.h>
#include <board.h>
#include <ti/drivers/PIN.h>
#if defined(HEADSTAGE_TNI_H)
@@ -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
@@ -0,0 +1,103 @@
#ifndef NEU_REC_INS_H
#define NEU_REC_INS_H
#include "headstage_instruction.h"
/**
* @fn build amplifier bias
*/
static bool build_amp_bias(uint32_t* value) {
uint8_t ins_opcode = INSTRUCTION.ins_opcode;
switch (ins_opcode) {
case BIAS_ONE: {
*value = (0x01 << 23) | (0x39 << 16) | NEU_LNA_BIAS_ONE;
INSTRUCTION.ins_opcode = BIAS_TWO;
return false;
}
case BIAS_TWO: {
*value = (0x01 << 23) | (0x3A << 16) | NEU_LNA_BIAS_TWO;
INSTRUCTION.ins_opcode = BIAS_TWO;
return true;
}
default: {
return false;
}
}
}
static NEU_CONFIG_TYPE build_rec_ins(NEU_CONFIG_TYPE config_type, uint32_t* value) {
bool done;
switch (config_type) {
/* These are recording parameter */
case NEU_WARM_UP:{
*value = (0x00 << 23) | (0x01 << 16) | 1;
return NEU_WARM_UP2;
}
case NEU_WARM_UP2:{
*value = (0x00 << 23) | (0x01 << 16) | 2;
return NEU_WARM_UP3;
}
case NEU_WARM_UP3:{
*value = (0x00 << 23) | (0x01 << 16) | 3;
return NEU_SET_GENERAL_EN;
}
case NEU_SET_GENERAL_EN: {
*value = (0x01 << 23) | (0x2F << 16) | NEU_GENERAL_EN;
return NEU_SET_REC_CHANNEL;
}
case NEU_SET_REC_CHANNEL: {
*value = (0x01 << 23) | (0x30 << 16) | INSTRUCTION.recording_channel;
return NEU_SET_AMP_GAIN;
}
case NEU_SET_AMP_GAIN: {
*value = (0x01 << 23) | (0x31 << 16) | INSTRUCTION.amplifier_gain;
return NEU_SET_VGRP;
}
case NEU_SET_VGRP:{
*value = (0x01 << 23) | (0x39 << 16) | (INSTRUCTION.vgrp << 5) | INSTRUCTION.vgrn;
return NEU_SET_VGRP_OLD;
}
case NEU_SET_VGRP_OLD:{
*value = (0x01 << 23) | (0x3A << 16) | (INSTRUCTION.vgr_int_old << 10) | (INSTRUCTION.vgr_intp << 5) | INSTRUCTION.vgr_intn;
return NEU_SETUP_DONE;
}
// case NEU_SET_SYS_CLK: {
// *value = (0x01 << 23) | (0x32 << 16) | INSTRUCTION.sys_clk_ratio;
// return NEU_SET_ADC_CLK;
// }
case NEU_SET_ADC_CLK: {
if(INSTRUCTION.adc_clock_ratio < 28){
INSTRUCTION.adc_clock_ratio = 28;
}
*value = (0x01 << 23) | (0x33 << 16) | INSTRUCTION.adc_clock_ratio;
// *value = (0x01 << 23) | (0x33 << 16) | 0x00C8;
return NEU_SET_AMP_BIAS;
}
case NEU_SET_AMP_BIAS: {
done = build_amp_bias(value);
if (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;
// }
default: {
return NEU_WARM_UP;
}
}
}
#endif
@@ -0,0 +1,30 @@
#ifndef STI_CALI_H
#define STI_CALI_H
#include "headstage_cali_sti.h"
static uint16_t UserCode2StiCode(uint16_t amp, uint8_t positive_ch){
// get real current value (uA)
uint32_t sti_code, real_amp = amp * 5;
if(StiCaliTable.p_ch.coefficient == 10000 && StiCaliTable.p_ch.offset == 0){
return amp;
}
if(StiCaliTable.n_ch.coefficient == 10000 && StiCaliTable.n_ch.offset == 0){
return amp;
}
// trans into sti code
if(positive_ch){
sti_code = StiCaliTable.p_ch.coefficient * real_amp + StiCaliTable.p_ch.offset;
}
else{
sti_code = StiCaliTable.n_ch.coefficient * real_amp + StiCaliTable.n_ch.offset;
}
sti_code = sti_code / 10000;
return (uint16_t) (sti_code);
}
#endif
@@ -0,0 +1,213 @@
#ifndef NEU_STI_INS_H
#define NEU_STI_INS_H
#include "headstage_sti_cali.h"
#include "headstage_instruction.h"
/**
* @fn get_sti_channel
*/
#define ALL_STI_CH_CONFIG_DONE 0xFF
static uint8_t get_sti_channel(uint8_t sti_channel, uint8_t ch_number_config_done) {
uint8_t sti_ch;
uint8_t total_sti_ch_number = BitCount(sti_channel);
if(ch_number_config_done == total_sti_ch_number){ return ALL_STI_CH_CONFIG_DONE; }
for (uint8_t i = 0; i < NEU_STI_CHANNEL_COUNTS-1 ; i++) {
if ( (1 << i) & sti_channel) {
if(ch_number_config_done > 0){
ch_number_config_done --;
}
else{
sti_ch = i;
return sti_ch;
}
}
}
return 9;
}
/**
* @fn build sti instruction with channel information
*/
static bool build_sti_cur_instruction(uint8_t sti_channel, uint32_t* value) {
uint8_t ins_opcode = INSTRUCTION.ins_opcode;
uint8_t op_neu; /** this is the final opcode to write register table in DBS */
switch (ins_opcode) {
case T_ZE:{
// sending garbage SPI (want to warm up SPI)
op_neu = 1;
*value = (0x00 << 23) | (op_neu << 16) | 1;
INSTRUCTION.ins_opcode = T_ST;
return false;
}
case T_ST: {
op_neu = sti_channel * 4 + 1;
uint16_t t1 = INSTRUCTION.sti_t1[sti_channel];
uint16_t t21 = (INSTRUCTION.sti_t2[sti_channel] & 0x003F) << 10;
*value = (0x01 << 23) | (op_neu << 16) | (t21) | (t1);
INSTRUCTION.ins_opcode = T_ND;
return false;
}
case T_ND: {
op_neu = sti_channel * 4 + 2;
uint16_t t22 = (INSTRUCTION.sti_t2[sti_channel] >> 6) & 0x000F;
uint16_t t3 = INSTRUCTION.sti_t3[sti_channel] << 4;
uint16_t t41 = (INSTRUCTION.sti_t4[sti_channel] & 0x03) << 14;
*value = (0x01 << 23) | (op_neu << 16) | t41 | t3 | t22;
INSTRUCTION.ins_opcode = T_RD;
return false;
}
case T_RD: {
op_neu = sti_channel * 4 + 3;
uint16_t t42 = (INSTRUCTION.sti_t4[sti_channel] >> 2) & 0xFFFF;
*value = (0x01 << 23) | (op_neu << 16) | t42;
INSTRUCTION.ins_opcode = T_FT;
return false;
}
case T_FT: {
op_neu = sti_channel * 4 + 4;
uint16_t t5 = (INSTRUCTION.sti_t5[sti_channel]) & 0x03FF;
*value = (0x01 << 23) | (op_neu << 16) | t5;
INSTRUCTION.ins_opcode = STI_CYCLE;
return false;
}
case STI_CYCLE: {
op_neu = (sti_channel / 2) + 42;
uint8_t odd_even = sti_channel % 2;
INSTRUCTION.ins_opcode = T_ZE;
// if (NEULIVE_STATE.config_type == NEU_SET_STI_VOLT) INSTRUCTION.ins_opcode = HIGH_SIDE;
if(sti_channel == 8){
// voltage stimulate
op_neu = 41;
*value = (0x01 << 23) | (op_neu << 16) | (0x00 << 8) | (INSTRUCTION.current_sti_cycle[sti_channel]);
return true;
}
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] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel - 1]);
}
return true;
}
default: {
INSTRUCTION.ins_opcode = T_ZE;
return false;
}
}
}
/**
* @fn build stimulation voltage
*/
static bool build_sti_amplitude(uint32_t* value) {
uint8_t ins_opcode = INSTRUCTION.ins_opcode;
switch (ins_opcode) {
case HIGH_SIDE: {
*value = (0x01 << 23) | (0x25 << 16) | INSTRUCTION.sti_amplitude_h_cali;
INSTRUCTION.ins_opcode = LOW_SIDE;
return false;
}
case LOW_SIDE: {
*value = (0x01 << 23) | (0x26 << 16) | INSTRUCTION.sti_amplitude_l_cali;
// INSTRUCTION.ins_opcode = VOLT_MODE_AMP;
INSTRUCTION.ins_opcode = BIAS_ONE;
// return false;
return true;
}
case VOLT_MODE_AMP: {
*value = (0x01 << 23) | (0x27 << 16) | INSTRUCTION.voltage_sti_amplitude;
INSTRUCTION.ins_opcode = BIAS_ONE;
return true;
}
default: {
return false;
}
}
}
static NEU_CONFIG_TYPE build_sti_ins(NEU_CONFIG_TYPE config_type, uint32_t* value){
bool single_ch_config_done;
bool done;
switch (config_type) {
/* These are recording parameter */
case NEU_WARM_UP:{
*value = (0x00 << 23) | (0x01 << 16) | 1;
return NEU_WARM_UP2;
}
case NEU_WARM_UP2:{
*value = (0x00 << 23) | (0x01 << 16) | 2;
return NEU_WARM_UP3;
}
case NEU_WARM_UP3:{
*value = (0x00 << 23) | (0x01 << 16) | 3;
return NEU_SET_STI_CUR;
}
// set stimulate t1~t5
case NEU_SET_STI_CUR: {
uint8_t sti_channel = get_sti_channel(INSTRUCTION.sti_channel, INSTRUCTION.sti_ch_config_done);
// go to config sti amplitude
if (sti_channel == ALL_STI_CH_CONFIG_DONE) {
INSTRUCTION.sti_ch_config_done = 0;
INSTRUCTION.ins_opcode = HIGH_SIDE;
// get correct amplitude sti code
INSTRUCTION.sti_amplitude_h_cali = UserCode2StiCode(INSTRUCTION.sti_amplitude_h, POSITIVE_CHANNEL);
INSTRUCTION.sti_amplitude_l_cali = UserCode2StiCode(INSTRUCTION.sti_amplitude_l, NEGATIVE_CHANNEL);
return NEU_SET_STI_VOLT;
}
// config next sti channel
else {
single_ch_config_done = build_sti_cur_instruction(sti_channel, value);
if(single_ch_config_done){ INSTRUCTION.sti_ch_config_done++; }
return NEU_SET_STI_CUR;
}
}
// config sti amplitude
case NEU_SET_STI_VOLT: {
done = build_sti_amplitude(value);
if (done) {
return NEU_SET_POLARITY;
} else {
return NEU_SET_STI_VOLT;
}
}
case NEU_SET_POLARITY: {
*value = (0x01 << 23) | (0x28 << 16) | INSTRUCTION.current_sti_polarity;
return NEU_SET_STI_CLK;
}
case NEU_SET_STI_CLK: {
*value = (0x01 << 23) | (0x34 << 16) | INSTRUCTION.sti_clock_ratio;
*value = (0x01 << 23) | (0x34 << 16) | 2;
return NEU_SET_STI_MODE;
}
// case NEU_SET_ARBITRARY: {
// *value = (0x01 << 23) | (0x36 << 16) | INSTRUCTION.arbitrary_en;
// return NEU_SET_ARB_INDEX;
// }
// case NEU_SET_ARB_INDEX: {
// *value = (0x01 << 23) | (0x37 << 16) | INSTRUCTION.arbitrary_index;
// return NEU_SET_STI_MODE;
// }
case NEU_SET_STI_MODE: {
*value = (0x01 << 23) | (0x38 << 16) | (INSTRUCTION.sti_mode << 2) | (INSTRUCTION.sti_h_bridge << 1) | (INSTRUCTION.sti_ref);
return NEU_SETUP_DONE;
}
default: {
return NEU_WARM_UP;
}
}
}
#endif
@@ -3,14 +3,42 @@
#define VERSION_DATE
#define VERSION_DATE_YEAR 20
#define VERSION_DATE_MONTH 3
#define VERSION_DATE_DAY 23
#define VERSION_DATE_HOUR 15
#define VERSION_DATE_MINUTE 25
#define VERSION_DATE_MONTH 10
#define VERSION_DATE_DAY 26
#define VERSION_DATE_HOUR 17
#define VERSION_DATE_MINUTE 3
// 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 764bd9364d7a99761ada31d35af557a39e1d65a4
#define VERSION_GIT_BRANCH neulive20_development_onchange_central
static void get_board_name(char *board_name_ch, uint8 *board_name_int, uint8 name_size){
uint8 name_offset = 18;
for(int i=0, k=0; i<name_size+1 ; i++){
if('0' <= board_name_ch[name_offset + i] && board_name_ch[name_offset + i] <= '9'){
board_name_int[k++] = board_name_ch[name_offset + i] - '0';
}
else if('A' <= board_name_ch[name_offset + i] && board_name_ch[name_offset + i] <= 'F'){
board_name_int[k++] = board_name_ch[name_offset + i] - 'A' + 10;
}
else if(board_name_ch[name_offset + i] == '_'){
continue;
}
else{
// error occur
for(int j=0 ; j<name_size/2 ; j++){
board_name_int[j] = 0xFF;
}
return;
}
}
for(int i=0 ; i<name_size/2 ; i++){
board_name_int[i] = (board_name_int[2*i] << 4) | (board_name_int[2*i + 1]);
}
}
#endif
@@ -3,7 +3,7 @@
#ifndef HEADSTAGE_WATCHDOG
#define HEADSTAGE_WATCHDOG
#include <Board.h>
#include <board.h>
#include <ti/drivers/Watchdog.h>
#include <ti/drivers/watchdog/WatchdogCC26XX.h>
@@ -8,11 +8,93 @@
#error "headstage/headstage_notify.h not included"
#endif
#include "headstage_dbs_object.h"
#define NOT_BUF_OFFSET_INIT 8
#include "headstage_cali_table.h"
static uint8_t numFFT = 16; // user define
static uint8_t step = 8; // which is numFFT/2
static uint8_t stageFFT = 4; // which is log2(numFFT)
static int twiddle_real[16] = {10000, 9238, 7071, 3826, 0, -3827, -7072, -9239, -10000, -9239, \
-7072, -3827, -1, 3826, 7071, 9238};
static int twiddle_imag[16] = { 0, -3827, -7072, -9239, -10000, -9239, -7072, -3827, -1, 3826, \
7071, 9238, 10000, 9238, 7071, 3826};
static void FFT(int* pred_LFP, int* imag_LFP, int numFFT);
static void BitReverse(int* BR_Array, int numFFT);
static void CLP(uint16_t raw_data);
static int ADC_U2S( uint16_t unsigned_buff);
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static void headstage_notify_set_timestamp();
static void headstage_notify_flip_buffer();
static uint8_t headstage_notify_append_data(uint8_t *data_value);
/**
* @fn headstage_neu_append_notify_data
*/
#define CHANNEL_VALID (INSTRUCTION.recording_channel & (0x0001 << channel))
static void headstage_neu_append_notify_data() {
uint8_t channel = spi_rxbuf[0];
// close-reopen SPI, if the first channel received is invalid
if(IsFirstData){
// start record
if((INSTRUCTION.recording_channel & (0x0001 << channel)) && (channel < 16)){
IsFirstData = false;
}
// restart SPI
else{
SPI_close(headstage_spi_handle);
ReopenSPI();
IsFirstData = true;
return;
}
}
// discard illegal channel
uint16_t valid_channel = INSTRUCTION.recording_channel & (0x0001 << channel);
if(!(INSTRUCTION.recording_channel & (0x0001 << channel)) || (channel > 15)){
// illegal channel
return;
}
uint8_t not_buf[2];
not_buf[0] = (channel & 0x0F) << 4 | (spi_rxbuf[1] & 0x0F);
not_buf[1] = spi_rxbuf[2];
// Borshin closed-loop start here <<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>----------------------
uint16_t borshin_raw;
uint8_t borshin_a;
uint8_t borshin_b;
uint8_t borshin_sample_rate;
uint16_t borshin_real;
borshin_raw = (spi_rxbuf[1]&0x0F)<<8 | spi_rxbuf[2];
borshin_a = CaliTable.Ch[channel].Gain[ rec_register_value[REC_CHANNEL_INDEX] ];
borshin_b = CaliTable.Ch[channel].Offset[ rec_register_value[REC_CHANNEL_INDEX] ];
borshin_real = borshin_raw * borshin_a + borshin_b; // range from [ FFF , 000 ]
borshin_sample_rate = 2000000/10/rec_register_value[REC_ADC_CLOCK_INDEX];
CLP( borshin_raw ); // This function input is 12-bit value
// the function will buffer 16-point then
// perform 16-point FFT.
// Afterwards, calculate sum of PSD then
// decided if HVS happened. (GPIO_4)
// Borshin closed-loop END here <<<<<<<<<<<<<<<<<<<<----------------------------->>>>>>>>>>>>>>>>>>>>
uint8_t data_size = headstage_notify_append_data(not_buf);
if (data_size >= BLE_NOT_BUFF_SIZE) {
headstage_notify_flip_buffer();
headstage_notify_send();
}
}
static void headstage_notify_set_timestamp() {
not_time_stamp = headstage_time_stamp_us();
@@ -23,7 +105,7 @@ static void headstage_notify_set_timestamp() {
}
static void headstage_notify_flip_buffer() {
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 3;
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 2;
headstage_notify_buffer[0] = CHIP_ID;
headstage_notify_buffer[1] = data_count;
@@ -40,11 +122,9 @@ static uint8_t headstage_notify_append_data(uint8_t *data_value) {
if (data_value == NULL) {
headstage_notify_buffer[not_buf_offset++] = 0x00;
headstage_notify_buffer[not_buf_offset++] = 0x00;
headstage_notify_buffer[not_buf_offset++] = 0x00;
} else {
headstage_notify_buffer[not_buf_offset++] = data_value[0];
headstage_notify_buffer[not_buf_offset++] = data_value[1];
headstage_notify_buffer[not_buf_offset++] = data_value[2];
}
if (not_buf_offset >= BLE_NOT_BUFF_SIZE - 1) {
@@ -61,3 +141,179 @@ static uint8_t headstage_notify_append_data(uint8_t *data_value) {
}
#endif // HEADSTAGE_NOTIFY_TDC4VAF2_H
/*********************************************************************
* @fn FFT
*
* @brief TI Cortex M3 doesn't have floating-point ALU, we have to do
* fixed-point FFT. And in-place FFT because lack of RAM.
*
* @param None.
*
* @return None.
*/
static void FFT(int* pred_LFP, int* imag_LFP, int numFFT){
// testing_sig = !testing_sig;
// uint8_t stageFFT = 6; // static global log2(numFFT)
int l;
int product_real, product_imag;
int upfly_real, upfly_imag;
int downfly_real, downfly_imag;
for (int i=0; i<stageFFT; i++){
l = 1<<i;
for (int j=0; j<numFFT; j+=2*l){
for (int k=0; k<l; k++){
//printf("stage = %d , butterfly_top = %d , butterfly_down = %d , twiddle[%d] \n", i, j+k, j+k+l, NFFT*(k)/2/l);
product_real = pred_LFP[j+k+l] * twiddle_real[numFFT*(k)/2/l] \
- imag_LFP[j+k+l] * twiddle_imag[numFFT*(k)/2/l];
product_imag = pred_LFP[j+k+l] * twiddle_imag[numFFT*(k)/2/l] \
+ imag_LFP[j+k+l] * twiddle_real[numFFT*(k)/2/l];
product_real = product_real/10000; // left shift number =10 which is up to Int_twiddle-factor
product_imag = product_imag/10000;
upfly_real = pred_LFP[j+k] + product_real;
upfly_imag = imag_LFP[j+k] + product_imag;
downfly_real = pred_LFP[j+k] - product_real;
downfly_imag = imag_LFP[j+k] - product_imag;
pred_LFP[j+k] = upfly_real;
imag_LFP[j+k] = upfly_imag;
pred_LFP[j+k+l] = downfly_real;
imag_LFP[j+k+l] = downfly_imag;
}
}
}
return;
}
/*********************************************************************
* @fn ADC_U2S
*
* @brief ADC sample data in 12-bit which is FFF~000, but for FFT
* it needs to be pulled back to +7FF to -7FF. These is based
* on simulation result, which is like the function ADC_ISR()
* in Ramesh or Remy's code. [ ADC_unsigned_2_signed ]
*
* @param unsigned 16-bit input
*
* @return signed 16-bit output ----_0000_0000_0000 ~ ----_1000_0000_0000
*/
static int ADC_U2S( uint16_t unsigned_buff){
// 0x0FFF ~ 0x0000 (16-bit unsigned)
int output; // 0x07FF-0x0000 ~ 0x0FFF-0x0800
// int is 32-bit 0x0000_0000
if ( unsigned_buff >= 0x00000800)
output = unsigned_buff - 0x00000800;
else
output = unsigned_buff | 0xFFFFF800;
return output;
}
/*********************************************************************
* @fn BitReverse
*
* @brief Do array Bit-Reverse before perform FFT
*
* @param None.
*
* @return None.
*/
static void BitReverse(int* BR_Array, int numFFT){
// This BIR specify for 7-bit (0000_0000 ~ 0111_1111)
uint8_t n=0;
int tmp;
for (uint8_t i=0; i<numFFT; i++){
n = i; // printf ("%d %d\n",i,n);
n = (n&0x0f)<<4 | (n&0xf0)>>4; // 0123_4567 -> 4567_0123
n = (n&0x33)<<2 | (n&0xcc)>>2; // 4567_0123 -> 6745_2301
n = (n&0xaa)<<2 | (n&0x55)>>1; // 7856_3412 -> 7654_3210
n = n >> 1; // 7654_3210 -> 0765_4321
if (n>i){
tmp = BR_Array[n];
BR_Array[n] = BR_Array[i];
BR_Array[i] = tmp;
}
}
return;
} // END Bit Reverse Order Sort
/*********************************************************************
* @fn CLP ( Closed LooP )
*
* @brief
*
* @param None.
*
* @return None.
*/
static void CLP(uint16_t unsigned_real_data){
int signed_buff;
static int accumu_sum;
static int x_in[16];
static int real[16];
static int imag[16];
static int count_sample;
static int count_data;
int abs_tmp;
static int present, past1, past2, hvs;
// static int w[6] = {1597,-1909,1856,-1190,630,23};
static int w[6] = { 1, -2, 2, -1, 1, 0};
count_sample++; // count+1 every 1-ms
if (count_sample>=24){ // ensure sample LFP data every 24-ms(41.6667Hz)
signed_buff = ADC_U2S(unsigned_real_data); // FFF ~ 000 to +7FF ~ -7FF
x_in[count_data] = signed_buff;
real[count_data] = signed_buff;
imag[count_data] = 0;
count_sample = 0; // re-calculate count
count_data++;
if (count_data>=6){
accumu_sum = 0;
for (int i=6;i<numFFT;i++){
real[i] = ( w[0] * real[i-1] \
+ w[1] * real[i-2] \
+ w[2] * real[i-3] \
+ w[3] * real[i-4] \
+ w[4] * real[i-5] \
+ w[5] * real[i-6] );
imag[i] = 0;
}
BitReverse( real, numFFT);
FFT( real, imag, numFFT);
for (int i=1;i<6;i++){
if (i>=2&&i<=4){
accumu_sum += real[i]*real[i]+imag[i]*imag[i];
}
real[i-1] = x_in[i];
imag[i-1] = 0;
x_in[i-1] = x_in[i];
}
present = ( (accumu_sum) > 11500000 )?1:0;
if (present+past1+past2==3)
hvs = 1;
else
hvs = 0;
past2 = past1;
past1 = present;
if (hvs==1)
headstage_pin_output(PIN_CLP, 1);
else
headstage_pin_output(PIN_CLP, 0);
count_data--;
}
}
return;
}
@@ -29,7 +29,8 @@
#define PIN_LED_CLK IOID_1 // SPI1 clock
#define PIN_DC_DC IOID_2 // STI select need
#define PIN_EN_ADC_SPI_CLK IOID_3 //
#define PIN_BATT_HALF IOID_4 //
//#define PIN_BATT_HALF IOID_4 //
#define PIN_CLP IOID_4 // cDBS detect HVS LED::also added in config table
#define PIN_SPI_MISO IOID_7 //
#define PIN_SPI_MOSI IOID_8 //
#define PIN_SPI_CS IOID_9 //
@@ -77,9 +78,10 @@ static PIN_Config headstage_pin_configuration[] = { //
PIN_RESET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_EN_ADC_SPI_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_DC_DC | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_BATT_HALF | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_CLP | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL, // cDBS detect HVS LED::added in config table
// PIN_BATT_HALF | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_STI_CLK | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
//
// TODO : add PIN_IRQ for STI clock to detect STI status (update LED & resend STI command if failed before)
PIN_TERMINATE};
#endif // HEADSTAGE_PIN_UNI_H
@@ -3,7 +3,7 @@
#ifndef HEADSTAGE_PWM_H
#define HEADSTAGE_PWM_H
#include <Board.h>
#include <board.h>
#include <ti/drivers/PWM.h>
static PWM_Handle headstage_system_pwm_handle = NULL;
@@ -12,11 +12,15 @@ static void MCUReset(){
ResetINSTRUCTION();
// global variable reset
STI = false;
rec_sti_command = 0;
IsFirstData = true;
// SPI reset
SPI_close(headstage_spi_handle);
spi_state_counter = 0;
check_reg_counter = 0;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++ ){
spi_txbuf[i] = 0;
spi_rxbuf[i] = 0;
@@ -29,7 +33,7 @@ static void MCUReset(){
}
// CIS buffer reset
for(int i=0 ; i<BLE_CDR_BUFF_SIZE ; i++){
for(int i=0 ; i<BLE_CDR_SMALL_SIZE ; i++){
cdr_buf[i] = 0;
}
@@ -41,7 +45,10 @@ static void MCUReset(){
not_time_stamp = 0;
if(ConnectState){
if(ErrorRestart){
headstage_led_color(COLOR_RED);
}
else if(ConnectState){
headstage_led_color(COLOR_CYAN);
}
else{
@@ -77,32 +84,34 @@ static void ResetINSTRUCTION(){
INSTRUCTION.sti_clock_ratio = 10;
INSTRUCTION.amplifier_gain = 0;
INSTRUCTION.chopper_ratio = 2;
INSTRUCTION.sti_t1[1] = 1;
INSTRUCTION.sti_t1[1] = 0;
INSTRUCTION.sti_t2[1] = 0;
INSTRUCTION.sti_t3[1] = 0;
INSTRUCTION.sti_t4[1] = 0;
INSTRUCTION.sti_t5[1] = 0;
INSTRUCTION.sti_channel = 2;
INSTRUCTION.sti_channel = 0;
INSTRUCTION.arbitrary_en = 0;
INSTRUCTION.arbitrary_index = 0;
INSTRUCTION.sti_h_bridge = 0;
INSTRUCTION.sti_mode = 0;
INSTRUCTION.sti_ref = 0;
INSTRUCTION.current_sti_polarity = 2;
INSTRUCTION.current_sti_polarity = 0;
INSTRUCTION.sti_amplitude_h = 0;
INSTRUCTION.sti_amplitude_l = 0;
INSTRUCTION.sti_amplitude_h_cali = 0;
INSTRUCTION.sti_amplitude_l_cali = 0;
INSTRUCTION.ins_opcode = BIAS_ONE;
INSTRUCTION.sti_ch_config_done = 0;
uint8_t voltage_sti_channel = 0;
uint8_t voltage_sti_amplitude = 0;
// uint8_t voltage_sti_channel = 0;
// uint8_t voltage_sti_amplitude = 0;
for(int i=0 ; i<NEU_STI_CHANNEL_COUNTS ; i++){
INSTRUCTION.current_sti_cycle[i] = 0;
}
NEULIVE_STATE.state = NEU_IDLE;
NEULIVE_STATE.config_type = 0;
NEULIVE_STATE.config_type = NEU_WARM_UP;
NEULIVE_STATE.index = 0;
}
@@ -7,7 +7,7 @@
#error "put HEADSTAGE_MA_USE_SPI2 in predefined"
#endif
#include <Board.h>
#include <board.h>
#include <ti/drivers/SPI.h>
#include <ti/drivers/dma/UDMACC26XX.h>
#include <ti/drivers/spi/SPICC26XXDMA.h>
@@ -22,7 +22,6 @@ static SPI_Handle headstage_spi_handle = NULL;
static SPI_Transaction headstage_spi_transaction;
static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transaction);
static bool OpenSPI = false;
// SPI parameters initialize
#define headstage_spi_open() \
@@ -121,4 +120,72 @@ static void AppendSPITX(uint8_t index, uint32_t value){
}
}
/**
* @fn headstage_spi_callback
*
* description: callback function to deal with data transmission between DBS and CC2650
*/
static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transaction) {
switch(SPICallBack){
case CONTINUOUS_TRANS:{
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0x00;
}
flag_notify(EVT_NEU_SPI);
break;
}
case FLUSH_BUFFER:{
SPICallBack = FLUSH_BUFFER2;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0x00;
}
headstage_spi_transaction(SPI_BUFFER_SIZE);
break;
}
case FLUSH_BUFFER2:{
SPICallBack = ONE_SHOT_SPI;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0x00;
}
flag_notify(EVT_NEU_SPI);
// headstage_spi_transaction(SPI_BUFFER_SIZE);
break;
}
case ONE_SHOT_SPI:{
SPICallBack = FLUSH_BUFFER;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0x00;
}
headstage_spi_transaction(SPI_BUFFER_SIZE);
break;
}
case READ_MOSI:{
flag_notify(EVT_NEU_SPI);
break;
}
case READ_REG:{
check_reg_counter ++;
flag_notify(EVT_NEU_SPI);
break;
}
case CLOSE_SPI:{
SPICallBack = ONE_SHOT_SPI;
SPI_close(headstage_spi_handle);
break;
}
case END_TRANSMIT:{
tx_put_u24(0, 0);
SPICallBack = CONTINUOUS_TRANS;
break;
}
default:{
break;
}
}
}
#endif
@@ -114,21 +114,29 @@
#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 8
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 30
#else //! FEATURE_OAD
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
// Maximum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 25
#endif // FEATURE_OAD
#define SBP_PERIODIC_EVT_PERIOD DEFAULT_DESIRED_MIN_CONN_INTERVAL + 2
// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
@@ -160,6 +168,7 @@
#define SBP_STATE_CHANGE_EVT 0x0001
#define SBP_CHAR_CHANGE_EVT 0x0002
#define SBP_CONN_EVT_END_EVT 0x0004
#define SBP_PERIODIC_EVT 0x0008
// clang-format on
/*********************************************************************
@@ -552,6 +561,7 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
headstage_init_device_info();
headstage_init();
InitDBSRegister();
for (;;) {
// Waits for a signal to the semaphore associated with the calling thread.
@@ -603,6 +613,15 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
headstage_event_handle();
}
// if (events & SBP_PERIODIC_EVT) {
// events &= ~SBP_PERIODIC_EVT;
//
// // Util_startClock(&periodicClock);
//
// // Perform periodic application task
// SimpleBLEPeripheral_performPeriodicTask();
// }
#ifdef FEATURE_OAD
while (!Queue_empty(oad_queue_handle)) {
oadTargetWrite_t *oadWriteEvt = Queue_get(oad_queue_handle);
@@ -827,8 +846,10 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
numActive = linkDB_NumActive();
uint16_t cxnHandle;
// requestedPDUSize = LL payload = L2CAP_header + ATT header + BLE_NOT_BUFF_SIZE = 7 + BLE_NOT_BUFF_SIZE
uint16_t requestedPDUSize = 251;
uint16_t requestTxTime = 2120;
uint16_t requestTxTime = 2120; // (LL payload + 14) * 8
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
if (SUCCESS == HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestTxTime)) {
@@ -849,16 +870,22 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
// Device is started but not advertising, is in waiting period before advertising again
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
ConnectState = false;
headstage_led_color(COLOR_GREEN);
if(ErrorRestart){
headstage_led_color(COLOR_RED);
}
else{
headstage_led_color(COLOR_GREEN);
}
break;
case GAPROLE_WAITING_AFTER_TIMEOUT:
// Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
// disconnected
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
headstage_led_color(COLOR_RED);
ErrorRestart = true;
CONNECT_HANDLE = 0xFFFF;
flag_notify(EVT_DISCONNECTED);
headstage_led_color(COLOR_RED);
break;
case GAPROLE_ERROR: // Error occurred - invalid state
headstage_led_color(COLOR_RED);
@@ -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;
}
@@ -51,7 +51,7 @@
#include "hal_types.h"
#include "ble_user_config.h"
#include <ti/drivers/rf/rf.h>
#include <ti/drivers/rf/RF.h>
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & SECURE_CONNS_CFG)
#include "ecc/ECCROMCC26XX.h"
@@ -82,7 +82,8 @@ extern "C" {
// Length of Characteristic 5 in bytes
#define SIMPLEPROFILE_CHAR1_LEN 2
#define SIMPLEPROFILE_CHAR2_LEN 10
//#define SIMPLEPROFILE_CHAR2_LEN 50
#define SIMPLEPROFILE_CHAR2_LEN 34
#define SIMPLEPROFILE_CHAR3_LEN 20
#define SIMPLEPROFILE_CHAR4_LEN 200
//#define SIMPLEPROFILE_CHAR4_LEN 20
+68
View File
@@ -0,0 +1,68 @@
#!/bin/bash
folder=$(basename "$(pwd)")
if [ "$folder" == "bioprocc2650" ]; then
input="./Neulive_sti_cali.txt"
output="./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_cali_sti.h"
#variable
declare -i current_line=96
declare -i col_index=0
declare -i row_index=0
#constant
declare -i COL_MAX=8
declare -i START_ROW=27
declare -i UN_USED_ROW=$START_ROW-1
MAC="MAC"
while read -r line; do
for word in $line; do
# get device MAC
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 3 ];then
MAC=$word
sed -i "${current_line} i \\\n#elif defined(BOARD_${MAC})\\n{" "$output"
sed -i 's/:/_/g' "$output"
current_line=$current_line+3
fi
# get device positive channel coeff and offset
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 4 ];then
sed -i "${current_line} i \ .p_ch.coefficient = $word," "$output"
current_line=$current_line+1
fi
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 5 ];then
sed -i "${current_line} i \ .p_ch.offset = $word," "$output"
current_line=$current_line+1
fi
# get device negative channel coeff and offset
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 6 ];then
sed -i "${current_line} i \ .n_ch.coefficient = $word," "$output"
current_line=$current_line+1
fi
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 7 ];then
sed -i "${current_line} i \ .n_ch.offset = $word" "$output"
current_line=$current_line+1
sed -i "${current_line} i };" "$output"
current_line=$current_line+1
fi
#update index
if [ $col_index -lt $COL_MAX ];then
col_index=$col_index+1
else
col_index=0
row_index=$row_index+1
fi
done
done < $input
else
echo "This script should be executed on CC2650 periperal only"
fi