Compare commits

...

366 Commits

Author SHA1 Message Date
yichin d45420579a error fix 2020-05-20 17:34:31 +08:00
weiting2 1ac4b0b640 attempt to support "connect" function 2020-05-20 17:27:16 +08:00
weiting2 eb4b14af59 attempt to support "display scanned device" function 2020-05-19 11:06:10 +08:00
weiting2 325f34b867 attempt to support "display scanned device" function 2020-05-19 11:03:27 +08:00
weiting2 46cd82a2d6 attempt to support "display scanned device" function 2020-05-19 10:53:40 +08:00
weiting2 15bcefc9d1 attempt to support "display scanned device" function 2020-05-19 10:45:54 +08:00
weiting2 58dcd3f128 we can support "scan" instruction now 2020-05-18 18:20:41 +08:00
yichin 7aa40392d0 update cali data 2020-05-18 18:15:31 +08:00
yichin 1d32330d27 update cali data 2020-05-18 18:10:48 +08:00
weiting2 7c783ef0bf Merge remote-tracking branch 'origin/central_pseudo_controller' into central_pseudo_controller
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/pesudo_controller/pesudo_pi_uart.h
2020-05-18 17:51:57 +08:00
weiting2 6b59a997c2 attempt to support "scan" instruction 2020-05-18 17:51:34 +08:00
yichin 774811d83b update cali data 2020-05-18 17:37:52 +08:00
weiting2 9b55ab972c attempt to support "scan" instruction 2020-05-18 17:31:49 +08:00
yichin f6828c9ad1 update cali data 2020-05-18 17:17:21 +08:00
yichin 5d00281bbe update cali data 2020-05-18 17:10:17 +08:00
weiting2 e60ba49220 attempt to support "scan" instruction 2020-05-18 16:44:36 +08:00
yichin 5f0c413e56 update cali data 2020-05-18 15:38:57 +08:00
weiting2 524e62bcc7 attempt to support "scan" instruction 2020-05-18 15:25:36 +08:00
yichin 2d2946753b error fix 2020-05-18 12:43:41 +08:00
weiting2 2c5ad43d22 attempt to support "scan" instruction 2020-05-18 12:32:11 +08:00
weiting2 ee9b117da0 UART read should not have timeout 2020-05-15 16:13:17 +08:00
weiting2 7e42d35d00 central mem board attempt to read UART 2020-05-15 12:46:41 +08:00
weiting2 c715aba1b8 attempt to avoid DIO2, 3 2020-05-14 17:59:20 +08:00
yichin 29e0d7b4f5 update pesudo controller name 2020-05-14 17:20:27 +08:00
yichin d91eaed4fb update cali data 2020-05-14 16:27:39 +08:00
yichin 6983f193ce UART init pullup 2020-05-14 16:24:52 +08:00
yichin 5640b54ae9 update cali data 2020-05-14 16:08:01 +08:00
yichin 9948179728 Merge remote-tracking branch 'origin/central_pseudo_controller' into central_pseudo_controller 2020-05-14 15:44:04 +08:00
weiting2 874a2cb05a pesudo controller LP 2020-05-14 13:15:32 +08:00
yichin 777709171f error fix 2020-05-14 09:58:33 +08:00
weiting2 885caace80 pesudo controller LP 2020-05-14 09:43:36 +08:00
yichin 40cb4d7a1e error fix 2020-05-13 18:51:56 +08:00
weiting2 680b0a0599 pesudo controller LP 2020-05-13 18:32:58 +08:00
weiting2 c60469f5b4 pesudo controller LP 2020-05-13 18:29:11 +08:00
yichin 6bc775b694 error fix 2020-05-13 18:07:16 +08:00
weiting2 547877b30d pesudo controller LP 2020-05-13 18:01:36 +08:00
weiting2 0af1434882 pesudo controller LP 2020-05-13 18:00:14 +08:00
yichin b1477d96f5 update cali data 2020-05-13 17:49:39 +08:00
weiting2 119d8e385c attempt to use LED 2020-05-11 12:06:59 +08:00
weiting2 23adda2e53 attempt to use UART 2020-05-11 11:44:10 +08:00
weiting2 c3cdf4c8ad attempt to use UART 2020-05-11 11:42:19 +08:00
weiting2 20a9324c58 attempt to use UART 2020-05-11 11:39:20 +08:00
weiting2 f5808d6731 attempt to use UART 2020-05-11 11:35:00 +08:00
weiting2 a16a487bf2 attempt to use UART 2020-05-11 11:23:27 +08:00
weiting2 2704879aa4 [stable] attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-11 11:14:45 +08:00
weiting2 693b2e457d [stable] attempt to break start command into "VIT_START", "VIS_REC", "VIS_STI" 2020-05-11 10:57:04 +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
weiting2 638c2fe671 [semi stable] battery volt with new format 2020-03-23 15:25:55 +08:00
weiting2 3d1de663a8 [semi stable] calibration well function; check chip register; check notify channel 2020-03-23 12:03:17 +08:00
weiting2 d1b1daeed7 [semi stable] calibration well function; check chip register; check notify channel 2020-03-23 11:54:36 +08:00
weiting2 3c22eda2dc [semi stable] calibration well function; check chip register; check notify channel 2020-03-20 17:20:07 +08:00
weiting2 5deae80baa [semi stable] calibration well function; check chip register; check notify channel 2020-03-20 17:10:06 +08:00
weiting2 0ce0e65d40 update cali CIS format 2020-03-20 14:11:34 +08:00
weiting2 cacc86099e update cali CIS format 2020-03-19 18:45:54 +08:00
weiting2 9b0d2a7fce [debug] check the first received channel 2020-03-17 15:15:32 +08:00
weiting2 71387262fc [debug] update cali table 2020-03-17 12:01:27 +08:00
weiting2 e9fbbc2aa1 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-03-17 11:41:59 +08:00
weiting2 ead9ef68ce Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-03-17 11:38:46 +08:00
weiting2 b3f57d19b1 [debug] LED corlor = GRENN/CYAN if dis/connect 2020-03-17 11:38:45 +08:00
weiting2 3b6cc46136 Merge remote-tracking branch 'origin/Neulive2.0_developement' into Neulive2.0_developement 2020-03-17 11:38:11 +08:00
weiting2 11e1e8a26c [debug] LED corlor = GRENN/CYAN if dis/connect 2020-03-17 11:38:02 +08:00
weiting2 a6ce89f73f [stable] LED corlor = GRENN/CYAN if dis/connect 2020-03-17 11:36:50 +08:00
weiting2 aceb1d2f05 connect reset=CYCN; standby reset=GREEN 2020-03-17 11:26:39 +08:00
weiting2 24c476d919 [debug] TODO: connect reset=CYCN; standby reset=GREEN 2020-03-17 11:20:51 +08:00
weiting2 28332daea7 [stable] close-reopen SPI during reset 2020-03-17 11:10:32 +08:00
weiting2 0439d8d97d [debug] close-reopen SPI during reset 2020-03-17 11:06:48 +08:00
weiting2 3baec88cce [debug] check unusual channel pattern 2020-03-17 10:59:15 +08:00
weiting2 a3a69d24fd connect = LED CYAN; working = LED BLUE 2020-03-17 10:52:21 +08:00
weiting2 7ae75451bc [stable] neu2.1 check all rec register 2020-03-17 10:32:41 +08:00
weiting2 6937b6a54f check chip register 2020-03-16 19:03:25 +08:00
weiting2 fdbe554eda check chip register 2020-03-16 16:24:22 +08:00
weiting2 dac9aa3444 check chip register 2020-03-16 15:38:17 +08:00
weiting2 b9f8f07bbc check chip register 2020-03-16 15:35:39 +08:00
weiting2 3815fc66b4 check chip register 2020-03-16 15:30:39 +08:00
weiting2 77dbf2f5c9 check chip register 2020-03-16 14:27:07 +08:00
weiting2 e6c157688a check chip register 2020-03-16 12:00:47 +08:00
weiting2 4c72d92ebe neu, elite cali script 2020-03-13 15:05:03 +08:00
weiting2 919dfbc31b neu2.1 cali 2020-03-13 12:03:08 +08:00
weiting2 cc6f06dc3e neu2.1 cali 2020-03-12 10:22:37 +08:00
weiting2 0d97b06c57 [debug] time stamp nonuniform issue; report every time stamp to controller 2020-03-10 18:07:35 +08:00
weiting2 feffc91f96 [Stable] resolved timestamp reset issue 2020-03-10 15:34:59 +08:00
weiting2 fdb2c85ce3 CCS can not link FlushNotify function. What a garbage IDE 2020-03-10 15:31:41 +08:00
weiting2 94e0286059 CCS can not link FlushNotify function. What a garbage IDE 2020-03-10 15:25:32 +08:00
weiting2 97b1aac278 error fix 2020-03-10 14:59:46 +08:00
weiting2 ac7f145da5 error fix 2020-03-10 14:12:44 +08:00
weiting2 43f89eee78 error fix 2020-03-10 14:11:29 +08:00
weiting2 9ab356af36 error fix 2020-03-10 14:09:33 +08:00
weiting2 c9f7007368 flush notify before/after work 2020-03-10 14:07:19 +08:00
weiting2 4ebdb5cfa1 flush notify before/after work 2020-03-10 11:36:52 +08:00
weiting2 cd25c99600 flush notify before/after work 2020-03-10 11:10:00 +08:00
weiting2 adf44acec1 [Stable] resolved restart issue; update battery voltage while scan and connect 2020-03-09 17:47:11 +08:00
weiting2 61ba6905d3 update battery voltage while scanning device 2020-03-09 17:43:36 +08:00
weiting2 9991c818a4 error fix 2020-03-05 18:50:15 +08:00
weiting2 0e5f136c22 error fix 2020-03-05 18:48:40 +08:00
weiting2 9cd9680805 solve a script bug 2020-03-05 18:44:05 +08:00
weiting2 6faafc39e4 solve a script bug 2020-03-05 18:33:51 +08:00
weiting2 27896cd970 solve a script bug 2020-03-05 18:24:37 +08:00
weiting2 761a2c1653 add report battery function 2020-03-05 18:08:45 +08:00
weiting2 fd59b5a6ea add report battery function 2020-03-05 18:06:51 +08:00
weiting2 fec1fd439e add report battery function 2020-03-05 18:01:23 +08:00
weiting2 f0bc9575b9 add report battery function 2020-03-05 15:32:24 +08:00
weiting2 7a87809974 add cali function 2020-03-05 15:26:12 +08:00
weiting2 83befad0b1 add cali function 2020-03-05 15:25:06 +08:00
weiting2 1eb6b386e5 add cali table 2020-03-05 15:23:57 +08:00
weiting2 4d51474c65 check both rec & sti channel register 2020-03-05 15:00:59 +08:00
weiting2 3cb8a846b6 restart issue 99% solved 2020-03-05 14:47:49 +08:00
weiting2 bb0e524314 will recording work fine? 2020-03-05 14:32:56 +08:00
weiting2 f4a49e95f8 will recording work fine? 2020-03-05 14:02:13 +08:00
weiting2 d1dcc60965 will recording work fine? 2020-03-05 13:53:12 +08:00
weiting2 bacb67a75e will recording work fine? 2020-03-05 13:36:52 +08:00
weiting2 b9aaaf441e will recording work fine? 2020-03-05 11:53:35 +08:00
weiting2 d7684cb6b8 recording enable 2020-02-27 14:38:55 +08:00
weiting2 bd527afe41 recording enable 2020-02-27 10:32:33 +08:00
weiting2 996e73f2c8 recording enable 2020-02-25 18:40:43 +08:00
weiting2 9fdf1b535d get sti instruction 2020-02-25 16:52:13 +08:00
weiting2 c9bb309c29 get sti instruction 2020-02-25 16:52:05 +08:00
weiting2 9939a92809 update version script 2020-02-25 12:36:46 +08:00
weiting2 d5f1068b78 update version script 2020-02-25 12:36:15 +08:00
weiting2 5fdc676460 add version script 2020-02-25 12:17:39 +08:00
weiting2 d826e90919 add version script 2020-02-25 12:17:34 +08:00
weiting2 3bb8a11aff add version script 2020-02-25 12:16:48 +08:00
weiting2 7c00fd31c6 add version script 2020-02-25 12:16:29 +08:00
weiting2 a77f800a1d add version script 2020-02-25 12:14:04 +08:00
weiting2 799a7434dc add version script 2020-02-25 12:12:14 +08:00
weiting2 320c960370 add version script 2020-02-25 12:10:57 +08:00
weiting2 68673ef071 add version script 2020-02-24 18:29:22 +08:00
weiting2 114b7d1776 add version script 2020-02-24 18:23:32 +08:00
weiting2 9e6a71f7f8 add version script 2020-02-24 18:22:31 +08:00
weiting2 ad566ac363 add version script 2020-02-24 18:21:14 +08:00
weiting2 0516a58ec6 add version script 2020-02-24 18:16:09 +08:00
weiting2 143f733077 add version script 2020-02-24 17:58:46 +08:00
weiting2 a774a98ea4 add version script 2020-02-24 17:54:17 +08:00
weiting2 22350a3555 add version script 2020-02-24 17:53:04 +08:00
weiting2 bd3ab34263 add version script 2020-02-24 17:51:54 +08:00
weiting2 1f3ef4c84a add version script 2020-02-24 17:50:46 +08:00
weiting2 2add4a55ef add version script 2020-02-24 17:50:39 +08:00
weiting2 8788cf21c4 add version script 2020-02-24 17:47:37 +08:00
weiting2 2ddc9eb927 add version script 2020-02-24 17:47:28 +08:00
weiting2 a4f8684bef add version script 2020-02-24 17:45:23 +08:00
weiting2 10c6cf52b1 add version script 2020-02-24 17:42:14 +08:00
weiting2 f12064e029 add version script 2020-02-24 17:42:04 +08:00
weiting2 985cf9f977 add version script 2020-02-24 17:41:02 +08:00
weiting2 1b54fcae86 add version script 2020-02-24 17:37:14 +08:00
weiting2 f1b2e5a530 add version script 2020-02-24 17:25:24 +08:00
weiting2 2464c99999 add version script 2020-02-24 17:09:06 +08:00
weiting2 17fd5ace9b amplitude = 0x01FF 2020-02-24 11:46:08 +08:00
weiting2 e266de61bf amplitude = 0x01FF 2020-02-24 11:39:09 +08:00
weiting2 e8ba02eb7a amplitude = 0x01FF 2020-02-24 11:29:49 +08:00
weiting2 40edc8677f fix t2~t5 assign bug 2020-02-24 10:53:49 +08:00
weiting2 82d9be071b fix t2~t5 assign bug 2020-02-24 10:28:29 +08:00
weiting2 81760c35c9 I forgot to set amplitude at the last commit QQ 2020-02-21 18:33:38 +08:00
weiting2 9a361e6e97 new test pattern 2020-02-21 17:33:16 +08:00
weiting2 67a276dbb6 current_sti_polarity should be 16-bits 2020-02-21 17:13:48 +08:00
weiting2 be1276785c bug fix 2020-02-21 16:57:20 +08:00
weiting2 2f8b646a4f return NEU_SETUP_DONE at correct time 2020-02-21 16:42:36 +08:00
yichin 1ff7bc8746 error fix 3 2020-02-21 12:17:45 +08:00
weiting2 1dbf5c1b6b using warm up instruction 2020-02-21 12:11:59 +08:00
weiting2 5ba1f22de8 using warm up instruction 2020-02-21 11:40:12 +08:00
weiting2 e04a49b6a0 using warm up instruction 2020-02-21 09:55:48 +08:00
weiting2 5b2529ad71 try to read register 2020-02-19 18:25:05 +08:00
weiting2 e0a193c671 Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-19 16:54:52 +08:00
weiting2 99023db231 try to read register 2020-02-19 16:54:43 +08:00
yichin 2c5c92e578 error fix 2020-02-19 16:48:15 +08:00
weiting2 22594e36c0 we can config more than one channel now 2020-02-19 16:44:44 +08:00
weiting2 9018c98a68 test sti instruction 2020-02-19 14:45:52 +08:00
weiting2 62ed077791 test sti instruction 2020-02-19 14:28:09 +08:00
weiting2 68b32a5a15 test sti instruction 2020-02-19 11:56:55 +08:00
weiting2 a24aebf4ac test sti instruction 2020-02-19 11:29:19 +08:00
weiting2 95a7926f36 test sti instruction 2020-02-19 10:37:49 +08:00
yichin 76d5537b7a Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-19 10:10:00 +08:00
weiting2 75f1fcc663 test sti instruction 2020-02-19 09:56:46 +08:00
weiting2 ab803c7a54 test sti instruction 2020-02-18 18:56:09 +08:00
yichin 0431f8f1be Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-18 18:42:40 +08:00
weiting2 4f1884a468 test sti instruction 2020-02-18 18:42:12 +08:00
yichin 1789fd82a0 Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-18 18:17:31 +08:00
weiting2 9602b5e7fb test sti instruction 2020-02-18 17:52:22 +08:00
yichin 08e9cc715f error fix 2020-02-18 16:53:23 +08:00
weiting2 578b483c68 Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-18 16:46:13 +08:00
weiting2 fc2bd6b187 test sti instruction 2020-02-18 16:46:04 +08:00
yichin e7180b56ee Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-18 14:10:19 +08:00
yichin 020703e07d error fix 2020-02-18 14:10:06 +08:00
weiting2 c1e8443ceb test sti instruction 2020-02-18 14:09:22 +08:00
weiting2 7cda4c4dec test sti instruction 2020-02-18 11:47:01 +08:00
weiting2 4194730f9c get register value (for debug) 2020-02-18 10:40:14 +08:00
weiting2 a3fabf7eb6 get register value (for debug) 2020-02-18 10:07:07 +08:00
weiting2 33b17782cf get register value (for debug) 2020-02-15 18:20:54 +08:00
weiting2 0307d7ba2a H-bridge test 2020-02-15 17:20:46 +08:00
weiting2 00c431dfd0 H-bridge test 2020-02-15 17:19:19 +08:00
weiting2 317b34a8c0 t4 = 0.5 * t1 2020-02-15 16:55:32 +08:00
weiting2 09060b0b6f test current sti 2020-02-15 16:14:42 +08:00
weiting2 4cdda6dacb Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-15 15:36:56 +08:00
weiting2 54193ffae7 test current sti 2020-02-15 15:36:45 +08:00
yichin af5cd3dcf2 error fix 2020-02-15 15:27:34 +08:00
yichin c9985a3c67 Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
2020-02-15 15:26:26 +08:00
yichin 1d7aa1b0ad add version.h 2020-02-15 15:25:58 +08:00
weiting2 bb4561bd4e test current sti 2020-02-15 15:24:14 +08:00
weiting2 9077420de8 [BUG] voltage stimulate has a bug, voltage_sti_amplitude can't assign 2020-02-15 12:05:28 +08:00
weiting2 26e5f36783 stimulate test 2020-02-15 11:46:43 +08:00
weiting2 4d5b7b3033 stimulate test 2020-02-15 11:22:36 +08:00
weiting2 ed73d2fdae sti channel should be a u16, not u8
(because current+volt have 8+1 = 9 channel)
2020-02-14 18:44:14 +08:00
weiting2 a00aec83ff return version from CIS 2020-02-14 18:21:10 +08:00
yichin 6b611ff248 return version from CIS
new cali table
2020-02-14 18:20:14 +08:00
weiting2 e2af8153ed return version from CIS 2020-02-14 18:19:03 +08:00
weiting2 5724a22c9d try to use volt sti 2020-02-14 18:14:57 +08:00
weiting2 ee8e207004 [stable] recording well function; system clk = 2M; sample rate = 2k (default, ADC_clk_ratio=100) 2020-02-14 12:12:06 +08:00
weiting2 a2c93167ce 8k sample rate 2020-02-13 18:01:36 +08:00
weiting2 e94fd65e8f notify data size should be 241, not 20 2020-02-13 16:54:08 +08:00
weiting2 ddf2f9e8f5 will it break down if pi3 don't save data 2020-02-13 16:00:49 +08:00
weiting2 923e6408e7 will it break down if don't send notify 2020-02-13 15:21:15 +08:00
weiting2 96e6a441b9 2k sample rate 2020-02-13 13:54:28 +08:00
weiting2 fbb8a4cbf6 1k sample rate 2020-02-13 11:46:01 +08:00
weiting2 2c84a79ebb test notify 2020-02-13 11:19:20 +08:00
weiting2 7bd2381dca test notify 2020-02-13 11:09:27 +08:00
weiting2 a922b0cc40 test notify 2020-02-13 11:05:54 +08:00
weiting2 3c0cf37074 test notify 2020-02-13 10:45:00 +08:00
weiting2 f9412ed0ea test notify 2020-02-13 10:37:54 +08:00
weiting2 da6647391c notify length = 241; should be 20 2020-02-13 10:13:37 +08:00
weiting2 a2c6c0298e notify length = 241; should be 20 2020-02-12 18:48:03 +08:00
weiting2 aa6c58df79 test instruction 2020-02-12 18:01:53 +08:00
yichin 71d43c26be error fix 2020-02-12 16:34:53 +08:00
weiting2 e9dea14165 is interrupt a bug? 2020-02-12 16:32:06 +08:00
weiting2 3b076f0faa Merge remote-tracking branch 'origin/Neulive20_MergeWith13' into Neulive20_MergeWith13 2020-02-12 15:28:36 +08:00
weiting2 2f4c6ce787 notify buffer size = 20 2020-02-12 15:28:27 +08:00
yichin 6425ffd91c error fix; still have pin init error 2020-02-12 12:01:39 +08:00
weiting2 cbbe0a7387 merge everything in neu1.3 2020-02-12 10:09:04 +08:00
yichin ad0c8e6bd6 error fix; still have pin init error 2020-02-11 18:57:40 +08:00
weiting2 68085d5ea5 merge everything in neu1.3 2020-02-11 18:45:48 +08:00
weiting2 bfba8a23e1 merge everything in neu1.3 2020-02-11 18:36:49 +08:00
weiting2 2cd847b57b merge peripheral.c headstage.h pin.h 2020-02-11 18:29:28 +08:00
weiting2 11928ccbb8 merge peripheral.c headstage.h pin.h 2020-02-11 18:16:38 +08:00
weiting2 7bc70b5a72 merge peripheral.c headstage.h pin.h 2020-02-11 17:35:24 +08:00
weiting2 e10eeb48dd merge peripheral.c headstage.h pin.h 2020-02-11 15:45:28 +08:00
yichin 1298b5ce2a using lauch pad 2020-01-21 16:40:47 +08:00
48 changed files with 4117 additions and 1256 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
+23
View File
@@ -0,0 +1,23 @@
no device y=ax+b MAC a+ b+ a- b- avg
1 c6be c6be 1804ED37C6BE 2270 -7040 2259 -14129 4.15063496100114
2 8cd0 8cd0 0081F9E48CD0 2199 -4616 2162 -16396 4.67288597901671
3 c694 c694 1804ED37C694 2354 -12824 2354 -11216 4.34663132771076
4 c6c7 c6c7 1804ED37C6C7 2199 -7238 2221 -15702 4.63164432837751
5 9b97 9b97 0081F9E49B97 2227 -9846 2151 -26609 4.75015860006776
6 c6df c6df 1804ED37C6DF 2132 -3844 2054 -21545 4.89066238118665
7 c652 c652 18:04:ED:37:C6:52 2024 -7687 2086 -11283 4.88850143182858
8 c5ed c5ed 18:04:ED:37:C5:ED 2231 -1711 2353 -70845 4.45265043545859
9 9bef 9bef 0081F9E49BEF 2383 -8585 2415 -20347 4.2758539244186
10 8b50 8b50 00:81:F9:E4:8B:50 2369 -11005 2360 -11797 4.30475635707671
11 c641 c641 18:04:ED:37:C6:41 2090 4616 1997 -40665 5.07591391714942
12 E8E6 E8E6 A4:DA:32:D4:E8:E6 2306 -88454 2418 -15140 4.2686494968089
13 E73B E73B A4:DA:32:D4:E7:3B 2262 -564 2298 44746 4.35551198222141
14 EEE2 EEE2 A4:DA:32:D4:EE:E2 2057 5980 2096 -21411 4.82094019052184
15 E871 E871 A4:DA:32:D4:E8:71 2175 -4549 2220 31468 4.60684608395208
16 EFC4 EFC4 A4:DA:32:D4:EF:C4 2348 -4371 2374 -26606 4.45106768611704
17 EF85 EF85 A4:DA:32:D4:EF:85 2136 -3339 2189 -30040 4.61909624778354
18 E7DA E7DA A4:DA:32:D4:E7:DA 2081 -3015 2122 -21543 4.79766509652981
19 E6EA E6EA A4:DA:32:D4:E6:EA 2039 -262 2127 -47259 4.79384458739747
20 EEDB EEDB A4:DA:32:D4:EE:DB 2214 -1170 2351 -24636 4.44485358085645
21 E73A E73A A4:DA:32:D4:E7:3A 2210 -4855 2339 -16434 4.47776494604746
22 E6CF E6CF A4:DA:32:D4:E6:CF 2135 -5206 2193 -30885 4.73462680884304
Executable
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
#path=$(pwd)
#folder=$($path | awk -F"/" '{$NF}')
folder=$(basename "$(pwd)")
if [ "$folder" == "bioprocc2650" ]; then
year=$(date +%-y)
month=$(date +%-m)
day=$(date +%-d)
hour=$(date +%-H)
minute=$(date +%-M)
hash=$(git rev-parse HEAD)
branch=$(git rev-parse --abbrev-ref HEAD)
sed -i "5c #define VERSION_DATE_YEAR ${year}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "6c #define VERSION_DATE_MONTH ${month}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "7c #define VERSION_DATE_DAY ${day}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "8c #define VERSION_DATE_HOUR ${hour}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "9c #define VERSION_DATE_MINUTE ${minute}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "13c #define VERSION_HASH ${hash}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
sed -i "14c #define VERSION_GIT_BRANCH ${branch}"\
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
#cat ./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h
fi
@@ -9,6 +9,6 @@
<linkerCommandFile value="cc26x0f128.cmd"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
<isTargetManual value="false"/>
</projectOptions>
@@ -18,315 +18,282 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.rtsc.XDCtools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137" name="FlashROM" parent="com.ti.ccstudio.buildDefinitions.TMS470.Default" postbuildStep="${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out" prebuildStep="">
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137." name="/" resourcePath="">
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1870396971"
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.508772074"
name="TI Build Tools"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1042851466">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1148563193"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.253004641">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.307496426"
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="XDC_VERSION=3.32.2.25_core"/>
<listOptionValue builtIn="false" value="INACTIVE_REPOS="/>
<listOptionValue builtIn="false" value="EXPANDED_REPOS="/>
<listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.rtsc.TIRTOSCC13XX_CC26XX:2.21.01.08;"/>
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1477629759"
name="Compiler version"
<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="XDC_VERSION=3.32.2.25_core"/>
<listOptionValue builtIn="false" value="INACTIVE_REPOS="/>
<listOptionValue builtIn="false" value="EXPANDED_REPOS="/>
<listOptionValue builtIn="false"
value="RTSC_PRODUCTS=com.ti.rtsc.TIRTOSCC13XX_CC26XX:2.21.01.08;"/>
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
<listOptionValue builtIn="false"
value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1440951273"
superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION"
value="18.1.5.LTS" valueType="string"/>
<targetPlatform
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.1964203011"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.1602976043"
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.1215278602"
keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true"
parallelizationNumber="optimal"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.1636245865"
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.844266887"
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.970988650"
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.1339014530"
name="Target processor version (--silicon_version, -mv)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.1857210705"
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.309125063"
name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.714636443"
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.256396971"
name="Application binary interface. (--abi)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.261228559"
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.224447533"
name="Little endian code [See 'General' page to edit] (--little_endian, -me)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.1228981473"
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.838358175"
name="Optimization level (--opt_level, -O)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.605071558"
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.1758979029"
name="Speed vs. size trade-offs (--opt_for_speed, -mf)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.108821138"
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.1992834918"
name="Add dir to #include search path (--include_path, -I)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.957532787"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH"
valueType="includePath">
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
<listOptionValue builtIn="false" value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
<listOptionValue builtIn="false" value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/dev_info"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/simple_profile/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/simple_profile"/>
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
<listOptionValue builtIn="false"
value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
<listOptionValue builtIn="false"
value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
<listOptionValue builtIn="false" value="${SRC_EX}/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/icall/inc"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/roles"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/dev_info"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/simple_profile/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_EX}/profiles/simple_profile"/>
<listOptionValue builtIn="false" value="${SRC_EX}/common/cc26xx"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/heapmgr"/>
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/controller/cc26xx/inc"/>
<listOptionValue builtIn="false" value="${SRC_COMMON}/hal/src/target/_common"/>
<listOptionValue builtIn="false" value="${SRC_EX}/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/sdata"/>
<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="${CC26XXWARE}"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.584710211"
name="Pre-define NAME (--define, -D)"
<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/sdata"/>
<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="${CC26XXWARE}"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1105424988"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE"
valueType="definedSymbols">
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_ADC"/>
<listOptionValue builtIn="false" value="HEADSTAGE_RECORD_BATTERY"/>
<listOptionValue builtIn="false" value="HEADSTAGE_CIS_VOLT_H"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_SPI2"/>
<listOptionValue builtIn="false" value="CC26XX"/>
<listOptionValue builtIn="false" value="GAPROLE_TASK_STACK_SIZE=540"/>
<listOptionValue builtIn="false" value="HEAPMGR_SIZE=0"/>
<listOptionValue builtIn="false" value="ICALL_MAX_NUM_ENTITIES=6"/>
<listOptionValue builtIn="false" value="ICALL_MAX_NUM_TASKS=3"/>
<listOptionValue builtIn="false" value="USE_ICALL"/>
<listOptionValue builtIn="false" value="xBOARD_DISPLAY_EXCLUDE_LCD"/>
<listOptionValue builtIn="false" value="xDisplay_DISABLE_ALL"/>
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.366333795"
name="Debugging model"
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_ADC"/>
<listOptionValue builtIn="false" value="HEADSTAGE_RECORD_BATTERY"/>
<listOptionValue builtIn="false" value="HEADSTAGE_CIS_VOLT_H"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_SPI2"/>
<listOptionValue builtIn="false" value="CC26XX"/>
<listOptionValue builtIn="false" value="GAPROLE_TASK_STACK_SIZE=540"/>
<listOptionValue builtIn="false" value="HEAPMGR_SIZE=0"/>
<listOptionValue builtIn="false" value="ICALL_MAX_NUM_ENTITIES=6"/>
<listOptionValue builtIn="false" value="ICALL_MAX_NUM_TASKS=3"/>
<listOptionValue builtIn="false" value="USE_ICALL"/>
<listOptionValue builtIn="false" value="xBOARD_DISPLAY_EXCLUDE_LCD"/>
<listOptionValue builtIn="false" value="xDisplay_DISABLE_ALL"/>
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1032444705"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.396634009"
name="C Dialect"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.1070661718"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.5036346"
name="Enable support for GCC extensions (DEPRECATED) (--gcc)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.476728347"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC"
value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.2023161003"
name="Suppress diagnostic &lt;id&gt; (--diag_suppress, -pds)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1028582292"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS"
valueType="stringList">
<listOptionValue builtIn="false" value="48"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1284580016"
name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)"
<listOptionValue builtIn="false" value="48"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1576358748"
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.249332571"
name="Wrap diagnostic messages (--diag_wrap)"
<listOptionValue builtIn="false" value="225"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.839364861"
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.278396112"
name="Emit diagnostic identifier numbers (--display_error_number, -pden)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.1520544614"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER"
value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.2092732559"
name="Place each function in a separate subsection (--gen_func_subsections, -ms)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.632756283"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on"
valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1551195628"
name="Read options from specified file (--cmd_file, -@)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1953982293"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE"
valueType="stringList">
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
</option>
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
<listOptionValue builtIn="false"
value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
</option>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.1694661736"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.311618182"
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.1687796135"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1172126406"
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.1118337260"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.1875232524"
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.1159637661"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.1021129889"
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.1042851466"
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.253004641"
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.872774008"
name="Set C system stack size (--stack_size, -stack)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.163894365"
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.2009961004"
name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.446557062"
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.2041929472"
name="Link information (map) listed into &lt;file&gt; (--map_file, -m)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1183163963"
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.1329270549"
name="Specify output file name (--output_file, -o)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1489194034"
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.1665414523"
name="Include library file or command file as input (--library, -l)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.83785030"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY"
valueType="libs">
<listOptionValue builtIn="false" value="libc.a"/>
<listOptionValue builtIn="false" value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
<listOptionValue builtIn="false" value="${ROM}/common_rom_releases/03282014/common_rom.symbols"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.653944079"
name="Add &lt;dir&gt; to library search path (--search_path, -i)"
<listOptionValue builtIn="false" value="libc.a"/>
<listOptionValue builtIn="false"
value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
<listOptionValue builtIn="false"
value="${ROM}/common_rom_releases/03282014/common_rom.symbols"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.531184787"
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.1571098441"
name="Suppress diagnostic &lt;id&gt; (--diag_suppress)"
<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.1981415630"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS"
valueType="stringList">
<listOptionValue builtIn="false" value="10247-D"/>
<listOptionValue builtIn="false" value="16002-D"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.2089339392"
name="Wrap diagnostic messages (--diag_wrap)"
<listOptionValue builtIn="false" value="10247-D"/>
<listOptionValue builtIn="false" value="16002-D"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.649902168"
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.1585150190"
name="Emit diagnostic identifier numbers (--display_error_number)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.1729779528"
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.1879557100"
name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.1878611611"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO"
value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.870807907"
name="Aggressively reduce size of the DWARF information (--compress_dwarf)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.202293784"
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.1443935039"
name="Eliminate sections not needed in the executable (--unused_section_elimination)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.320082858"
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.1144532052"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1085231487"
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.527665495"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.1108737317"
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.342557325"
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.75789309"
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.1134045744"
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.1993143283"
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.361823987"
name="Specify rom width (--romwidth, -romwidth=width)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1082701845"
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.2004720746"
name="Specify memory width (--memwidth, -memwidth=width)"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.1869306517"
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.358755565"
name="Output format"
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.823229474"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL"
valueType="enumerated"/>
</tool>
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.861960875" name="XDCtools"
</tool>
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.91063780" name="XDCtools"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1920608743"
name="Package repositories (--xdcpath)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1479641733"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH"
valueType="stringList">
<listOptionValue builtIn="false" value="${COM_TI_RTSC_TIRTOSCC13XX_CC26XX_REPOS}"/>
<listOptionValue builtIn="false" value="${TARGET_CONTENT_BASE}"/>
</option>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.363159983"
name="Target (-t)"
<listOptionValue builtIn="false" value="${COM_TI_RTSC_TIRTOSCC13XX_CC26XX_REPOS}"/>
<listOptionValue builtIn="false" value="${TARGET_CONTENT_BASE}"/>
</option>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.141072820"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET"
value="ti.targets.arm.elf.M3" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1189355321"
name="Platform (-p)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.29309402"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM"
value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.1865073937"
name="Platform (-p)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.655405343"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW"
value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1732364012"
name="Build-profile (-r)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.2098255943"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE"
value="release" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.433819693"
name="Compiler tools directory (-c)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1106331477"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR"
value="${CG_TOOL_ROOT}" valueType="string"/>
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.417898510"
name="Additional compiler options (--compileOptions)"
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.803098937"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS"
value="&quot;${COMPILER_FLAGS}&quot;" valueType="string"/>
</tool>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
@@ -12,7 +12,7 @@
<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\ccsv8\ccs_base\emulation\gel\images\cc26xx\cc26x0_rtos_rom_syms.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"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/simple_peripheral_cc2650em_app"/>
</listAttribute>
@@ -1,19 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe_0" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe_0" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="2" id="The Converter Usage">
<choice Name="Generate 1149.7 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="The Converter 1149.7 Frequency">
<choice Name="Overclock with user specified value" value="unused">
<property Type="choicelist" Value="5" id="-- Choose a value from 1.0MHz to 50.0MHz"/>
</choice>
</property>
<property Type="choicelist" Value="5" id="The Target Scan Format"/>
<configuration XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe_0" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe_0" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="1" id="Power Selection">
<choice Name="Probe supplied power" value="1">
<property Type="stringfield" Value="3.3" id="Voltage Level"/>
</choice>
</property>
<property Type="choicelist" Value="0" id="JTAG Signal Isolation"/>
<property Type="choicelist" Value="4" id="SWD Mode Settings">
<choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="XDS110 Aux Port"/>
</choice>
</property>
<property Type="choicelist" Value="1" id="Debug Probe Selection">
<choice Name="Select by serial number" value="0">
<property Type="stringfield" Value="L1000537" id="-- Enter the serial number"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
@@ -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">
@@ -51,6 +51,7 @@ extern "C" {
#include <ti/drivers/PIN.h>
#include <driverlib/ioc.h>
#define HEADSTAGE_UNI_2_0
#ifdef HEADSTAGE_UNI_2_0
#include "neu/headstage_pin.h"
#else
@@ -79,7 +79,7 @@ const PIN_Config BoardGpioInitTable[] = {
Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
Board_BTN2 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
Board_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN, /* External flash chip select */
Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
Board_UART_RX | PIN_INPUT_EN | PIN_PULLUP, /* UART RX via debugger back channel */
Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
Board_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master out - slave in */
Board_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master in - slave out */
@@ -80,8 +80,8 @@ extern const PIN_Config BoardGpioInitTable[];
#define Board_BTN2 IOID_14
/* UART Board */
#define Board_UART_RX IOID_2 /* RXD */
#define Board_UART_TX IOID_3 /* TXD */
#define Board_UART_RX IOID_25 /* RXD */
#define Board_UART_TX IOID_26 /* TXD */
#define Board_UART_CTS IOID_19 /* CTS */
#define Board_UART_RTS IOID_18 /* RTS */
@@ -0,0 +1,51 @@
#!/bin/bash
input="./Elite_test.txt"
declare -i col_index=0
declare -i row_index=0
declare -i channel=0
declare -i gain=0
declare -i current_line=2
declare -a value
MAC="MAC"
while read -r line; do
for word in $line; do
# get device MAC
if [ $row_index -eq 1 ] && [ $col_index -eq 0 ];then
MAC=$word
sed -i "${current_line} i \\\n#elif defined(BOARD_${MAC}){" ./test.txt
sed -i 's/:/_/g' ./test.txt
current_line=$current_line+2
# if [ $row_index -gt 0 ];then
# # row 1~8 is the least gain clai data
# channel=`expr $row_index - 1`
# channel=`expr $channel % 8`
#
# gain=`expr $row_index - 1`
# gain=`expr $gain / 8`
#
# if [ $col_index -eq 4 ];then
# sed -i "${current_line} i \\\t.Ch[${channel}].Gain[${gain}] = $word," ./test.txt
# current_line=$current_line+1
# elif [ $col_index -eq 6 ];then
# sed -i "${current_line} i \\\t.Ch[${channel}].Offset[${gain}] = $word," ./test.txt
# current_line=$current_line+1
# fi
fi
#update index
if [ $col_index -lt 5 ];then
col_index=$col_index+1
else
col_index=0
row_index=$row_index+1
fi
done
done < $input
#sed -i "${current_line} i }" ./test.txt
@@ -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,18 @@ instruction operator
#include <ti/sysbios/knl/Semaphore.h>
#include "simple_gatt_profile.h"
/*========================
==== Global Variable ====
=========================*/
static bool STI = false;
static bool IsFirstData = true;
static uint8_t spi_state_counter = 0;
static bool ConnectState = false;
static bool ErrorRestart = false;
static bool turn_off_sti = false;
static uint8_t SPICallBack = 0;
/*======================
==== event control ====
=====================*/
@@ -181,18 +193,27 @@ extern ICall_Semaphore semaphore;
#define INS_TYPE_VIS 0xC0
#define INS_TYPE_CIS 0x70
// RIS operator
#define RIS_SEND_UART 0x01
#define RIS_PREPARE_SEND 0x02
// VIS operator
#define VIS_ASK 0x30
#define VIS_INT 0x60
#define VIS_FUH 0x90
#define VIS_CAL 0xA0
#define VIS_STI 0xC0
#define VIS_RST 0xF0
#define VIS_ASK 0x30
#define VIS_INT 0x60
#define VIS_STI 0x90
#define VIS_CAL 0xA0
#define VIS_START 0xC0
#define VIS_RST 0xF0
#define VIS_STOP_STI 0x01
// CIS operator
#define CIS_NOP 0x00
#define CIS_VOLT 0x10
#define CIS_LED 0x20
#define CIS_CALI 0x30
#define CIS_VERSION 0x40
// CIS return status code
#define CDR_SUCCESS 0x0
@@ -316,7 +337,7 @@ typedef struct {
==== device implement implement header ====
=========================================*/
#include "headstage_uni.h"
#include "headstage_neu.h"
/*!
* main function
@@ -378,7 +399,18 @@ static void headstage_update_instruction(uint8_t *instruction) {
break;
}
case INS_TYPE_CIS: {
headstage_update_cis_instruction(ins_oper);
if(ins_oper == CIS_CALI){
// CIS has only 20 byte now
// need ins[2] to choose return gain or offset
SendCaliValue(instruction[2]);
}
else{
headstage_update_cis_instruction(ins_oper);
}
break;
}
default:{
break;
}
}
@@ -0,0 +1,14 @@
#ifndef BIT_COUNT
#define BIT_COUNT
static uint8_t BitCount(uint8_t u8_value){
uint8_t ret = 0;
for(int i=0 ; i<8 ; i++){
if(u8_value & (1 << i)){
ret ++;
}
}
return ret;
}
#endif
@@ -12,9 +12,31 @@ static uint8_t headstage_battery_percent() {
uint32_t internal_batt_sense = AONBatMonBatteryVoltageGet();
internal_batt_sense = (internal_batt_sense * 125) >> 5;
internal_batt_sense = (internal_batt_sense * 100) / MAX_BATTERY_CAPACITY;
internal_battery_percent = internal_batt_sense & 0xff;
internal_battery_percent = internal_batt_sense & 0xFF;
if (internal_battery_percent < battery_percent) battery_percent = internal_battery_percent;
return battery_percent;
}
static uint8_t battery_volt;
static uint8_t headstage_battery_volt1() {
uint8_t internal_battery_percent;
uint32_t internal_batt_sense = AONBatMonBatteryVoltageGet();
// internal_batt_sense = (internal_batt_sense * 125) >> 5;
// internal_batt_sense = (internal_batt_sense * 100) / MAX_BATTERY_CAPACITY;
internal_battery_percent = internal_batt_sense & 0xFF;
battery_volt = internal_battery_percent;
return battery_volt;
}
static uint8_t headstage_battery_volt2() {
uint8_t internal_battery_percent;
uint32_t internal_batt_sense = AONBatMonBatteryVoltageGet();
// internal_batt_sense = (internal_batt_sense * 125) >> 5;
// internal_batt_sense = (internal_batt_sense * 100) / MAX_BATTERY_CAPACITY;
internal_battery_percent = (internal_batt_sense >> 8) & 0xFF;
battery_volt = internal_battery_percent;
return battery_volt;
}
#endif // HEADSTAGE_BATT_H
@@ -0,0 +1,47 @@
#ifndef NEU_CALI_FXN
#define NEU_CALI_FXN
#include "headstage_cali_table.h"
static void CaliTable2u8(uint8_t* cali){
for(int i=0 ; i<12 ; i++){
for(int j=0 ; j<3 ; j++){
*(cali + 12*i + 2*j) = (uint8_t) (CaliTable.Ch[i].Gain[j] | 0xFF00) >> 8;
*(cali + 12*i + 2*j+1) = (uint8_t) (CaliTable.Ch[i].Gain[j] | 0x00FF);
*(cali + 12*i + 2*j+6) = (uint8_t) (CaliTable.Ch[i].Offset[j] | 0xFF00) >> 8;
*(cali + 12*i + 2*j+7) = (uint8_t) (CaliTable.Ch[i].Offset[j] | 0x00FF);
}
}
}
/*
* SendCaliValue
* CaliNumber : 0~23
* - 0: ch1 gain value
* - 1: ch1 offset value
* - 2: ch2 gain
* - .......
*/
static void SendCaliValue(uint8_t CaliNumber){
uint8_t ch, cdr_buf[10];
ch = 2 * (CaliNumber % 4);
uint8_t gain_level = CaliNumber / 4; // 0:gain, 1:offset
cdr_buf[0] = CHIP_ID;
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;
cdr_buf[9] = 0; // don't care
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
}
#endif
@@ -0,0 +1,195 @@
#ifndef NEU_CALI_STI_H
#define NEU_CALI_STI_H
#include "headstage_cali_table.h"
typedef struct _StiCali{
uint16_t coefficient;
int16_t offset;
}StiCali;
struct _StiCaliStiTable{
StiCali p_ch;
StiCali n_ch;
}StiCaliTable =
#ifdef BOARD_TEST
{
.p_ch.coefficient = 10000,
.p_ch.offset = 0,
.n_ch.coefficient = 10000,
.n_ch.offset = 0
};
#elif defined(BOARD_00_81_F9_E4_8C_D0)
{
.p_ch.coefficient = 2199,
.p_ch.offset = -4615,
.n_ch.coefficient = 2162,
.n_ch.offset = -16395
};
#elif defined(BOARD_18_04_ED_37_C6_BE)
{
.p_ch.coefficient = 2270,
.p_ch.offset = -7039,
.n_ch.coefficient = 2259,
.n_ch.offset = -14128
};
#elif defined(BOARD_18_04_ED_37_C6_41)
{
.p_ch.coefficient = 2090,
.p_ch.offset = 4616,
.n_ch.coefficient = 1997,
.n_ch.offset = -40664
};
#elif defined(BOARD_18_04_ED_37_C6_DF)
{
.p_ch.coefficient = 2132,
.p_ch.offset = -3843,
.n_ch.coefficient = 2054,
.n_ch.offset = -21544
};
#elif defined(BOARD_18_04_ED_37_C6_C7)
{
.p_ch.coefficient = 2199,
.p_ch.offset = -7237,
.n_ch.coefficient = 2221,
.n_ch.offset = -15701
};
#elif defined(BOARD_00_81_F9_E4_8B_50)
{
.p_ch.coefficient = 2369,
.p_ch.offset = -11004,
.n_ch.coefficient = 2360,
.n_ch.offset = -11796
};
#elif defined(BOARD_00_81_F9_E4_9B_97)
{
.p_ch.coefficient = 2227,
.p_ch.offset = -9845,
.n_ch.coefficient = 2151,
.n_ch.offset = -26608
};
#elif defined(BOARD_18_04_ED_37_C6_52)
{
.p_ch.coefficient = 2024,
.p_ch.offset = -7686,
.n_ch.coefficient = 2086,
.n_ch.offset = -11282
};
#elif defined(BOARD_00_81_F9_E4_9B_EF)
{
.p_ch.coefficient = 2383,
.p_ch.offset = -8584,
.n_ch.coefficient = 2415,
.n_ch.offset = -20346
};
#elif defined(BOARD_A4_DA_32_D4_E8_E6)
{
.p_ch.coefficient = 2306,
.p_ch.offset = -88454,
.n_ch.coefficient = 2418,
.n_ch.offset = -15140
};
#elif defined(BOARD_A4_DA_32_D4_E7_3B)
{
.p_ch.coefficient = 2262,
.p_ch.offset = -564,
.n_ch.coefficient = 2298,
.n_ch.offset = 44746
};
#elif defined(BOARD_A4_DA_32_D4_EE_E2)
{
.p_ch.coefficient = 2057,
.p_ch.offset = 5980,
.n_ch.coefficient = 2096,
.n_ch.offset = -21411
};
#elif defined(BOARD_A4_DA_32_D4_E8_71)
{
.p_ch.coefficient = 2175,
.p_ch.offset = -4549,
.n_ch.coefficient = 2220,
.n_ch.offset = 31468
};
#elif defined(BOARD_A4_DA_32_D4_EF_C4)
{
.p_ch.coefficient = 2348,
.p_ch.offset = -5830,
.n_ch.coefficient = 2374,
.n_ch.offset = -26403
};
#elif defined(BOARD_A4_DA_32_D4_EF_85)
{
.p_ch.coefficient = 2136,
.p_ch.offset = -3339,
.n_ch.coefficient = 2189,
.n_ch.offset = -30040
};
#elif defined(BOARD_A4_DA_32_D4_E7_DA)
{
.p_ch.coefficient = 2081,
.p_ch.offset = -3015,
.n_ch.coefficient = 2122,
.n_ch.offset = -21543
};
#elif defined(BOARD_A4_DA_32_D4_E6_EA)
{
.p_ch.coefficient = 2039,
.p_ch.offset = -262,
.n_ch.coefficient = 2127,
.n_ch.offset = -47259
};
#elif defined(BOARD_A4_DA_32_D4_EE_DB)
{
.p_ch.coefficient = 2214,
.p_ch.offset = -1170,
.n_ch.coefficient = 2351,
.n_ch.offset = -24636
};
#elif defined(BOARD_A4_DA_32_D4_E7_3A)
{
.p_ch.coefficient = 2210,
.p_ch.offset = -4855,
.n_ch.coefficient = 2339,
.n_ch.offset = -16434
};
#elif defined(BOARD_A4_DA_32_D4_E6_CF)
{
.p_ch.coefficient = 2135,
.p_ch.offset = -5206,
.n_ch.coefficient = 2193,
.n_ch.offset = -30885
};
#else
{
.p_ch.coefficient = 10000,
.p_ch.offset = 0,
.n_ch.coefficient = 10000,
.n_ch.offset = 0
};
#endif
#endif
@@ -0,0 +1,50 @@
#ifndef NEU_CHECK_INSTRUCTION
#define NEU_CHECK_INSTRUCTION
#include "headstage_instruction.h"
#include "neu/headstage_spi.h"
#include "neu/headstage_reset.h"
static uint8_t check_ins(uint16_t trans_ins){
uint16_t recv_ins;
recv_ins = spi_rxbuf[1] << 8 | spi_rxbuf[2];
return (trans_ins == recv_ins);
}
static void check_register(uint8_t register_to_check, uint16_t instruction_to_fit, uint8_t next_state){
if(spi_state_counter < 6){
SPICallBack = CONTINUOUS_TRANS;
spi_txbuf[0] = register_to_check;
spi_txbuf[1] = register_to_check;
spi_txbuf[2] = register_to_check;
spi_state_counter ++;
headstage_spi_transaction(3);
}
else{
spi_state_counter = 0;
if(check_ins(instruction_to_fit)){
NEULIVE_STATE.state = next_state;
SPICallBack = ONE_SHOT_SPI;
}
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;
}
else{
INSTRUCTION.ins_opcode = BIAS_ONE;
}
SPICallBack = ONE_SHOT_SPI;
ReopenSPI();
}
headstage_spi_transaction(3);
}
}
#endif
@@ -97,9 +97,9 @@ static void headstage_@REPLACE@_event() {
==== function implement ====
==========================*/
static void headstage_init() {
// TODO
}
//static void headstage_init() {
// // TODO
//}
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t *instruction) {
// TODO
@@ -0,0 +1,91 @@
#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. */
// sti_tx[0~7] is current stimulate
// sti_tx[8] assign to voltage mode channel. */
uint16_t sti_t1[NEU_STI_CHANNEL_COUNTS]; /**< first stimulation pulse duration, it can't be 0. */
uint16_t sti_t2[NEU_STI_CHANNEL_COUNTS]; /**< interval between biphasic pulses. */
uint16_t sti_t3[NEU_STI_CHANNEL_COUNTS]; /**< second stimulation pulse duration. */
uint32_t sti_t4[NEU_STI_CHANNEL_COUNTS]; /**< discharge time per stimulation. */
uint16_t sti_t5[NEU_STI_CHANNEL_COUNTS]; /**< discharge time after final stimulation. */
bool sti_mode; /**< if true: continuous mode, else limited mode. */
bool sti_h_bridge; /**< if true: enable h bridge, else single ended. */
bool sti_ref; /**< if true: reference cell body to gnd, else single ended is used. */
uint16_t current_sti_polarity; /**<
* default : low side.
* define which channel is high side or low side.
*/
uint8_t voltage_sti_channel; /**<
* voltage_channel[7:4] represent pmos channel,
* voltage_channel[3:0] represent nmos channel
*/
uint8_t amplifier_gain; /**<
* parameter table to represent actual amplifier gain
* ----------
* | bit |mean|
* ----------
* |0b00 | 100|
* ----------
* |0b01 | 400|
* ----------
* |0b10 | 800|
* -----------
* |0b11 | 25 |
* -----------
*/
/**< 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;
uint8_t ins_opcode; /**< check instruction opcode which is transmitted to DBS. */
uint8_t voltage_sti_amplitude; /**< voltage mode stimulation amplitude control. */
uint16_t arbitrary_index; /**< this index to keep address of arbitrary data we have already stored. */
uint16_t arbitrary_en; /**< if true: enable arbitrary mode stimulation. */
uint16_t recording_channel; /**< recording_channel[17] represent enabling channel 17. */
uint16_t sti_amplitude_h; /**< positive side amplitude. */
uint16_t sti_amplitude_l; /**< negative side amplitude. */
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. */
uint16_t chopper_ratio; /**< freqeuncy divider for chopper. */
uint16_t sti_channel; /**<
* if stimulation[7] == true, stimulation channel 7 is enabled .
* if stimulation[4] == true. stimulation channel 4 is enabled .
*/
uint8_t sti_ch_config_done; // number of stimulate channel which is config done
} INSTRUCTION = {0};
/**
* @brief:
* manage which operation to be conducted
*/
struct HEADSTAGE_STATE {
uint16_t state;
uint8_t config_type;
uint8_t index;
} NEULIVE_STATE = {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};
@@ -192,7 +196,7 @@ static void headstage_led_color(uint8_t color) {
==== LED implement (GPIO) ====
============================*/
#if defined (HEADSTAGE_UNI_H) || defined(HEADSTAGE_TEST_DATA_H)
#ifdef HEADSTAGE_UNI_H
#define HEADSTAGE_LED_USE_GPIO
#endif
@@ -102,12 +102,14 @@
*
*/
#define DEVICE_NAME "Neulive-v2.0"
#define MAJOR_PRODUCT_NUMBER 1
#define MINOR_PRODUCT_NUMBER 1
#define MAJOR_VERSION_NUMBER 2
#define DEVICE_NAME "PesudoCon"
#define MAJOR_PRODUCT_NUMBER 1 // neulive, 0 is Elite
#define MINOR_PRODUCT_NUMBER 1 //
#define MAJOR_VERSION_NUMBER 2 // neulive 2.0
#define MINOR_VERSION_NUMBER 0
static void FlushNotify();
/***********************************
* instruction building macro *
***********************************/
@@ -150,86 +152,14 @@
* MACRO *
***************/
// clang-format off
/** data format */
#define HEADSTAGE_NOTIFY_USE_TDC4VAF2
/** define cis */
#define CIS_READ_PARAM 0x30
/** instruction opcode from control box */
#define NEU_STI_PARAM 0x00
#define NEU_REC_PARAM 0x20
#define NEU_ARB_PARAM 0x40
#define NEU_TEST_INS 0x60
//#define CIS_READ_PARAM 0x30
/** event */
#define EVT_NEU_SPI 0x0001 /**< spi transaction event */
#define EVT_NEU_LED 0x0002 /**< set led event */
#define EVT_NEU_CHECK 0x0003 /**< check neulive single instruction */
/** clock setting */
#define NEU_SYS_CLK 8000000 /**< 10Mhz */
#define NEU_POLY_R_CLK 1000 /**< 1khz */
#define NEU_SPI_FREQ 800000 /**< 1Mhz */
#define NEU_LED_FREQ 1000000 /**< 1Mhz */
/** amounts of channel */
#define NEU_STI_CHANNEL_COUNTS 9 /**< voltage mode channel counts and current mode channel counts */
#define NEU_REC_CHANNEL_COUNTS 16 /**< recording channel counts */
/** state for CC2650 to control DBS */
#define NEU_WRITE_INSTRUCTION 0 /**< write instruction into register table by spi interface */
#define NEU_READ_DATA 1 /**< read amplifier data by spi interface */
#define NEU_SINGLE_INS_READ 2
#define NEU_CHECK_REGISTER 3
#define NEU_RECEIVE_PARAM 4
#define NEU_IDLE 15
/** macros for build up DBS instruction */
#define NEU_LNA_BIAS_ONE 0x0210 /**< vgrp(1_0000) left shift 5bits | vgrn(1_0000) */
#define NEU_LNA_BIAS_TWO 0x4210 /**< vgr_int_old(1_0000) left shift 10bits | vgr_intp(1_0000) left shift 5bits | vgr_intn(1_0000) */
#define NEU_GENERAL_EN 0x40f0 /**<
* | 15| 14| 13| 12| 11| 10| 9| 8|
* |en_ook|en_lsk|en_tg_10k|en_tg_10M|en_mux_10k|en_mux_10M|FSK_SEL|LNA_CLOCK_SEL|
*
* | 7| 6| 5| 4| 3| 2| 1| 0|
* |LNA_SEL|ADC_CLOCK_SEL|ADC_SEL|STI_SEL|RIPPLE_REDUCTION|DC_SERVO_LOOP|FAST_SETTLING|CHOPPER|
*/
/** macro for internal build buffer */
#define NEU_SET_STI_CUR 0x00
#define NEU_SET_STI_VOLT 0x01
#define NEU_SET_POLARITY 0x02
#define NEU_SET_STI_CYCLE 0x03
#define NEU_SET_STI_CHANNEL 0x04
#define NEU_SET_GENERAL_EN 0x05
#define NEU_SET_REC_CHANNEL 0x06
#define NEU_SET_AMP_GAIN 0x07
#define NEU_SET_SYS_CLK 0x08
#define NEU_SET_ADC_CLK 0x09
#define NEU_SET_STI_CLK 0x0A
#define NEU_SET_ARBITRARY 0x0B
#define NEU_SET_ARB_INDEX 0x0C
#define NEU_SET_STI_MODE 0x0D
#define NEU_SET_AMP_BIAS 0x0E
#define NEU_SET_CHOPPER 0x0F
#define NEU_SETUP_DONE 0x10
/**
* macro for setting DBS instruction
*/
#define T_ST 0x10
#define T_ND 0x20
#define T_RD 0x30
#define T_FT 0x40
#define STI_CYCLE 0x50
#define HIGH_SIDE 0x60
#define LOW_SIDE 0x70
#define VOLT_MODE_AMP 0x80
#define BIAS_ONE 0x90
#define BIAS_TWO 0xA0
#define EVT_NEU_CHECK 0x0004 /**< check neulive single instruction */
#define EVT_NEU_REG_SPI 0x0008 /** register spi event */
// clang-format on
@@ -237,230 +167,20 @@
* include *
*****************/
#include "time.h"
#include "headstage_pin.h"
#include "headstage_instruction.h"
#include "neu/headstage_pin.h"
#include "headstage_arm.h"
#include "headstage_debug.h"
#include "headstage_led.h"
#include "headstage_notify.h"
#include "headstage_swi.h"
#include "headstage_watchdog.h"
#include "neu/headstage_adc.h" /**< to be implemented to monitor battery voltage */
#include "neu/headstage_neu_parameter.h"
#include "neu/headstage_pwm.h"
#include "neu/headstage_spi.h"
#include "neu/headstage_notify.h"
/******************
* variable *
******************/
/**
*
* all the parameter going to be set to DBS Chip
*
* need to check default value of each parameter
*/
struct HEADSTAGE_PARAMETER_TABLE {
uint8_t current_sti_cycle[NEU_STI_CHANNEL_COUNTS]; /** stimulation times will be executed. */
/**< channel[8] assign to voltage mode channel. */
uint16_t sti_t1[NEU_STI_CHANNEL_COUNTS]; /**< first stimulation pulse duration, it can't be 0. */
uint16_t sti_t2[NEU_STI_CHANNEL_COUNTS]; /**< interval between biphasic pulses. */
uint16_t sti_t3[NEU_STI_CHANNEL_COUNTS]; /**< second stimulation pulse duration. */
uint32_t sti_t4[NEU_STI_CHANNEL_COUNTS]; /**< discharge time per stimulation. */
uint16_t sti_t5[NEU_STI_CHANNEL_COUNTS]; /**< discharge time after final stimulation. */
bool sti_mode; /**< if true: continuous mode, else limited mode. */
bool sti_h_bridge; /**< if true: enable h bridge, else single ended. */
bool sti_ref; /**< if true: reference cell body to gnd, else single ended is used. */
uint8_t current_sti_polarity; /**<
* default : low side.
* define which channel is high side or low side.
*/
uint8_t voltage_sti_channel; /**<
* voltage_channel[7:4] represent pmos channel,
* voltage_channel[3:0] represent nmos channel
*/
uint8_t amplifier_gain; /**<
* parameter table to represent actual amplifier gain
* ----------
* | bit |mean|
* ----------
* |0b00 | 100|
* ----------
* |0b01 | 400|
* ----------
* |0b10 | 800|
* -----------
* |0b11 | 25 |
* -----------
*/
/**< 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;
uint8_t ins_opcode; /**< check instruction opcode which is transmitted to DBS. */
uint8_t voltage_sti_amplitude; /**< voltage mode stimulation amplitude control. */
uint16_t arbitrary_index; /**< this index to keep address of arbitrary data we have already stored. */
uint16_t arbitrary_en; /**< if true: enable arbitrary mode stimulation. */
uint16_t recording_channel; /**< recording_channel[17] represent enabling channel 17. */
uint16_t sti_amplitude_h; /**< positive side amplitude. */
uint16_t sti_amplitude_l; /**< negative side amplitude. */
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. */
uint16_t chopper_ratio; /**< freqeuncy divider for chopper. */
uint16_t sti_channel; /**<
* if stimulation[7] == true, stimulation channel 7 is enabled .
* if stimulation[4] == true. stimulation channel 4 is enabled .
*/
} INSTRUCTION = {0};
/**
* @brief:
* manage which operation to be conducted
*/
struct HEADSTAGE_STATE {
uint8_t state;
uint8_t config_type;
uint8_t index;
} NEULIVE_STATE = {0};
/*
* todo: need to define some procedure to detect this device status
*/
static uint8_t headstage_debug_instruction(uint8_t* ins_buf) {
return 0;
}
/**
* @fn get_sti_channel
*/
static uint8_t get_sti_channel(uint8_t sti_channel) {
uint8_t sti_ch;
for (uint8_t i = 0; i < 8; i++) {
if ((0x01 << i) & sti_channel) {
sti_ch = i;
return sti_ch;
}
}
return 0xff;
}
/**
* @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_ST: {
op_neu = sti_channel * 4 + 1;
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.sti_t2[sti_channel] & 0x3f << 10) | (INSTRUCTION.sti_t1[sti_channel]);
INSTRUCTION.ins_opcode = T_ND;
return false;
}
case T_ND: {
op_neu = sti_channel * 4 + 2;
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.sti_t4[sti_channel] & 0x03 << 14) | (INSTRUCTION.sti_t3[sti_channel] << 6) | (INSTRUCTION.sti_t2[sti_channel] & 0x03c);
INSTRUCTION.ins_opcode = T_RD;
return false;
}
case T_RD: {
op_neu = sti_channel * 4 + 3;
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.sti_t4[sti_channel] >> 2) & 0xffff;
INSTRUCTION.ins_opcode = T_FT;
return false;
}
case T_FT: {
op_neu = sti_channel * 4 + 4;
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.sti_t5[sti_channel]) & 0x03ff;
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 = HIGH_SIDE;
if (NEULIVE_STATE.config_type == NEU_SET_STI_VOLT) INSTRUCTION.ins_opcode = HIGH_SIDE;
if (odd_even)
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel - 1]);
else
*value = (0x01 << 23) | (op_neu << 16) | (INSTRUCTION.current_sti_cycle[sti_channel + 1] << 8) | (INSTRUCTION.current_sti_cycle[sti_channel]);
return true;
}
default: {
INSTRUCTION.ins_opcode = T_ST;
return false;
}
}
}
/**
* @fn build stimulation voltage
*/
static bool build_sti_volt(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;
INSTRUCTION.ins_opcode = LOW_SIDE;
return false;
}
case LOW_SIDE: {
*value = (0x01 << 23) | (0x26 << 16) | INSTRUCTION.sti_amplitude_l;
INSTRUCTION.ins_opcode = VOLT_MODE_AMP;
return false;
}
case VOLT_MODE_AMP: {
*value = (0x01 << 23) | (0x27 << 16) | INSTRUCTION.voltage_sti_amplitude;
INSTRUCTION.ins_opcode = BIAS_ONE;
return true;
}
default: {
return false;
}
}
}
/**
* @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;
}
}
}
//#include "neu/headstage_reset.h"
#include "headstage_batt.h"
#include "headstage_BitCount.h"
#include "headstage_cali_CIS.h"
#include "headstage_version.h"
#include "headstage_power.h"
#include "string.h"
#include "pesudo_controller/pesudo_pi_uart.h"
/**
* @fn headstage_init
@@ -468,41 +188,20 @@ static bool build_amp_bias(uint32_t* value) {
* description: initial all the object we need to build
*/
static void headstage_init() {
static void headstage_init(){
headstage_pin_open();
headstage_spi_open();
headstage_led_open();
headstage_pwm_open();
headstage_led_color(COLOR_GREEN); // color green
headstage_pwm_start(headstage_system_pwm_handle);
headstage_pwm_start(headstage_poly_r_pwm_handle);
headstage_pin_output(PIN_RESET, 1);
headstage_pin_output(PIN_DC_DC, 1);
headstage_cpu_delay_ms(1);
headstage_pin_output(PIN_RESET, 0);
headstage_cpu_delay_ms(1);
headstage_pin_output(PIN_EN_ADC_SPI_CLK, 1);
headstage_pin_output(PIN_RESET, 1);
pesudo_pi_uart_init();
headstage_pin_output(Board_GLED, Board_LED_ON);
// turn off neulive if battery too low
// #define THREE_POINT_THREE_VOLT 845
// if (AONBatMonBatteryVoltageGet() < THREE_POINT_THREE_VOLT){
// headstage_led_color(COLOR_BLACK);
// headstage_power_shutdown();
// }
// #undef THREE_POINT_THREE_VOLT
}
/**
* @fn headstage_neu_append_notify_data
*/
static void headstage_neu_append_notify_data() {
uint8_t not_buf[2];
not_buf[0] = (spi_rxbuf[0] << 4) | spi_rxbuf[1];
not_buf[1] = spi_rxbuf[2];
uint8_t data_size = headstage_notify_append_data(not_buf);
if (data_size >= BLE_NOT_BUFF_SIZE) {
headstage_notify_send();
headstage_notify_flip_buffer();
}
}
static void headstage_neu_state_spi();
/**
* @fn headstage_neu_event
*
@@ -511,8 +210,8 @@ static void headstage_neu_state_spi();
static void headstage_neu_event() {
if (flag_mask(EVT_NEU_SPI)) {
headstage_neu_state_spi();
flag_disable(EVT_NEU_SPI);
// headstage_neu_state_spi();
}
if (flag_mask(EVT_NEU_LED)) {
@@ -524,136 +223,25 @@ static void headstage_neu_event() {
}
if (flag_mask(EVT_DISCONNECTED)) {
ConnectState = false;
headstage_update_vis_instruction(VIS_INT);
}
}
/**
* @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) {
flag_notify(EVT_NEU_SPI);
}
/**
* @fn headstage_update_ris_instruction
*
* description: decode real instruction to set corresponding parameter
*/
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instruction) {
switch (instruction[0] & 0xE0) {
case NEU_STI_PARAM: {
/** this is for test */
bool sti_volt_curr_sel = (instruction[0] & 0b00001000);
bool sti_mode = (instruction[0] & 0b00000100);
bool sti_h_bridge = (instruction[0] & 0b00000010);
bool sti_ref = (instruction[0] & 0b00000001);
uint8_t p_ch = (instruction[1] & 0xf0) >> 4;
uint8_t n_ch = (instruction[1] & 0x0f);
uint8_t sti_cycles = instruction[2];
uint16_t sti_amplitude_h = (instruction[3] << 2) | ((instruction[4] & 0xc0) >> 6);
uint16_t sti_amplitude_l = ((instruction[4] & 0x3f) << 4) | ((instruction[5] & 0xf0) >> 4);
uint16_t sti_t1 = ((instruction[5] & 0x0f) << 6) | ((instruction[6] & 0xfc) >> 2);
uint16_t sti_t2 = ((instruction[6] & 0x03) << 8) | instruction[7];
uint16_t sti_t3 = (instruction[8] << 2) | ((instruction[9] & 0xc0) >> 6);
uint16_t sti_t4 = ((instruction[9] & 0x3f) << 4) | ((instruction[10] & 0xf0) >> 4);
uint16_t sti_t5 = ((instruction[10] & 0x0f) << 6) | ((instruction[11] & 0xfc) >> 2);
uint16_t sti_clock_ratio = ((instruction[11] & 0x03) << 14) | (instruction[12] << 6) | ((instruction[13] & 0xfc) >> 2);
switch (instruction[0]) {
case RIS_PREPARE_SEND:{
INSTRUCTION.arbitrary_en = (0x01 << p_ch) | (0x01 << n_ch);
INSTRUCTION.sti_mode = sti_mode;
INSTRUCTION.sti_h_bridge = sti_h_bridge;
INSTRUCTION.sti_ref = sti_ref;
INSTRUCTION.current_sti_polarity = (0x01) << (7 - p_ch);
INSTRUCTION.sti_amplitude_h = sti_amplitude_h;
INSTRUCTION.sti_amplitude_l = sti_amplitude_l;
if (sti_volt_curr_sel) {
INSTRUCTION.sti_t1[p_ch] = sti_t1;
INSTRUCTION.sti_t1[n_ch] = sti_t1;
INSTRUCTION.sti_t2[p_ch] = sti_t2;
INSTRUCTION.sti_t2[n_ch] = sti_t2;
INSTRUCTION.sti_t3[p_ch] = sti_t3;
INSTRUCTION.sti_t3[n_ch] = sti_t3;
INSTRUCTION.sti_t4[p_ch] = sti_t4;
INSTRUCTION.sti_t4[n_ch] = sti_t4;
INSTRUCTION.sti_t5[p_ch] = sti_t5;
INSTRUCTION.sti_t5[n_ch] = sti_t5;
INSTRUCTION.current_sti_cycle[p_ch] = sti_cycles;
INSTRUCTION.sti_channel = ((0x01) << p_ch) | ((0x01) << n_ch);
} else {
INSTRUCTION.sti_t1[8] = sti_t1;
INSTRUCTION.sti_t2[8] = sti_t2;
INSTRUCTION.sti_t3[8] = sti_t3;
INSTRUCTION.sti_t4[8] = sti_t4;
INSTRUCTION.sti_t5[8] = sti_t5;
INSTRUCTION.current_sti_cycle[8] = sti_cycles;
INSTRUCTION.sti_channel = (0x01 << 8);
}
INSTRUCTION.sti_clock_ratio = sti_clock_ratio;
INSTRUCTION.ins_opcode = T_FT;
break;
}
case NEU_REC_PARAM: {
uint8_t vgrp = instruction[0] & 0x1f;
uint8_t vgrn = (instruction[1] & 0xf8) >> 3;
uint8_t vgr_int_old = ((instruction[1] & 0x07) << 2) | ((instruction[2] & 0xc0) >> 6);
uint8_t vgr_intp = ((instruction[2] & 0x3E) >> 1);
uint8_t vgr_intn = ((instruction[2] & 0x01) << 4) | ((instruction[3] & 0xf0) >> 4);
uint16_t recording_channel = ((instruction[3] & 0x0f) << 12) | (instruction[4] << 4) | ((instruction[5] & 0xf0) >> 4);
uint16_t adc_clock_ratio = ((instruction[5] & 0x0f) << 12) | (instruction[6] << 4) | ((instruction[7] & 0xf0) >> 4);
uint16_t sys_clk_ratio = ((instruction[7] & 0x0f) << 12) | (instruction[8] << 4) | ((instruction[9] & 0xf0) >> 4);
uint8_t amplifier_gain = ((instruction[9] & 0x0c) >> 2);
uint16_t chopper_ratio = (instruction[10] << 8) | instruction[11];
INSTRUCTION.vgrp = vgrp;
INSTRUCTION.vgrn = vgrn;
INSTRUCTION.vgr_int_old = vgr_int_old;
INSTRUCTION.vgr_intp = vgr_intp;
INSTRUCTION.vgr_intn = vgr_intn;
INSTRUCTION.recording_channel = recording_channel;
INSTRUCTION.adc_clock_ratio = adc_clock_ratio;
INSTRUCTION.sys_clk_ratio = sys_clk_ratio;
INSTRUCTION.amplifier_gain = (amplifier_gain == 0) ?3 :amplifier_gain-1 ; /**< control shift*/
INSTRUCTION.chopper_ratio = chopper_ratio;
INSTRUCTION.ins_opcode = T_FT;
break;
}
case NEU_ARB_PARAM: {
// to be implemented
break;
}
case NEU_TEST_INS: {
INSTRUCTION.vgrp = 16;
INSTRUCTION.vgrn = 16;
INSTRUCTION.vgr_intp = 16;
INSTRUCTION.vgr_intn = 16;
INSTRUCTION.vgr_int_old = 16;
INSTRUCTION.recording_channel = 2 ^ 7;
INSTRUCTION.adc_clock_ratio = 200;
INSTRUCTION.sys_clk_ratio = 10;
INSTRUCTION.sti_clock_ratio = 10;
INSTRUCTION.amplifier_gain = 0;
INSTRUCTION.chopper_ratio = 2;
INSTRUCTION.sti_t1[1] = 1;
INSTRUCTION.sti_t2[1] = 0;
INSTRUCTION.sti_t3[1] = 0;
INSTRUCTION.sti_t4[1] = 0;
INSTRUCTION.sti_t5[1] = 0;
INSTRUCTION.current_sti_cycle[1] = 1;
INSTRUCTION.sti_channel = 2;
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.sti_amplitude_h = 0;
INSTRUCTION.sti_amplitude_l = 0;
INSTRUCTION.ins_opcode = T_FT;
case RIS_SEND_UART:{
send_uart(instruction+1, 10);
break;
}
default: {
@@ -670,24 +258,6 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
static void headstage_update_vis_instruction(uint8_t vis_oper) {
switch (vis_oper) {
case VIS_RST: {
headstage_pin_output(PIN_RESET, 0);
headstage_cpu_delay_ms(1);
headstage_pin_output(PIN_RESET, 1);
/**< stop spi transaction */
break; /**< reset all the parameter */
}
case VIS_STI: {
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
flag_notify(EVT_NEU_SPI);
break; /**< start to operate */
}
case VIS_INT: {
NEULIVE_STATE.state = NEU_IDLE;
headstage_spi_transaction_cancel(headstage_spi_handle);
/**< stop stimulation and recording */
break; /**< interrupt the operation */
}
default: {
break;
}
@@ -699,305 +269,13 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
*/
static void headstage_update_cis_instruction(uint8_t cis_oper) {
switch (cis_oper) {
case CIS_NOP: {
// nothing
cdr_buf[0] = _B_4b4b(CIS_NOP, CHIP_ID);
cdr_buf[1] = _B_4b4b(CDR_SUCCESS, 0);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, 2, cdr_buf);
break;
}
#ifdef HEADSTAGE_CIS_VOLT_H
case CIS_VOLT: {
uint8_t status = headstage_update_vis_volt(ins_len, instruction + 2, cdr_buf + 2);
cdr_buf[0] = _B_4b4b(CIS_VOLT, CHIP_ID);
cdr_buf[1] = status;
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
#endif
#ifdef HEADSTAGE_CIS_LED_H
case CIS_LED: {
uint8_t status = headstage_update_vis_led(ins_len, instruction + 2, cdr_buf + 2);
cdr_buf[0] = _B_4b4b(CIS_LED, CHIP_ID);
cdr_buf[1] = status;
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
#endif
case CIS_READ_PARAM: {
NEULIVE_STATE.state = NEU_SINGLE_INS_READ;
flag_notify(EVT_NEU_SPI);
break;
}
default: {
cdr_buf[0] = _B_4b4b(cis_oper, CHIP_ID);
cdr_buf[1] = _B_4b4b(CDR_FAILURE, 0);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
}
}
/**
* @fn headstage_data_append_notify_buffer
*
* description: append data into notify buffer
*/
static void headstage_data_append_notify_buffer(uint8_t* dat_buf) {}
/**
* @fn read_neu_ins_config
*/
static void read_neu_ins_config(uint8_t config_type, uint32_t* value) {
uint8_t opcode;
switch (config_type) {
case NEU_SET_STI_CUR: {
uint8_t channel = get_sti_channel(INSTRUCTION.sti_channel);
opcode = channel * 4 + 1;
*value = opcode << 16;
break;
}
case NEU_SET_STI_VOLT: {
opcode = 0x25;
*value = opcode << 16;
break;
}
case NEU_SET_POLARITY: {
opcode = 0x28;
*value = opcode << 16;
break;
}
case NEU_SET_STI_CHANNEL: {
opcode = 0x2A;
*value = opcode << 16;
break;
}
case NEU_SET_GENERAL_EN: {
opcode = 0x2F;
*value = opcode << 16;
break;
}
case NEU_SET_REC_CHANNEL: {
opcode = 0x30;
*value = opcode << 16;
break;
}
case NEU_SET_AMP_GAIN: {
opcode = 0x31;
*value = opcode << 16;
break;
}
case NEU_SET_SYS_CLK: {
opcode = 0x32;
*value = opcode << 16;
break;
}
case NEU_SET_ADC_CLK: {
opcode = 0x33;
*value = opcode << 16;
break;
}
case NEU_SET_STI_CLK: {
opcode = 0x34;
*value = opcode << 16;
break;
}
case NEU_SET_ARBITRARY: {
opcode = 0x36;
*value = opcode << 16;
break;
}
case NEU_SET_ARB_INDEX: {
opcode = 0x37;
*value = opcode << 16;
break;
}
case NEU_SET_STI_MODE: {
opcode = 0x38;
*value = opcode << 16;
break;
}
case NEU_SET_AMP_BIAS: {
opcode = 0x39;
*value = opcode << 16;
break;
}
case NEU_SET_CHOPPER: {
opcode = 0x3B;
*value = opcode << 16;
break;
}
default: {
opcode = 0x33;
*value = opcode << 16;
break;
}
}
}
/**
* @fn build_neu_ins_config
*
* description: build the instruction and set it into spi txbuf
*
* list:
* 1-4: sti channel 0 : t1-t5
* 5-8: sti channel 1 : t1-t5
* 9-12: sti channel 2 : t1-t5
* 13-16: sti channel 3 : t1-t5
* 17-20: sti channel 4 : t1-t5
* 21-24: sti channel 5 : t1-t5
* 25-28: sti channel 6 : t1-t5
* 29-32: sti channel 7 : t1-t5
* 33-36: vol channel : t1-t5
*/
static uint8_t build_neu_ins_config(uint8_t config_type, uint32_t* value) {
bool done;
switch (config_type) {
case NEU_SET_STI_CUR: {
uint8_t sti_channel = get_sti_channel(INSTRUCTION.sti_channel);
done = build_sti_cur_instruction(sti_channel, value);
if (done) {
if (sti_channel == 0xff) {
return NEU_SET_STI_VOLT;
} else {
INSTRUCTION.sti_channel ^= (0x01 << sti_channel);
return NEU_SET_STI_CUR;
}
} else {
return NEU_SET_STI_CUR;
}
}
case NEU_SET_STI_VOLT: {
done = build_sti_volt(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_GENERAL_EN;
}
case NEU_SET_STI_CHANNEL: {
*value = (0x01 << 23) | (0x2E << 16) | INSTRUCTION.sti_channel;
return NEU_SET_STI_CUR;
}
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_SYS_CLK;
}
case NEU_SET_SYS_CLK: {
*value = (0x01 << 23) | (0x32 << 16) | INSTRUCTION.sys_clk_ratio;
return NEU_SET_ADC_CLK;
}
case NEU_SET_ADC_CLK: {
*value = (0x01 << 23) | (0x33 << 16) | INSTRUCTION.adc_clock_ratio;
return NEU_SET_STI_CLK;
}
case NEU_SET_STI_CLK: {
*value = (0x01 << 23) | (0x34 << 16) | INSTRUCTION.sti_clock_ratio;
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_SET_AMP_BIAS;
}
case NEU_SET_AMP_BIAS: {
done = build_amp_bias(value);
if (done)
return NEU_SET_CHOPPER;
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_SET_STI_CUR;
}
}
}
/**
* @fn headstage_neu_state_spi()
*
* @brief spi transaction
*/
static void headstage_neu_state_spi() {
uint32_t value;
uint8_t nxt_ins;
switch (NEULIVE_STATE.state) {
case NEU_WRITE_INSTRUCTION: {
nxt_ins = build_neu_ins_config(NEULIVE_STATE.config_type, &value); /**< set instruction one by one in order to set all the parameter.*/
NEULIVE_STATE.config_type = nxt_ins;
tx_put_u24(0, value);
headstage_spi_transaction(3);
if (nxt_ins == NEU_SETUP_DONE) {
NEULIVE_STATE.state = NEU_READ_DATA;
} else {
NEULIVE_STATE.state = NEU_WRITE_INSTRUCTION;
}
break;
}
case NEU_READ_DATA: {
headstage_neu_append_notify_data();
headstage_spi_transaction(3);
break;
}
case NEU_SINGLE_INS_READ: {
read_neu_ins_config(NEULIVE_STATE.config_type, &value);
tx_put_u24(0, value);
NEULIVE_STATE.state = NEU_RECEIVE_PARAM;
headstage_spi_transaction(3);
break;
}
case NEU_RECEIVE_PARAM: {
headstage_spi_transaction(3);
NEULIVE_STATE.state = NEU_CHECK_REGISTER;
break;
}
case NEU_CHECK_REGISTER: {
cdr_buf[0] = spi_rxbuf[1];
cdr_buf[1] = spi_rxbuf[2];
cdr_buf[2] = _B_4b4b(CIS_READ_PARAM, CHIP_ID);
cdr_buf[3] = _B_4b4b(CDR_SUCCESS, 0);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
case NEU_IDLE: {
break; /**< the other state will return to this and wait for next event.*/
}
default: {
break;
}
}
}
#endif
@@ -44,31 +44,61 @@ static uint8_t headstage_notify_buffer[BLE_NOT_BUFF_SIZE] = {0};
*
*/
static void headstage_notify_send() {
#ifdef HEADSTAGE_NOTIFY_USE_ATT
uint16_t buffer_size = BLE_NOT_BUFF_SIZE;
uint8_t *value = (uint8 *)GATT_bm_alloc(CONNECT_HANDLE, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &buffer_size);
if (value != NULL) {
memcpy(value, headstage_notify_buffer, buffer_size);
attHandleValueNoti_t notify = {
// clang-format off
.handle = 0x1E,
.len = buffer_size,
.pValue = value
// clang-format on
};
if (GATT_Notification(CONNECT_HANDLE, &notify, 0) != SUCCESS) {
// notify not send
GATT_bm_free((gattMsg_t *)&notify, ATT_HANDLE_VALUE_NOTI);
}
}
#else
//#ifdef HEADSTAGE_NOTIFY_USE_ATT
// uint16_t buffer_size = BLE_NOT_BUFF_SIZE;
// uint8_t *value = (uint8 *)GATT_bm_alloc(CONNECT_HANDLE, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &buffer_size);
//
// if (value != NULL) {
// memcpy(value, headstage_notify_buffer, buffer_size);
//
// attHandleValueNoti_t notify = {
// // clang-format off
// .handle = 0x1E,
// .len = buffer_size,
// .pValue = value
// // clang-format on
// };
//
// if (GATT_Notification(CONNECT_HANDLE, &notify, 0) != SUCCESS) {
// // notify not send
// GATT_bm_free((gattMsg_t *)&notify, ATT_HANDLE_VALUE_NOTI);
// }
// }
//
//#else
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
#endif
//#endif
}
/*
// | | 1 | 2 | 3 |
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
// -----------------------------------------------------------------
// | header | length = N |
// | timestamp |
// | time delta |
// | data [0] | data[1] |
// | ............................ | data[15] |
*/
static void FlushNotify(){
// headstage_notify_buffer[0] = INSTRUCTION.chip_id;
headstage_notify_buffer[0] = CHIP_ID;
headstage_notify_buffer[1] = 1; // data length = 1 when flushing notify
for (int i = 2; i < BLE_NOT_BUFF_SIZE ; i++) {
headstage_notify_buffer[i] = 0;
}
// 1 Timestamp = 32 usec; 31 Timestamp ~= 1 msec
uint32_t flush_time_stamp = 0; // msec
headstage_notify_buffer[2] = flush_time_stamp & 0xFF;
headstage_notify_buffer[3] = (flush_time_stamp >> 8) & 0xFF;
headstage_notify_buffer[4] = (flush_time_stamp >> 16) & 0xFF;
headstage_notify_buffer[5] = (flush_time_stamp >> 24) & 0xFF;
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
}
#endif // HEADSTAGE_NOTIFY_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
@@ -199,24 +199,24 @@ static void headstage_sti_event() {
==== function implement ====
==========================*/
static void headstage_init() {
headstage_pin_open();
// init global stable value
Types_FreqHz cpu_freq;
BIOS_getCpuFreq(&cpu_freq);
cpu_frequency = cpu_freq.lo;
headstage_gptimer_open();
headstage_pwm_open();
headstage_pin_output(PIN_POL0, 0);
headstage_pin_output(PIN_POL1, 0);
headstage_pin_output(PIN_PON0, 0);
headstage_pin_output(PIN_PON1, 0);
headstage_pin_output(PIN_TPS, 1);
}
//static void headstage_init() {
// headstage_pin_open();
//
// // init global stable value
// Types_FreqHz cpu_freq;
// BIOS_getCpuFreq(&cpu_freq);
// cpu_frequency = cpu_freq.lo;
//
// headstage_gptimer_open();
//
// headstage_pwm_open();
//
// headstage_pin_output(PIN_POL0, 0);
// headstage_pin_output(PIN_POL1, 0);
// headstage_pin_output(PIN_PON0, 0);
// headstage_pin_output(PIN_PON1, 0);
// headstage_pin_output(PIN_TPS, 1);
//}
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t *instruction) {
uint8_t ins_oper = instruction[0] & 0xE0;
@@ -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
@@ -36,12 +36,12 @@
static void headstage_test_periodic();
static void headstage_init() {
headstage_pin_open();
headstage_spi_open();
headstage_gptimer_open();
headstage_gptimer_set_frequency(1000);
}
//static void headstage_init() {
// headstage_pin_open();
// headstage_spi_open();
// headstage_gptimer_open();
// headstage_gptimer_set_frequency(1000);
//}
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instruction) {
}
@@ -196,14 +196,14 @@ static void headstage_tni_event() {
==== function implement ====
==========================*/
static void headstage_init() {
headstage_pin_open();
headstage_spi_open();
headstage_gptimer_open();
headstage_pin_output(PIN_S2P_RST, 0);
headstage_pin_output(PIN_P2S_RST, 0);
}
//static void headstage_init() {
// headstage_pin_open();
// headstage_spi_open();
// headstage_gptimer_open();
//
// headstage_pin_output(PIN_S2P_RST, 0);
// headstage_pin_output(PIN_P2S_RST, 0);
//}
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t *instruction) {
uint8_t header = instruction[0] & 0xE0;
@@ -123,6 +123,9 @@
#include "uni/headstage_spi.h"
#include "uni/headstage_pwm.h"
#include "uni/uni1.3_parameter.h"
#include "neulive13_CalibrationTable.h"
#include "headstage_calibration_CIS.h"
#include "headstage_version.h"
/************************************
* instruction building macro
@@ -690,16 +693,16 @@ static void headstage_reset() {
/*=========================================
==== initialize parameter and device. ====
========================================*/
static void headstage_init() {
headstage_pin_open();
headstage_spi_open();
headstage_pwm_open();
headstage_led_spi_color(COLOR_GREEN);
headstage_pin_output(PIN_RESET, 1); // initialize DBS chip
headstage_pin_output(PIN_STI_SEL, 1); // chip select is ok
headstage_pin_output(PIN_VGRP, 1);
headstage_pin_output(PIN_FASTSET, 0);
}
//static void headstage_init() {
// headstage_pin_open();
// headstage_spi_open();
// headstage_pwm_open();
// headstage_led_spi_color(COLOR_GREEN);
// headstage_pin_output(PIN_RESET, 1); // initialize DBS chip
// headstage_pin_output(PIN_STI_SEL, 1); // chip select is ok
// headstage_pin_output(PIN_VGRP, 1);
// headstage_pin_output(PIN_FASTSET, 0);
//}
static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instruction) {
switch ((instruction[0] & 0xE0)) {
@@ -852,6 +855,17 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
break;
}
#endif
case CIS_VERSION:{
cdr_buf[0] = VERSION_DATE_YEAR;
cdr_buf[1] = VERSION_DATE_MONTH;
cdr_buf[2] = VERSION_DATE_DAY;
cdr_buf[3] = VERSION_DATE_HOUR;
cdr_buf[4] = VERSION_DATE_MINUTE;
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
default: {
cdr_buf[0] = _B_4b4b(cis_oper, CHIP_ID);
cdr_buf[1] = _B_4b4b(CDR_FAILURE, 0);
@@ -884,9 +898,14 @@ static void headstage_uni_umc_data_append_notify_buffer(uint8_t* dat_buf) {
headstage_uni_delay();
} else {
if ((dat_buf[1] & 0x28) == 0x28) {
// headstage_led_spi_color(COLOR_YELLOW);
dat_buf[0] = (dat_buf[0] << 1) | ((dat_buf[1] >> 7) & 0x01);
dat_buf[1] = (dat_buf[1] << 1) | ((dat_buf[2] >> 7) & 0x01);
dat_buf[2] = (dat_buf[2] << 1) | ((dat_buf[3] >> 7) & 0x01);
// dat_buf[0] = (dat_buf[0] << 1) | ((dat_buf[1] >> 7) & 0x01);
// dat_buf[2] = ((dat_buf[1] & 0b00000111) << 2) | (dat_buf[2] & 0b11100000);
// dat_buf[1] = (dat_buf[1] >> 3) & 0b00001111;
}
uint8_t channel;
@@ -0,0 +1,44 @@
#ifndef VERSION_DATE
#define VERSION_DATE
#define VERSION_DATE_YEAR 20
#define VERSION_DATE_MONTH 5
#define VERSION_DATE_DAY 20
#define VERSION_DATE_HOUR 17
#define VERSION_DATE_MINUTE 27
// this is NOT the version hash !!
// it's the last version hash
#define VERSION_HASH eb4b14af59afe8af309a843a93f87cacc8c68072
#define VERSION_GIT_BRANCH central_pseudo_controller
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
@@ -221,23 +221,23 @@ static void headstage_dac_send(uint8_t command, uint8_t p1, uint8_t p2) {
==== function implement ====
==========================*/
static void headstage_init() {
headstage_pin_open();
headstage_led_open();
headstage_spi_open();
PIN_registerIntCb(headstage_pins_handle, &headstage_zm_pin_callback);
PIN_setInterrupt(headstage_pins_handle, PIN_SWITCH_ON | PIN_IRQ_NEGEDGE);
headstage_pin_output(PIN_SHUTDOWN_6994, 1);
headstage_pin_output(PIN_ENABLE_V05, 1);
headstage_pin_output(PIN_ENABLE_V10, 1);
headstage_pin_output(PIN_ADC_CS, 1);
headstage_pin_output(PIN_DAC_CS, 1);
INSTRUCTION.mode = MODE_POWER_ON;
}
//static void headstage_init() {
// headstage_pin_open();
// headstage_led_open();
// headstage_spi_open();
//
// PIN_registerIntCb(headstage_pins_handle, &headstage_zm_pin_callback);
// PIN_setInterrupt(headstage_pins_handle, PIN_SWITCH_ON | PIN_IRQ_NEGEDGE);
//
// headstage_pin_output(PIN_SHUTDOWN_6994, 1);
// headstage_pin_output(PIN_ENABLE_V05, 1);
// headstage_pin_output(PIN_ENABLE_V10, 1);
//
// headstage_pin_output(PIN_ADC_CS, 1);
// headstage_pin_output(PIN_DAC_CS, 1);
//
// INSTRUCTION.mode = MODE_POWER_ON;
//}
static void headstage_zm_turn(uint8_t on_off) {
if (on_off) {
@@ -0,0 +1,23 @@
#ifndef CHECK_MOSI
#define CHECK_MOSI
#include "headstage_led.h"
/*
* MOSI channel meet with INSTRUCTION.recording_channel ?
*/
static uint8_t CheckMOSI(uint8_t* MOSI){
uint8_t ch = MOSI[0];
uint16_t selectCh = 0x0001 << ch;
if(selectCh & INSTRUCTION.recording_channel){
return 1;
}
else{
// headstage_led_color(COLOR_RED);
// headstage_led_color(COLOR_GREEN);
return 0;
}
}
#endif
@@ -10,7 +10,7 @@
#define NOT_BUF_OFFSET_INIT 8
static uint32_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static void headstage_notify_set_timestamp() {
@@ -23,7 +23,7 @@ static void headstage_notify_set_timestamp() {
}
static void headstage_notify_flip_buffer() {
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 2;
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 3;
headstage_notify_buffer[0] = CHIP_ID;
headstage_notify_buffer[1] = data_count;
@@ -39,13 +39,15 @@ 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++] = 0x03;
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) {
if (not_buf_offset >= BLE_NOT_BUFF_SIZE - 1) {
uint32_t current = headstage_time_stamp_us();
uint32_t time_delta = ((current - not_time_stamp)) & 0xFFFF;
@@ -6,38 +6,29 @@
#if defined(CC2650_LAUNCHXL)
// clang-format off
#define PIN_RESET IOID_0 // SPI1 to receive LSK
#define PIN_EN_ADC_SPI_CLK IOID_1 // SPI1 clock
#define PIN_DC_DC IOID_2 // STI select need
#define PIN_BATT_HALF IOID_3 //
#define PIN_AMP_VCK IOID_4 //
#define PIN_LED_SDI IOID_7 //
#define PIN_LED_CLK IOID_8 //
#define PIN_STI_CLK IOID_9 //
#define PIN_SPI_MISO IOID_10 //
#define PIN_SPI_MOSI IOID_11 //
#define PIN_SPI_CS IOID_12 //
#define PIN_SPI_CLK IOID_13 //
#define PIN_SYS_CLK IOID_14 //
#define Board_RLED IOID_6
#define Board_GLED IOID_7
#define Board_WAKE_CENTRAL IOID_8
// clang-format on
#elif defined(BOOSTXL_CC2650MA)
// clang-format off
#define PIN_RESET IOID_0 // SPI1 to receive LSK
#define PIN_EN_ADC_SPI_CLK IOID_1 // SPI1 clock
#define PIN_LED_SDI IOID_0 // SPI1 to receive LSK
#define PIN_LED_CLK IOID_1 // SPI1 clock
#define PIN_DC_DC IOID_2 // STI select need
#define PIN_BATT_HALF IOID_3 //
#define PIN_AMP_VCK IOID_4 //
#define PIN_LED_SDI IOID_7 //
#define PIN_LED_CLK IOID_8 //
#define PIN_STI_CLK IOID_9 //
#define PIN_SPI_MISO IOID_10 //
#define PIN_SPI_MOSI IOID_11 //
#define PIN_SPI_CS IOID_12 //
#define PIN_SPI_CLK IOID_13 //
#define PIN_SYS_CLK IOID_14 //
#define PIN_EN_ADC_SPI_CLK IOID_3 //
#define PIN_BATT_HALF IOID_4 //
#define PIN_SPI_MISO IOID_7 //
#define PIN_SPI_MOSI IOID_8 //
#define PIN_SPI_CS IOID_9 //
#define PIN_SPI_CLK IOID_10 //
#define PIN_SYS_CLK IOID_11 //
#define PIN_RESET IOID_12 //
#define PIN_AMP_VCK IOID_13 //
#define PIN_STI_CLK IOID_14 //
// clang-format on
#endif
@@ -47,7 +38,8 @@
#define Board_SPI0_MISO PIN_SPI_MISO
#define Board_SPI0_MOSI PIN_SPI_MOSI
#define Board_SPI0_CLK PIN_SPI_CLK
#define Board_SPI0_CSN PIN_SPI_CS
//#define Board_SPI0_CSN PIN_SPI_CS
#define Board_SPI0_CSN PIN_UNASSIGNED
/*
* SPI1 interface work with LED
@@ -72,13 +64,23 @@
#define Board_PWMPIN6 PIN_UNASSIGNED
#define Board_PWMPIN7 PIN_UNASSIGNED
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_STI_CLK | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
static PIN_Config pesudo_pi_pin_configuration[] = { //
Board_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
Board_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
Board_WAKE_CENTRAL | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
//
PIN_TERMINATE};
PIN_TERMINATE
};
static PIN_State pesudo_pi_pins_state;
static PIN_Handle pesudo_pi_pins_handle;
#define headstage_pin_open() \
do { \
pesudo_pi_pins_handle = PIN_open(&pesudo_pi_pins_state, pesudo_pi_pin_configuration); \
} while (0)
#define headstage_pin_output(pin, value) PIN_setOutputValue(pesudo_pi_pins_handle, PIN_ID(pin), (value))
#endif // HEADSTAGE_PIN_UNI_H
@@ -0,0 +1,114 @@
#ifndef NEU_2_RST
#define NEU_2_RST
#include "headstage_instruction.h"
#include "neu/headstage_spi.h"
static void ResetINSTRUCTION();
static void MCUReset(){
// Reset INSTRUCTION & NEULIVE_STATE
ResetINSTRUCTION();
// global variable reset
STI = false;
turn_off_sti = false;
IsFirstData = true;
// SPI reset
SPI_close(headstage_spi_handle);
spi_state_counter = 0;
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++ ){
spi_txbuf[i] = 0;
spi_rxbuf[i] = 0;
}
SPICallBack = ONE_SHOT_SPI;
ReopenSPI();
for(int i=0 ; i<SPI_LED_BUFF_SIZE ; i++){
headstage_spi_led_txbuf[i] = 0;
}
// CIS buffer reset
for(int i=0 ; i<BLE_CDR_BUFF_SIZE ; i++){
cdr_buf[i] = 0;
}
// Notify Buffer reset
for(int i=0 ; i<BLE_NOT_BUFF_SIZE ; i++){
headstage_notify_buffer[i] = 0;
}
not_buf_offset = NOT_BUF_OFFSET_INIT;
not_time_stamp = 0;
if(ErrorRestart){
headstage_led_color(COLOR_RED);
}
else if(ConnectState){
headstage_led_color(COLOR_CYAN);
}
else{
headstage_led_color(COLOR_GREEN); // color green
}
// this flag is set by SimpleBLEPeripheral_processStateChangeEvt() in simple_peripheral.c
// ConnectState = false;
}
static void DBSReset(){
headstage_pin_output(PIN_RESET, 0);
headstage_cpu_delay_ms(10);
headstage_pin_output(PIN_DC_DC, 1);
headstage_pin_output(PIN_EN_ADC_SPI_CLK, 1);
headstage_pin_output(PIN_RESET, 1);
}
static void Neu2Reset(){
DBSReset();
MCUReset();
}
static void ResetINSTRUCTION(){
INSTRUCTION.vgrp = 16;
INSTRUCTION.vgrn = 16;
INSTRUCTION.vgr_intp = 16;
INSTRUCTION.vgr_intn = 16;
INSTRUCTION.vgr_int_old = 16;
INSTRUCTION.recording_channel = 0b0000000000000000;
INSTRUCTION.adc_clock_ratio = 100;
INSTRUCTION.sys_clk_ratio = 10;
INSTRUCTION.sti_clock_ratio = 10;
INSTRUCTION.amplifier_gain = 0;
INSTRUCTION.chopper_ratio = 2;
INSTRUCTION.sti_t1[1] = 1;
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.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.sti_amplitude_h = 0;
INSTRUCTION.sti_amplitude_l = 0;
INSTRUCTION.ins_opcode = BIAS_ONE;
INSTRUCTION.sti_ch_config_done = 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.index = 0;
}
#endif
@@ -12,7 +12,7 @@
#include <ti/drivers/dma/UDMACC26XX.h>
#include <ti/drivers/spi/SPICC26XXDMA.h>
#define SPI_BUFFER_SIZE 20
#define SPI_BUFFER_SIZE 3
static uint8_t spi_txbuf[SPI_BUFFER_SIZE] = {0};
static uint8_t spi_rxbuf[SPI_BUFFER_SIZE] = {0};
@@ -38,14 +38,14 @@ static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transacti
headstage_spi_handle = SPI_open(Board_SPI0, &spi_parameter); \
} while (0)
#define headstage_spi_transaction(handle, length, tx, rx) \
({ \
SPI_Transaction transaction = headstage_spi_transaction ; \
transaction.count = (length); \
transaction.txBuf = (tx); \
transaction.rxBuf = (rx); \
SPI_transfer(handle, &transaction); \
})
//#define headstage_spi_transaction(handle, length, tx, rx) \
// ({ \
// SPI_Transaction transaction = headstage_spi_transaction ; \
// transaction.count = (length); \
// transaction.txBuf = (tx); \
// transaction.rxBuf = (rx); \
// SPI_transfer(handle, &transaction); \
// })
#define headstage_spi_transaction(length) \
({ \
@@ -70,4 +70,54 @@ static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transacti
} \
} while (0)
#endif
static void ReopenSPI(){
SPI_init();
SPI_Params spi_parameter;
SPI_Params_init(&spi_parameter);
spi_parameter.transferMode = SPI_MODE_CALLBACK;
spi_parameter.mode = SPI_SLAVE;
spi_parameter.bitRate = NEU_SPI_FREQ;
spi_parameter.dataSize = 8;
spi_parameter.frameFormat = SPI_POL0_PHA1;
spi_parameter.transferCallbackFxn = headstage_spi_callback;
headstage_spi_handle = SPI_open(Board_SPI0, &spi_parameter);
}
//static void WriteSPI(uint8_t length){
// if(OpenSPI){
// ReopenSPI();
// }
//
// for(int i=length ; i<SPI_BUFFER_SIZE ; i++){
// spi_rxbuf[i] = 0x00;
// }
//
// SPICallBack = FLUSH_BUFFER;
// headstage_spi_transaction.count = 3;
// headstage_spi_transaction.txBuf = spi_txbuf;
// headstage_spi_transaction.rxBuf = spi_rxbuf;
//
// SPI_transfer(headstage_spi_handle, &headstage_spi_transaction);
//}
//static void ReadSPI(){
// if(OpenSPI){
// ReopenSPI();
// }
//
// SPICallBack = READ_REG;
// headstage_spi_transaction.count = 3;
// headstage_spi_transaction.txBuf = spi_txbuf;
// headstage_spi_transaction.rxBuf = spi_rxbuf;
//
// SPI_transfer(headstage_spi_handle, &headstage_spi_transaction);
//}
static void AppendSPITX(uint8_t index, uint32_t value){
tx_put_u24(index, value);
for(int i=3 ; i<SPI_BUFFER_SIZE ; i++){
spi_txbuf[i] = 0;
}
}
#endif
@@ -0,0 +1,75 @@
#ifndef PESUDO_PI_UART_H
#define PESUDO_PI_UART_H
/*
* http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/
* 2_20_00_06/exports/tirtos_full_2_20_00_06/products/tidrivers_cc13xx_cc26xx_2_20_00_08/
* docs/doxygen/html/_u_a_r_t_c_c26_x_x_8h.html
*/
#include <ti/drivers/UART.h>
#include <ti/drivers/uart/UARTCC26XX.h>
#include <ti/sysbios/knl/Clock.h>
#include "../neu/headstage_pin.h"
// Clock object used to timeout connection
static Clock_Struct SendUARTClock;
// Scan duration in ms
#define SEND_UART_DURATION 1000
#define UART_TX_BUF_SIZE 10
#define UART_RX_BUF_SIZE 10
static UART_Handle handle;
static UART_Params params;
static uint8_t UART_txBuf[UART_TX_BUF_SIZE];
static uint8_t UART_rxBuf[UART_RX_BUF_SIZE];
static void _send_uart(UArg arg0);
static void pesudo_pi_uart_init(){
uint32_t timeoutUs = 5000; // 5ms timeout, default timeout is no timeout (BIOS_WAIT_FOREVER)
// Init UART and specify non-default parameters
UART_Params_init(&params);
params.baudRate = 9600;
params.writeDataMode = UART_DATA_BINARY;
// params.readTimeout = timeoutUs / Clock_tickPeriod; // Default tick period is 10us
params.readTimeout = ti_sysbios_BIOS_WAIT_FOREVER;
// Open the UART and do the read
handle = UART_open(Board_UART, &params);
// int rxBytes = UART_read(handle, rxBuf, 100);
Util_constructClock(&SendUARTClock, _send_uart,
SEND_UART_DURATION, 0, false, 0);
return;
}
static void send_uart(uint8_t *txbuf, uint8_t size) {
headstage_pin_output(Board_WAKE_CENTRAL, Board_LED_ON);
headstage_pin_output(Board_RLED, Board_LED_ON);
for(int i=0 ; i<size && i<UART_TX_BUF_SIZE ; i++){
UART_txBuf[i] = txbuf[i];
}
// Util_startClock(&SendUARTClock);
CPUdelay(16000000);
UART_write(handle, UART_txBuf, UART_TX_BUF_SIZE);
headstage_pin_output(Board_RLED, Board_LED_OFF);
headstage_pin_output(Board_WAKE_CENTRAL, Board_LED_OFF);
}
static void _send_uart(UArg arg0){
UART_write(handle, UART_txBuf, UART_TX_BUF_SIZE);
headstage_pin_output(Board_RLED, Board_LED_OFF);
headstage_pin_output(Board_WAKE_CENTRAL, Board_LED_OFF);
}
#endif
@@ -10,7 +10,7 @@
#define NOT_BUF_OFFSET_INIT 8
static uint32_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static void headstage_notify_set_timestamp() {
@@ -76,14 +76,14 @@
#endif
static PIN_Config headstage_pin_configuration[] = { //
PIN_STI_SEL | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_RESET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_VGRP | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_FASTSET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_LED_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_LED_OUT | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
//
PIN_TERMINATE};
//static PIN_Config headstage_pin_configuration[] = { //
// PIN_STI_SEL | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// PIN_RESET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// PIN_VGRP | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// PIN_FASTSET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// PIN_LED_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// PIN_LED_OUT | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// //
// PIN_TERMINATE};
#endif // HEADSTAGE_PIN_UNI_H
@@ -115,20 +115,28 @@
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 6
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
// parameter update request is enabled
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
#else //! FEATURE_OAD
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
// Maximum connection interval (units of 1.25ms, 8=10ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 25
#endif // FEATURE_OAD
#define SBP_PERIODIC_EVT_PERIOD DEFAULT_DESIRED_MIN_CONN_INTERVAL + 2
// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
@@ -160,6 +168,7 @@
#define SBP_STATE_CHANGE_EVT 0x0001
#define SBP_CHAR_CHANGE_EVT 0x0002
#define SBP_CONN_EVT_END_EVT 0x0004
#define SBP_PERIODIC_EVT 0x0008
// clang-format on
/*********************************************************************
@@ -407,7 +416,9 @@ static void SimpleBLEPeripheral_init(void) {
// Register for GATT local events and ATT Responses pending for transmission
GATT_RegisterForMsgs(self);
headstage_led_spi_color(COLOR_GREEN);
// HCI_LE_ReadMaxDataLenCmd();
//
// HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
}
@@ -507,7 +518,7 @@ static void headstage_init_device_info() {
for (unsigned int i = 0; i < sizeof(DEVICE_NAME) - 1; i++) {
*p++ = DEVICE_NAME[i];
}
*p++ = 15;
*p++ = 16;
*p++ = GAP_ADTYPE_MANUFACTURER_SPECIFIC;
// unsafe_memcpy(p, "BPHS", 4);
*p++ = 'B';
@@ -523,7 +534,9 @@ static void headstage_init_device_info() {
*p++ = 'B';
*p++ = 'A';
*p++ = 'T';
*p++ = headstage_battery_percent();
*p++ = headstage_battery_volt1();
*p++ = headstage_battery_volt2();
GGS_SetParameter(GGS_DEVICE_NAME_ATT, sizeof(DEVICE_NAME), DEVICE_NAME);
@@ -595,9 +608,18 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
}
}
if (EVENT_MASK > 0) {
headstage_event_handle();
}
// if (EVENT_MASK > 0) {
// 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)) {
@@ -823,12 +845,14 @@ 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)) {
headstage_led_spi_color(COLOR_CYAN);
ConnectState = true;
}
// Use numActive to determine the connection handle of the last
// connection
@@ -843,18 +867,22 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
case GAPROLE_WAITING:
// Device is started but not advertising, is in waiting period before advertising again
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
ConnectState = false;
if(ErrorRestart){
}
else{
}
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_spi_color(COLOR_RED); /** for neulive1.3 call headstage_led_spi_color ; for neulive2.0 call headstage_led_color */
ErrorRestart = true;
CONNECT_HANDLE = 0xFFFF;
flag_notify(EVT_DISCONNECTED);
break;
case GAPROLE_ERROR: // Error occurred - invalid state
headstage_led_spi_color(COLOR_RED);
break;
case GAPROLE_INIT: // Waiting to be started
case GAPROLE_ADVERTISING: // Currently Advertising
@@ -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;
}
@@ -85,6 +85,7 @@ extern "C" {
#define SIMPLEPROFILE_CHAR2_LEN 10
#define SIMPLEPROFILE_CHAR3_LEN 20
#define SIMPLEPROFILE_CHAR4_LEN 200
//#define SIMPLEPROFILE_CHAR4_LEN 20
#define SIMPLEPROFILE_CHAR5_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=23
declare -i UN_USED_ROW=$START_ROW-1
MAC="MAC"
while read -r line; do
for word in $line; do
# get device MAC
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 3 ];then
MAC=$word
sed -i "${current_line} i \\\n#elif defined(BOARD_${MAC})\\n{" "$output"
sed -i 's/:/_/g' "$output"
current_line=$current_line+3
fi
# get device positive channel coeff and offset
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 4 ];then
sed -i "${current_line} i \ .p_ch.coefficient = $word," "$output"
current_line=$current_line+1
fi
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 5 ];then
sed -i "${current_line} i \ .p_ch.offset = $word," "$output"
current_line=$current_line+1
fi
# get device negative channel coeff and offset
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 6 ];then
sed -i "${current_line} i \ .n_ch.coefficient = $word," "$output"
current_line=$current_line+1
fi
if [ $row_index -gt $UN_USED_ROW ] && [ $col_index -eq 7 ];then
sed -i "${current_line} i \ .n_ch.offset = $word" "$output"
current_line=$current_line+1
sed -i "${current_line} i };" "$output"
current_line=$current_line+1
fi
#update index
if [ $col_index -lt $COL_MAX ];then
col_index=$col_index+1
else
col_index=0
row_index=$row_index+1
fi
done
done < $input
else
echo "This script should be executed on CC2650 periperal only"
fi