Compare commits

..

306 Commits

Author SHA1 Message Date
weiting2 a82ad36975 SPI should be phase 1 2020-02-12 11:20:57 +08:00
weiting2 2320d5b757 mimic neu1.3_12/3 version 2020-02-11 11:43:41 +08:00
weiting2 db02c38a47 mimic neu1.3_12/3 version 2020-02-11 10:35:59 +08:00
weiting2 550b3c1158 mimic neu1.3_12/3 version 2020-02-10 17:15:01 +08:00
weiting2 d6070848b6 SBP_TASK_STACK_SIZE 1024 => 844
I am not sure what will happen
2020-02-10 16:40:57 +08:00
weiting2 0eecf13936 disable data length extension 2020-02-10 16:02:50 +08:00
yichin 4dd471961a error fix 2020-02-04 14:32:24 +08:00
weiting2 3021f65838 discard illegal channel data 2020-02-04 14:22:34 +08:00
weiting2 d355defa2d fix warning 2020-01-22 16:18:30 +08:00
weiting2 9f3f3335fc test mode using ch2 2020-01-22 16:16:11 +08:00
weiting2 0c5632fe30 3PIN SPI 2020-01-21 11:12:43 +08:00
weiting2 2a4924c5b2 4PIN SPI 2020-01-20 17:38:24 +08:00
weiting2 19ec8c4d6f 8bit spi without CS 2020-01-17 17:22:00 +08:00
weiting2 a232f2d795 8bit spi without CS 2020-01-17 17:11:21 +08:00
yichin 3090e2b4ea 8bit SPI 2020-01-17 14:55:56 +08:00
weiting2 162731f640 read spi_rxbuf 2020-01-17 10:25:32 +08:00
weiting2 8a63dd49c7 read spi_rxbuf 2020-01-17 10:16:28 +08:00
weiting2 e707c0a3d9 read spi_rxbuf 2020-01-17 10:10:59 +08:00
weiting2 83fb7687bb append notify in SPI callback 2020-01-16 18:08:28 +08:00
weiting2 55d6f5c565 append notify in SPI callback 2020-01-16 17:51:02 +08:00
weiting2 d5cd66f026 append notify in SPI callback 2020-01-16 17:14:25 +08:00
weiting2 9fd7987327 append notify in SPI callback 2020-01-16 17:11:04 +08:00
weiting2 6339640eb7 notify channel send correctly? 2020-01-16 17:03:53 +08:00
weiting2 dc7c3f8e99 notify channel send correctly? 2020-01-16 16:54:57 +08:00
weiting2 bd5c75d1b1 VIS_RST/INT will reset 2650 correctly 2020-01-16 12:33:39 +08:00
weiting2 fddf3535f3 VIS_RST/INT will reset 2650 correctly 2020-01-15 18:49:19 +08:00
weiting2 d8b4221d81 VIS_RST/INT will reset 2650 correctly 2020-01-15 18:40:16 +08:00
weiting2 c5af1e0959 VIS_RST/INT will reset 2650 correctly 2020-01-15 18:34:31 +08:00
weiting2 4135a823e3 VIS_RST/INT will reset 2650 correctly 2020-01-15 18:21:15 +08:00
weiting2 507c0cd439 VIS_RST/INT will reset 2650 correctly 2020-01-15 18:03:31 +08:00
weiting2 cc54e95b30 VIS_RST/INT will reset 2650 correctly 2020-01-15 17:49:39 +08:00
yichin c084dfd67a error fix 2020-01-15 17:20:59 +08:00
weiting2 8c7424bf5b VIS_RST/INT will reset 2650 correctly 2020-01-15 17:19:15 +08:00
weiting2 235140c10b VIS_RST/INT will reset 2650 correctly 2020-01-15 16:47:59 +08:00
weiting2 6f9b279a82 VIS_RST/INT will reset 2650 correctly 2020-01-15 16:44:59 +08:00
weiting2 512bac4f80 VIS_RST/INT will reset 2650 correctly 2020-01-15 16:19:09 +08:00
weiting2 1353e192c2 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h
2020-01-14 17:19:03 +08:00
weiting2 f0eb5da80e check SPI MOSI channel 2020-01-14 17:18:12 +08:00
yichin f8fb36ca26 disable sti in test mode 2020-01-14 16:57:15 +08:00
weiting2 3c2970e36f check SPI MOSI channel 2020-01-14 16:02:19 +08:00
weiting2 f829c2af1a check SPI MOSI channel 2020-01-14 15:24:36 +08:00
weiting2 7710283346 check SPI MOSI channel 2020-01-14 14:22:19 +08:00
weiting2 1aac170954 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2020-01-14 13:57:38 +08:00
weiting2 f13df95710 check SPI MOSI channel 2020-01-14 11:21:21 +08:00
yichin e97ce556dd Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2020-01-14 10:32:48 +08:00
weiting2 504088b534 check SPI MOSI channel 2020-01-14 10:30:28 +08:00
yichin 06a6010cf3 test 2020-01-13 16:08:07 +08:00
yichin f006ef75d5 change amp vck (poly r pwm) 2020-01-10 15:30:21 +08:00
yichin c5f06cd076 change amp vck (poly r pwm) 2020-01-10 11:49:44 +08:00
yichin e2f2b88e80 commit 2020-01-09 16:46:02 +08:00
yichin 7cbe888f39 error fix 2020-01-09 12:38:55 +08:00
yichin 7121a12737 error fix 2020-01-07 16:10:17 +08:00
yichin 68e395a86c error fix 2020-01-07 15:07:00 +08:00
weiting2 48eb5f0196 test NEU 2.0 instruction 2020-01-07 15:00:09 +08:00
weiting2 5fdd0a1e07 test NEU 2.0 reset 2020-01-07 14:14:59 +08:00
weiting2 157676b29d test NEU 2.0 reset 2020-01-07 13:37:01 +08:00
weiting2 53ba84d5d3 test NEU 2.0 reset 2020-01-07 11:33:13 +08:00
weiting2 50da5a1876 test NEU 2.0 reset 2020-01-07 11:20:39 +08:00
weiting2 5e42dc0056 test NEU 2.0 reset 2020-01-07 11:03:30 +08:00
weiting2 5e53b7d651 test NEU 2.0 reset 2020-01-07 10:32:56 +08:00
weiting2 b129f2b7d4 test NEU 2.0 2020-01-06 18:53:34 +08:00
weiting2 5502099315 test NEU 2.0 2020-01-06 18:47:59 +08:00
weiting2 a3670d0e9a test NEU 2.0 2020-01-06 18:11:43 +08:00
yichin 6f8479770d Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2020-01-06 17:37:18 +08:00
weiting2 d89744b1c7 ADC clock & amp gain instruction 2020-01-06 17:36:34 +08:00
yichin 224475f342 error fix 2020-01-06 11:41:23 +08:00
yichin 7164b5f6c3 error fix 2020-01-06 11:39:20 +08:00
weiting2 0406cdea67 neu2.1 pin assign 2020-01-06 10:55:38 +08:00
weiting2 91787a5bb4 neu2.0 UI work well 2019-12-19 15:11:40 +08:00
weiting2 1c074fd180 notify should include device ID QQQQQ 2019-12-19 15:08:53 +08:00
weiting2 a5051dd42b notify should include device ID QQQQQ 2019-12-19 15:02:33 +08:00
weiting2 d1583ba5e1 notify should include device ID QQQQQ 2019-12-19 14:56:04 +08:00
weiting2 cc48dab88b notify should include device ID QQQQQ 2019-12-19 14:55:23 +08:00
weiting2 82383bbfcf Slow down notify speed. Check if memory board write correctly 2019-12-18 18:01:02 +08:00
weiting2 99a45314ae Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-18 16:45:33 +08:00
weiting2 17c501b855 Slow down notify speed. Check if memory board write correctly 2019-12-18 16:45:19 +08:00
yichin 1933ccbfe7 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-18 16:09:44 +08:00
weiting2 092b848c4d Slow down notify speed. Check if memory board write correctly 2019-12-18 16:08:50 +08:00
weiting2 8597e29a8a TODO: speed up ADC clock 2019-12-16 17:47:37 +08:00
weiting2 f3b8d74f82 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-13 14:31:54 +08:00
weiting2 4d3dee1c40 DBS clk_src = 4M, spi 400K 2019-12-13 14:31:23 +08:00
weiting2 ca70cba3bf DBS clk_src = 5M, spi 500K 2019-12-13 14:30:32 +08:00
weiting2 5ec4104255 DBS clk_src = 5M, spi 500K 2019-12-13 14:27:45 +08:00
weiting2 bb1ec23e02 DBS clk_src = 6M, spi 600K 2019-12-13 14:25:14 +08:00
weiting2 1615914ce4 DBS clk_src = 6M, spi 600K 2019-12-13 14:23:20 +08:00
weiting2 7b33bb5916 DBS clk_src = 4M, spi 4K 2019-12-13 14:20:56 +08:00
weiting2 0c22389b52 test pure SPI (receive DBS SPI only 2019-12-13 14:09:26 +08:00
weiting2 067281c449 test pure SPI (receive DBS SPI only 2019-12-13 11:57:49 +08:00
weiting2 74273f1469 test pure SPI (receive DBS SPI only 2019-12-13 11:21:53 +08:00
weiting2 07d606f5a9 test pure SPI (receive DBS SPI only 2019-12-13 11:17:18 +08:00
weiting2 aac9d26052 test pure SPI (receive DBS SPI only 2019-12-13 10:44:55 +08:00
weiting2 58c398e73f test pure SPI (receive DBS SPI only 2019-12-13 10:34:38 +08:00
weiting2 b81c5eb6ce test pure SPI (receive DBS SPI only 2019-12-13 09:49:18 +08:00
weiting2 e91089016e test pure SPI (receive DBS SPI only 2019-12-12 17:57:18 +08:00
weiting2 68f1cbf030 test pure SPI (receive DBS SPI only 2019-12-12 17:40:57 +08:00
weiting2 d73dccbefe test notify 2019-12-12 12:13:44 +08:00
weiting2 75f62f2a3e test notify 2019-12-12 12:04:00 +08:00
weiting2 a28b9ffd35 test notify 2019-12-12 10:38:49 +08:00
weiting2 bd6f745033 test notify 2019-12-12 09:55:27 +08:00
weiting2 54c6d2a217 test notify 2019-12-12 09:35:44 +08:00
weiting2 06bdc3aee4 test notify 2019-12-11 17:24:17 +08:00
weiting2 4c387980c8 test notify 2019-12-11 17:14:56 +08:00
YiChin 00ee10a94a Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-11 13:54:02 +08:00
weiting2 7a7aaf62a7 flush timestamp register before start PeriodicEvent 2019-12-11 13:53:05 +08:00
YiChin 62e24a2323 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-11 13:41:42 +08:00
weiting2 eb17de7490 test read data 2019-12-11 11:40:17 +08:00
YiChin aa336be8df Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-11 10:45:50 +08:00
weiting2 a06d1a1849 test read data 2019-12-11 10:45:18 +08:00
YiChin d153d91e71 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-11 10:38:15 +08:00
weiting2 8cb6594197 test read data 2019-12-11 10:37:46 +08:00
YiChin e44e6f511d Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-11 10:25:02 +08:00
weiting2 f440f56b3c test read data 2019-12-11 10:21:39 +08:00
weiting2 8968967ad1 test read data 2019-12-10 19:08:17 +08:00
YiChin 6abab9fe6b Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 17:45:00 +08:00
weiting2 cf481d482a test read data 2019-12-10 17:44:39 +08:00
YiChin 91b11fe3d9 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 17:29:24 +08:00
weiting2 96a44ad200 test read data 2019-12-10 17:29:00 +08:00
weiting2 b6fd48f9d9 test read data 2019-12-10 17:22:13 +08:00
weiting2 3d9c3f4e1e test read data 2019-12-10 11:48:54 +08:00
YiChin 05561a9959 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 11:43:24 +08:00
weiting2 fcd350c0d4 test read data 2019-12-10 11:42:02 +08:00
YiChin d07f8636dd Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 11:23:36 +08:00
weiting2 91315be16f test read data 2019-12-10 11:23:17 +08:00
weiting2 898bd81599 test read data 2019-12-10 11:06:16 +08:00
YiChin 8a92a1ba8b Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 10:47:59 +08:00
weiting2 7c83a01731 test read data 2019-12-10 10:47:37 +08:00
YiChin c05a76bd6d Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 10:36:49 +08:00
weiting2 425414dd2d test read data 2019-12-10 10:36:28 +08:00
YiChin 65c85aca40 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 10:27:25 +08:00
weiting2 1664a2cabd test read data 2019-12-10 10:27:03 +08:00
YiChin c207965207 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-10 10:02:50 +08:00
weiting2 7680879264 test read data 2019-12-10 10:00:38 +08:00
YiChin 031600d62a Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 18:32:47 +08:00
weiting2 0ce86bb4dd test read data 2019-12-09 18:32:26 +08:00
YiChin b848182595 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 18:05:35 +08:00
weiting2 54b48ef57d test read data 2019-12-09 18:04:37 +08:00
YiChin 03cbcdce49 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 16:35:44 +08:00
weiting2 52d51de3fd test read data 2019-12-09 16:35:19 +08:00
YiChin f65817e18c Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 16:27:22 +08:00
weiting2 6f6fffa84a test read data 2019-12-09 16:26:47 +08:00
YiChin fdb667ce8c Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 16:07:37 +08:00
weiting2 808c042c5a test read data 2019-12-09 16:07:06 +08:00
YiChin 09c1b3193d Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 15:52:50 +08:00
weiting2 c39b3d83f7 test read data 2019-12-09 15:52:27 +08:00
YiChin 1b72ead038 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h
2019-12-09 15:42:02 +08:00
weiting2 68645bab82 test read data 2019-12-09 15:41:26 +08:00
YiChin 21e366b601 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 15:13:22 +08:00
weiting2 e129608ad0 test read data 2019-12-09 15:13:00 +08:00
YiChin 4aadcbdefe Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-09 11:44:03 +08:00
weiting2 bcf3442aa5 test read data 2019-12-09 11:43:19 +08:00
YiChin 8b34a9b39f Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 16:29:51 +08:00
weiting2 ce70363247 test read data 2019-12-06 16:29:32 +08:00
YiChin 0143d16b48 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 16:25:48 +08:00
weiting2 b8c00d825e test read data 2019-12-06 16:25:27 +08:00
YiChin d0ecad7862 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 15:22:25 +08:00
weiting2 d16038974c test read data 2019-12-06 15:21:51 +08:00
YiChin dd9198c548 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 14:55:56 +08:00
weiting2 371c6b1f83 test read data 2019-12-06 14:55:34 +08:00
YiChin 877642fe15 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 14:27:41 +08:00
weiting2 c7d5dc7330 test read data 2019-12-06 14:27:10 +08:00
YiChin 40a0025ffc Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 14:07:52 +08:00
weiting2 528649f909 test read data 2019-12-06 14:07:28 +08:00
YiChin 83c19f1e93 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 13:54:15 +08:00
weiting2 57ec1ad0c6 test read data 2019-12-06 13:53:47 +08:00
YiChin 555bd907fb Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 13:33:46 +08:00
weiting2 695cac4cf0 test read data 2019-12-06 13:33:09 +08:00
YiChin cf4f4627c9 Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development 2019-12-06 12:25:50 +08:00
weiting2 b74451a18a test read data 2019-12-06 12:23:39 +08:00
YiChin 61be6c01fc test recording notify 2019-12-04 16:34:26 +08:00
weiting2 c1f8e263d4 test recording 2019-12-04 16:32:29 +08:00
weiting2 fe19490b23 test recording 2019-12-04 15:34:42 +08:00
YiChin e49efd8798 RIS has au unknown error 2019-12-04 15:34:08 +08:00
YiChin d1c70811b4 RIS has au unknown error 2019-12-04 14:25:06 +08:00
weiting2 03667cb36c test recording 2019-12-04 14:08:36 +08:00
weiting2 c1a2b184f6 add t1~t5 ins 2019-12-03 12:55:01 +08:00
weiting2 3f831ff84c check instruction 2019-11-29 18:31:00 +08:00
weiting2 d8c61db417 check instruction 2019-11-29 13:59:09 +08:00
weiting2 dacf0d1055 check INSTRUCTION and RIS 2019-11-28 18:30:36 +08:00
weiting2 cfc68885c8 check INSTRUCTION and RIS 2019-11-28 17:59:11 +08:00
weiting2 b841454957 [IV] default output Volt is Vin instead of Vout 2019-11-27 10:25:27 +08:00
weiting2 882b5efbd0 [Neu 2.0] give up read and send MOSI 2019-11-26 14:46:35 +08:00
weiting2 5c33c0130a [Neu 2.0] attempt to read and send MOSI 2019-11-26 14:33:56 +08:00
weiting2 46d0c4b09e [Neu 2.0] attempt to read and send MOSI 2019-11-26 14:32:08 +08:00
weiting2 48924b400b [Neu 2.0] attempt to read and send MOSI 2019-11-26 14:07:06 +08:00
weiting2 1b6aeb1f70 [Neu 2.0] attempt to read and send MOSI 2019-11-26 13:31:22 +08:00
weiting2 3fc364134a [Neu 2.0] attempt to read and send MOSI 2019-11-26 11:55:35 +08:00
weiting2 fa522254f3 [Neu 2.0] attempt to read and send MOSI 2019-11-26 11:47:52 +08:00
YiChin 8c41b0a976 read spi 2019-11-26 11:44:04 +08:00
weiting2 cf7d0616ad [Neu 2.0] attempt to read and send MOSI 2019-11-26 11:20:06 +08:00
weiting2 25d7722d93 [Neu 2.0] attempt to read and send MOSI 2019-11-26 11:16:55 +08:00
weiting2 336b325f03 [Neu 2.0] SPI callback flush SPI twice 2019-11-26 10:58:49 +08:00
weiting2 246f871ba7 [Neu 2.0] SPI callback flush SPI twice 2019-11-26 10:52:51 +08:00
weiting2 96b61d364e [Neu 2.0] SPI callback using a switch 2019-11-26 10:26:12 +08:00
weiting2 eba70d4af7 Neulive 2.0 test SPI conti trans speed 2019-11-25 18:44:04 +08:00
weiting2 b24a275019 Neulive 2.0 test SPI conti trans speed 2019-11-25 18:37:38 +08:00
weiting2 7621490d13 Neulive 2.0 fix instruction bug 2019-11-25 12:36:59 +08:00
weiting2 eb17cda0dc Neulive 2.0 comment UART 2019-11-25 11:59:42 +08:00
weiting2 cd1bc37e62 Neulive 2.0 add cb func 2019-11-25 11:43:05 +08:00
weiting2 c151eb1fab Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 18:12:45 +08:00
weiting2 4782c604c5 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 17:53:55 +08:00
weiting2 de908817c4 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 17:51:58 +08:00
YiChin e853241537 add pin define macro for 2.0 2019-11-22 17:33:00 +08:00
YiChin 097c475e5f comment R/G LED 2019-11-22 17:27:35 +08:00
YiChin 3e64d122de Merge remote-tracking branch 'origin/neulive2.0/development' into neulive2.0/development
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_neu.h
2019-11-22 17:26:18 +08:00
YiChin 466a6627ef comment R/G LED 2019-11-22 17:24:59 +08:00
weiting2 c08ea10397 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 16:52:32 +08:00
weiting2 500b9b00fd Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 16:45:30 +08:00
weiting2 b06bba4333 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 14:39:14 +08:00
weiting2 0eeb973e15 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 14:27:34 +08:00
weiting2 46f797f083 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 14:23:13 +08:00
weiting2 d24cde42b5 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 13:26:49 +08:00
weiting2 19bc7d23db Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 12:29:30 +08:00
weiting2 3849a25e7f Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 12:21:09 +08:00
weiting2 4c760ac644 Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 11:25:50 +08:00
weiting2 ba990ce65f Neulive 2.0 lauchpad SPI test add LED test 2019-11-22 10:16:53 +08:00
weiting2 0ef19c37dc Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 18:20:44 +08:00
weiting2 469c06390a Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 14:51:47 +08:00
weiting2 f09e440b45 Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 14:45:29 +08:00
weiting2 4e82451108 Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 14:39:10 +08:00
weiting2 d21613cee8 Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 13:32:47 +08:00
weiting2 b8308303fc Neulive 2.0 lauchpad SPI test add LED test 2019-11-21 13:32:26 +08:00
weiting2 80f9d63a09 Neulive 2.0 lauchpad SPI test 2019-11-20 13:09:56 +08:00
yichin 81945184d1 data rate test for memory board 2019-11-18 13:44:13 +08:00
yichin 955c3a2e7c json parameter table renew and modification 2019-09-23 20:12:21 +08:00
yichin 664b6e56b9 framework modified 2019-09-20 19:20:13 +08:00
yichin f94e4375f3 neulive 2.0 structure modify 2019-09-19 20:49:25 +08:00
yichin 1cf1c01163 for neulive 2.0 test 2019-09-18 21:03:52 +08:00
yichin 0cd2fe0528 neulive2.0 modified 2019-09-17 20:34:09 +08:00
yichin fb34754e1f debug neulive 2.0 2019-09-17 15:29:17 +08:00
yichin 20d5804a87 neulive2.0 debug 2019-09-17 11:22:50 +08:00
yichin 5851dc9707 some bugs with system clock 2019-09-10 20:38:55 +08:00
yichin 7cc337c0fd begin to debug 2019-09-10 10:05:30 +08:00
yichin 09685951c3 check sti firmware done 2019-09-09 20:52:20 +08:00
yichin 720f6d3548 add device information 2019-09-09 16:36:30 +08:00
yichin 1393d568a0 build pass 2019-09-09 15:54:37 +08:00
YiChin2018 92b6a3a4f2 add build instruction 2019-09-06 22:09:15 +08:00
YiChin2018 becdca9dc7 add build instruction 2019-09-06 18:26:05 +08:00
YiChin2018 dc3cce9990 add build instruction 2019-09-05 20:25:48 +08:00
YiChin2018 f8d7296f76 develop 2.0 firmware 2019-09-04 21:57:53 +08:00
YiChin2018 615eba69bd develop 2.0 firmware 2019-09-04 11:18:09 +08:00
YiChin2018 aab6d49812 develop 2.0 firmware 2019-09-01 10:57:36 +08:00
YiChin2018 9bfef795e7 develop 2.0 firmware 2019-08-30 18:32:08 +08:00
YiChin2018 428808715a develop 2.0 firmware 2019-08-30 17:51:10 +08:00
YiChin2018 7dfc856318 develop 2.0 firmware 2019-08-30 11:12:10 +08:00
YiChin2018 c87fb49656 temporary version of neulive 1.2 / 1.3
porting to neulive 2.0
2019-08-29 18:00:31 +08:00
YiChin2018 df21b2021a temporary version of neulive 1.2 / 1.3
porting to neulive 2.0
2019-08-29 17:53:06 +08:00
YiChin2018 6cb386e578 temporary version of neulive 1.2 / 1.3
porting to neulive 2.0
2019-08-29 17:02:33 +08:00
YiChin2018 bd7c73f2a5 add software interrupt and documentations 2019-08-29 09:27:13 +08:00
YiChin2018 ea21075a1d add software interrupt and documentations 2019-08-28 20:08:57 +08:00
YiChin2018 71a5d93a21 add software interrupt and documentations 2019-08-28 19:57:18 +08:00
YiChin2018 c461f71cf2 add software interrupt 2019-08-27 18:14:27 +08:00
YiChin2018 9ce8ea1400 prepare to add hwi to implement our system 2019-08-26 11:54:41 +08:00
YiChin2018 b181d9273b configure file modify and add hareware interrupt 2019-08-23 19:02:27 +08:00
YiChin2018 069881f5c4 interrupt do the same thing 2019-08-23 13:43:46 +08:00
YiChin2018 ce61501d43 interrupt with bugs 2019-08-22 19:11:34 +08:00
YiChin2018 386f2940ad interrupt with bugs 2019-08-21 19:24:27 +08:00
YiChin2018 1965f6e182 there are some bugs need to be fixed 2019-08-21 10:56:20 +08:00
YiChin2018 f699ecdae9 format 2019-08-20 13:27:47 +08:00
YiChin2018 6655e7dd20 format 2019-08-15 13:04:40 +08:00
YiChin2018 1101798a28 with clang-format
system with scheduling problem
2019-08-15 11:04:31 +08:00
YiChin2018 e7836141d1 still with some problems on scheduling 2019-08-14 23:57:04 +08:00
YiChin2018 b824867264 py modified and data lost 2019-08-13 17:48:22 +08:00
YiChin2018 a115b00822 plantuml complete 2019-08-13 09:34:30 +08:00
YiChin2018 e34a0e9d5b plantuml complete 2019-08-12 21:13:55 +08:00
YiChin2018 2dee13b495 indicate function add 2019-08-12 19:56:55 +08:00
YiChin2018 cdd208fc7b indicate complete 2019-08-12 18:15:42 +08:00
YiChin2018 86df7e4735 still data lost 2019-08-11 19:44:29 +08:00
YiChin2018 0cb04a5fdb indicate need modified 2019-08-10 18:48:43 +08:00
Ta-Shun Su b05a3db6f0 save 2019-08-10 16:47:15 +08:00
Ta-Shun Su c0f9a6216c save 2019-08-10 16:43:45 +08:00
Ta-Shun Su 5f21e2bae6 fix fft x-axis 2019-08-10 16:19:49 +08:00
Ta-Shun Su 69e2327b41 overflow handle 2019-08-10 13:52:16 +08:00
Ta-Shun Su 80d23a4dad fix value delta 2019-08-10 13:45:45 +08:00
Ta-Shun Su 6dc12400c5 graph output to file 2019-08-10 13:21:46 +08:00
Ta-Shun Su 68fcbd56f6 add graph 2019-08-10 13:20:39 +08:00
Ta-Shun Su 2ff06e2142 update and save 2019-08-10 12:52:46 +08:00
YiChin2018 4ed89630f7 modify char4 property to be indication 2019-08-08 18:34:06 +08:00
YiChin2018 cb512647b3 python code for debug data lost
add indication method
2019-08-08 15:13:53 +08:00
YiChin2018 284725f420 python code for debug data lost
add indication method
2019-08-08 15:11:21 +08:00
YiChin2018 d9e2aad988 Merge remote-tracking branch 'remotes/gitlab_origin/release/neulive' into neulive/development
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_uni.h
2019-08-08 13:26:00 +08:00
YiChin2018 3f0aeb68ea Merge branch 'release/neulive' of https://gitlab.com/s880782002/bioprocc2650 into release/neulive
# Conflicts:
#	python_test_code/uni/briefly_data_analysis.py
2019-08-08 13:11:17 +08:00
YiChin2018 285500cd86 python code for debug data lost 2019-08-08 13:09:39 +08:00
alan c7dfaff662 modify data lost analyze doc 2019-08-08 12:46:03 +08:00
YiChin2018 be85ccb830 python code for debug data lost 2019-08-08 10:31:39 +08:00
YiChin2018 f1f7b519e5 python code for debug data lost 2019-08-07 23:44:21 +08:00
YiChin2018 694395f997 python code for debug data lost 2019-08-07 19:45:09 +08:00
YiChin2018 e88fb5c895 Merge remote-tracking branch 'remotes/origin/release/neulive' into neulive/development
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_uni.h
2019-08-07 17:36:11 +08:00
YiChin2018 bbdc1cb56f python code for debug data lost 2019-08-07 17:25:53 +08:00
YiChin2018 9d94be8dd6 python code for debug data lost 2019-08-07 17:17:37 +08:00
YiChin2018 2b70c8b1d1 python code for debug data lost 2019-08-06 19:26:30 +08:00
YiChin2018 56dafa2198 with data length extension but
a lot of data loss
2019-08-05 17:52:48 +08:00
YiChin2018 47a9e50a2e Merge branch 'neulive/development' into release/neulive
# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_uni.h
2019-08-02 17:08:37 +08:00
YiChin2018 bffc1e89c4 issue number#3 modify 2019-08-02 17:01:34 +08:00
YiChin2018 2ad8bf988a release temporary
do not support new json
2019-08-02 13:14:20 +08:00
YiChin2018 ef4eb1f30b debug wrong data probleme 2019-08-02 12:25:32 +08:00
YiChin2018 f2d1faeec4 compile done 2019-08-01 19:55:09 +08:00
YiChin2018 bbb0481774 compile done 2019-08-01 19:42:26 +08:00
YiChin2018 67fa04b8ed choose neulive 1.3 parameter library 2019-08-01 19:35:24 +08:00
YiChin2018 aac42015f8 version modify 2019-08-01 19:29:12 +08:00
YiChin2018 debc9b061f version modify 2019-08-01 17:31:46 +08:00
YiChin2018 43da6cc840 release version: Neulive board 1.3 2019-08-01 11:12:18 +08:00
YiChin2018 170eb132a4 version information modify 2019-08-01 10:43:23 +08:00
YiChin2018 875f5c2d9d temporary test timestamp 2019-08-01 10:41:52 +08:00
YiChin2018 fba9d4cf67 temporary test timestamp 2019-08-01 10:28:08 +08:00
YiChin2018 72ecd7e39f temporary test timestamp 2019-07-31 18:39:42 +08:00
YiChin2018 00e35e4042 temporary test timestamp 2019-07-31 14:04:27 +08:00
72 changed files with 7064 additions and 1189 deletions
+1
View File
@@ -3,6 +3,7 @@
# CSS package
xdctools_*/
ccsv8/
simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/
# CSS build files
FlashROM/
Binary file not shown.
+6 -6
View File
@@ -25,16 +25,16 @@ NEULIVE_PARAMETER = {
'LB': 0, # LOW BAND FREQEUNCY
'CH': 0, # CHOPPER
'FS': 0, # FAST SETTLE
'WF': 3, # WAVEFORM : POS, NEG, P2N...etc.
'TV': 10, # STIMULATION VOLTAGE
'WF': 1, # WAVEFORM : POS, NEG, P2N...etc.
'TV': 0, # STIMULATION VOLTAGE
'PM': 0, # P CHANNEL SELECT
'NM': 1, # N CHANNEL SELECT
'NM': 0, # N CHANNEL SELECT
'SR': 0, # ADC SAMPLING RATE
'AG': 5, # AMP GAIN
'PW': 9, # PULSE WIDTH
'PW': 0, # PULSE WIDTH
'TT': 9, # STIMULATION TIMES
'SB': 1, # STIMULATION BEHAVIOR
'TF': 0, # STIMULATION FREQUENCY
'SB': 2, # STIMULATION BEHAVIOR
'TF': 1, # STIMULATION FREQUENCY
'CA': 1, # AMP CHANNEL A ENABLE
'CB': 0, # AMP CHANNEL B ENABLE
'CC': 0, # AMP CHANNEL C ENABLE
+1
View File
@@ -0,0 +1 @@
*.txt
+526 -5
View File
@@ -1,7 +1,528 @@
def main():
file = open('C:/ti/python_test_code/uni/att_notify.psd', 'r')
print(file.read())
file.close()
"""
purpose:
in order to analyze the data loss of bluetooth, a small code is needed.
Guess that there are three type of data loss. In order to prove this idea,
several tests are needed
types of data loss:
1. packet loss:
bluetooth notification does not need any negotiation.
if there is any packet loss during the connection,
it will not be lost forever
2. program delay causes loss in client(headstage):
too many effort on data packaging, it would cause
data delay
3. program delay causes loss in host(controller):
...todo and need to define
Assume that we have lost several bytes data. We want to analyze the type of data lost.
method:
compare ramp data with time stamp, there are several conditions
if data_delta * 1 / sampling_rate == time_delta:
this should be packet loss
else
this should be program delay
method to coped with the corresponding problem:
1. try 'Indication' to check data loss is reduced or not.
2. modified the procedure of data packaging
3. after the upper two problems are excluded, this problem should be left over
"""
import os.path
import sys
from collections import Counter
from typing import List, Optional, Dict, Set, Any
class Options:
def __init__(self):
self.skip = False
self.round = 2
self.overflow_pow: Optional[int] = None
# print options
self.quiet = False
# graph options
self.graph: Optional[str] = None
self.graph_log_scale = False
self.graph_save_path: Optional[str] = None
# fft graph options
self.fft_x_log = False
self.fft_y_norm = False
self.fft_channel = 0
@staticmethod
def print_help():
prg = sys.argv[0]
print(prg, '[OPTIONS]', 'FILE', '...')
print()
print('OPTIONS:')
print(' -h, --help : print help')
print(' --skip : skip if FILE not found')
print(' --round VALUE : floating number round')
print(' --overflow VALUE : overflow number. 2^VALUE')
print()
print('OPTIONS (print):')
print(' -q : do not print table')
print()
print('OPTIONS (graph):')
print(' --graph TYPE : use matplotlib to generate graph. could be:')
print(' ramp : ramp data, calculate value miss')
print(' fft : sin wave data, calculate fft')
print(' --graph-log-scale :')
print(' --graph-save PATH : save graph file path')
print()
print('OPTIONS (graph=fft):')
print(' --fft-channel CH : filter channel')
print(' --fft-log : log x-axis')
print(' --fft-norm : log x-axis normalize')
print(' --fft [opt,...] : above')
print()
print('ARGUMENTS:')
print(' FILE : txt data file')
print()
class Result:
def __init__(self, data_file: str, options: Options):
# data file information
self.data_file = data_file
self.date_time: Optional[str] = None
self.device_name: Optional[str] = None
self.device_address: Optional[str] = None
self.parameter: Dict[str, str] = {}
self.channel: Set[int] = set()
self.total_duration: float = 0.0
# analysis data
self.data_count = 0
self.time_delta_counter = Counter()
self.value_delta_counter = Counter()
# analysis options
self.round = options.round
self.overflow: Optional[int] = None
if options.overflow_pow is not None:
self.overflow = 2 ** options.overflow_pow
# temp data
self._prev_time: Optional[float] = None
self._prev_value: Optional[int] = None
self._close = False
@property
def sample_rate(self) -> int:
try:
sample_rate = self.parameter['SAMPLE_RATE']
except KeyError as e:
raise RuntimeError('data file do not contain SAMPLE_RATE') from e
try:
return int(sample_rate)
except ValueError as e:
raise RuntimeError('data file SAMPLE_RATE value not a value : ' + str(sample_rate)) from e
def update(self, time: float, channel: int, value: int):
if self._close:
raise RuntimeError('closed')
self.data_count += 1
if self._prev_time is not None:
delta = round(time - self._prev_time, self.round)
self.time_delta_counter[delta] += 1
if self._prev_value is not None:
delta = value - self._prev_value
self.value_delta_counter[delta] += 1
self._prev_time = time
self.channel.add(channel)
self._prev_value = value
self.total_duration = time
def close(self):
self._close = True
if self.overflow is not None:
self.value_delta_counter[1] += self.value_delta_counter[1 - self.overflow]
del self.value_delta_counter[1 - self.overflow]
i = 2
while i - self.overflow in self.value_delta_counter:
self.value_delta_counter[i] += self.value_delta_counter[i - self.overflow]
del self.value_delta_counter[i - self.overflow]
i += 1
def calculate(txt_file: str, options: Options) -> Result:
if not os.path.exists(txt_file):
raise FileNotFoundError(txt_file)
result = Result(txt_file, options)
parsing_state = 0
with open(txt_file) as _file:
for line, content in enumerate(_file): # type: int, str
content = content.strip()
if len(content) == 0:
continue
if parsing_state == 0:
if content.startswith('#'):
if result.date_time is None:
result.date_time = content[1:].strip()
elif content.startswith('# device_name'):
result.device_name = content[len('# device_name'):].strip()
elif content.startswith('# mac_address'):
result.device_address = content[len('# mac_address'):].strip()
elif content.startswith('# parameter'):
parsing_state = 1
elif parsing_state == 1:
if content.startswith('#'):
if content.startswith('# time_stamp'):
parsing_state = 2
else:
part = content[2:].split(' ', maxsplit=2)
result.parameter[part[0]] = part[1]
elif parsing_state == 2:
if content.startswith('#'):
continue
part = content.split(' ', maxsplit=3)
try:
time = part[0]
channel = part[1]
value = part[2]
except IndexError:
print('@%d' % (line + 1), 'incomplete data', ':', content)
continue
check_pass = True
try:
time = float(time)
except ValueError:
print('@%d' % (line + 1), 'incomplete time', ':', time)
check_pass = False
try:
channel = int(channel)
except ValueError:
print('@%d' % (line + 1), 'incomplete channel', ':', channel)
check_pass = False
try:
value = int(value)
except ValueError:
print('@%d' % (line + 1), 'incomplete value', ':', value)
check_pass = False
if check_pass:
result.update(time, channel, value)
result.close()
return result
def print_result(result: Result, options: Options):
def print_table(counter: Dict[Any, Any], key_format='%10d', value_format='%d'):
f = ' %s : %s' % (key_format, value_format)
for k in sorted(counter.keys()):
print(f % (k, counter[k]))
if not options.quiet:
print(result.data_file)
print('data_count', result.data_count)
print('channel', ' '.join(list(map(str, sorted(result.channel)))))
try:
sample_rate = result.sample_rate
print('sample_rate [1/s]', sample_rate)
print('1/sample_rate [ms]', 1000 / sample_rate)
except RuntimeError:
print('sample_rate', '(E)')
print('time_delta')
print_table(result.time_delta_counter, '%10.2f')
print()
print('value_delta')
print_table(result.value_delta_counter)
print()
# packet miss rate
#
if options.graph == 'ramp':
delta_value = list(filter(lambda it: it > 0, result.value_delta_counter))
total = sum(map(lambda it: it * result.value_delta_counter[it], delta_value))
miss = sum(map(lambda it: (it - 1) * result.value_delta_counter[it], delta_value))
print('value_miss (ramp)', '%d/%d' % (miss, total), '%.2f%%' % (100 * miss / total))
valid_time = list(filter(lambda it: it < 50, result.time_delta_counter))
total_valid_t = sum(map(lambda it: it * result.time_delta_counter[it], valid_time))
print('time_waste (ramp)', '%d/%d' % (total_valid_t, result.total_duration), '%.2f%%' % ( 100 * total_valid_t / result.total_duration))
timesofwaste = list(filter(lambda it: it > 50, result.time_delta_counter))
timesintotal = sum(map(lambda it: result.time_delta_counter[it], timesofwaste))
print('waste time occur times (ramp)', '%d' % timesintotal)
print()
paint_ramp_result(result, options)
elif options.graph == 'fft':
paint_fft_result(result, options)
def paint_fft_result(result: Result, options: Options):
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal
from scipy.interpolate import interp1d
from scipy.fftpack import fft
time_seq = []
value_seq = []
time_offset = None
total_duration = 0.0
with open(result.data_file) as _file:
for line in _file:
line = line.strip()
if len(line) == 0 or line.startswith('#'):
continue
else:
part = line.split(' ', maxsplit=3)
channel = int(part[1])
if channel == options.fft_channel:
time = float(part[0])
if time_offset is None:
time_seq.append(0.0)
time_offset = time
else:
total_duration = time - time_offset
time_seq.append(time - time_offset)
value_seq.append(int(part[2]))
if len(time_seq) == 0:
raise RuntimeError('empty channel data : ' + str(options.fft_channel))
plt.figure(1)
f1, pxx_den = signal.periodogram(value_seq, 1e3)
plt.semilogy(f1, pxx_den)
plt.ylim([1e-7, 1e7])
plt.xlabel('frequency [hz]')
plt.ylabel('PSD[v**2/Hz')
plt.figure(2)
sample_rate = result.sample_rate
time_delta = 1 / sample_rate
total_time_step = int(total_duration / (time_delta * 1000))
f = interp1d(time_seq, value_seq, copy=False)
t = np.linspace(0, total_duration, total_time_step)
fft_result = fft(f(t))
fft_result = fft_result[:len(fft_result) // 2]
fft_x = np.linspace(0, 1.0/(2.0*time_delta), len(fft_result)//2)
if options.fft_x_log:
fft_x = np.log10(fft_x)
if options.fft_y_norm:
fft_result /= sum(fft_result)
plt.plot(fft_x, 2.0 / len(fft_result) * np.abs(fft_result[0:len(fft_result)//2]))
if options.graph_save_path is not None:
plt.savefig(options.graph_save_path, dpi=600)
else:
plt.show()
def paint_ramp_result(result: Result, options: Options):
import matplotlib.pyplot as plt
fig, (at, av) = plt.subplots(2, 1)
time_delta_data = list(result.time_delta_counter)
expect_time_delta = 1000 / result.sample_rate
time_delta_bins = int((max(time_delta_data) - min(time_delta_data)) / expect_time_delta)
time_delta_weight = [result.time_delta_counter[k] for k in time_delta_data]
at.hist(time_delta_data,
bins=time_delta_bins,
weights=time_delta_weight,
log=options.graph_log_scale,
align='left')
value_delta_data = list(result.value_delta_counter)
value_delta_bins = max(value_delta_data) - min(value_delta_data)
value_delta_weight = [result.value_delta_counter[k] for k in value_delta_data]
av.hist(value_delta_data,
bins=value_delta_bins,
weights=value_delta_weight,
log=options.graph_log_scale,
align='left')
fig.tight_layout()
if options.graph_save_path is not None:
plt.savefig(options.graph_save_path, dpi=600)
else:
plt.show()
def main(argv: List[str]):
"""
:param argv:
:return:
"""
# df = pd.read_csv("C:/Users/yichin/Downloads/last-2019-07-18-16-30-15-7.csv", sep=",", skiprows=12, header=None)
# sel_df = pd.DataFrame(df)
# column, row = sel_df.shape
# sel_df = sel_df.fillna(value=0)
# delta_df = sel_df.diff(periods=1)
# delta_df = delta_df.fillna(value=0)
# delta_df = delta_df.drop(column - 1)
# delta_df.set_axis(['time_delta', 'data_delta'], axis='columns', inplace=True)
o = Options()
i = 0
while i < len(argv):
arg = argv[i]
if arg in ('-h', '--help'):
o.print_help()
return
elif arg == '--skip':
o.skip = True
i += 1
elif arg == '--round':
o.round = int(argv[i + 1])
i += 2
elif arg.startswith('--round='):
o.round = int(arg[len('--round='):])
i += 1
elif arg == '--overflow':
o.overflow_pow = int(argv[i + 1])
i += 2
elif arg.startswith('--overflow='):
o.overflow_pow = int(arg[len('--overflow='):])
i += 1
elif arg == '-q':
o.quiet = True
i += 1
elif arg == '--graph':
o.graph = argv[i + 1]
i += 2
elif arg.startswith('--graph='):
o.graph = arg[len('--graph='):]
i += 1
elif arg == '--graph-log-scale':
o.graph_log_scale = True
i += 1
elif arg == '--graph-save':
o.graph_save_path = argv[i + 1]
i += 2
elif arg.startswith('--graph-save='):
o.graph = arg[len('--graph-save='):]
i += 1
elif arg == '--fft-channel':
o.fft_channel = int(argv[i + 1])
i += 2
elif arg.startswith('--fft-channel='):
o.fft_channel = int(arg[len('--fft-channel='):])
i += 1
elif arg == '--fft-log':
o.fft_x_log = True
i += 1
elif arg == '--fft-norm':
o.fft_y_norm = True
i += 1
elif arg.startswith('--fft'):
if arg == '--fft':
c = argv[i + 1]
i += 2
elif arg.startswith('--fft='):
c = arg[len('--fft='):]
i += 1
else:
raise ValueError('unknown options : ' + arg)
for a in c.split(','):
if a == 'log':
o.fft_x_log = True
elif a == 'norm':
o.fft_y_norm = True
elif a.startswith('channel='):
o.fft_channel = int(a[len('channel='):])
else:
raise ValueError('unknown options : --fft-' + a)
elif arg.startswith('-'):
raise ValueError('unknown options : ' + arg)
else:
i += 1
try:
result = calculate(arg, o)
except FileNotFoundError:
if o.skip:
continue
else:
raise
else:
print_result(result, o)
if __name__ == '__main__':
main()
main(sys.argv[1:])
@@ -1,5 +1,4 @@
import unittest
import random
from random import randint
from typing import List, Optional
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
inEditor=false
onBuild=false
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="configuration_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe">
<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"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="CC2640F128" href="devices/cc2640f128.xml" id="CC2640F128" xml="cc2640f128.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>
@@ -0,0 +1,9 @@
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
on the device and connection settings specified in your project on the Properties > General page.
Please note that in automatic target-configuration management, changes to the project's device and/or
connection settings will either modify an existing or generate a new target-configuration file. Thus,
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
you may create your own target-configuration file for this project and manage it manually. You can
always switch back to automatic target-configuration management by checking the "Manage the project's
target-configuration automatically" checkbox on the project's Properties > General page.
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
inEditor=false
onBuild=false
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="configuration_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe">
<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"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="CC2640F128" href="devices/cc2640f128.xml" id="CC2640F128" xml="cc2640f128.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>
@@ -0,0 +1,9 @@
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
on the device and connection settings specified in your project on the Properties > General page.
Please note that in automatic target-configuration management, changes to the project's device and/or
connection settings will either modify an existing or generate a new target-configuration file. Thus,
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
you may create your own target-configuration file for this project and manage it manually. You can
always switch back to automatic target-configuration management by checking the "Manage the project's
target-configuration automatically" checkbox on the project's Properties > General page.
@@ -9,6 +9,6 @@
<linkerCommandFile value="cc26x0f128.cmd"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
<isTargetManual value="false"/>
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
<isTargetManual value="true"/>
</projectOptions>
@@ -9,6 +9,6 @@
<linkerCommandFile value="cc26x0f128.cmd"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
<isTargetManual value="false"/>
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
<isTargetManual value="true"/>
</projectOptions>
@@ -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,140 +18,279 @@
<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.630386091" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.79296890">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.548534114" 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.47584557" 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.1062983983" 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.1700118337" 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.2136445879" 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.1442029135" 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.1227543067" 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.983343098" 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.915765448" 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.2028717074" 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.1765791493" 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.355253920" 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="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"/>
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.960161747"
name="TI Build Tools"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.795316214">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.773509801"
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.1355878258"
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.115857743"
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.777666998"
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.548851344"
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.2079251582"
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.1296542541"
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.830681449"
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.4295324"
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.966262121"
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.595578058"
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.1931842022"
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="${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.45713043" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
<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.188887433" name="Debugging model" 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.709859007" 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.GCC.1303283836" name="Enable support for GCC extensions (DEPRECATED) (--gcc)" 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.880614544" 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"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.787930495" 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.2110497797" 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.1508735855" 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.GEN_FUNC_SUBSECTIONS.1406670754" name="Place each function in a separate subsection (--gen_func_subsections, -ms)" 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.1230809079" 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"/>
<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.497243650" 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.1364217553" 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.39449259" 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.1178170160" 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.79296890" 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.891763345" 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.314304138" 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.338495855" 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.1060277100" 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.875035059" 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="${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.1276978340" 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.336823753" 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="10247-D"/>
<listOptionValue builtIn="false" value="16002-D"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1219370365" 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.703721803" 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.1258348097" 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.COMPRESS_DWARF.1063255995" 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.1912195294" 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.464172264" 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.1422737841" 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.194007756" 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.148133664" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1747210980" 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.2120609162" 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.147492991" 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>
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.2115491595" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1165924088" name="Package repositories (--xdcpath)" 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.231881756" name="Target (-t)" 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.819491801" name="Platform (-p)" 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.2074274477" name="Platform (-p)" 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.235985274" name="Build-profile (-r)" 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.173132565" name="Compiler tools directory (-c)" 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.582390411" name="Additional compiler options (--compileOptions)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value="&quot;${COMPILER_FLAGS}&quot;" valueType="string"/>
</tool>
<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.919051850"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE"
valueType="definedSymbols">
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
<listOptionValue builtIn="false" value="HEADSTAGE_UNI_2_0"/>
<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.435242422"
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.1041287954"
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.762496694"
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.150403703"
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.94153709"
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.1489730615"
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.1620048666"
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.1485773521"
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.1081719363"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE"
valueType="stringList">
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
<listOptionValue builtIn="false"
value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
</option>
<inputType
id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.520101889"
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.1070105812"
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.738826337"
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.1232640856"
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.795316214"
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.761443666"
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.1912770343"
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.1725177715"
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.390113473"
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.1148769301"
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.120359588"
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.945233756"
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.910404897"
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.513420139"
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.741712094"
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.891380419"
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.613666775"
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.277965674"
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.1067547555"
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.599189161"
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.1127603084"
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.222076978"
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.1912546049"
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.1935998185"
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.1402268573" name="XDCtools"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1506218018"
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.1860209354"
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.617935002"
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.298557207"
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.1856522446"
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.1053483030"
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.1740094026"
superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS"
value="&quot;${COMPILER_FLAGS}&quot;" valueType="string"/>
</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,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v3 USB Debug Probe_0" href="connections/TIXDS100v3_Dot7_Connection.xml" id="Texas Instruments XDS100v3 USB Debug Probe_0" xml="TIXDS100v3_Dot7_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v3 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="2" id="The Converter Usage">
<choice Name="Generate 1149.7 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="The Converter 1149.7 Frequency">
<choice Name="Overclock with user specified value" value="unused">
<property Type="choicelist" Value="5" id="-- Choose a value from 1.0MHz to 50.0MHz"/>
</choice>
</property>
<property Type="choicelist" Value="5" id="The Target Scan Format"/>
<configuration XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe_0" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe_0" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="1" id="Power Selection">
<choice Name="Probe supplied power" value="1">
<property Type="stringfield" Value="3.3" id="Voltage Level"/>
</choice>
</property>
<property Type="choicelist" Value="0" id="JTAG Signal Isolation"/>
<property Type="choicelist" Value="4" id="SWD Mode Settings">
<choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable">
<property Type="choicelist" Value="1" id="XDS110 Aux Port"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
@@ -16,11 +16,11 @@ BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/pa
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armar rq
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armar rq
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
@@ -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.202004189"
name="TI Build Tools"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain"
targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.1000474609">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.384721047"
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.1036745756"
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.236081606"
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.1371891035"
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.1719137531"
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.677403831"
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.1103252039"
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.1530385187"
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.986411830"
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.1600021398"
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.610602206"
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.2056105474"
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="GATT_NO_CLIENT"/>
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<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.697027420"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE"
valueType="definedSymbols">
<listOptionValue builtIn="false" value="CC26XX"/>
<listOptionValue builtIn="false" value="GATT_NO_CLIENT"/>
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
<listOptionValue builtIn="false" value="POWER_SAVING"/>
<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.2049018539"
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.133900437"
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.181358488"
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.718298036"
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.973122860"
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.1320388168"
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.1951926405"
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.375018960"
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.1850764340"
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.1730763582"
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.1000474609"
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.788149472"
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.1048132209"
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.807659049"
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.925427965"
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.1310161066"
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.1308202839"
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.166746284"
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.567907781"
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.1017913720"
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.792466464"
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.685791588"
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.471478777"
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.340204852"
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.601587839"
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.2113293581"
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.1732089675"
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.1445067749"
name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1310825565"
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.1858409467"
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.1953800232"
superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT"
value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL"
valueType="enumerated"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="cc26x0f128.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
@@ -12,6 +12,7 @@
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:simple_peripheral_cc2650em_stack}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\stack\FlashROM\simple_peripheral_cc2650em_stack.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/simple_peripheral_cc2650em_stack"/>
</listAttribute>
@@ -1,19 +1,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">
@@ -116,46 +116,46 @@ const PowerCC26XX_Config PowerCC26XX_config = {
* ============================= UART begin ===================================
*/
/* Place into subsections to allow the TI linker to remove items properly */
#if defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(UART_config, ".const:UART_config")
#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
#endif
/* Include drivers */
#include <ti/drivers/UART.h>
#include <ti/drivers/uart/UARTCC26XX.h>
/* UART objects */
UARTCC26XX_Object uartCC26XXObjects[BOOSTXL_CC2650MA_UARTCOUNT];
/* UART hardware parameter structure, also used to assign UART pins */
const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[BOOSTXL_CC2650MA_UARTCOUNT] = {
//
{
.baseAddr = UART0_BASE,
.powerMngrId = PowerCC26XX_PERIPH_UART0,
.intNum = INT_UART0_COMB,
.intPriority = ~0,
.swiPriority = 0,
.txPin = Board_UART_TX,
.rxPin = Board_UART_RX,
.ctsPin = PIN_UNASSIGNED,
.rtsPin = PIN_UNASSIGNED
//
}
//
};
/* UART configuration structure */
const UART_Config UART_config[] = { //
{
//
.fxnTablePtr = &UARTCC26XX_fxnTable,
.object = &uartCC26XXObjects[0],
.hwAttrs = &uartCC26XXHWAttrs[0]
//
},
{NULL, NULL, NULL}};
//#if defined(__TI_COMPILER_VERSION__)
//#pragma DATA_SECTION(UART_config, ".const:UART_config")
//#pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
//#endif
//
///* Include drivers */
//#include <ti/drivers/UART.h>
//#include <ti/drivers/uart/UARTCC26XX.h>
//
///* UART objects */
//UARTCC26XX_Object uartCC26XXObjects[BOOSTXL_CC2650MA_UARTCOUNT];
//
///* UART hardware parameter structure, also used to assign UART pins */
//const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[BOOSTXL_CC2650MA_UARTCOUNT] = {
// //
// {
// .baseAddr = UART0_BASE,
// .powerMngrId = PowerCC26XX_PERIPH_UART0,
// .intNum = INT_UART0_COMB,
// .intPriority = ~0,
// .swiPriority = 0,
// .txPin = Board_UART_TX,
// .rxPin = Board_UART_RX,
// .ctsPin = PIN_UNASSIGNED,
// .rtsPin = PIN_UNASSIGNED
// //
// }
// //
//};
//
///* UART configuration structure */
//const UART_Config UART_config[] = { //
// {
// //
// .fxnTablePtr = &UARTCC26XX_fxnTable,
// .object = &uartCC26XXObjects[0],
// .hwAttrs = &uartCC26XXHWAttrs[0]
// //
// },
// {NULL, NULL, NULL}};
/*
* ============================= UART end =====================================
*/
@@ -233,7 +233,7 @@ const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_SPICOUNT] = {
.mosiPin = Board_SPI0_MOSI,
.misoPin = Board_SPI0_MISO,
.clkPin = Board_SPI0_CLK,
.csnPin = Board_SPI0_CS
.csnPin = Board_SPI0_CSN
//
},
#ifdef HEADSTAGE_MA_USE_SPI2
@@ -250,7 +250,7 @@ const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_SPICOUNT] = {
.mosiPin = Board_SPI1_MOSI,
.misoPin = Board_SPI1_MISO,
.clkPin = Board_SPI1_CLK,
.csnPin = Board_SPI1_CS //
.csnPin = Board_SPI1_CSN //
},
#endif
};
@@ -51,6 +51,12 @@ 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
#include "uni/headstage_pin.h"
#endif
/** ============================================================================
* Externs
* ==========================================================================*/
@@ -144,36 +150,36 @@ extern const PIN_Config BoardGpioInitTable[];
#define Board_UART_TX Board_BP_UART_Rx /* RXD */
#define Board_UART_RX Board_BP_UART_Tx /* TXD */
/*
* SPI0 is LSK interface
*/
#define Board_SPI0_MISO PIN_UNASSIGNED
#define Board_SPI0_MOSI IOID_0
#define Board_SPI0_CLK IOID_1
#define Board_SPI0_CS IOID_3
/*
* SPI1 is ASK interface
*/
#define Board_SPI1_MISO PIN_UNASSIGNED
#define Board_SPI1_MOSI IOID_13
#define Board_SPI1_CLK PIN_UNASSIGNED
#define Board_SPI1_CS IOID_4
/* Power Management Board */
#define Board_SRDY Board_BP_Pin_J2_19
#define Board_MRDY Board_BP_Pin_J1_2
/* PWM outputs */
#define Board_PWMPIN0 IOID_6
#define Board_PWMPIN1 PIN_UNASSIGNED
#define Board_PWMPIN2 IOID_8
#define Board_PWMPIN3 PIN_UNASSIGNED
#define Board_PWMPIN4 PIN_UNASSIGNED
#define Board_PWMPIN5 PIN_UNASSIGNED
#define Board_PWMPIN6 PIN_UNASSIGNED
#define Board_PWMPIN7 PIN_UNASSIGNED
///*
// * SPI0 interface with DBS chip 2.0
// */
//#define Board_SPI0_MISO PIN_UNASSIGNED
//#define Board_SPI0_MOSI PIN_UNASSIGNED
//#define Board_SPI0_CLK PIN_UNASSIGNED
//#define Board_SPI0_CS PIN_UNASSIGNED
//
///*
// * SPI1 interface work with LED
// */
//
//#define Board_SPI1_MISO PIN_UNASSIGNED
//#define Board_SPI1_MOSI PIN_UNASSIGNED
//#define Board_SPI1_CLK PIN_UNASSIGNED
//#define Board_SPI1_CS PIN_UNASSIGNED
//
///* Power Management Board */
//#define Board_SRDY Board_BP_Pin_J2_19
//#define Board_MRDY Board_BP_Pin_J1_2
//
///* PWM outputs */
//#define Board_PWMPIN0 PIN_UNASSIGNED
//#define Board_PWMPIN1 PIN_UNASSIGNED
//#define Board_PWMPIN2 PIN_UNASSIGNED
//#define Board_PWMPIN3 PIN_UNASSIGNED
//#define Board_PWMPIN4 PIN_UNASSIGNED
//#define Board_PWMPIN5 PIN_UNASSIGNED
//#define Board_PWMPIN6 PIN_UNASSIGNED
//#define Board_PWMPIN7 PIN_UNASSIGNED
/** ============================================================================
@@ -51,6 +51,8 @@ extern "C" {
#include <ti/drivers/PIN.h>
#include <driverlib/ioc.h>
#include "neu/headstage_pin.h"
/** ============================================================================
* Externs
* ==========================================================================*/
@@ -68,34 +70,34 @@ extern const PIN_Config BoardGpioInitTable[];
*/
/* Discrete outputs */
#define Board_RLED IOID_6
#define Board_GLED IOID_7
#define Board_RLED PIN_UNASSIGNED
#define Board_GLED PIN_UNASSIGNED
#define Board_LED_ON 1
#define Board_LED_OFF 0
/* Discrete inputs */
#define Board_BTN1 IOID_13
#define Board_BTN2 IOID_14
#define Board_BTN1 PIN_UNASSIGNED
#define Board_BTN2 PIN_UNASSIGNED
/* UART Board */
#define Board_UART_RX IOID_1 /* RXD */
#define Board_UART_TX IOID_2 /* TXD */
#define Board_UART_RX PIN_UNASSIGNED /* RXD */
#define Board_UART_TX PIN_UNASSIGNED /* TXD */
#define Board_UART_CTS PIN_UNASSIGNED /* CTS */
#define Board_UART_RTS PIN_UNASSIGNED /* RTS */
/* SPI Board */
#define Board_SPI0_MISO PIN_UNASSIGNED /* RF1.20 */
#define Board_SPI0_MOSI IOID_12 /* RF1.18 */
#define Board_SPI0_CLK PIN_UNASSIGNED /* RF1.16 */
#define Board_SPI0_CSN IOID_4
#define Board_SPI1_MISO PIN_UNASSIGNED
#define Board_SPI1_MOSI IOID_10
#define Board_SPI1_CLK IOID_9
#define Board_SPI1_CSN IOID_3
//#define Board_SPI0_MISO PIN_UNASSIGNED /* RF1.20 */
//#define Board_SPI0_MOSI PIN_UNASSIGNED /* RF1.18 */
//#define Board_SPI0_CLK PIN_UNASSIGNED /* RF1.16 */
//#define Board_SPI0_CSN PIN_UNASSIGNED
//#define Board_SPI1_MISO PIN_UNASSIGNED
//#define Board_SPI1_MOSI PIN_UNASSIGNED
//#define Board_SPI1_CLK PIN_UNASSIGNED
//#define Board_SPI1_CSN PIN_UNASSIGNED
/* I2C */
#define Board_I2C0_SCL0 IOID_4
#define Board_I2C0_SDA0 IOID_5
#define Board_I2C0_SCL0 PIN_UNASSIGNED
#define Board_I2C0_SDA0 PIN_UNASSIGNED
/* SPI */
#define Board_SPI_FLASH_CS IOID_20
@@ -123,21 +125,21 @@ extern const PIN_Config BoardGpioInitTable[];
/* Booster pack LCD (430BOOST - Sharp96 Rev 1.1) */
#define Board_LCD_CS IOID_24 // SPI chip select
#define Board_LCD_EXTCOMIN IOID_12 // External COM inversion
#define Board_LCD_EXTCOMIN PIN_UNASSIGNED // External COM inversion
#define Board_LCD_ENABLE IOID_22 // LCD enable
#define Board_LCD_POWER IOID_23 // LCD power control
#define Board_LCD_CS_ON 1
#define Board_LCD_CS_OFF 0
/* PWM outputs */
#define Board_PWMPIN0 Board_RLED
#define Board_PWMPIN1 Board_GLED
#define Board_PWMPIN2 IOID_5
#define Board_PWMPIN3 IOID_11
#define Board_PWMPIN4 PIN_UNASSIGNED
#define Board_PWMPIN5 PIN_UNASSIGNED
#define Board_PWMPIN6 PIN_UNASSIGNED
#define Board_PWMPIN7 PIN_UNASSIGNED
//#define Board_PWMPIN0 PIN_UNASSIGNED
//#define Board_PWMPIN1 PIN_UNASSIGNED
//#define Board_PWMPIN2 PIN_UNASSIGNED
//#define Board_PWMPIN3 PIN_UNASSIGNED
//#define Board_PWMPIN4 PIN_UNASSIGNED
//#define Board_PWMPIN5 PIN_UNASSIGNED
//#define Board_PWMPIN6 PIN_UNASSIGNED
//#define Board_PWMPIN7 PIN_UNASSIGNED
/** ============================================================================
* Instance identifiers
@@ -205,6 +205,7 @@ Error.maxDepth = 2;
/* ================ Hwi configuration ================ */
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
/*
* Checks for Hwi (system) stack overruns while in the Idle loop.
*
@@ -218,6 +219,7 @@ var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
*/
//halHwi.checkStackFlag = true;
halHwi.checkStackFlag = false;
//C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\.config\xconfig_app_ble
/*
* The following options alter the system's behavior when a hardware exception
@@ -368,6 +368,9 @@ static void HostTestApp_processAttEvent(gattMsgEvent_t *message) {
} else if (method == ATT_HANDLE_VALUE_NOTI) {
attHandleValueNoti_t *att_notify = (attHandleValueNoti_t *)(&message->msg);
master_handle_notify(att_notify->len, att_notify->pValue);
} else if (method == ATT_HANDLE_VALUE_IND) {
attHandleValueInd_t *att_indicate = (attHandleValueInd_t *)(&message->msg);
master_handle_notify(att_indicate->len, att_indicate->pValue);
}
// Free message. Needed only for ATT Protocol messages
@@ -0,0 +1,28 @@
@startuml
start
while (negedge chip select)
if (rxbuf is wrong) then (yes)
:modify data until it is correct;
else
:pass;
endif
partition headstage_notify_append_data {
if (buf offset == INIT) then (yes)
:reset timestamp;
endif
if (buf offset == BUFF_SIZE)
:set time delta;
endif
:append data & return index;
}
if (buf offset == BUFF_SIZE)
:headstage_notify_send(0.676ms);
endif
:headstage_spi_lsk_transaction (0.528ms);
endwhile
stop
@enduml
@@ -287,6 +287,11 @@ static uint8_t CHIP_ID = 0;
*/
static uint16_t CONNECT_HANDLE = 0;
/**
* command instruction buffer
*/
static uint8_t cdr_buf[BLE_CDR_BUFF_SIZE] = {0};
/*====================
==== event table ====
====================*/
@@ -311,7 +316,7 @@ typedef struct {
==== device implement implement header ====
=========================================*/
#include "headstage_uni.h"
#include "headstage_neu.h"
/*======================
==== main function ====
@@ -329,6 +334,9 @@ static EventTableEntry EVENT_TABLE[] = { //
#endif
#ifdef HEADSTAGE_STI_H
{EVT_ALL, &headstage_sti_event},
#endif
#ifdef HEADSTAGE_NEU_H
{EVT_ALL, &headstage_neu_event},
#endif
// terminated
{0, NULL}};
@@ -352,8 +360,6 @@ static void headstage_event_handle() {
* system handle for instruction input.
*/
static void headstage_update_instruction(uint8_t *instruction) {
static uint8_t cdr_buf[BLE_CDR_BUFF_SIZE] = {0};
uint8_t ins_type = instruction[0] & 0xF0;
CHIP_ID = instruction[0] & 0x0F;
uint8_t ins_oper = instruction[1] & 0xF0;
@@ -369,45 +375,8 @@ static void headstage_update_instruction(uint8_t *instruction) {
break;
}
case INS_TYPE_CIS: {
switch (ins_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
default: {
cdr_buf[0] = _B_4b4b(ins_oper, CHIP_ID);
cdr_buf[1] = _B_4b4b(CDR_FAILURE, 0);
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
break;
}
}
headstage_update_cis_instruction(ins_oper);
break;
}
}
}
@@ -3,9 +3,9 @@
#ifndef HEADSTAGE_ARM_H
#define HEADSTAGE_ARM_H
static uint16_t headstage_ramp_data_counter = 0;
static void headstage_arm_append_ramp_data(uint8_t *buff) {
static uint16_t headstage_ramp_data_counter = 0;
uint16_t v = headstage_ramp_data_counter++;
@@ -25,8 +25,8 @@ static void headstage_cis_led_enable(uint8_t enable);
static uint8_t headstage_cis_led_set_pattern(uint8_t pattern);
/**
* @para pattern: pattern number
* @para parameter: led parameter, NULL to unset
* @param pattern: pattern number
* @param parameter: led parameter, NULL to unset
* @return: CDR_SUCCESS
*/
static uint8_t headstage_cis_led_set_value(uint8_t pattern, //
@@ -0,0 +1,84 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
/*
Headstage indicate utility
==========================
reference code :
root:
glucose.c
glucserive.c
code need modifying:
headstage_indicate.h
simple_gatt_profile.c : WriteAtterCB -> add case "indication" to support indicate
sipmle_peripheral.c : find another service callback
use this website to construct software structure : http://plantuml.com/zh/
reference document:
bluetooth Core5.1 Vol 3, Part F, Section 3.4.6
The Prepare Write Request is used to request the server to prepare to write the
value of an attribute. The server will respond to this request with a Prepare Write
Response, so that the client can verify that the value was received correctly.
host-test can ask simple-peripheral to prepare the queue to write attribute
5.3.4.3 Queued Writes
Prepare Write commands allows a GATT server to send more payload data by queuing up multiple write
requests. The default queue size is 5. With a default MTU of 23 and payload of 18 bytes, up to 90 bytes of
payload can be sent. Refer to Core_v4.2 specification (Vol 3, Part F, Section 3.4.6) for more information
on queued writes.
Adjust the Prepare Write queue with GATTServApp_SetParameter with parameter
GATT_PARAM_NUM_PREPARE_WRITES. There is no specified limit, but it is bounded by the available
HEAPMGR space. Refer to the API definition in gattservapp.h.
GATT_PARAM_NUM_PREPARE_WRITES
*/
#ifndef HEADSTAGE_INDICATE_H
#define HEADSTAGE_INDICATE_H
#include <xdc/runtime/Timestamp.h>
#define headstage_time_stamp() Timestamp_get32()
/*==========================
==== indicate function ====
=========================*/
/*
* send indicate
* connHandle -> where to assign this parameter
*/
static bStatus_t headstage_indicate() {
uint16_t buffer_size = BLE_NOT_BUFF_SIZE;
uint8_t *value = (uint8_t *)GATT_bm_alloc(CONNECT_HANDLE, ATT_HANDLE_VALUE_IND, GATT_MAX_MTU,&buffer_size);
if (value != NULL) {
memcpy(value, headstage_notify_buffer, buffer_size);
}
attHandleValueInd_t indicate = {
// clang-format off
.handle = 0x1E,
.len = buffer_size,
.pValue = value
// clang-format on
};
if (GATT_Indication(CONNECT_HANDLE, &indicate, 0, ICall_getEntityId()) != SUCCESS) {
GATT_bm_free((gattMsg_t *)&indicate, ATT_HANDLE_VALUE_IND);
}
return TRUE;
}
#endif
@@ -0,0 +1,85 @@
#ifndef NEU_INSTRUCTION
#define NEU_INSTRUCTION
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. */
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};
#endif
@@ -192,38 +192,36 @@ static void headstage_led_color(uint8_t color) {
==== LED implement (GPIO) ====
============================*/
#ifdef BOOSTXL_CC2650MA
#ifdef HEADSTAGE_UNI_H
#define HEADSTAGE_LED_USE_GPIO
#endif
#ifdef HEADSTAGE_LED_USE_GPIO
#include "headstage_pin.h"
#include "headstage_pin.h"
/*
every 400us to transmit spi data
*/
static void headstage_led_spi_transmit (){
for(int8_t i = 0; i < 8; i++) {
static void headstage_led_spi_transmit() {
for (int8_t i = 0; i < 8; i++) {
uint16_t d = headstage_spi_led_txbuf[i];
for(int8_t j = 15; j >= 0; j--){
int16_t v = (d & (1 << j)); // why check > 0 or not
bool SET_LED = (v > 0) ? 1 : 0;
headstage_pin_output(PIN_LED_CLK,1);
CPUdelay( 16*400 );// 2500hz
headstage_pin_output(PIN_LED_OUT, SET_LED);
for (int8_t j = 15; j >= 0; j--) {
int16_t v = (d & (1 << j)); // why check > 0 or not
bool SET_LED = (v > 0) ? 1 : 0;
headstage_pin_output(PIN_LED_CLK, 0);
CPUdelay( 16*400 );// 2500hz
CPUdelay(16 * 400); // 2500hz
headstage_pin_output(PIN_LED_OUT, SET_LED);
headstage_pin_output(PIN_LED_CLK, 1);
CPUdelay(16 * 400); // 2500hz
}
}
}
static void headstage_led_spi_color (uint8_t color){
static void headstage_led_spi_color(uint8_t color) {
headstage_led_set_color(headstage_spi_led_txbuf, SPI_LED_REPEAT, color);
headstage_led_spi_transmit();
}
#endif // HEADSTAGE_LED_USE_GPIO
#endif // HEADSTAGE_LED_H
@@ -31,7 +31,7 @@ optional implement
#include <xdc/runtime/Timestamp.h>
#define headstage_time_stamp_us() Timestamp_get32()
#define headstage_time_stamp_us() (Timestamp_get32() / 2)
/*========================
==== notify function ====
@@ -66,7 +66,6 @@ static void headstage_notify_send() {
}
#else
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
#endif
@@ -14,6 +14,8 @@
#include "zm/headstage_pin.h"
#elif defined(HEADSTAGE_STI_H)
#include "sti/headstage_pin.h"
#elif defined(HEADSTAGE_NEU_H)
#include "neu/headstage_pin.h"
#else
#error "headstage_pin headstage_pin_configuration not defined"
@@ -28,7 +28,7 @@ static SPI_Transaction spi_transaction;
spi_parameter.bitRate = 12000000; \
spi_parameter.transferTimeout = 1000; \
spi_parameter.dataSize = 8; \
spi_parameter.frameFormat = SPI_POL0_PHA0; \
spi_parameter.frameFormat = SPI_POL0_PHA1; \
spi_handle = SPI_open(Board_SPI0, &spi_parameter); \
} while (0)
@@ -0,0 +1,30 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
/**
\file headstage_swi.h
In order to enable interrupt, hookset function need declaring.
reference:ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/docs/Bios_User_Guide.pdf
*/
#ifndef HEADSTAGE_SWI_H
#define HEADSTAGE_SWI_H
#include <ti/sysbios/knl/Swi.h>
#include <xdc/runtime/Error.h>
/*
software interrupt
*/
Swi_Handle headstage_swi;
typedef void (*headstage_swiFxn)(UArg arg0, UArg arg1);
void headstage_swi_init(headstage_swiFxn callback) {
Error_Block eb;
Error_init(&eb);
headstage_swiFxn my_swi = callback;
headstage_swi = Swi_create(my_swi, NULL, &eb);
}
#endif
@@ -1,5 +1,5 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_H
#error "headstage.h not include"
#endif
@@ -7,15 +7,71 @@
#ifndef HEADSTAGE_UNI_H
#define HEADSTAGE_UNI_H
/*============================
==== product information ====
===========================*/
/**
* @file headstage_uni.h
*
* Copyright (c) 2019. BioPro. Scientific.
*
* NEULIVE firmware structure:
*
* headstage_init()
* headstage_uni_event()
* headstage_umc_state_transfer_lsk()
* headstage_umc_state_transfer_ask()
*
* description:
*
* Construct corresponding headstage_uni_event to implement the communication between
* DBS and CC2650. Because finite state machine is used to build the digital core,
* a similar structure to monitor its state is needed.
*
* headstage_uni_event:
*
* 1. LSK transmit event :
* receive LSK and process raw data
*
* 2. ASK transmit event :
* transmit ASK to DBS chip
*
* 3. trigger stimulation event:
* transmit trigger flag to DBS chip
*
* 4. Disconnect :
* stop system working
*
* ...reserved
*
* protocol between DBS chip and cc2650:
*
* DBS (LSK) -> CC2650 (SPI):
* format: 9'b PREAMBLE + 4'b HEADER + 10'bit DATA
* PREAMBLE: imply the channel order, refer to rearrange channel for more detail.
*
* cc2650 (SPI) -> DBS (ASK):
* format: 4'bHEADER + ( 10'b INSTRUCTION + 4'b ID ) * 2
* INSTRUCTION: construct the instruction corresponding to DBS chip
*
* state machine:
*
* In order to control the digital core inside DBS chip, this application needs to simulate a similar structure.
* (interrupt)
* IDLE -> HANDSHAKE -> HANDSHAKE_RECEIVE -> INITIAL -> CONFIGURE -> WAIT_START --> TRIGGER -> WAIT_TRIGGER ----------------> CONFIGURE
* | |
* --> LIMITED --|
* | |
* --> CONTINUOUS --
*
* State Description:
#define DEVICE_NAME "Neulive-v0.3"
#define MAJOR_PRODUCT_NUMBER 1
#define MINOR_PRODUCT_NUMBER 1
#define MAJOR_VERSION_NUMBER 0
#define MINOR_VERSION_NUMBER 2
* There are two state machines implemented in this structure.
* Different state acts differently,
* e.g., CONFIGURE and WAIT_START would transmit the same code to DBS with different meaning
* state transfer in LSK:
* After receiving LSK data, acts corresponding to current state and decide to change state or not
* state transfer in ASK:
* After receiving ASK data, acts corresponding to current state
*
*/
// TODO low frequency mode
// TODO battery record
@@ -26,47 +82,76 @@
==== constant ====
=================*/
// data rate
// clang-format off
#define UMC_LSK_FREQ 50000 // 500 khz
#define UMC_ASK_FREQ 10000 // 100 khz
#define UMC_SYS_CLK 1000000 // target is 8Mhz
#define UMC_POLY_R_CLK 1000 // poly-R switching clock
// clang-format on
// data transmit format 9'b PREAMBLE + 4'b HEADER + 10'bit DATA
// clang-format off
/**
specific data from DBS
In order to set recording channel, arrange a set of selected channel.
The first select channel data will come with preamble.
*/
#define UMC_PREAMBLE 0b011000001
/**
header used in LSK and ASK transmission
*/
#define UMC_HEADER 0b0101
// clang-format on
/**
The data format between NEULIVE and CONTROLL BOX
Use notification to transmit data to control box through BLE.
Definition of the protocol:
4'B timestamp + 2'B time delta + (4'b channel + 10'b voltage + 2'b flag) * (N)
N: numbers of data transmitted in a transaction
*/
#define HEADSTAGE_NOTIFY_USE_TDC4VAF2
/*================
==== include ====
================*/
#include "time.h"
#include "population.h"
#include "headstage_arm.h"
#include "headstage_notify.h"
#include "headstage_debug.h"
#include "headstage_pin.h"
#include "headstage_led.h"
#include "headstage_arm.h"
#include "headstage_watchdog.h"
#include "headstage_notify.h"
#include "headstage_indicate.h"
#include "headstage_swi.h"
#include "tni/headstage_notify.h"
#include "uni/headstage_spi.h"
#include "uni/headstage_pwm.h"
#include "uni/headstage_adc.h"
#include "uni/uni1.3_parameter.h"
/*===================================
==== instruction building macro ====
==================================*/
/**
construct final instruction
Construct the final instruction transmitted to DBS chip
final instruction = Header + instruction + instruction
@param code: prebuilt instruction
@return final instruction
*/
#define build_instruction(code) \
({ \
uint32_t __x = (code)&0x3FFF; \
(UMC_HEADER << 28) | (__x << 14) | (__x); \
})
/**
construct instruction
Construct the instruction and pass it to build_instruction.
Instruction = 4'b type(opcode) + 6'b value + 4'b chip_id
@param type: the opcode is going to be transmitted
@param value: the operating value
@return final instruction
*/
#define build_configure_instruction(type, value) \
({ \
@@ -76,14 +161,11 @@
build_instruction((__t << 10) | (__v << 4) | __c); \
})
#define build_conservative_instruction(type, value) \
({ \
uint32_t __t = (type)&0xF; \
uint32_t __v = (value)&0x3F; \
uint32_t __c = (CHIP_ID)&0xFF; \
uint32_t __x = ((__t << 6) | (__v)) & 0x3FF; \
(UMC_HEADER << 28) | (__x << 18) | (__c << 10) | (__x); \
})
/**
get data from spi_rxbuf and convert it to uint16_t
@param index: getting value from the index
@return receive data casting in uint16_t
*/
#define rx_get_u16(index) \
({ \
@@ -93,6 +175,12 @@
(__a << 8) | __b; \
})
/**
get data from spi_rxbuf and convert it to uint32_t
@param index: the index of spi_rxbuf
@return receive data casting in uint32_t
*/
#define rx_get_u32(index) \
({ \
uint32_t __i = (uint32_t)(index); \
@@ -103,6 +191,12 @@
(__a << 24) | (__b << 16) | (__c << 8) | __d; \
})
/**
put uint16_t into spi_txbuf
@param index: the index of spi_txbuf
@param value: the data is going to be set
*/
#define tx_put_u16(index, value) \
do { \
uint32_t __i = (uint32_t)(index); \
@@ -111,6 +205,12 @@
spi_txbuf[__i++] = (__v)&0xFF; \
} while (0)
/**
put uint32_t into spi_txbuf
@param index: the index of spi_txbuf
@param value: the data is going to be set
*/
#define tx_put_u32(index, value) \
do { \
uint32_t __i = (uint32_t)(index); \
@@ -125,31 +225,72 @@
==== constant ====
=================*/
/**
this part frequency is controlling the operating
*/
// clang-format off
/** target LSK data rate is 50 khz */
#define UMC_LSK_FREQ 50000
/** target ASK data rate is 10 khz */
#define UMC_ASK_FREQ 10000
/** target SYSTEM clock frequency is 1Mhz */
#define UMC_SYS_CLK 1000000
/** poly-R switching clock frequency */
#define UMC_POLY_R_CLK 1000
// UNI 1.2 instruction macro
/// Neulive instruction macro
/** handshake information receive from DBS */
#define UMC_HAND_SHAKE_SEND 0b0011000011
/** handshake information send to DBS */
#define UMC_HAND_SHAKE_RECV 0b01010011000110000000110001100000
/** set the interface with DBS */
#define UMC_MODE_LSK_OUT 0b101001
#define UMC_CALIB_DONE 0b1010 // UMC_CALIB_DONE + UMC_MODE_LSK_OUT -> leave initial state and set "CHIP ID"
#define UMC_CONFIG_DONE 0b0100 // UMC_CONFIG_DONE + 6'bxxxxxx -> EXIT config state
/** UMC_CALIB_DONE + UMC_MODE_LSK_OUT : leave initial state and set "CHIP ID" */
#define UMC_CALIB_DONE 0b1010
/** UMC_CONFIG_DONE + 6 bits don't care : EXIT config state */
#define UMC_CONFIG_DONE 0b0100
/**
UMC_IRQ + UMC_IRQ_CODE + CHIP ID : go back to configure data from continuous, trigger, limited
UMC_IRQ type of interrupt
*/
#define UMC_IRQ 0b1110
#define UMC_IRQ_CODE 0b001001 // UMC_IRQ + UMC_IRQ_CODE + CHIP ID -> when we want to go back to configure data.
/** UMC_IRQ_CODE value of interrupt */
#define UMC_IRQ_CODE 0b001001
/** leave wait trigger state by this instruction */
#define UMC_GOLDEN_KEY 0b01011010010110000010100101100000 //this is important to leave wait trigger state.
// we need to check transfer data meets or not
#define UMC_TRANSMIT_S 0b101 // transmit success
/** we need to check transfer data meets or not */
#define UMC_TRANSMIT_S 0b101
// trigger stimulation by ask
/**
trigger a stimulation by ASK
UMC_TRIG + UMC_STIMULUS + CHIP ID
UMC_TRIG type of trigger a stimulus
*/
#define UMC_TRIG 0b1100
/**
UMC_STIMULUS value of trigger a stimulus
*/
#define UMC_STIMULUS 0b000011
/**
type of opcode, control box to cc2650.
*/
/** control box to cc2650:default type instruction */
#define RIS_DEFAULT 0x00
/** control box to cc2650 instruction opcode, parameter set 1 */
#define RIS_SET_PARA 0x20
/** control box to cc2650 instruction opcode, remove amplifier offset */
#define RIS_RESET_AMP 0x60
/** control box to cc2650 instruction opcode, parameter set 2 */
#define RIS_DIR 0xA0
/** control box to cc2650 instruction opcode, trigger stimulation */
#define RIS_UMC_TRIG 0xC0
/**
stimulation waveform
*/
#define STI_MODE_DISABLE 0
#define STI_MODE_POS 1
#define STI_MODE_NEG 2
@@ -158,11 +299,18 @@
#define STI_MODE_AWF 5
#define ARM_MODE_RAMP 8
/**
reserved virtual instruction
*/
#define VIS_BLE_T 0b10100000
#define VIS_SHIFT_T 0b01010000
// all the categories of instruction we can change .
/**
configuration set for DBS instruction
*/
#define CONFIG_AMP_CH 0x10 // this state is for transmit amp channel one more time
#define CONFIG_AMP_MUX 0x01
#define CONFIG_AMP_GAIN 0x02
@@ -222,103 +370,6 @@ static uint16_t fast_settle_table[2] = { //
{0b000000},
{0b000001}};
// XXX not used
static uint16_t sti_channel_table[4] = {
{0b000010}, // 3
{0b000011}, // 4
{0b000100}, // 5
{0b000101} // 6
};
/*
* we need to use this parameter
*/
#ifdef UNI_1P2
static uint16_t reverse_channel[16] = {
{0x0A}, // 1
{0x0B},
{0x00},
{0x01},
{0x02},
{0x07},
{0x06},
{0x03},
{0x05},
{0x04},
{0x08},
{0xff},
{0x0c},
{0x09},
{0xff},
{0xff}
};
#else
static uint16_t reverse_channel[16] = {
{0x0A}, // 1
{0x00},
{0x01},
{0x02},
{0x03},
{0x08},
{0x07},
{0x06},
{0x05},
{0x04},
{0x09},
{0x0B},
{0xFF},
{0xFF},
{0xff},
{0xff}
};
#endif
/* we can change amp channel from one to eight
* the user will choose these channel from this table
*/
#ifdef UNI_1p2
static uint16_t amp_channel_table[13] = { //
{0x03},
{0x04},
{0x05},
{0x08},
{0x0A},
{0x09},
{0x07},
{0x06},
{0x0B},
{0x0E},
{0x01},
{0x02},
{0x0D}
};
#else
static uint16_t amp_channel_table[12] = { //
{0x02},
{0x03},
{0x04},
{0x05},
{0x0A},
{0x09},
{0x08},
{0x07},
{0x06},
{0x0b},
{0x01},
{0x0C}
};
#endif
static uint16_t amp_gain_table[] = {
0b100011, // 3
0b101100, // 14
0b101001, // 27
0b000011, // 60
0b001100, // 280
0b001001, // 540
};
/**
* pulse width, with unit us
*/
@@ -441,12 +492,21 @@ struct HEADSTAGE_PARAMETER_TABLE {
*/
bool adc_clock_signal;
/*
/**
* amplifier reset
*/
bool amp_rst;
} INSTRUCTION = {0};
/**
@fn static void headstage_uni_delay()
@brief make some delay
*/
static void headstage_uni_delay() {
for (uint16_t i = 0; i < 1023; i++)
;
}
static void rearrange_channel_mux_table() {
uint8_t enable_channel_number = 0;
uint8_t last_enable_channel = 0;
@@ -496,13 +556,12 @@ static void rearrange_channel_mux_table() {
}
}
int8_t offset = last_enable_channel - channel_mux_index ;
int8_t offset = last_enable_channel - channel_mux_index;
while (channel_mux_index >= 0) {
INSTRUCTION.channel_mux[channel_mux_index] = INSTRUCTION.channel_mux[channel_mux_index + offset];
channel_mux_index--;
}
}
/*======================
@@ -525,6 +584,10 @@ static void rearrange_channel_mux_table() {
#define UPDATE_DONE 0xFF
// clang-format on
/**
@struct UMC_STATE
*/
struct {
uint8_t state;
@@ -591,13 +654,12 @@ static void headstage_uni_event() {
}
static void headstage_spi_ask_callback(SPI_Handle handle, SPI_Transaction* transaction) {
if ( UMC_STATE.reset_flag == 0)
flag_notify(EVT_UMC_ASK);
if (UMC_STATE.reset_flag == 0) flag_notify(EVT_UMC_ASK);
}
static void headstage_spi_lsk_callback(SPI_Handle handle, SPI_Transaction* transaction) {
if ( UMC_STATE.reset_flag == 0)
flag_notify(EVT_UMC_LSK);
if (not_buf_offset >= BLE_NOT_BUFF_SIZE) Swi_post(headstage_swi);
if (UMC_STATE.reset_flag == 0) flag_notify(EVT_UMC_LSK);
}
static void headstage_reset() {
@@ -619,6 +681,8 @@ static void headstage_reset() {
==== function implement ====
==========================*/
static void headstage_swi_func(UArg a0, UArg a1) {}
/**
* initialize parameter and device.
*/
@@ -626,17 +690,18 @@ static void headstage_init() {
headstage_pin_open();
headstage_spi_open();
headstage_pwm_open();
headstage_swi_init(headstage_swi_func);
headstage_led_spi_color(COLOR_GREEN);
// headstage_watchdog_open();
// if(headstage_watchdog_handle == NULL)
// {
// headstage_led_spi_color(COLOR_RED);
// }
// headstage_watchdog_open();
// if(headstage_watchdog_handle == NULL)
// {
// headstage_led_spi_color(COLOR_RED);
// }
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); //
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) {
@@ -645,7 +710,7 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
uint8_t amp_lbf = (instruction[0] & 0b00000111);
uint8_t chopper = (instruction[1] & 0b00100000) >> 5;
uint8_t fast_settle = (instruction[1] & 0b00010000) >> 4;
uint8_t sti_waveform = (instruction[1] & 0b00001110) >> 1; // define pos to neg or neg to pos
uint8_t sti_waveform = (instruction[1] & 0b00001110) >> 1; // define pos to neg or neg to pos
uint8_t sti_volt_h = (instruction[1] & 0b00000001);
uint8_t sti_volt_l = (instruction[2] & 0b11110000) >> 4;
uint8_t sti_volt = (sti_volt_h << 4) | sti_volt_l;
@@ -653,75 +718,71 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
uint8_t sti_chn = (instruction[3] & 0b11110000) >> 4;
uint8_t frequency = (instruction[3] & 0b00001111);
INSTRUCTION.sti_waveform = sti_waveform;
INSTRUCTION.frequency = frequency;
INSTRUCTION.amp_low_band_freq = amp_lbf;
INSTRUCTION.chopper = chopper;
INSTRUCTION.fast_settle = fast_settle;
INSTRUCTION.sti_volt = sti_volt;
INSTRUCTION.sti_channel_pmos = sti_channel_table[sti_chp];
INSTRUCTION.sti_channel_nmos = sti_channel_table[sti_chn];
INSTRUCTION.sti_waveform = sti_waveform;
INSTRUCTION.frequency = frequency;
INSTRUCTION.amp_low_band_freq = amp_lbf;
INSTRUCTION.chopper = chopper;
INSTRUCTION.fast_settle = fast_settle;
INSTRUCTION.sti_volt = sti_volt;
INSTRUCTION.sti_channel_pmos = sti_channel_table[sti_chp];
INSTRUCTION.sti_channel_nmos = sti_channel_table[sti_chn];
break;
}
case RIS_SET_PARA: {
uint8_t amp_gain = (instruction[0] & 0x1C) >> 2;
uint8_t pulse_width = ((instruction[0] & 0x03) << 2) | ((instruction[1] & 0xC0)>> 6);
uint8_t sti_times = (instruction[1] & 0x3F);
uint8_t sti_freq = (instruction[2] & 0x3F);
uint8_t mode = (instruction[2] & 0xC0) >> 6;
uint8_t cha = (instruction[3] & 0x0F);
uint8_t chb = (instruction[4] & 0xF0) >> 4;
uint8_t chc = (instruction[4] & 0x0F);
uint8_t chd = (instruction[5] & 0xF0) >> 4;
uint8_t amp_gain = (instruction[0] & 0x1C) >> 2;
uint8_t pulse_width = ((instruction[0] & 0x03) << 2) | ((instruction[1] & 0xC0) >> 6);
uint8_t sti_times = (instruction[1] & 0x3F);
uint8_t sti_freq = (instruction[2] & 0x3F);
uint8_t mode = (instruction[2] & 0xC0) >> 6;
uint8_t cha = (instruction[3] & 0x0F);
uint8_t chb = (instruction[4] & 0xF0) >> 4;
uint8_t chc = (instruction[4] & 0x0F);
uint8_t chd = (instruction[5] & 0xF0) >> 4;
INSTRUCTION.amp_gain = amp_gain;
INSTRUCTION.pulse_width = pulse_width;
INSTRUCTION.sti_times = sti_times;
INSTRUCTION.mode = mode;
INSTRUCTION.sti_freq = sti_freq;
if (instruction[3] & 0b10000000) INSTRUCTION.channel_table[amp_channel_table[cha]-1] = TRUE;
if (instruction[3] & 0b01000000) INSTRUCTION.channel_table[amp_channel_table[chb]-1] = TRUE;
if (instruction[3] & 0b00100000) INSTRUCTION.channel_table[amp_channel_table[chc]-1] = TRUE;
if (instruction[3] & 0b00010000) INSTRUCTION.channel_table[amp_channel_table[chd]-1] = TRUE;
INSTRUCTION.mode = mode;
if (instruction[3] & 0b10000000) INSTRUCTION.channel_table[amp_channel_table[cha] - 1] = TRUE;
if (instruction[3] & 0b01000000) INSTRUCTION.channel_table[amp_channel_table[chb] - 1] = TRUE;
if (instruction[3] & 0b00100000) INSTRUCTION.channel_table[amp_channel_table[chc] - 1] = TRUE;
if (instruction[3] & 0b00010000) INSTRUCTION.channel_table[amp_channel_table[chd] - 1] = TRUE;
break;
}
// todo: check multichannel selection is correct or not
case RIS_DEFAULT: {
INSTRUCTION.channel_table[amp_channel_table[0]-1] = TRUE;
INSTRUCTION.amp_gain = 5; // x1000
INSTRUCTION.pulse_width = 0; // 40us
INSTRUCTION.sti_times = 0; // repeat stimulation x1
INSTRUCTION.mode = 1; // trigger mode
INSTRUCTION.sti_freq = 3; // 30hz
INSTRUCTION.sti_waveform = 1; // positive
INSTRUCTION.chopper = 0; // turn off chopper
INSTRUCTION.fast_settle = 0; // turn on fast settling
INSTRUCTION.sti_volt = 0; // 2Volt
INSTRUCTION.sti_channel_nmos = 15; // sti nch = ch2 means sti turn off
INSTRUCTION.sti_channel_pmos = 0; // sti pch = ch1 means sti turn off
INSTRUCTION.amp_low_band_freq = 0; // the maximum
INSTRUCTION.channel_table[amp_channel_table[0] - 1] = TRUE;
INSTRUCTION.amp_gain = 5; // x1000
INSTRUCTION.pulse_width = 0; // 40us
INSTRUCTION.sti_times = 0; // repeat stimulation x1
INSTRUCTION.mode = 3; // trigger mode
INSTRUCTION.sti_freq = 3; // 30hz
INSTRUCTION.sti_waveform = 1; // positive
INSTRUCTION.chopper = 0; // turn off chopper
INSTRUCTION.fast_settle = 0; // turn on fast settling
INSTRUCTION.sti_volt = 0; // 2Volt
INSTRUCTION.sti_channel_nmos = 0; // sti nch = ch2 means sti turn off
INSTRUCTION.sti_channel_pmos = 1; // sti pch = ch1 means sti turn off
INSTRUCTION.amp_low_band_freq = 0; // the maximum
// this for-loop is used for setting the amplifier channel
// for (unsigned int i = 0; i < REC_CHANNEL_COUNT; i++) {
// INSTRUCTION.channel_table[i] = (4 <= i && i <= 8);
// }
// this for-loop is used for setting the amplifier channel
// for (unsigned int i = 0; i < REC_CHANNEL_COUNT; i++) {
// INSTRUCTION.channel_table[i] = (4 <= i && i <= 8);
// }
break;
}
case RIS_UMC_TRIG:
case RIS_UMC_TRIG: {
tx_put_u32(0, build_configure_instruction(UMC_TRIG, UMC_STIMULUS));
flag_notify(EVT_UMC_STI);
/*
load
*/
break;
case RIS_RESET_AMP:
}
case RIS_RESET_AMP:{
tx_put_u32(0, build_configure_instruction(UMC_TRIG, UMC_STIMULUS));
headstage_spi_ask_transaction(4);
break;
}
default:
break;
}
@@ -737,9 +798,10 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
break;
case VIS_STI:
if (headstage_state == UMC_STATE_INTERRUPT) {
headstage_state = UMC_STATE_CONFIGURE;
headstage_state = UMC_STATE_INITIAL;
rearrange_channel_mux_table();
UMC_STATE.config_type = CONFIG_AMP_MUX;
headstage_led_spi_color(COLOR_BLACK);
tx_put_u32(0, build_configure_instruction(UMC_IRQ, UMC_IRQ_CODE));
headstage_spi_ask_transaction(4);
} else {
@@ -748,7 +810,7 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
headstage_pwm_start(headstage_system_pwm_handle);
headstage_pwm_start(headstage_poly_r_pwm_handle);
UMC_STATE.config_type = CONFIG_AMP_MUX;
UMC_STATE.reset_flag = 0;
UMC_STATE.reset_flag = 0;
headstage_led_spi_color(COLOR_BLUE);
flag_notify(EVT_UMC_LSK);
}
@@ -757,11 +819,8 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
// interrupt
case VIS_INT:
headstage_state = UMC_STATE_INTERRUPT;
headstage_spi_transaction_cancel(headstage_spi_lsk_handle);
memset(headstage_debug_buffer, 0, BLE_NOT_BUFF_SIZE);
tx_put_u32(0, build_configure_instruction(UMC_IRQ, UMC_IRQ_CODE));
headstage_spi_ask_transaction(4);
headstage_reset();
headstage_state = UMC_STATE_HANDSHAKE;
break;
case VIS_BLE_T:
@@ -779,6 +838,52 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
}
}
/**
* @fn headstage_update_cis_instruction
*/
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
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;
}
}
}
/*
* todo: need to define some procedure to detect this device status
*/
@@ -791,9 +896,9 @@ static uint8_t headstage_debug_instruction(uint8_t* ins_buf) {
=====================*/
static void headstage_uni_test_data_append_notify_buffer(uint8_t* dat_buf) {
uint8_t channel = 0;
dat_buf[0] = dat_buf[0];
dat_buf[1] = (dat_buf[1] + 1) & 0xfc;
uint8_t channel = 0;
dat_buf[0] = dat_buf[0];
dat_buf[1] = (dat_buf[1] + 1) & 0xfc;
headstage_notify_append_data(channel, dat_buf);
// always send notify no matter buffer full or not
@@ -801,39 +906,38 @@ static void headstage_uni_test_data_append_notify_buffer(uint8_t* dat_buf) {
headstage_notify_send();
}
// todo: check data length extension with this function -> this function should be
// todo: check data length extension with this function -> this function should be
static void headstage_uni_umc_data_append_notify_buffer(uint8_t* dat_buf) {
// check LSK data preamble ( 0b01100_0001 ) 58(01011000) 2c(00101100)
// sometimes we lose the first bit , it means we only receive
// 0110_0000_1010_1xxx_xxxx_xxxX_XXXX_XXXX and
// 1100_0001_0101_xxxx_xxxx_xxXX_XXXX_XXXX
if ((dat_buf[1] & 0x28) == 0x28) {
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);
}
uint8_t channel;
if(INSTRUCTION.enable_channel_number == 1) {
channel = reverse_channel[INSTRUCTION.last_enable_channel];
}
else if (dat_buf[0] == 0xc1) {
channel = reverse_channel[INSTRUCTION.last_enable_channel];
if (((spi_rxbuf[0] & 0xC1) != 0xC1) && (spi_rxbuf[0] != 0x00)) {
headstage_led_spi_color(COLOR_CYAN);
headstage_uni_delay();
} else {
uint8_t channel_pointer = (INSTRUCTION.channel_pointer + 1) % INSTRUCTION.last_enable_channel;
INSTRUCTION.channel_pointer = channel_pointer;
channel = reverse_channel[INSTRUCTION.channel_mux[channel_pointer]];
}
// uint16_t data_value = (uint16_t)(((dat_buf[1] & 0x0F) << 6) | ((dat_buf[2] & 0xFC) >> 2));
uint8_t data_size = headstage_notify_append_data(channel, dat_buf);
if ((spi_rxbuf[1] & 0x28) == 0x28) {
spi_rxbuf[0] = (spi_rxbuf[0] << 1) | ((spi_rxbuf[1] >> 7) & 0x01);
spi_rxbuf[1] = (spi_rxbuf[1] << 1) | ((spi_rxbuf[2] >> 7) & 0x01);
spi_rxbuf[2] = (spi_rxbuf[2] << 1) | ((spi_rxbuf[3] >> 7) & 0x01);
}
if (data_size >= BLE_NOT_BUFF_SIZE) {
headstage_notify_send();
}
uint8_t channel;
if ((INSTRUCTION.enable_channel_number == 1) || (spi_rxbuf[0] == 0xc1)) {
channel = reverse_channel[INSTRUCTION.last_enable_channel];
} else {
uint8_t channel_pointer = (INSTRUCTION.channel_pointer + 1) % INSTRUCTION.last_enable_channel;
INSTRUCTION.channel_pointer = channel_pointer;
channel = reverse_channel[INSTRUCTION.channel_mux[channel_pointer]];
}
// uint8_t data_size = headstage_notify_append_data(channel, spi_rxbuf);
if (data_size >= BLE_NOT_BUFF_SIZE) {
headstage_notify_send();
headstage_notify_flip_buffer();
}
}
// uint16_t data_value = (uint16_t)(((dat_buf[1] & 0x0F) << 6) | ((dat_buf[2] & 0xFC) >> 2));
headstage_spi_lsk_transaction(3);
}
@@ -926,7 +1030,10 @@ static uint8_t build_umn_ins_config(uint8_t config_type, uint32_t* value) {
==== UMC SPI interface ====
=========================*/
// ASK interface
/**
* @fn headstage_umc_state_transfer_ask
*
*/
static void headstage_umc_state_transfer_ask() {
// after receive handshake , transmit handreceive
@@ -950,6 +1057,7 @@ static void headstage_umc_state_transfer_ask() {
case UMC_STATE_TRIGGER:
case UMC_STATE_CONTINUOUS:
case UMC_STATE_LIMITED:
case UMC_STATE_INTERRUPT:
break;
case UMC_STATE_WAIT_TRIGGER:
headstage_state = UMC_STATE_TRIGGER;
@@ -960,10 +1068,11 @@ static void headstage_umc_state_transfer_ask() {
}
}
/** headstage_umc_state_transfer_lsk
*
*/
static void headstage_umc_state_transfer_lsk() {
headstage_debug_buffer[0] = headstage_state;
headstage_debug_buffer[10] = INSTRUCTION.mode;
headstage_set_debug_information();
switch (headstage_state) {
case UMC_STATE_IDLE:
@@ -1017,10 +1126,6 @@ static void headstage_umc_state_transfer_lsk() {
uint32_t value;
uint8_t new_config_type = build_umn_ins_config(UMC_STATE.config_type, &value);
headstage_debug_buffer[18] = INSTRUCTION.sti_channel_pmos;
headstage_debug_buffer[19] = INSTRUCTION.sti_channel_nmos;
headstage_set_debug_information();
if (new_config_type == CONFIG_ERROR) {
// XXX
} else {
@@ -1045,82 +1150,79 @@ static void headstage_umc_state_transfer_lsk() {
}
break;
/*
conservative instruction need golden key to trigger DBS
*/
/*
conservative instruction need golden key to trigger DBS
*/
case UMC_STATE_WAIT_START:
if(headstage_debug_buffer[1] > 18){
headstage_spi_lsk_transaction(7);
switch (INSTRUCTION.mode) {
if (headstage_debug_buffer[1] > 18) {
// this transaction make cause amplifier data right shift
switch (INSTRUCTION.mode) {
case 0:
// continuous mode
headstage_state = UMC_STATE_TRIGGER;
UMC_STATE.trigger_times = 0;
headstage_spi_lsk_transaction(3);
break;
default:
headstage_state = UMC_STATE_CONTINUOUS;
UMC_STATE.trigger_times = 0;
break;
case 3:
// continuous mode
headstage_state = UMC_STATE_CONTINUOUS;
UMC_STATE.trigger_times = 0;
break;
case 1:
// trigger mode
headstage_state = UMC_STATE_TRIGGER;
UMC_STATE.trigger_times = 0;
headstage_spi_lsk_transaction(3);
break;
case 1:
// trigger mode
headstage_state = UMC_STATE_TRIGGER;
UMC_STATE.trigger_times = 0;
break;
case 2:
// limited mode
headstage_state = UMC_STATE_LIMITED;
UMC_STATE.trigger_times = INSTRUCTION.sti_times;
headstage_spi_lsk_transaction(3);
break;
case 2:
// limited mode
headstage_state = UMC_STATE_LIMITED;
UMC_STATE.trigger_times = INSTRUCTION.sti_times;
break;
}
} else if(headstage_debug_buffer[1] > 10){
headstage_debug_buffer[1] += 1;
tx_put_u32(0, UMC_GOLDEN_KEY);
headstage_spi_ask_transaction(4);
} else {
headstage_debug_buffer[1] += 1;
tx_put_u32(0, build_configure_instruction(CONFIG_DONE, 0xFF));
headstage_spi_ask_transaction(4);
case 3:
// continuous mode
headstage_state = UMC_STATE_CONTINUOUS;
UMC_STATE.trigger_times = 0;
headstage_spi_lsk_transaction(3);
break;
default:
headstage_state = UMC_STATE_CONTINUOUS;
UMC_STATE.trigger_times = 0;
headstage_spi_lsk_transaction(3);
break;
}
} else if (headstage_debug_buffer[1] > 10) {
headstage_debug_buffer[1] += 1;
tx_put_u32(0, UMC_GOLDEN_KEY);
headstage_spi_ask_transaction(4);
} else {
headstage_debug_buffer[1] += 1;
tx_put_u32(0, build_configure_instruction(CONFIG_DONE, 0xFF));
headstage_spi_ask_transaction(4);
}
break;
case UMC_STATE_TRIGGER:
headstage_uni_umc_data_append_notify_buffer(spi_rxbuf);
// headstage_state = UMC_STATE_WAIT_TRIGGER;
// headstage_cpu_delay_ms(1);
// headstage_spi_lsk_transaction(3);
break;
case UMC_STATE_WAIT_TRIGGER:
// XXX how to back to UMC_STATE_TRIGGER state
headstage_spi_ask_transaction(5);
headstage_spi_ask_transaction(4);
break;
case UMC_STATE_CONTINUOUS:
headstage_uni_umc_data_append_notify_buffer(spi_rxbuf);
// headstage_cpu_delay_ms(1);
// headstage_spi_lsk_transaction(3);
break;
case UMC_STATE_LIMITED:
headstage_uni_umc_data_append_notify_buffer(spi_rxbuf);
UMC_STATE.trigger_times--;
if (UMC_STATE.trigger_times == 0) {
headstage_state = UMC_STATE_WAIT_START;
}
// headstage_cpu_delay_ms(1);
// headstage_spi_lsk_transaction(3);
break;
case UMC_STATE_INTERRUPT:
break;
default:
break;
}
@@ -0,0 +1,5 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_ADC_H
#define HEADSTAGE_ADC_H
#endif
@@ -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
@@ -0,0 +1,16 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef NEULIVE_2P0
#define NEULIVE_2P0
/*============================
==== product information ====
===========================*/
#define DEVICE_NAME "Neulive-v2.0"
#define MAJOR_PRODUCT_NUMBER 1
#define MINOR_PRODUCT_NUMBER 1
#define MAJOR_VERSION_NUMBER 2
#define MINOR_VERSION_NUMBER 0
#endif
@@ -0,0 +1,59 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_NOTIFY_TDC4VC_H
#define HEADSTAGE_NOTIFY_TDC4VC_H
#ifndef HEADSTAGE_NOTIFY_H
#error "headstage/headstage_notify.h not included"
#endif
#define NOT_BUF_OFFSET_INIT 8
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static void headstage_notify_set_timestamp() {
not_time_stamp = headstage_time_stamp_us();
headstage_notify_buffer[0] = CHIP_ID;
headstage_notify_buffer[1] = 4;
headstage_notify_buffer[2] = not_time_stamp & 0xFF;
headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
headstage_notify_buffer[4] = (not_time_stamp >> 16) & 0xFF;
headstage_notify_buffer[5] = (not_time_stamp >> 24) & 0xFF;
}
static void headstage_notify_flip_buffer() {
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 2;
headstage_notify_buffer[0] = CHIP_ID;
headstage_notify_buffer[1] = data_count;
not_buf_offset = NOT_BUF_OFFSET_INIT;
}
/**
The data format between NEULIVE and CONTROL BOX
Use notification to transmit data to control box through BLE.
Definition of the protocol:
4 byte timestamp + (1 byte channel + 2 byte voltage) * (N)
N: numbers of data transmitted in a transaction
*/
static uint8_t headstage_notify_append_data(uint8_t *data_value) {
if (not_buf_offset <= NOT_BUF_OFFSET_INIT) {
headstage_notify_set_timestamp();
not_buf_offset = NOT_BUF_OFFSET_INIT;
}
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];
uint8_t ret = not_buf_offset;
return ret;
}
#endif // HEADSTAGE_NOTIFY_TDC4VAF2_H
@@ -0,0 +1,109 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_PIN_NEU_H
#define HEADSTAGE_PIN_NEU_H
//#define NEU_2_0
#define NEU_2_1
#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_5 //
#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 GLED IOID_7
//#define RLED IOID_6
// clang-format on
#elif defined(BOOSTXL_CC2650MA)
// clang-format off
#ifdef NEU_2_0
#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 //
#elif defined(NEU_2_1)
#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_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 //
#endif
// clang-format on
#endif
/*
* SPI0 interface with DBS chip 2.0
*/
#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_UNASSIGNED
/*
* SPI1 interface work with LED
*/
#define Board_SPI1_MISO PIN_UNASSIGNED
#define Board_SPI1_MOSI PIN_LED_SDI
#define Board_SPI1_CLK PIN_LED_CLK
#define Board_SPI1_CSN PIN_UNASSIGNED
/* Power Management Board */
#define Board_SRDY Board_BP_Pin_J2_19
#define Board_MRDY Board_BP_Pin_J1_2
/* PWM outputs */
#define Board_PWMPIN0 PIN_AMP_VCK
#define Board_PWMPIN1 PIN_UNASSIGNED
#define Board_PWMPIN2 PIN_SYS_CLK
#define Board_PWMPIN3 PIN_UNASSIGNED
#define Board_PWMPIN4 PIN_UNASSIGNED
#define Board_PWMPIN5 PIN_UNASSIGNED
#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,
// RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
//
PIN_TERMINATE};
#endif // HEADSTAGE_PIN_UNI_H
@@ -0,0 +1,37 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_PWM_H
#define HEADSTAGE_PWM_H
#include <Board.h>
#include <ti/drivers/PWM.h>
static PWM_Handle headstage_system_pwm_handle = NULL;
static PWM_Handle headstage_poly_r_pwm_handle = NULL; // poly-R adjustment clock
#define headstage_pwm_open() \
do { \
PWM_init(); \
PWM_Params headstage_system_pwm_params; \
PWM_Params_init(&headstage_system_pwm_params); \
headstage_system_pwm_params.idleLevel = PWM_IDLE_LOW; \
headstage_system_pwm_params.periodUnits = PWM_PERIOD_HZ; \
headstage_system_pwm_params.periodValue = NEU_SYS_CLK; \
headstage_system_pwm_params.dutyUnits = PWM_DUTY_FRACTION; \
headstage_system_pwm_params.dutyValue = PWM_DUTY_FRACTION_MAX / 2; \
headstage_system_pwm_handle = PWM_open(Board_PWM2, &headstage_system_pwm_params); \
PWM_Params headstage_poly_r_pwm_params; \
PWM_Params_init(&headstage_poly_r_pwm_params); \
headstage_poly_r_pwm_params.idleLevel = PWM_IDLE_LOW; \
headstage_poly_r_pwm_params.periodUnits = PWM_PERIOD_HZ; \
headstage_poly_r_pwm_params.periodValue = NEU_POLY_R_CLK; \
headstage_poly_r_pwm_params.dutyUnits = PWM_DUTY_FRACTION; \
headstage_poly_r_pwm_params.dutyValue = PWM_DUTY_FRACTION_MAX / 2; \
headstage_poly_r_pwm_handle = PWM_open(Board_PWM0, &headstage_poly_r_pwm_params); \
} while (0)
#define headstage_pwm_start(handle) PWM_start(handle)
#define headstage_pwm_stop(handle) PWM_stop(handle)
#define headstage_pwm_close(handle) PWM_close(handle)
#endif // HEADSTAGE_PWM_H
@@ -0,0 +1,94 @@
#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();
// SPI buffer reset
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++ ){
spi_txbuf[i] = 0;
spi_rxbuf[i] = 0;
}
SPICallBack = ONE_SHOT_SPI;
// FlushSPICounter = 0;
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;
headstage_led_color(COLOR_GREEN); // color green
}
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;
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
@@ -0,0 +1,125 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef HEADSTAGE_SPI_H
#define HEADSTAGE_SPI_H
#if defined(BOOSTXL_CC2650MA) && !defined(HEADSTAGE_MA_USE_SPI2)
#error "put HEADSTAGE_MA_USE_SPI2 in predefined"
#endif
#include <Board.h>
#include <ti/drivers/SPI.h>
#include <ti/drivers/dma/UDMACC26XX.h>
#include <ti/drivers/spi/SPICC26XXDMA.h>
#define SPI_BUFFER_SIZE 3
#define SPI_RX_SIZE 9
static uint8_t spi_txbuf[SPI_BUFFER_SIZE] = {0};
static uint8_t spi_rxbuf[SPI_BUFFER_SIZE] = {0};
static SPI_Handle headstage_spi_handle = NULL;
static SPI_Transaction headstage_spi_transaction;
static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transaction);
static bool OpenSPI = false;
// SPI parameters initialize
#define headstage_spi_open() \
do { \
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); \
} 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(length) \
({ \
headstage_spi_transaction.count = (length); \
headstage_spi_transaction.txBuf = (spi_txbuf); \
headstage_spi_transaction.rxBuf = (spi_rxbuf); \
SPI_transfer(headstage_spi_handle, &headstage_spi_transaction); \
})
#define headstage_spi_close(spi_handle) \
do { \
if (spi_handle != NULL) { \
SPI_close(spi_handle); \
spi_handle = NULL; \
} \
} while (0)
#define headstage_spi_transaction_cancel(spi_handle) \
do { \
if (spi_handle != NULL) { \
SPI_transferCancel(spi_handle); \
} \
} while (0)
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,305 @@
{
"name": "Neulive",
"version": "2.0",
"match_rule": {
"local_name_pattern": "Neulive.*",
"major_product_number": 1,
"minor_product_number": 1,
"major_version_number": 2,
"minor_version_number": 0
},
"constant": {
"REC_CHANNEL_COUNT": 16,
"STI_VOLT_CHANNEL_COUNT": 16,
"STI_AMP_CHANNEL_COUNT": 8
},
"parameters": {
"CHANNEL": {
"description": "record channels",
"record_meta": true,
"domain": {
"set": [
"REC_CHANNEL_COUNT"
]
}
},
"STI_VOLT_PCHANNEL": {
"description": "stimulation voltage mode channels",
"record_meta": true,
"domain": {
"set": [
"STI_VOLT_CHANNEL_COUNT"
]
},
"guard": "STI_VOLT_PCHANNEL != STI_VOLT_NCHANNEL"
},
"STI_VOLT_NCHANNEL": {
"description": "stimulation voltage mode channels",
"record_meta": true,
"domain": {
"set": [
"STI_VOLT_CHANNEL_COUNT"
]
},
"guard": "STI_VOLT_PCHANNEL != STI_VOLT_NCHANNEL"
},
"STI_AMP_PCHANNEL": {
"description": "stimulation ampere mode p channel",
"record_meta": true,
"domain": {
"set": [
"STI_AMP_CHANNEL_COUNT"
]
},
"guard": "STI_AMP_PCHANNEL != STI_AMP_NCHANNEL"
},
"STI_AMP_NCHANNEL": {
"description": "stimulation ampere mode n channel",
"record_meta": true,
"domain": {
"set": [
"STI_AMP_CHANNEL_COUNT"
]
},
"guard": "STI_AMP_PCHANNEL != STI_AMP_NCHANNEL"
},
"STI_TIME_DURATION_ONE": {
"description": "stimulation pattern",
"record_meta": false,
"domain": [
1024
],
"guard": "STI_TIME_DURATION_ONE < 1"
},
"STI_TIME_DURATION_TWO": {
"description": "stimulation pattern",
"record_meta": false,
"domain": [
1024
]
},
"STI_TIME_DURATION_THREE": {
"description": "stimulation pattern",
"record_meta": false,
"domain": [
1024
]
},
"STI_TIME_DURATION_FOUR": {
"description": "stimulation pattern",
"record_meta": false,
"domain": [
65536
]
},
"STI_TIME_DURATION_FIVE": {
"description": "stimulation pattern",
"record_meta": false,
"domain": [
2048
]
},
"AMP_GAIN": {
"description": "amplifier gain setting",
"record_meta": true,
"value": [
25,
100,
400,
800
]
},
"STI_MODE": {
"description": "how to execute stimulus",
"value": [
"DISABLE",
"LIMITED",
"CONTINUOUS"
]
},
"STI_AMPERE_HIGH_SIDE": {
"description": "stimulation ampere for pmos, unit: uA ",
"type": "int",
"domain": [
1024
],
"value": "VALUE * 4"
},
"STI_AMPERE_LOW_SIDE": {
"description": "stimulation ampere for nmos, unit: uA",
"type": "int",
"domain": [
1024
],
"value": "VALUE * 4"
},
"STI_VOLTAGE_AMPLITUDE": {
"description": "stimulation voltage mode, unit: Volt ",
"type": "float",
"domain": [
32
],
"value": " 2 + VALUE / 31"
},
"STI_TIMES": {
"description": "how many times will be executed",
"domain": [
256
]
},
"SYSTEM_CLOCK_RATIO": {
"description": "frequency of system clock, unit: khz",
"type": "float",
"domain": [
65536
],
"value": " 8000 / VALUE",
"guard": "SYSTEM_CLOCK_RATIO < 2"
},
"ADC_CLOCK_RATIO": {
"description": "adc sampling rate, unit: khz",
"type": "float",
"domain": [
65536
],
"value": " SYSTEM_CLOCK_RATIO / VALUE ",
"guard": "ADC_CLOCK_RATIO < 28"
},
"STI_CLOCK_RATIO": {
"description": "stimulation rate",
"type": "float",
"domain": [
65536
],
"value": "SYSTEM_CLOCK_RATIO / VALUE",
"guard": "STI_CLOCK_RATIO < 2"
},
"ARBITRARY_EN": {
"description": "arbitrary stimulation enable",
"domain": "bool"
},
"ARBITRARY_CH": {
"description": "arbitrary stimulation enable channels",
"domain": "int",
"value": " ( 1 << STI_AMP_PCHANNEL ) if (ARBITRARY_EN) else 0 "
},
"ARBITRARY_INDEX": {
"description": "define the last point of arbitrary data, from zero to arbitrary_index. ",
"domain": "INT",
"guard": "VALUE > 499"
},
"H_BRIDGE": {
"description": "whether to contruct a h bridge execute a stimulation",
"domain": "bool"
},
"STI_REF": {
"description": "bipolar or monopolar",
"domain": "bool"
},
"FAST_SETTLE": {
"description": "protect amplifier input when stimulation is executed",
"domain": "bool"
},
"UMC_TEST": {
"description": "start umc test mode",
"domain": "action",
"on_change": "umc_default"
},
"UMC_RESET": {
"description": "reset headstage to perform another setting",
"domain": "action",
"on_change": "reset"
},
"UMC_TRIGGER": {
"description": "trigger stimulation when device is in trigger mode",
"domain": "action",
"on_change": "STIMULUS"
}
},
"instruction": {
"start": [
{
"expression": "len(CHANNEL) > 0",
"raise": "no recording channel"
},
"data_format",
"_notify(True)",
"start_recording",
"umc_parameter",
"_sync(True)",
"VIS_STI"
],
"trigger stimulation": [
"umc_sti_trigger0"
],
"umc_reset": [
"VIS_RST"
],
"data_format": [
"_data_format('TDC4VAF2')"
],
"start_recording": {
"type": "RIS",
"data": [
"3b101#direct header;2b0#don't care;3b>LOW_FREQ_BAND",
"2b0#don't care;1bCHOPPER;1bFAST_SETTLE;3b>STI_WAVEFORM",
"5b>STI_AMPERE;4b>STI_PMOS",
"4b>STI_NMOS;4b>SAMPLE_RATE"
]
},
"umc_parameter": {
"type": "RIS",
"foreach-parameter": {
"parameter": "CHANNEL",
"variable": [
"a",
"b",
"c",
"d"
]
},
"data": [
"3b001#umc parameter header;3b>AMP_GAIN",
"4b>PULSE_WIDTH;6b>STI_TIMES",
"2b>STI_MODE;6b>STI_FREQ",
"1ba?;1bb?;1bc?;1bd?",
"4b>a?:0;4b>b?:0",
"4b>c?:0;4b>d?:0"
]
},
"umc_default": [
"_set('CHANNEL', 0)",
"_set('SAMPLE_RATE', 0)",
"_set('AMP_GAIN', 5)",
"_set('STI_WAVEFORM', 1)",
"_set('STI_MODE', 1)",
"_set('STI_NMOS', 0)",
"_set('STI_PMOS', 1)",
"_set('STI_AMPERE', 0)",
"_set('STI_FREQ', 0)",
"_set('STI_TIMES', 0)",
"_set('PULSE_WIDTH', 0)",
"_set('FAST_SETTLE', 1)",
"_set('CHOPPER', 0)",
"data_format",
"_notify(True)",
"umc_default0",
"_sync(True)",
"VIS_STI"
],
"umc_default0": {
"type": "RIS",
"data": [
"1B0#load umc default parameter into uni"
]
},
"umc_sti_trigger0": {
"type": "RIS",
"description": "this function is perform only in trigger mode",
"data": [
"1BC0# trigger stimulation when recording is performed"
]
}
}
}
@@ -0,0 +1,19 @@
@startuml
start
:stimulation select;
if (continuous) then (yes)
if(current mode / voltage mode) then (current mode)
:sti parameter setup;
else (voltage mode)
:sti parameter setup;
endif
else if (limited)
if(current mode / voltage mode) then (current mode)
:sti parameter setup;
else (voltage mode)
:sti parameter setup;
endif
else (disable)
endif
stop
@enduml
@@ -14,7 +14,7 @@ static uint32_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
static void headstage_notify_set_timestamp() {
not_time_stamp = headstage_time_stamp_us() ;
not_time_stamp = headstage_time_stamp_us();
headstage_notify_buffer[2] = not_time_stamp & 0xFF;
headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
@@ -34,22 +34,9 @@ static void headstage_notify_flip_buffer() {
static uint8_t headstage_notify_append_data(uint8_t channel, uint8_t *data_value) {
if (not_buf_offset <= NOT_BUF_OFFSET_INIT) {
headstage_notify_set_timestamp();
not_buf_offset = NOT_BUF_OFFSET_INIT;
}
if (not_buf_offset == NOT_BUF_OFFSET_INIT + 10) {
uint32_t current = headstage_time_stamp_us() ;
uint32_t time_delta = (current - not_time_stamp) & 0xFFFF;
headstage_notify_buffer[6] = time_delta & 0xFF;
headstage_notify_buffer[7] = (time_delta >> 8) & 0xFF;
}
if (not_buf_offset >= BLE_NOT_BUFF_SIZE) {
return not_buf_offset;
}
if (data_value == NULL) {
headstage_notify_buffer[not_buf_offset++] = ((channel & 0x0F) << 4);
headstage_notify_buffer[not_buf_offset++] = 0x03;
@@ -58,12 +45,16 @@ static uint8_t headstage_notify_append_data(uint8_t channel, uint8_t *data_value
headstage_notify_buffer[not_buf_offset++] = data_value[2] & 0xFC;
}
uint8_t ret = not_buf_offset;
if (not_buf_offset == BLE_NOT_BUFF_SIZE) {
uint32_t current = headstage_time_stamp_us();
uint32_t time_delta = ((current - not_time_stamp)) & 0xFFFF;
if (not_buf_offset >= BLE_NOT_BUFF_SIZE) {
headstage_notify_flip_buffer();
headstage_notify_buffer[6] = time_delta & 0xFF;
headstage_notify_buffer[7] = (time_delta >> 8) & 0xFF;
}
uint8_t ret = not_buf_offset;
return ret;
}
@@ -2,4 +2,4 @@
*/
#ifndef HEADSTAGE_ADC_H
#define HEADSTAGE_ADC_H
#endif // HEADSTAGE_ADC_H
#endif // HEADSTAGE_ADC_H
@@ -42,6 +42,38 @@
// clang-format on
/*
* SPI0 interface with DBS chip 2.0
*/
#define Board_SPI0_MISO PIN_UNASSIGNED
#define Board_SPI0_MOSI PIN_LSK_MOSI
#define Board_SPI0_CLK PIN_LSK_CLK
#define Board_SPI0_CS PIN_LSK_CS
/*
* SPI1 interface work with LED
*/
#define Board_SPI1_MISO PIN_UNASSIGNED
#define Board_SPI1_MOSI PIN_ASK_MOSI
#define Board_SPI1_CLK PIN_UNASSIGNED
#define Board_SPI1_CS PIN_ASK_CS
/* Power Management Board */
#define Board_SRDY Board_BP_Pin_J2_19
#define Board_MRDY Board_BP_Pin_J1_2
/* PWM outputs */
#define Board_PWMPIN0 PIN_AMP_VCK
#define Board_PWMPIN1 PIN_UNASSIGNED
#define Board_PWMPIN2 PIN_CLOCK_8M
#define Board_PWMPIN3 PIN_UNASSIGNED
#define Board_PWMPIN4 PIN_UNASSIGNED
#define Board_PWMPIN5 PIN_UNASSIGNED
#define Board_PWMPIN6 PIN_UNASSIGNED
#define Board_PWMPIN7 PIN_UNASSIGNED
#endif
static PIN_Config headstage_pin_configuration[] = { //
@@ -5,60 +5,60 @@
"local_name_pattern": "Neulive.*",
"major_product_number": 1,
"minor_product_number": 1,
"major_version_number": 0,
"major_version_number": 1,
"minor_version_number": 2
},
"constant": {
"REC_CHANNEL_COUNT": 13,
"STI_CHANNEL_COUNT": 4,
"ADC_SAMPLE_RATE_LIST": [
10000,
19000,
38000,
76000,
152000
2000,
3800,
7600,
15200,
30400
],
"STI_FREQ_LIST": [
6,
8,
10,
12,
14,
16,
18,
20,
22,
24,
26,
28,
30,
32,
34,
36,
38,
40,
50,
60,
70,
80,
90,
100,
110,
120,
130,
140,
150,
160,
170,
180,
190,
200,
400,
600,
800,
1000,
2000,
3000,
4000,
5000,
6000,
7000,
8000,
9000,
10000
1200,
1400,
1600,
1800,
2000
],
"STI_PULSE_WIDTH": [
40,
90,
140,
190,
240,
290,
340,
390,
440,
490
80,
180,
280,
380,
480,
580,
680,
780,
880,
980
]
},
"parameters": {
@@ -84,12 +84,12 @@
"description": "amp gain",
"record_meta": true,
"value": [
2,
5,
10,
200,
500,
1000
3,
40,
70,
30,
400,
700
]
},
"LOW_FREQ_BAND": {
@@ -99,7 +99,7 @@
8
]
},
"STI_BEHAVIOR": {
"STI_MODE": {
"description": "how to execute stimulus",
"value": [
"DISABLE",
@@ -108,8 +108,8 @@
"CONTINUOUS"
]
},
"STI_MODE": {
"description": "stimulation mode",
"STI_WAVEFORM": {
"description": "describe the waveform of stimulation",
"value": [
"Positive Pulse",
"Negative Pulse",
@@ -119,12 +119,12 @@
]
},
"STI_VOLT": {
"description": "stimulation voltage",
"description": "stimulation volt, unit: V ",
"type": "float",
"domain": [
32
],
"value": "2 + 3 * VALUE / 31"
"value": " 2 + 3 * VALUE / 31"
},
"STI_TIMES": {
"description": "how many times will be executed",
@@ -162,17 +162,27 @@
"value": "STI_PULSE_WIDTH[VALUE]"
},
"CHOPPER": {
"description": "",
"description": "default_disable",
"domain": "bool"
},
"FAST_SETTLE": {
"description": "",
"description": "protect amplifier input when stimulation is executed",
"domain": "bool"
},
"UMC_TEST": {
"description": "start umc test mode",
"domain": "action",
"on_change": "umc_default"
},
"UMC_RESET": {
"description": "reset headstage to perform another setting",
"domain": "action",
"on_change": "reset"
},
"UMC_TRIGGER": {
"description": "trigger stimulation when device is in trigger mode",
"domain": "action",
"on_change": "STIMULUS"
}
},
"instruction": {
@@ -188,10 +198,10 @@
"_sync(True)",
"VIS_STI"
],
"stop": [
"VIS_INT"
"trigger stimulation": [
"umc_sti_trigger0"
],
"restart": [
"umc_reset": [
"VIS_RST"
],
"data_format": [
@@ -201,7 +211,7 @@
"type": "RIS",
"data": [
"3b101#direct header;2b0#don't care;3b>LOW_FREQ_BAND",
"2b0#don't care;1bCHOPPER;1bFAST_SETTLE;3b>STI_MODE",
"2b0#don't care;1bCHOPPER;1bFAST_SETTLE;3b>STI_WAVEFORM",
"5b>STI_VOLT;4b>STI_PMOS",
"4b>STI_NMOS;4b>SAMPLE_RATE"
]
@@ -220,27 +230,26 @@
"data": [
"3b001#umc parameter header;3b>AMP_GAIN",
"4b>PULSE_WIDTH;6b>STI_TIMES",
"2b>STI_BEHAVIOR;6b>STI_FREQ",
"2b>STI_MODE;6b>STI_FREQ",
"1ba?;1bb?;1bc?;1bd?",
"4b>a?:0;4b>b?:0",
"4b>c?:0;4b>d?:0"
]
},
"umc_default": [
"_set('CHANNEL', 1)",
"_set('CHANNEL', 0)",
"_set('SAMPLE_RATE', 0)",
"_set('AMP_GAIN', 5)",
"_set('STI_BEHAVIOR', 1)",
"_set('STI_MODE', 0)",
"_set('STI_NMOS', STI_PMOS + 1)",
"_set('STI_PMOS', 0)",
"_set('STI_NMOS', 1)",
"_set('STI_WAVEFORM', 1)",
"_set('STI_MODE', 1)",
"_set('STI_NMOS', 0)",
"_set('STI_PMOS', 1)",
"_set('STI_VOLT', 0)",
"_set('STI_FREQ', 0)",
"_set('STI_TIMES', 0)",
"_set('PULSE_WIDTH', 0)",
"_set('FAST_SETTLE', 0)",
"_set('CHOPPER', 1)",
"_set('FAST_SETTLE', 1)",
"_set('CHOPPER', 0)",
"data_format",
"_notify(True)",
"umc_default0",
@@ -252,6 +261,14 @@
"data": [
"1B0#load umc default parameter into uni"
]
},
"umc_sti_trigger0": {
"type": "RIS",
"description": "this function is perform only in trigger mode",
"data": [
"1BC0# trigger stimulation when recording is performed"
]
}
}
}
@@ -1,64 +1,64 @@
{
"name": "Neulive",
"version": "0.2",
"version": "1.3",
"match_rule": {
"local_name_pattern": "Neulive.*",
"major_product_number": 1,
"minor_product_number": 1,
"major_version_number": 0,
"minor_version_number": 2
"major_version_number": 1,
"minor_version_number": 3
},
"constant": {
"REC_CHANNEL_COUNT": 13,
"REC_CHANNEL_COUNT": 12,
"STI_CHANNEL_COUNT": 4,
"ADC_SAMPLE_RATE_LIST": [
10000,
19000,
38000,
76000,
152000
2000,
3800,
7600,
15200,
30400
],
"STI_FREQ_LIST": [
6,
8,
10,
12,
14,
16,
18,
20,
22,
24,
26,
28,
30,
32,
34,
36,
38,
40,
50,
60,
70,
80,
90,
100,
110,
120,
130,
140,
150,
160,
170,
180,
190,
200,
400,
600,
800,
1000,
2000,
3000,
4000,
5000,
6000,
7000,
8000,
9000,
10000
1200,
1400,
1600,
1800,
2000
],
"STI_PULSE_WIDTH": [
40,
90,
140,
190,
240,
290,
340,
390,
440,
490
80,
180,
280,
380,
480,
580,
680,
780,
880,
980
]
},
"parameters": {
@@ -84,22 +84,22 @@
"description": "amp gain",
"record_meta": true,
"value": [
2,
5,
10,
200,
500,
1000
3,
14,
27,
60,
280,
540
]
},
"LOW_FREQ_BAND": {
"description": "",
"description": "low pass filter",
"record_meta": true,
"domain": [
8
]
},
"STI_BEHAVIOR": {
"STI_MODE": {
"description": "how to execute stimulus",
"value": [
"DISABLE",
@@ -108,8 +108,8 @@
"CONTINUOUS"
]
},
"STI_MODE": {
"description": "stimulation mode",
"STI_WAVEFORM": {
"description": "describe the waveform of stimulation",
"value": [
"Positive Pulse",
"Negative Pulse",
@@ -118,13 +118,13 @@
"Arbitrary Waveform"
]
},
"STI_VOLT": {
"description": "stimulation voltage",
"STI_AMPERE": {
"description": "stimulation ampere, unit: uA ",
"type": "float",
"domain": [
32
],
"value": "2 + 3 * VALUE / 31"
"value": " 31 * VALUE "
},
"STI_TIMES": {
"description": "how many times will be executed",
@@ -162,17 +162,27 @@
"value": "STI_PULSE_WIDTH[VALUE]"
},
"CHOPPER": {
"description": "",
"description": "default_disable",
"domain": "bool"
},
"FAST_SETTLE": {
"description": "",
"description": "protect amplifier input when stimulation is executed",
"domain": "bool"
},
"UMC_TEST": {
"description": "start umc test mode",
"domain": "action",
"on_change": "umc_default"
},
"UMC_RESET": {
"description": "reset headstage to perform another setting",
"domain": "action",
"on_change": "reset"
},
"UMC_TRIGGER": {
"description": "trigger stimulation when device is in trigger mode",
"domain": "action",
"on_change": "STIMULUS"
}
},
"instruction": {
@@ -181,12 +191,19 @@
"expression": "len(CHANNEL) > 0",
"raise": "no recording channel"
},
"data_format",
"_notify(True)",
"start_recording",
"umc_parameter",
"_sync(True)",
"VIS_STI"
],
"trigger stimulation": [
"umc_sti_trigger0"
],
"umc_reset": [
"VIS_RST"
],
"data_format": [
"_data_format('TDC4VAF2')"
],
@@ -194,40 +211,45 @@
"type": "RIS",
"data": [
"3b101#direct header;2b0#don't care;3b>LOW_FREQ_BAND",
"4b0#don't care;1bCHOPPER;1bFAST_SETTLE",
"5b>STI_VOLT;4b>STI_PMOS",
"2b0#don't care;1bCHOPPER;1bFAST_SETTLE;3b>STI_WAVEFORM",
"5b>STI_AMPERE;4b>STI_PMOS",
"4b>STI_NMOS;4b>SAMPLE_RATE"
]
},
"umc_parameter": {
"type": "RIS",
"foreach-parameter": {
"parameter": "CHANNEL",
"variable": [
"a",
"b",
"c",
"d"
]
},
"data": [
"3b001#umc parameter header",
"3b>AMP_GAIN;4b>PULSE_WIDTH",
"6b>STI_TIMES;2b>STI_BEHAVIOR",
"6b>STI_FREQ"
"3b001#umc parameter header;3b>AMP_GAIN",
"4b>PULSE_WIDTH;6b>STI_TIMES",
"2b>STI_MODE;6b>STI_FREQ",
"1ba?;1bb?;1bc?;1bd?",
"4b>a?:0;4b>b?:0",
"4b>c?:0;4b>d?:0"
]
},
"umc_default": [
"_set('CHANNEL', 3)",
"_set('CHANNEL', 4)",
"_set('CHANNEL', 5)",
"_set('CHANNEL', 6)",
"_set('CHANNEL', 7)",
"_set('CHANNEL', 8)",
"_set('SAMPLE_RATE', 9)",
"_set('AMP_GAIN', 3)",
"_set('STI_BEHAVIOR', 1)",
"_set('STI_MODE', 0)",
"_set('STI_NMOS', STI_PMOS + 1)",
"_set('STI_PMOS', 0)",
"_set('STI_NMOS', 1)",
"_set('STI_VOLT', 0)",
"_set('CHANNEL', 0)",
"_set('SAMPLE_RATE', 0)",
"_set('AMP_GAIN', 5)",
"_set('STI_WAVEFORM', 1)",
"_set('STI_MODE', 1)",
"_set('STI_NMOS', 0)",
"_set('STI_PMOS', 1)",
"_set('STI_AMPERE', 0)",
"_set('STI_FREQ', 0)",
"_set('STI_TIMES', 0)",
"_set('PULSE_WIDTH', 0)",
"_set('FAST_SETTLE', 0)",
"_set('CHOPPER', 1)",
"_set('FAST_SETTLE', 1)",
"_set('CHOPPER', 0)",
"data_format",
"_notify(True)",
"umc_default0",
@@ -239,6 +261,14 @@
"data": [
"1B0#load umc default parameter into uni"
]
},
"umc_sti_trigger0": {
"type": "RIS",
"description": "this function is perform only in trigger mode",
"data": [
"1BC0# trigger stimulation when recording is performed"
]
}
}
}
@@ -0,0 +1,64 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef NEULIVE_1P2
#define NEULIVE_1P2
/*============================
==== product information ====
===========================*/
#define DEVICE_NAME "Neulive-v1.2"
#define MAJOR_PRODUCT_NUMBER 1
#define MINOR_PRODUCT_NUMBER 1
#define MAJOR_VERSION_NUMBER 1 // need to modify
#define MINOR_VERSION_NUMBER 2
static uint16_t sti_channel_table[4] = {
{0b000001}, // 2
{0b000111}, // 8
{0b001011}, // 12
{0b001111} // 16
};
static uint16_t reverse_channel[16] = {{0x0A}, // 1
{0x0B},
{0x00},
{0x01},
{0x02},
{0x07},
{0x06},
{0x03},
{0x05},
{0x04},
{0x08},
{0xff},
{0x0c},
{0x09},
{0xff},
{0xff}};
static uint16_t amp_channel_table[13] = { //
{0x03},
{0x04},
{0x05},
{0x08},
{0x0A},
{0x09},
{0x07},
{0x06},
{0x0B},
{0x0E},
{0x01},
{0x02},
{0x0D}};
static uint16_t amp_gain_table[] = {
0b100011, // 3
0b000011, // 30
0b101100, // 40
0b101001, // 70
0b001100, // 400
0b001001, // 700
};
#endif
@@ -0,0 +1,63 @@
/* Copyright (c) 2019. BioPro. Scientific.
*/
#ifndef NEULIVE_1P3
#define NEULIVE_1P3
/*============================
==== product information ====
===========================*/
#define DEVICE_NAME "Neulive-v1.3"
#define MAJOR_PRODUCT_NUMBER 1
#define MINOR_PRODUCT_NUMBER 1
#define MAJOR_VERSION_NUMBER 1
#define MINOR_VERSION_NUMBER 3
static uint16_t sti_channel_table[4] = {
{0b000010}, // 3
{0b000011}, // 4
{0b000100}, // 5
{0b000101} // 6
};
static uint16_t reverse_channel[16] = {{0x0A}, // 1
{0x00},
{0x01},
{0x02},
{0x03},
{0x08},
{0x07},
{0x06},
{0x05},
{0x04},
{0x09},
{0x0B},
{0xFF},
{0xFF},
{0xff},
{0xff}};
static uint16_t amp_channel_table[12] = { //
{0x02},
{0x03},
{0x04},
{0x05},
{0x0A},
{0x09},
{0x08},
{0x07},
{0x06},
{0x0b},
{0x01},
{0x0C}};
static uint16_t amp_gain_table[] = {
0b100011, // 3
0b101100, // 14
0b101001, // 27
0b000011, // 60
0b001100, // 280
0b001001, // 540
};
#endif
@@ -153,7 +153,7 @@
#define SBP_TASK_PRIORITY 1
#ifndef SBP_TASK_STACK_SIZE
#define SBP_TASK_STACK_SIZE 1024
#define SBP_TASK_STACK_SIZE 844
#endif
// Internal Events for RTOS application
@@ -184,7 +184,7 @@ typedef struct {
static ICall_EntityID self;
// Semaphore globally used to post events to the application thread
static ICall_Semaphore semaphore;
ICall_Semaphore semaphore;
// Queue object used for app messages
static Queue_Struct application_message;
@@ -408,9 +408,10 @@ static void SimpleBLEPeripheral_init(void) {
// Register for GATT local events and ATT Responses pending for transmission
GATT_RegisterForMsgs(self);
HCI_LE_ReadMaxDataLenCmd();
// HCI_LE_ReadMaxDataLenCmd();
//
// HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
HCI_LE_WriteSuggestedDefaultDataLenCmd(251 , 2120); // this is used for data length extension
}
#ifndef DEVICE_NAME
@@ -444,75 +445,74 @@ static void SimpleBLEPeripheral_init(void) {
#endif
static char *date = __DATE__;
static void headstage_init_device_info() {
static void headstage_init_device_info() {
uint8_t year = 10 * (date[9] - '0') + (date[10] - '0');
uint8_t month = 0;
switch (date[0]) {
case 'J':
// Jan, January
// Jun, June
// Jul, July
if (date[1] == 'a') {
month = 1;
} else if (date[2] == 'n') {
month = 6;
} else {
month = 7;
}
break;
case 'F':
// Feb, February
month = 2;
break;
case 'M':
// Mar, March
// May, May
if (date[2] == 'r') {
month = 3;
} else {
month = 5;
}
break;
case 'A':
// Apr, April
// Ang, August
if (date[1] == 'p') {
month = 4;
} else {
month = 8;
}
break;
case 'S':
// Sep, September
month = 9;
break;
case 'O':
// Oct, October
month = 10;
break;
case 'N':
// Nov, November
month = 11;
break;
case 'D':
// Dec, December
month = 12;
break;
case 'J':
// Jan, January
// Jun, June
// Jul, July
if (date[1] == 'a') {
month = 1;
} else if (date[2] == 'n') {
month = 6;
} else {
month = 7;
}
break;
case 'F':
// Feb, February
month = 2;
break;
case 'M':
// Mar, March
// May, May
if (date[2] == 'r') {
month = 3;
} else {
month = 5;
}
break;
case 'A':
// Apr, April
// Ang, August
if (date[1] == 'p') {
month = 4;
} else {
month = 8;
}
break;
case 'S':
// Sep, September
month = 9;
break;
case 'O':
// Oct, October
month = 10;
break;
case 'N':
// Nov, November
month = 11;
break;
case 'D':
// Dec, December
month = 12;
break;
}
uint8_t scanRspData[64];
uint8_t *p = scanRspData;
*p++ = sizeof(DEVICE_NAME);
*p++ = GAP_ADTYPE_LOCAL_NAME_COMPLETE;
// unsafe_memcpy(p, DEVICE_NAME, sizeof(DEVICE_NAME));
for (unsigned int i = 0; i < sizeof(DEVICE_NAME) - 1; i++){
// unsafe_memcpy(p, DEVICE_NAME, sizeof(DEVICE_NAME));
for (unsigned int i = 0; i < sizeof(DEVICE_NAME) - 1; i++) {
*p++ = DEVICE_NAME[i];
}
*p++ = 11;
*p++ = GAP_ADTYPE_MANUFACTURER_SPECIFIC;
// unsafe_memcpy(p, "BPHS", 4);
// unsafe_memcpy(p, "BPHS", 4);
*p++ = 'B';
*p++ = 'P';
*p++ = 'H';
@@ -553,7 +553,7 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
// message is queued to the message receive queue of the thread or when
// ICall_signal() function is called onto the semaphore.
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER);
// headstage_watchdog_clear();
// headstage_watchdog_clear();
if (errno == ICALL_ERRNO_SUCCESS) {
ICall_EntityID dest;
ICall_ServiceEnum src;
@@ -581,19 +581,19 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
ICall_freeMsg(message);
}
}
}
// If RTOS queue is not empty, process app message.
while (!Queue_empty(application_message_queue)) {
sbpEvt_t *message = (sbpEvt_t *)Util_dequeueMsg(application_message_queue);
if (message) {
// Process message.
SimpleBLEPeripheral_processAppMsg(message);
// If RTOS queue is not empty, process app message.
while (!Queue_empty(application_message_queue)) {
sbpEvt_t *message = (sbpEvt_t *)Util_dequeueMsg(application_message_queue);
if (message) {
// Process message.
SimpleBLEPeripheral_processAppMsg(message);
// Free the space from the message.
ICall_free(message);
}
// Free the space from the message.
ICall_free(message);
}
}
if (EVENT_MASK > 0) {
headstage_event_handle();
}
@@ -629,22 +629,21 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
*/
static uint8_t SimpleBLEPeripheral_processStackMsg(ICall_Hdr *message) {
switch (message->event) {
case GATT_MSG_EVENT:
// Process GATT message
return SimpleBLEPeripheral_processGATTMsg((gattMsgEvent_t *)message);
case GATT_MSG_EVENT:
// Process GATT message
return SimpleBLEPeripheral_processGATTMsg((gattMsgEvent_t *)message);
case HCI_GAP_EVENT_EVENT:{ // GAP event
switch(message->event)
{
case HCI_GAP_EVENT_EVENT: { // GAP event
switch (message->event) {
case HCI_EXT_SET_MAX_DATA_LENGTH_EVENT: {
break;
}
break;
}
default:
break;
}
}
default:
return TRUE;
default:
return TRUE;
}
}
@@ -677,9 +676,10 @@ static uint8_t SimpleBLEPeripheral_processGATTMsg(gattMsgEvent_t *message) {
} else if (message->method == ATT_MTU_UPDATED_EVENT) {
// MTU size updated
headstage_debug_buffer[10] = 0xff;
headstage_set_debug_information();
// headstage_data_length_extension();
// headstage_debug_buffer[10] = 0xff;
// headstage_set_debug_information();
} else if (message->method == ATT_HANDLE_VALUE_CFM) {
// quick pass
}
// Free message payload. Needed only for ATT Protocol messages
@@ -759,13 +759,13 @@ static void SimpleBLEPeripheral_freeAttRsp(uint8_t status) {
*/
static void SimpleBLEPeripheral_processAppMsg(sbpEvt_t *message) {
switch (message->hdr.event) {
case SBP_STATE_CHANGE_EVT:
SimpleBLEPeripheral_processStateChangeEvt((gaprole_States_t)message->hdr.state);
break;
case SBP_STATE_CHANGE_EVT:
SimpleBLEPeripheral_processStateChangeEvt((gaprole_States_t)message->hdr.state);
break;
case SBP_CHAR_CHANGE_EVT:
headstage_characteristic_updated(message->hdr.state);
break;
case SBP_CHAR_CHANGE_EVT:
headstage_characteristic_updated(message->hdr.state);
break;
}
}
@@ -793,77 +793,76 @@ static void SimpleBLEPeripheral_stateChangeCB(gaprole_States_t newState) {
*/
static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState) {
switch (newState) {
case GAPROLE_STARTED: { // Started but not advertising
uint8_t ownAddress[B_ADDR_LEN];
uint8_t systemId[DEVINFO_SYSTEM_ID_LEN];
case GAPROLE_STARTED: { // Started but not advertising
uint8_t ownAddress[B_ADDR_LEN];
uint8_t systemId[DEVINFO_SYSTEM_ID_LEN];
GAPRole_GetParameter(GAPROLE_BD_ADDR, ownAddress);
GAPRole_GetParameter(GAPROLE_BD_ADDR, ownAddress);
// use 6 bytes of device address for 8 bytes of system ID value
systemId[0] = ownAddress[0];
systemId[1] = ownAddress[1];
systemId[2] = ownAddress[2];
// use 6 bytes of device address for 8 bytes of system ID value
systemId[0] = ownAddress[0];
systemId[1] = ownAddress[1];
systemId[2] = ownAddress[2];
// set middle bytes to zero
systemId[4] = 0x00;
systemId[3] = 0x00;
// set middle bytes to zero
systemId[4] = 0x00;
systemId[3] = 0x00;
// shift three bytes up
systemId[7] = ownAddress[5];
systemId[6] = ownAddress[4];
systemId[5] = ownAddress[3];
// shift three bytes up
systemId[7] = ownAddress[5];
systemId[6] = ownAddress[4];
systemId[5] = ownAddress[3];
DevInfo_SetParameter(DEVINFO_SYSTEM_ID, DEVINFO_SYSTEM_ID_LEN, systemId);
DevInfo_SetParameter(DEVINFO_SYSTEM_ID, DEVINFO_SYSTEM_ID_LEN, systemId);
break;
}
case GAPROLE_CONNECTED: { // In a connection
linkDBInfo_t linkInfo;
uint8_t numActive = 0;
numActive = linkDB_NumActive();
headstage_led_spi_color(COLOR_CYAN);
uint16_t cxnHandle;
uint16_t requestedPDUSize = 251;
uint16_t requestTxTime = 2120;
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
if(SUCCESS != HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestTxTime)) {
break;
}
// Use numActive to determine the connection handle of the last
// connection
if (linkDB_GetInfo(numActive - 1, &linkInfo) == SUCCESS) {
} else {
uint8_t peerAddress[B_ADDR_LEN];
GAPRole_GetParameter(GAPROLE_CONN_BD_ADDR, peerAddress);
case GAPROLE_CONNECTED: { // In a connection
linkDBInfo_t linkInfo;
uint8_t numActive = 0;
numActive = linkDB_NumActive();
headstage_led_color(COLOR_RED);
uint16_t cxnHandle;
uint16_t requestedPDUSize = 251; // payload = 251 - 7 = 244 byte
uint16_t requestTxTime = 2120; // 2 ms
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
if (SUCCESS != HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestTxTime)) {
}
// Use numActive to determine the connection handle of the last
// connection
if (linkDB_GetInfo(numActive - 1, &linkInfo) == SUCCESS) {
} else {
uint8_t peerAddress[B_ADDR_LEN];
GAPRole_GetParameter(GAPROLE_CONN_BD_ADDR, peerAddress);
}
break;
}
flag_notify(EVT_CONNECTED);
break;
}
case GAPROLE_WAITING:
// Device is started but not advertising, is in waiting period before advertising again
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
break;
case GAPROLE_WAITING:
// Device is started but not advertising, is in waiting period before advertising again
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
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);
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
case GAPROLE_CONNECTED_ADV: // In a connection and advertising
default:
break;
case GAPROLE_WAITING_AFTER_TIMEOUT:
// Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
// disconnected
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
headstage_led_color(COLOR_RED);
CONNECT_HANDLE = 0xFFFF;
flag_notify(EVT_DISCONNECTED);
break;
case GAPROLE_ERROR: // Error occurred - invalid state
headstage_led_color(COLOR_RED);
break;
case GAPROLE_INIT: // Waiting to be started
case GAPROLE_ADVERTISING: // Currently Advertising
case GAPROLE_CONNECTED_ADV: // In a connection and advertising
default:
break;
}
}
@@ -939,4 +938,3 @@ static void SimpleBLEPeripheral_enqueueMsg(uint8_t event, uint8_t state) {
Util_enqueueMsg(application_message_queue, semaphore, (uint8 *)message);
}
}
@@ -304,57 +304,57 @@ bStatus_t SimpleProfile_RegisterAppCBs(simpleProfileCBs_t *appCallbacks) {
*/
bStatus_t SimpleProfile_SetParameter(uint8 param, uint8 len, void *value) {
switch (param) {
case SIMPLEPROFILE_CHAR1:
if (len <= SIMPLEPROFILE_CHAR1_LEN) {
memcpy(simpleProfileChar1, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR1:
if (len <= SIMPLEPROFILE_CHAR1_LEN) {
memcpy(simpleProfileChar1, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR2:
if (len <= SIMPLEPROFILE_CHAR2_LEN) {
memcpy(simpleProfileChar2, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR2:
if (len <= SIMPLEPROFILE_CHAR2_LEN) {
memcpy(simpleProfileChar2, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR3:
if (len <= SIMPLEPROFILE_CHAR3_LEN) {
memcpy(simpleProfileChar3, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR3:
if (len <= SIMPLEPROFILE_CHAR3_LEN) {
memcpy(simpleProfileChar3, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR4:
if (len <= SIMPLEPROFILE_CHAR4_LEN) {
memcpy(simpleProfileChar4, value, len);
case SIMPLEPROFILE_CHAR4:
if (len <= SIMPLEPROFILE_CHAR4_LEN) {
memcpy(simpleProfileChar4, value, len);
// See if Notification has been enabled
GATTServApp_ProcessCharCfg(simpleProfileChar4Config, //
simpleProfileChar4,
FALSE,
simpleProfileAttrTbl,
GATT_NUM_ATTRS(simpleProfileAttrTbl),
INVALID_TASK_ID,
simpleProfile_ReadAttrCB);
return SUCCESS;
} else {
return bleInvalidRange;
}
// See if Notification has been enabled
GATTServApp_ProcessCharCfg(simpleProfileChar4Config, //
simpleProfileChar4,
FALSE,
simpleProfileAttrTbl,
GATT_NUM_ATTRS(simpleProfileAttrTbl),
INVALID_TASK_ID,
simpleProfile_ReadAttrCB);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR5:
if (len <= SIMPLEPROFILE_CHAR5_LEN) {
memcpy(simpleProfileChar5, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
case SIMPLEPROFILE_CHAR5:
if (len <= SIMPLEPROFILE_CHAR5_LEN) {
memcpy(simpleProfileChar5, value, len);
return SUCCESS;
} else {
return bleInvalidRange;
}
default:
return INVALIDPARAMETER;
default:
return INVALIDPARAMETER;
}
}
@@ -373,28 +373,28 @@ bStatus_t SimpleProfile_SetParameter(uint8 param, uint8 len, void *value) {
*/
bStatus_t SimpleProfile_GetParameter(uint8 param, void *value) {
switch (param) {
case SIMPLEPROFILE_CHAR1:
memcpy(value, simpleProfileChar1, SIMPLEPROFILE_CHAR1_LEN);
break;
case SIMPLEPROFILE_CHAR1:
memcpy(value, simpleProfileChar1, SIMPLEPROFILE_CHAR1_LEN);
break;
case SIMPLEPROFILE_CHAR2:
memcpy(value, simpleProfileChar2, SIMPLEPROFILE_CHAR2_LEN);
break;
case SIMPLEPROFILE_CHAR2:
memcpy(value, simpleProfileChar2, SIMPLEPROFILE_CHAR2_LEN);
break;
case SIMPLEPROFILE_CHAR3:
memcpy(value, simpleProfileChar3, SIMPLEPROFILE_CHAR3_LEN);
break;
case SIMPLEPROFILE_CHAR3:
memcpy(value, simpleProfileChar3, SIMPLEPROFILE_CHAR3_LEN);
break;
case SIMPLEPROFILE_CHAR4:
memcpy(value, simpleProfileChar4, SIMPLEPROFILE_CHAR4_LEN);
break;
case SIMPLEPROFILE_CHAR4:
memcpy(value, simpleProfileChar4, SIMPLEPROFILE_CHAR4_LEN);
break;
case SIMPLEPROFILE_CHAR5:
memcpy(value, simpleProfileChar5, SIMPLEPROFILE_CHAR5_LEN);
break;
case SIMPLEPROFILE_CHAR5:
memcpy(value, simpleProfileChar5, SIMPLEPROFILE_CHAR5_LEN);
break;
default:
return INVALIDPARAMETER;
default:
return INVALIDPARAMETER;
}
return SUCCESS;
@@ -433,31 +433,31 @@ static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle, //
// 16-bit UUID
uint16 uuid = BUILD_UINT16(pAttr->type.uuid[0], pAttr->type.uuid[1]);
switch (uuid) {
case SIMPLEPROFILE_CHAR1_UUID:
*pLen = SIMPLEPROFILE_CHAR1_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR1_LEN);
break;
case SIMPLEPROFILE_CHAR1_UUID:
*pLen = SIMPLEPROFILE_CHAR1_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR1_LEN);
break;
case SIMPLEPROFILE_CHAR2_UUID:
*pLen = SIMPLEPROFILE_CHAR2_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR2_LEN);
break;
case SIMPLEPROFILE_CHAR2_UUID:
*pLen = SIMPLEPROFILE_CHAR2_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR2_LEN);
break;
case SIMPLEPROFILE_CHAR4_UUID:
*pLen = SIMPLEPROFILE_CHAR4_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR4_LEN);
break;
case SIMPLEPROFILE_CHAR4_UUID:
*pLen = SIMPLEPROFILE_CHAR4_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR4_LEN);
break;
case SIMPLEPROFILE_CHAR5_UUID:
*pLen = SIMPLEPROFILE_CHAR5_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR5_LEN);
break;
case SIMPLEPROFILE_CHAR5_UUID:
*pLen = SIMPLEPROFILE_CHAR5_LEN;
memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR5_LEN);
break;
default:
// Should never get here! (characteristics 3 and 4 do not have read permissions)
*pLen = 0;
status = ATT_ERR_ATTR_NOT_FOUND;
break;
default:
// Should never get here! (characteristics 3 and 4 do not have read permissions)
*pLen = 0;
status = ATT_ERR_ATTR_NOT_FOUND;
break;
}
} else {
// 128-bit UUID
@@ -496,59 +496,59 @@ static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle, //
uint16 uuid = BUILD_UINT16(pAttr->type.uuid[0], pAttr->type.uuid[1]);
switch (uuid) {
case SIMPLEPROFILE_CHAR3_UUID:
case SIMPLEPROFILE_CHAR3_UUID:
// Validate the value
// Make sure it's not a blob oper
if (offset == 0) {
if (len >= SIMPLEPROFILE_CHAR3_LEN) {
status = ATT_ERR_INVALID_VALUE_SIZE;
// Validate the value
// Make sure it's not a blob oper
if (offset == 0) {
if (len >= SIMPLEPROFILE_CHAR3_LEN) {
status = ATT_ERR_INVALID_VALUE_SIZE;
}
} else {
status = ATT_ERR_ATTR_NOT_LONG;
}
} else {
status = ATT_ERR_ATTR_NOT_LONG;
}
// Write the value
if (status == SUCCESS) {
// Copy pValue into the variable we point to from the attribute table.
memcpy(pAttr->pValue + offset, pValue, len);
memset(pAttr->pValue + len, 0, SIMPLEPROFILE_CHAR3_LEN - len);
// Write the value
if (status == SUCCESS) {
// Copy pValue into the variable we point to from the attribute table.
memcpy(pAttr->pValue + offset, pValue, len);
memset(pAttr->pValue + len, 0, SIMPLEPROFILE_CHAR3_LEN - len);
if (pAttr->pValue == simpleProfileChar3) {
notifyApp = SIMPLEPROFILE_CHAR3;
if (pAttr->pValue == simpleProfileChar3) {
notifyApp = SIMPLEPROFILE_CHAR3;
}
}
}
break;
case SIMPLEPROFILE_CHAR5_UUID:
if (offset == 0) {
if (len >= SIMPLEPROFILE_CHAR5_LEN) {
status = ATT_ERR_INVALID_VALUE_SIZE;
break;
case SIMPLEPROFILE_CHAR5_UUID:
if (offset == 0) {
if (len >= SIMPLEPROFILE_CHAR5_LEN) {
status = ATT_ERR_INVALID_VALUE_SIZE;
}
} else {
status = ATT_ERR_ATTR_NOT_LONG;
}
} else {
status = ATT_ERR_ATTR_NOT_LONG;
}
// Write the value
if (status == SUCCESS) {
// Copy pValue into the variable we point to from the attribute table.
memcpy(pAttr->pValue + offset, pValue, len);
memset(pAttr->pValue + len, 0, SIMPLEPROFILE_CHAR5_LEN - len);
// Write the value
if (status == SUCCESS) {
// Copy pValue into the variable we point to from the attribute table.
memcpy(pAttr->pValue + offset, pValue, len);
memset(pAttr->pValue + len, 0, SIMPLEPROFILE_CHAR5_LEN - len);
if (pAttr->pValue == simpleProfileChar5) {
notifyApp = SIMPLEPROFILE_CHAR5;
if (pAttr->pValue == simpleProfileChar5) {
notifyApp = SIMPLEPROFILE_CHAR5;
}
}
}
break;
case GATT_CLIENT_CHAR_CFG_UUID:
status = GATTServApp_ProcessCCCWriteReq(connHandle, pAttr, pValue, len, offset, GATT_CLIENT_CFG_NOTIFY);
break;
break;
case GATT_CLIENT_CHAR_CFG_UUID:
status = GATTServApp_ProcessCCCWriteReq(connHandle, pAttr, pValue, len, offset, GATT_CLIENT_CFG_NOTIFY);
break;
default:
// Should never get here! (characteristics 2 and 4 do not have write permissions)
status = ATT_ERR_ATTR_NOT_FOUND;
break;
default:
// Should never get here! (characteristics 2 and 4 do not have write permissions)
status = ATT_ERR_ATTR_NOT_FOUND;
break;
}
} else {
// 128-bit UUID
@@ -84,7 +84,8 @@ extern "C" {
#define SIMPLEPROFILE_CHAR1_LEN 2
#define SIMPLEPROFILE_CHAR2_LEN 10
#define SIMPLEPROFILE_CHAR3_LEN 20
#define SIMPLEPROFILE_CHAR4_LEN 20
#define SIMPLEPROFILE_CHAR4_LEN 193
#define SIMPLEPROFILE_CHAR4_LEN 20 // 8 header + 3n data, n=3
#define SIMPLEPROFILE_CHAR5_LEN 20
/*********************************************************************