Compare commits
433 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a488e07da | |||
| a92cbf4b0f | |||
| a05a7d641d | |||
| f43d19b7d4 | |||
| de45c74a85 | |||
| bbc6c231a2 | |||
| eee1eb1cea | |||
| 269eb5b95a | |||
| 6de914294d | |||
| b49f9b6f7e | |||
| 055bebda3c | |||
| 412483456d | |||
| 4c4ea1e54d | |||
| 652f6103dc | |||
| 496e8b7c99 | |||
| 615b81d011 | |||
| 8ac902de28 | |||
| 821208d54d | |||
| 5a3d5aad21 | |||
| 1de5e6da72 | |||
| 8453dc2ae8 | |||
| ca26aa4b41 | |||
| f50f8a118a | |||
| 0e9a3442ac | |||
| 3f7700eb16 | |||
| ae46ccf786 | |||
| 4509b1acbd | |||
| 47701ebe63 | |||
| 29afc7062f | |||
| 7847d86b81 | |||
| a1a34e49b8 | |||
| cc315f09a1 | |||
| 66f317aeea | |||
| 74f9ee3959 | |||
| a847daccef | |||
| e7306a4c69 | |||
| af6aae0c4b | |||
| c4a286b41e | |||
| d805f8612a | |||
| 2aa3ebe25b | |||
| 8a32b7bc2b | |||
| 458602d05a | |||
| 4e01c27e8e | |||
| a71e456e81 | |||
| df1c1f9f7e | |||
| 06584e7d1c | |||
| 5ea5b16d89 | |||
| 10e2d12bc2 | |||
| 857388b204 | |||
| 78d788cab2 | |||
| 02185083f5 | |||
| aeca114c5f | |||
| 7b4f2b5828 | |||
| 7b075f40a3 | |||
| 6c68c67f0e | |||
| fd9f0ef321 | |||
| cb44628316 | |||
| 63fd8cf1df | |||
| cc39131466 | |||
| e71e064846 | |||
| 1356a8c8af | |||
| d9b6340f23 | |||
| 2709baf8e8 | |||
| 046fae3617 | |||
| 688868fb48 | |||
| 5967b6ebc6 | |||
| d9e9a2102e | |||
| 065517a7cc | |||
| 0691725819 | |||
| 5954a965dc | |||
| 788aca30ef | |||
| bda30b15b5 | |||
| 32523d6f88 | |||
| 300707871e | |||
| b21bdf57be | |||
| 3067a5eafe | |||
| ec4e48725c | |||
| 8322623699 | |||
| c588d4d377 | |||
| 9e23b67e03 | |||
| 0d4f77d25a | |||
| 0a16b06c78 | |||
| c6b6ff420d | |||
| 221c301739 | |||
| 5355e584a3 | |||
| 9fa2c0eb1a | |||
| 03a1e5a633 | |||
| 968150e9b7 | |||
| ef7484569d | |||
| 9cc483da5a | |||
| eb9609da00 | |||
| ea5c79cd77 | |||
| 4d4a0f5ce3 | |||
| cbeef5d00b | |||
| 433e9d27ec | |||
| 1e039a988a | |||
| 393051bfec | |||
| d0b51aef7a | |||
| c5e6739632 | |||
| b91fdc6d3f | |||
| d62b879a17 | |||
| 31306ee2a9 | |||
| 0346e37e50 | |||
| f004c60964 | |||
| 61c7827d93 | |||
| 4fcb7594d7 | |||
| 4d71181d78 | |||
| ed5e6d82fb | |||
| efc23e1393 | |||
| d8ce4418ae | |||
| fc5cebe638 | |||
| fb7811559b | |||
| a2e7049aa6 | |||
| f9e6fa7ad0 | |||
| e89dbd2f5c | |||
| 0b59913870 | |||
| d2e11c947a | |||
| 8c6968ec05 | |||
| b864235e5c | |||
| bd15523916 | |||
| 2f61a9ce99 | |||
| ed2edccbc1 | |||
| 59dc27dfda | |||
| 1f1b20f92f | |||
| 9a511e0fc1 | |||
| dff4082ea9 | |||
| a4e62ac39e | |||
| e119cfceb8 | |||
| 308d1c6ef3 | |||
| 89cd606529 | |||
| 0ed0c08878 | |||
| f1a3c290e9 | |||
| 47af16a2e2 | |||
| 3f885decac | |||
| fb58112ba7 | |||
| 9928f5281f | |||
| cf2944f651 | |||
| 5cfdec63e2 | |||
| 5defc984c2 | |||
| a0f7eff938 | |||
| 31a2dd0891 | |||
| 67b9a5be85 | |||
| 837bd99e86 | |||
| 507386a231 | |||
| 11b155070d | |||
| 91a9a315e4 | |||
| 85e2f6cf9d | |||
| f3301069ef | |||
| 7c1f558687 | |||
| 448a81bdf7 | |||
| 2712a2fa73 | |||
| 8151053d08 | |||
| 5e8f0af363 | |||
| 006d1c26b3 | |||
| 46f080e642 | |||
| 6088b102f8 | |||
| 7a59623930 | |||
| 4789a32fd4 | |||
| 4b6bea5f41 | |||
| da2b97dcf1 | |||
| 6aee724a7c | |||
| f1765d957c | |||
| 19e760f9cc | |||
| 04c7e8d640 | |||
| 813ef50bf5 | |||
| 8bc43f1bb0 | |||
| 50acc23eb1 | |||
| a26bad68a6 | |||
| f5796e8ac5 | |||
| c862e6790f | |||
| fb43ec6ac3 | |||
| e1aa33e6cb | |||
| fb3060a220 | |||
| be40ac25dc | |||
| 5a29b161ac | |||
| caee6602a8 | |||
| 12c4908881 | |||
| cb0b0fafd0 | |||
| 633b3424e1 | |||
| c75a147392 | |||
| 1e71de284c | |||
| 3bfadb0ea5 | |||
| a22a1aa656 | |||
| ac8f1af1cc | |||
| 42b5edd2bf | |||
| cafa70e740 | |||
| 7ecc6063ac | |||
| 1c5e586bd9 | |||
| 9861067a17 | |||
| 295abacf7c | |||
| 6b5dfcc12a | |||
| 8aab5b5aab | |||
| 776e40b639 | |||
| a97909625d | |||
| 259170af20 | |||
| b929433eef | |||
| b166235c21 | |||
| 37ad0160d0 | |||
| d40891396d | |||
| 4f31028d1a | |||
| 8727b7d2eb | |||
| 39e012de64 | |||
| 48e566dea4 | |||
| 3f617786ef | |||
| 080ca80f2b | |||
| 4875bb271a | |||
| b0ac5bb6e6 | |||
| 8b6a402d47 | |||
| aefb2cffbb | |||
| 6934d858fe | |||
| bc28dedc64 | |||
| 92b81cb47f | |||
| e9b5414ab0 | |||
| d3f6a6521a | |||
| 13efb6c32a | |||
| 18e4cac845 | |||
| f6a474e537 | |||
| 311bbdd809 | |||
| e47cf7c3db | |||
| b27718a30f | |||
| be79bec5e0 | |||
| a551eb1143 | |||
| ddc51481b8 | |||
| d8a567c607 | |||
| 776d8074b1 | |||
| e0f937be45 | |||
| 2d7bbb74aa | |||
| 03367a76cf | |||
| 8fffec3116 | |||
| d7210e3b5a | |||
| 82834f30b0 | |||
| 50fbaa5bc7 | |||
| 696f6447dc | |||
| 60734c69b4 | |||
| ddf22de09b | |||
| e169ed1d44 | |||
| 55759938da | |||
| 45de2e6825 | |||
| 4c0e7e2149 | |||
| b63989ca78 | |||
| c2df81dd3b | |||
| 7d6a0ce845 | |||
| 2c9105eb0a | |||
| 0d705b7d28 | |||
| 266e597e19 | |||
| 92d49c1f93 | |||
| c40adb3b64 | |||
| 44e5f54c50 | |||
| c642325859 | |||
| c3adc55aec | |||
| 8700625d69 | |||
| bc4dcfbe7d | |||
| 43170a4282 | |||
| 3652e19a3d | |||
| 36e6a47472 | |||
| c71c55ecf1 | |||
| 57a5b2b4f5 | |||
| 0da311941b | |||
| 7965a4cc1d | |||
| 551f9de36b | |||
| fa8f0202e9 | |||
| ee35c54dec | |||
| 031b98a6d5 | |||
| 82ab990f0b | |||
| 38774d9201 | |||
| 6845963c8b | |||
| 4e4ce66318 | |||
| 6fe44a536f | |||
| 07272963bf | |||
| 80dbc64452 | |||
| 3a8c5d843a | |||
| bf4baa8200 | |||
| bf2b1b9d3e | |||
| 03391b4fb3 | |||
| 9040e85dbb | |||
| 85021a88b0 | |||
| a5df1c227e | |||
| 8213d9fb19 | |||
| 14c424571a | |||
| 8a94a57843 | |||
| a58f787253 | |||
| 6c839b22d9 | |||
| c086de7cf4 | |||
| 3c5f4d9bb4 | |||
| f3037c7959 | |||
| 5a519d5fb5 | |||
| a16543ee57 | |||
| 9d281ce999 | |||
| d97b3ad6b0 | |||
| cad1763981 | |||
| 092c02940d | |||
| 0a19abd0e8 | |||
| 284cfe6d05 | |||
| 3298b6226b | |||
| dfcaf2d908 | |||
| d517318a67 | |||
| d0aa520329 | |||
| 9a875b8459 | |||
| 73ac2f5c90 | |||
| efcb1132de | |||
| 7492ed161d | |||
| ae7ec2e5ce | |||
| 63fde4bdbc | |||
| 32ccb8838f | |||
| 5b6fd53830 | |||
| 86eef98b13 | |||
| 3fdbfcf39f | |||
| 847ea9f3c0 | |||
| 25bd5b5ebe | |||
| 335fe6a9a4 | |||
| 6a0480613c | |||
| 300fb9a44c | |||
| 4fac2aa380 | |||
| d2ab4c1fe8 | |||
| 6048e10ab7 | |||
| 6bd94e3f73 | |||
| fc302d4c75 | |||
| 26a35a1446 | |||
| 8f2eda7281 | |||
| e26a97a32f | |||
| 5bdb0b04da | |||
| 8f8407601e | |||
| 4c6dbcf98d | |||
| 20ccd5de56 | |||
| 3c3ad8ccc7 | |||
| 1030d6625b | |||
| 326f3eb6b6 | |||
| 9dd7228eb5 | |||
| 59ac6b9909 | |||
| e24ce8e5d5 | |||
| 8720300bfc | |||
| 23fc75a236 | |||
| 80c25267cb | |||
| 81d1aff615 | |||
| 3221fe6492 | |||
| 4ca7d5b681 | |||
| 49677aa5b1 | |||
| bbfef99a65 | |||
| 05f11fd147 | |||
| f0aedf786d | |||
| a12146a479 | |||
| 410bef2e23 | |||
| 17c6a506cb | |||
| 0b9c945aee | |||
| 53ef219d6e | |||
| a14b2480db | |||
| 89368d5352 | |||
| f7903a0a31 | |||
| 56f42d21c5 | |||
| 52a8baad08 | |||
| 7acdbf6e78 | |||
| 393394be6f | |||
| b7f305e378 | |||
| cad8a78164 | |||
| 0c4ebcac79 | |||
| e700657d5d | |||
| ea9fb92d53 | |||
| ba215c7ca9 | |||
| 564dc6e266 | |||
| 86a2e54694 | |||
| 358950bec0 | |||
| de2cb269b7 | |||
| 151e829973 | |||
| 19121b55a7 | |||
| 31f03582a3 | |||
| 0859f6da6d | |||
| 120b7086e5 | |||
| d393872d8c | |||
| 3ab9afdcd3 | |||
| 8812b4c103 | |||
| 4cccced7ac | |||
| 7b3d342be6 | |||
| 97409c88c3 | |||
| 1d675d9d78 | |||
| 1774a255d8 | |||
| 1863016b63 | |||
| 1e89a540a1 | |||
| 5daa67e054 | |||
| 05ce7f7f44 | |||
| 9391c700a1 | |||
| 16c4ecf9f2 | |||
| 7280f76fae | |||
| 3a5d40a5d9 | |||
| 40dd596fef | |||
| 56b240b101 | |||
| bf36103499 | |||
| 477144dc24 | |||
| 0aa45cfedc | |||
| 4691345831 | |||
| 8445f8c263 | |||
| 7176f91a3f | |||
| e37065ce91 | |||
| 2537b76256 | |||
| 59e275c997 | |||
| bfe61896e8 | |||
| 0ad8b13db2 | |||
| 3c8abc04a8 | |||
| a48cf75c90 | |||
| 4f7017d5b2 | |||
| 79f0d57161 | |||
| d76e8e6f3f | |||
| b6147c1fe5 | |||
| 4bbd92127a | |||
| 337c2aef8d | |||
| e943d22a5f | |||
| bceb8b9134 | |||
| 14adc8a768 | |||
| 7c44ad2272 | |||
| c8272dd455 | |||
| cb2aa2126b | |||
| f74a412611 | |||
| f0b92f8578 | |||
| e7cae7dc21 | |||
| 1c41bd7a45 | |||
| a671a4916d | |||
| 15ea1488c9 | |||
| f92dd743ef | |||
| eddbe3980a | |||
| b27df1489b | |||
| dc3f2ee046 | |||
| ba7f03daeb | |||
| 079500faff | |||
| ce0defe5e9 | |||
| 7b1bcd5147 | |||
| 787eb5dce1 | |||
| 9d73fab37e | |||
| 6a833aabee | |||
| e40d0896b8 | |||
| c265eb0118 | |||
| cead3b0b5c | |||
| 238c09befd | |||
| de1867d523 | |||
| 906e02e265 |
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
#path=$(pwd)
|
||||
#folder=$($path | awk -F"/" '{$NF}')
|
||||
folder=$(basename "$(pwd)")
|
||||
|
||||
if [ "$folder" == "bioprocc2650" ]; then
|
||||
year=$(date +%-y)
|
||||
month=$(date +%-m)
|
||||
day=$(date +%-d)
|
||||
hour=$(date +%-H)
|
||||
minute=$(date +%-M)
|
||||
|
||||
hash=$(git rev-parse HEAD)
|
||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
sed -i "5c #define VERSION_DATE_YEAR ${year}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "6c #define VERSION_DATE_MONTH ${month}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "7c #define VERSION_DATE_DAY ${day}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "8c #define VERSION_DATE_HOUR ${hour}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "9c #define VERSION_DATE_MINUTE ${minute}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "13c #define VERSION_HASH ${hash}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
sed -i "14c #define VERSION_GIT_BRANCH ${branch}"\
|
||||
./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
|
||||
#cat ./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h
|
||||
fi
|
||||
+19
File diff suppressed because one or more lines are too long
+32
@@ -0,0 +1,32 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//FlashROM/Application/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Application/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/Display/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/Display/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/ECC/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/ECC/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/PIN/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/PIN/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/RF/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/RF/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/SPI/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/SPI/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/TRNG/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/TRNG/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/UART/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/UART/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/UDMA/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Drivers/UDMA/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/ICall/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/ICall/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/ICallBLE/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/ICallBLE/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/PROFILES/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/PROFILES/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/Startup/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/Startup/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/TOOLS/subdir_rules.mk=UTF-8
|
||||
encoding//FlashROM/TOOLS/subdir_vars.mk=UTF-8
|
||||
encoding//FlashROM/makefile=UTF-8
|
||||
encoding//FlashROM/objects.mk=UTF-8
|
||||
encoding//FlashROM/sources.mk=UTF-8
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
<configuration XML_version="1.2" id="Texas Instruments 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">
|
||||
<instance XML_version="1.2" desc="CC2650F128_0" href="devices/cc2650f128.xml" id="CC2650F128_0" xml="cc2650f128.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
||||
@@ -0,0 +1 @@
|
||||
This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project.
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# This file was generated based on the configuration script:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_central\ccs\config\app_ble.cfg
|
||||
#
|
||||
# This makefile may be included in other makefiles that need to build
|
||||
# the libraries containing the compiled source files generated as
|
||||
# part of the configuration step.
|
||||
|
||||
#
|
||||
# ======== GEN_SRC_DIR =========
|
||||
# The path to the sources generated during configuration
|
||||
#
|
||||
# This path must be either absolute or relative to the build directory.
|
||||
#
|
||||
# The absolute path to the generated source directory (at the time the
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_central\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
endif
|
||||
|
||||
#
|
||||
# ======== .force ========
|
||||
# The .force goal is used to force the build of any goal that names it as
|
||||
# a prerequisite
|
||||
#
|
||||
.PHONY: .force
|
||||
|
||||
#
|
||||
# ======== library macros ========
|
||||
#
|
||||
sysbios_SRC = $(GEN_SRC_DIR)/sysbios
|
||||
sysbios_LIB = $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
#
|
||||
# ======== dependencies ========
|
||||
#
|
||||
all: $(sysbios_LIB)
|
||||
clean: .sysbios_clean
|
||||
|
||||
|
||||
# ======== convenient build goals ========
|
||||
.PHONY: sysbios
|
||||
sysbios: $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
# CDT managed make executables depend on $(OBJS)
|
||||
OBJS += $(sysbios_LIB)
|
||||
|
||||
#
|
||||
# ======== rules ========
|
||||
#
|
||||
$(sysbios_LIB): .force
|
||||
@echo making $@ ...
|
||||
@$(MAKE) -C $(sysbios_SRC)
|
||||
|
||||
.sysbios_clean:
|
||||
@echo cleaning $(sysbios_SRC) ...
|
||||
-@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+107
@@ -0,0 +1,107 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_knl_Task_moduleStateCheckFlag__D=FALSE -Dti_sysbios_knl_Task_objectCheckFlag__D=FALSE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=6 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=6 -Dti_sysbios_knl_Task_checkStackFlag__D=FALSE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_DYNAMIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=FALSE -Dxdc_runtime_Assert_DISABLE_ALL -Dxdc_runtime_Log_DISABLE_ALL
|
||||
|
||||
BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
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.3.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/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/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.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo asmem3 $< ...
|
||||
@$(ASM) $(BIOS_DEFS) $(XOPTS) $(INCS) $<
|
||||
endef
|
||||
|
||||
all: rom_sysbios.aem3
|
||||
|
||||
m3_Hwi_asm.obj: family/arm/m3/Hwi_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm.obj
|
||||
|
||||
m3_Hwi_asm_switch.obj: family/arm/m3/Hwi_asm_switch.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm_switch.obj
|
||||
|
||||
m3_IntrinsicsSupport_asm.obj: family/arm/m3/IntrinsicsSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_IntrinsicsSupport_asm.obj
|
||||
|
||||
m3_TaskSupport_asm.obj: family/arm/m3/TaskSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_TaskSupport_asm.obj
|
||||
|
||||
|
||||
rom_sysbios.obj: BIOS.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/Mailbox.c knl/Queue.c knl/Semaphore.c knl/Swi.c knl/Swi_andn.c knl/Task.c family/arm/m3/Hwi.c family/arm/m3/TaskSupport.c family/arm/cc26xx/Boot.c family/arm/cc26xx/Timer.c family/arm/cc26xx/TimestampProvider.c hal/Hwi.c hal/Hwi_stack.c hal/Hwi_startup.c gates/GateHwi.c gates/GateMutex.c heaps/HeapMem.c xdc/runtime/xdc_noinit.c xdc/runtime/Assert.c xdc/runtime/Core-mem.c xdc/runtime/Core-smem.c xdc/runtime/Core-label.c xdc/runtime/Core-params.c xdc/runtime/Diags.c xdc/runtime/Error.c xdc/runtime/Gate.c xdc/runtime/Log.c xdc/runtime/Memory.c xdc/runtime/Registry.c xdc/runtime/Startup.c xdc/runtime/System.c xdc/runtime/SysCallback.c xdc/runtime/Text.c xdc/runtime/Timestamp.c makefile
|
||||
@-$(call RM, $@)
|
||||
@echo clem3 $< ...
|
||||
@$(CC) $(BIOS_DEFS) $(XOPTS) $(INCS) --output_file=rom_sysbios.obj \
|
||||
$(BIOS_ROOT)BIOS.c \
|
||||
$(BIOS_ROOT)knl/Clock.c \
|
||||
$(BIOS_ROOT)knl/Idle.c \
|
||||
$(BIOS_ROOT)knl/Intrinsics.c \
|
||||
$(BIOS_ROOT)knl/Event.c \
|
||||
$(BIOS_ROOT)knl/Mailbox.c \
|
||||
$(BIOS_ROOT)knl/Queue.c \
|
||||
$(BIOS_ROOT)knl/Semaphore.c \
|
||||
$(BIOS_ROOT)knl/Swi.c \
|
||||
$(BIOS_ROOT)knl/Swi_andn.c \
|
||||
$(BIOS_ROOT)knl/Task.c \
|
||||
$(BIOS_ROOT)family/arm/m3/Hwi.c \
|
||||
$(BIOS_ROOT)family/arm/m3/TaskSupport.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Boot.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Timer.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/TimestampProvider.c \
|
||||
$(BIOS_ROOT)hal/Hwi.c \
|
||||
$(BIOS_ROOT)hal/Hwi_stack.c \
|
||||
$(BIOS_ROOT)hal/Hwi_startup.c \
|
||||
$(BIOS_ROOT)gates/GateHwi.c \
|
||||
$(BIOS_ROOT)gates/GateMutex.c \
|
||||
$(BIOS_ROOT)heaps/HeapMem.c \
|
||||
$(XDC_ROOT)xdc/runtime/xdc_noinit.c \
|
||||
$(XDC_ROOT)xdc/runtime/Assert.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-mem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-smem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-label.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-params.c \
|
||||
$(XDC_ROOT)xdc/runtime/Diags.c \
|
||||
$(XDC_ROOT)xdc/runtime/Error.c \
|
||||
$(XDC_ROOT)xdc/runtime/Gate.c \
|
||||
$(XDC_ROOT)xdc/runtime/Log.c \
|
||||
$(XDC_ROOT)xdc/runtime/Memory.c \
|
||||
$(XDC_ROOT)xdc/runtime/Registry.c \
|
||||
$(XDC_ROOT)xdc/runtime/Startup.c \
|
||||
$(XDC_ROOT)xdc/runtime/System.c \
|
||||
$(XDC_ROOT)xdc/runtime/SysCallback.c \
|
||||
$(XDC_ROOT)xdc/runtime/Text.c \
|
||||
$(XDC_ROOT)xdc/runtime/Timestamp.c \
|
||||
|
||||
rom_sysbios.aem3: rom_sysbios.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj
|
||||
@-$(call RM, $@)
|
||||
@echo arem3 $^ ...
|
||||
@$(AR) $@ $^ C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
|
||||
|
||||
clean:
|
||||
@$(DEL) ..\makefile.libs
|
||||
@-$(call RM, *)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -9,6 +9,6 @@
|
||||
<linkerCommandFile value="cc26x0f128.cmd"/>
|
||||
<rts value="libc.a"/>
|
||||
<createSlaveProjects value=""/>
|
||||
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
|
||||
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
|
||||
<isTargetManual value="false"/>
|
||||
</projectOptions>
|
||||
|
||||
+55
-55
@@ -18,8 +18,8 @@
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.rtsc.XDCtools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137" name="FlashROM" parent="com.ti.ccstudio.buildDefinitions.TMS470.Default" postbuildStep="${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out" prebuildStep="">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1369151231" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.223507680">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732777020" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1345831464" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.910616164">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2045697190" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC2650F128"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
@@ -34,17 +34,17 @@
|
||||
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
|
||||
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.579299287" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="18.1.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.2112816025" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.1418617668" name="GNU Make.FlashROM" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.1368914557" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.872349905" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.1023813954" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.1674413144" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.184317276" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.1068578615" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.1943600764" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.644525479" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.283826897" 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.125763109" 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.1419681234" 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.1291803638" 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.2050886614" 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.1108409502" 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.334261891" 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.1886558187" 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.325362832" 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.1194031570" 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.443206607" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
<listOptionValue builtIn="false" value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
|
||||
@@ -70,7 +70,7 @@
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1330623088" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1547880768" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
|
||||
@@ -86,71 +86,71 @@
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1308360247" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.504235202" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.105967788" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.698913237" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.928393719" 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.1740295419" 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.1102035795" 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.1736078204" 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.1399241416" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.1575880763" 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.867926379" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.980626282" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.374992114" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1890491357" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.726507594" 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.1058654511" 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.972819601" 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.944616200" 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.263445006" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1235873701" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.207268648" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.1068957263" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.1336528024" 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.310070475" 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.1323022718" 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.773203741" 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.223507680" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.698430423" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE" value="256" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.402182782" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE" value="0" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1628689699" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.2141951901" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.679112687" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.910616164" 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.1947116251" 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.354964589" 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.1878826793" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1081885439" 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.311400946" 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.650613345" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.2054742586" 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.782343525" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.833241141" 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.1555270082" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.16105060" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.1713299511" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.68776981" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1860389255" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.152379533" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.158095632" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.978853236" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1522953205" 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.166010556" 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.2046832453" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.208128926" 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.1609127336" 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.2139872640" 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.1444790082" 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.2050319754" 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.2015106526" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1270425102" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.16813235" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.318851558" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.1833311544" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.908921763" 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.841633372" 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.1321597545" 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.927640565" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1908494509" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
|
||||
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.849185486" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1218482091" 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.1746187707" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.884959194" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.943624305" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1521167272" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1901654533" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.138005453" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.267298049" 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.208966345" 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.1031058644" 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.914575284" 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.155421236" 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.694278174" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
|
||||
+14
-15
@@ -1,20 +1,19 @@
|
||||
<?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 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"/>
|
||||
<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"/>
|
||||
</choice>
|
||||
</property>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -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>
|
||||
|
||||
+45
-45
@@ -15,8 +15,8 @@
|
||||
<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=""${TOOLS_BLE}/lib_search/lib_search.exe" ${ORG_PROJ_DIR}/build_config.opt "${TOOLS_BLE}/lib_search/params_split_cc2640.xml" ${SRC_BLE_CORE}/../blelib "${ORG_PROJ_DIR}/../../ccs/config/lib_linker.cmd"">
|
||||
<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">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1995933290" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.712529365">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.642166892" 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"/>
|
||||
@@ -26,17 +26,17 @@
|
||||
<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" 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" 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.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" 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" 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" 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" 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" 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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.2118383476" 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.1311223475" 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.2068086094" 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.106957297" 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.713283235" 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.1841804875" 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.1173627832" 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.566365077" 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.1988132749" 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.27459190" 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.1989794583" 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"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
<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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1807944232" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CC26XX"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="CC26XXWARE"/>
|
||||
@@ -81,60 +81,60 @@
|
||||
<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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.2073917641" 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.1725374228" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.883225147" 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" 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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.267030585" 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.869787934" 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.2013885834" 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"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.943131176" 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.1011898502" 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.470067069" 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.1944011103" 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" 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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.829303802" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.712529365" 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.628427859" 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.1500606998" 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.18052251" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1548460288" 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.419310182" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1951932064" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.807068870" 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" 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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT.1153340314" 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" 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" 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"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.2093334093" 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.890975428" 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.1465739067" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.ENTRY_POINT.1076183415" 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.1301855062" 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.1025070308" 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.98059634" 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.428150924" 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.989938850" 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" 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" 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" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.342284887" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1524223690" 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.797560737" 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.1167041718" 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>
|
||||
|
||||
+1
@@ -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>
|
||||
|
||||
+15
-14
@@ -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">
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project.
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# This file was generated based on the configuration script:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\throughput_example_central\ccs\config\app_ble.cfg
|
||||
#
|
||||
# This makefile may be included in other makefiles that need to build
|
||||
# the libraries containing the compiled source files generated as
|
||||
# part of the configuration step.
|
||||
|
||||
#
|
||||
# ======== GEN_SRC_DIR =========
|
||||
# The path to the sources generated during configuration
|
||||
#
|
||||
# This path must be either absolute or relative to the build directory.
|
||||
#
|
||||
# The absolute path to the generated source directory (at the time the
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\throughput_example_central\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650lp/throughput_example_central/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
endif
|
||||
|
||||
#
|
||||
# ======== .force ========
|
||||
# The .force goal is used to force the build of any goal that names it as
|
||||
# a prerequisite
|
||||
#
|
||||
.PHONY: .force
|
||||
|
||||
#
|
||||
# ======== library macros ========
|
||||
#
|
||||
sysbios_SRC = $(GEN_SRC_DIR)/sysbios
|
||||
sysbios_LIB = $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
#
|
||||
# ======== dependencies ========
|
||||
#
|
||||
all: $(sysbios_LIB)
|
||||
clean: .sysbios_clean
|
||||
|
||||
|
||||
# ======== convenient build goals ========
|
||||
.PHONY: sysbios
|
||||
sysbios: $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
# CDT managed make executables depend on $(OBJS)
|
||||
OBJS += $(sysbios_LIB)
|
||||
|
||||
#
|
||||
# ======== rules ========
|
||||
#
|
||||
$(sysbios_LIB): .force
|
||||
@echo making $@ ...
|
||||
@$(MAKE) -C $(sysbios_SRC)
|
||||
|
||||
.sysbios_clean:
|
||||
@echo cleaning $(sysbios_SRC) ...
|
||||
-@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+107
@@ -0,0 +1,107 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_knl_Task_moduleStateCheckFlag__D=FALSE -Dti_sysbios_knl_Task_objectCheckFlag__D=FALSE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=6 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=6 -Dti_sysbios_knl_Task_checkStackFlag__D=FALSE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_DYNAMIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=FALSE -Dxdc_runtime_Assert_DISABLE_ALL -Dxdc_runtime_Log_DISABLE_ALL
|
||||
|
||||
BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
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/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/Users/antoz/workspace_v8/throughput_example_central_cc2650lp_app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/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/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/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include" -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.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo asmem3 $< ...
|
||||
@$(ASM) $(BIOS_DEFS) $(XOPTS) $(INCS) $<
|
||||
endef
|
||||
|
||||
all: rom_sysbios.aem3
|
||||
|
||||
m3_Hwi_asm.obj: family/arm/m3/Hwi_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm.obj
|
||||
|
||||
m3_Hwi_asm_switch.obj: family/arm/m3/Hwi_asm_switch.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm_switch.obj
|
||||
|
||||
m3_IntrinsicsSupport_asm.obj: family/arm/m3/IntrinsicsSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_IntrinsicsSupport_asm.obj
|
||||
|
||||
m3_TaskSupport_asm.obj: family/arm/m3/TaskSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_TaskSupport_asm.obj
|
||||
|
||||
|
||||
rom_sysbios.obj: BIOS.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/Mailbox.c knl/Queue.c knl/Semaphore.c knl/Swi.c knl/Swi_andn.c knl/Task.c family/arm/m3/Hwi.c family/arm/m3/TaskSupport.c family/arm/cc26xx/Boot.c family/arm/cc26xx/Timer.c family/arm/cc26xx/TimestampProvider.c hal/Hwi.c hal/Hwi_stack.c hal/Hwi_startup.c gates/GateHwi.c gates/GateMutex.c heaps/HeapMem.c xdc/runtime/xdc_noinit.c xdc/runtime/Assert.c xdc/runtime/Core-mem.c xdc/runtime/Core-smem.c xdc/runtime/Core-label.c xdc/runtime/Core-params.c xdc/runtime/Diags.c xdc/runtime/Error.c xdc/runtime/Gate.c xdc/runtime/Log.c xdc/runtime/Memory.c xdc/runtime/Registry.c xdc/runtime/Startup.c xdc/runtime/System.c xdc/runtime/SysCallback.c xdc/runtime/Text.c xdc/runtime/Timestamp.c makefile
|
||||
@-$(call RM, $@)
|
||||
@echo clem3 $< ...
|
||||
@$(CC) $(BIOS_DEFS) $(XOPTS) $(INCS) --output_file=rom_sysbios.obj \
|
||||
$(BIOS_ROOT)BIOS.c \
|
||||
$(BIOS_ROOT)knl/Clock.c \
|
||||
$(BIOS_ROOT)knl/Idle.c \
|
||||
$(BIOS_ROOT)knl/Intrinsics.c \
|
||||
$(BIOS_ROOT)knl/Event.c \
|
||||
$(BIOS_ROOT)knl/Mailbox.c \
|
||||
$(BIOS_ROOT)knl/Queue.c \
|
||||
$(BIOS_ROOT)knl/Semaphore.c \
|
||||
$(BIOS_ROOT)knl/Swi.c \
|
||||
$(BIOS_ROOT)knl/Swi_andn.c \
|
||||
$(BIOS_ROOT)knl/Task.c \
|
||||
$(BIOS_ROOT)family/arm/m3/Hwi.c \
|
||||
$(BIOS_ROOT)family/arm/m3/TaskSupport.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Boot.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Timer.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/TimestampProvider.c \
|
||||
$(BIOS_ROOT)hal/Hwi.c \
|
||||
$(BIOS_ROOT)hal/Hwi_stack.c \
|
||||
$(BIOS_ROOT)hal/Hwi_startup.c \
|
||||
$(BIOS_ROOT)gates/GateHwi.c \
|
||||
$(BIOS_ROOT)gates/GateMutex.c \
|
||||
$(BIOS_ROOT)heaps/HeapMem.c \
|
||||
$(XDC_ROOT)xdc/runtime/xdc_noinit.c \
|
||||
$(XDC_ROOT)xdc/runtime/Assert.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-mem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-smem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-label.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-params.c \
|
||||
$(XDC_ROOT)xdc/runtime/Diags.c \
|
||||
$(XDC_ROOT)xdc/runtime/Error.c \
|
||||
$(XDC_ROOT)xdc/runtime/Gate.c \
|
||||
$(XDC_ROOT)xdc/runtime/Log.c \
|
||||
$(XDC_ROOT)xdc/runtime/Memory.c \
|
||||
$(XDC_ROOT)xdc/runtime/Registry.c \
|
||||
$(XDC_ROOT)xdc/runtime/Startup.c \
|
||||
$(XDC_ROOT)xdc/runtime/System.c \
|
||||
$(XDC_ROOT)xdc/runtime/SysCallback.c \
|
||||
$(XDC_ROOT)xdc/runtime/Text.c \
|
||||
$(XDC_ROOT)xdc/runtime/Timestamp.c \
|
||||
|
||||
rom_sysbios.aem3: rom_sysbios.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj
|
||||
@-$(call RM, $@)
|
||||
@echo arem3 $^ ...
|
||||
@$(AR) $@ $^ C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
|
||||
|
||||
clean:
|
||||
@$(DEL) ..\makefile.libs
|
||||
@-$(call RM, *)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project.
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# This file was generated based on the configuration script:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\throughput_example_peripheral\ccs\config\app_ble.cfg
|
||||
#
|
||||
# This makefile may be included in other makefiles that need to build
|
||||
# the libraries containing the compiled source files generated as
|
||||
# part of the configuration step.
|
||||
|
||||
#
|
||||
# ======== GEN_SRC_DIR =========
|
||||
# The path to the sources generated during configuration
|
||||
#
|
||||
# This path must be either absolute or relative to the build directory.
|
||||
#
|
||||
# The absolute path to the generated source directory (at the time the
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\throughput_example_peripheral\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650lp/throughput_example_peripheral/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
endif
|
||||
|
||||
#
|
||||
# ======== .force ========
|
||||
# The .force goal is used to force the build of any goal that names it as
|
||||
# a prerequisite
|
||||
#
|
||||
.PHONY: .force
|
||||
|
||||
#
|
||||
# ======== library macros ========
|
||||
#
|
||||
sysbios_SRC = $(GEN_SRC_DIR)/sysbios
|
||||
sysbios_LIB = $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
#
|
||||
# ======== dependencies ========
|
||||
#
|
||||
all: $(sysbios_LIB)
|
||||
clean: .sysbios_clean
|
||||
|
||||
|
||||
# ======== convenient build goals ========
|
||||
.PHONY: sysbios
|
||||
sysbios: $(GEN_SRC_DIR)/sysbios/rom_sysbios.aem3
|
||||
|
||||
# CDT managed make executables depend on $(OBJS)
|
||||
OBJS += $(sysbios_LIB)
|
||||
|
||||
#
|
||||
# ======== rules ========
|
||||
#
|
||||
$(sysbios_LIB): .force
|
||||
@echo making $@ ...
|
||||
@$(MAKE) -C $(sysbios_SRC)
|
||||
|
||||
.sysbios_clean:
|
||||
@echo cleaning $(sysbios_SRC) ...
|
||||
-@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+107
@@ -0,0 +1,107 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_knl_Task_moduleStateCheckFlag__D=FALSE -Dti_sysbios_knl_Task_objectCheckFlag__D=FALSE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=6 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=6 -Dti_sysbios_knl_Task_checkStackFlag__D=FALSE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_DYNAMIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=FALSE -Dxdc_runtime_Assert_DISABLE_ALL -Dxdc_runtime_Log_DISABLE_ALL
|
||||
|
||||
BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
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/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/Users/antoz/workspace_v8/throughput_example_peripheral_cc2650lp_app" --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/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include" -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.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo asmem3 $< ...
|
||||
@$(ASM) $(BIOS_DEFS) $(XOPTS) $(INCS) $<
|
||||
endef
|
||||
|
||||
all: rom_sysbios.aem3
|
||||
|
||||
m3_Hwi_asm.obj: family/arm/m3/Hwi_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm.obj
|
||||
|
||||
m3_Hwi_asm_switch.obj: family/arm/m3/Hwi_asm_switch.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_Hwi_asm_switch.obj
|
||||
|
||||
m3_IntrinsicsSupport_asm.obj: family/arm/m3/IntrinsicsSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_IntrinsicsSupport_asm.obj
|
||||
|
||||
m3_TaskSupport_asm.obj: family/arm/m3/TaskSupport_asm.sv7M makefile
|
||||
@-$(call RM, $@)
|
||||
$(ASSEMBLE) --output_file=m3_TaskSupport_asm.obj
|
||||
|
||||
|
||||
rom_sysbios.obj: BIOS.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/Mailbox.c knl/Queue.c knl/Semaphore.c knl/Swi.c knl/Swi_andn.c knl/Task.c family/arm/m3/Hwi.c family/arm/m3/TaskSupport.c family/arm/cc26xx/Boot.c family/arm/cc26xx/Timer.c family/arm/cc26xx/TimestampProvider.c hal/Hwi.c hal/Hwi_stack.c hal/Hwi_startup.c gates/GateHwi.c gates/GateMutex.c heaps/HeapMem.c xdc/runtime/xdc_noinit.c xdc/runtime/Assert.c xdc/runtime/Core-mem.c xdc/runtime/Core-smem.c xdc/runtime/Core-label.c xdc/runtime/Core-params.c xdc/runtime/Diags.c xdc/runtime/Error.c xdc/runtime/Gate.c xdc/runtime/Log.c xdc/runtime/Memory.c xdc/runtime/Registry.c xdc/runtime/Startup.c xdc/runtime/System.c xdc/runtime/SysCallback.c xdc/runtime/Text.c xdc/runtime/Timestamp.c makefile
|
||||
@-$(call RM, $@)
|
||||
@echo clem3 $< ...
|
||||
@$(CC) $(BIOS_DEFS) $(XOPTS) $(INCS) --output_file=rom_sysbios.obj \
|
||||
$(BIOS_ROOT)BIOS.c \
|
||||
$(BIOS_ROOT)knl/Clock.c \
|
||||
$(BIOS_ROOT)knl/Idle.c \
|
||||
$(BIOS_ROOT)knl/Intrinsics.c \
|
||||
$(BIOS_ROOT)knl/Event.c \
|
||||
$(BIOS_ROOT)knl/Mailbox.c \
|
||||
$(BIOS_ROOT)knl/Queue.c \
|
||||
$(BIOS_ROOT)knl/Semaphore.c \
|
||||
$(BIOS_ROOT)knl/Swi.c \
|
||||
$(BIOS_ROOT)knl/Swi_andn.c \
|
||||
$(BIOS_ROOT)knl/Task.c \
|
||||
$(BIOS_ROOT)family/arm/m3/Hwi.c \
|
||||
$(BIOS_ROOT)family/arm/m3/TaskSupport.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Boot.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/Timer.c \
|
||||
$(BIOS_ROOT)family/arm/cc26xx/TimestampProvider.c \
|
||||
$(BIOS_ROOT)hal/Hwi.c \
|
||||
$(BIOS_ROOT)hal/Hwi_stack.c \
|
||||
$(BIOS_ROOT)hal/Hwi_startup.c \
|
||||
$(BIOS_ROOT)gates/GateHwi.c \
|
||||
$(BIOS_ROOT)gates/GateMutex.c \
|
||||
$(BIOS_ROOT)heaps/HeapMem.c \
|
||||
$(XDC_ROOT)xdc/runtime/xdc_noinit.c \
|
||||
$(XDC_ROOT)xdc/runtime/Assert.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-mem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-smem.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-label.c \
|
||||
$(XDC_ROOT)xdc/runtime/Core-params.c \
|
||||
$(XDC_ROOT)xdc/runtime/Diags.c \
|
||||
$(XDC_ROOT)xdc/runtime/Error.c \
|
||||
$(XDC_ROOT)xdc/runtime/Gate.c \
|
||||
$(XDC_ROOT)xdc/runtime/Log.c \
|
||||
$(XDC_ROOT)xdc/runtime/Memory.c \
|
||||
$(XDC_ROOT)xdc/runtime/Registry.c \
|
||||
$(XDC_ROOT)xdc/runtime/Startup.c \
|
||||
$(XDC_ROOT)xdc/runtime/System.c \
|
||||
$(XDC_ROOT)xdc/runtime/SysCallback.c \
|
||||
$(XDC_ROOT)xdc/runtime/Text.c \
|
||||
$(XDC_ROOT)xdc/runtime/Timestamp.c \
|
||||
|
||||
rom_sysbios.aem3: rom_sysbios.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj
|
||||
@-$(call RM, $@)
|
||||
@echo arem3 $^ ...
|
||||
@$(AR) $@ $^ C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
|
||||
|
||||
clean:
|
||||
@$(DEL) ..\makefile.libs
|
||||
@-$(call RM, *)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+233
-7
@@ -12,7 +12,7 @@
|
||||
#define CMD_CURRENT_MEASURE 0xC5
|
||||
#define CMD_VOLT_MEASURE 0xD5
|
||||
#define CMD_DAC_MEASURE 0xE5
|
||||
#define CMD_BATTERY_MEASURE 0xF5
|
||||
#define CMD_BATTERY_MEASURE 0xF1
|
||||
|
||||
// controller command, these are command from control box
|
||||
#define ADC_CH_CURRENT 0x00
|
||||
@@ -62,24 +62,29 @@ static void ADC_read(uint8_t *ADCdata){
|
||||
|
||||
static void ADCGainControl(uint8_t ADCLevel){
|
||||
if(ADCLevel == 0){
|
||||
// ADC gain level = 0, using 200R resister
|
||||
// ADC gain level = 0, using 200K resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 0);
|
||||
}
|
||||
else if(ADCLevel == 1){
|
||||
// ADC gain level = 1, using 10K resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 1);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 0);
|
||||
}
|
||||
else if(ADCLevel == 2){
|
||||
// ADC gain level = 2, using 100R resister
|
||||
// ADC gain level = 2, using 200R resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 1);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 1);
|
||||
}
|
||||
else if(ADCLevel == 3){
|
||||
// ADC gain level = 0, auto gain (using 200R resister)
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 1);
|
||||
}
|
||||
else{
|
||||
// default using 200R resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,4 +126,225 @@ static void ADCChannelSelect(uint8_t ADCChannel){
|
||||
}
|
||||
}
|
||||
|
||||
static void ReadVolt(uint8_t *buf){
|
||||
// Read data twice since the first data we get is previous data
|
||||
ADCChannelSelect(ADC_CH_VOLT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
|
||||
ADCChannelSelect(ADC_CH_VOLT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
}
|
||||
|
||||
static void ReadVoutVolt(uint8_t *buf){
|
||||
// Read data twice since the first data we get is previous data
|
||||
ADCChannelSelect(ADC_CH_DAC);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
|
||||
ADCChannelSelect(ADC_CH_DAC);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
}
|
||||
|
||||
static void ReadCurrent(uint8_t *buf){
|
||||
// Read data twice since the first data we get is previous data
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
}
|
||||
|
||||
static void ReadBatVolt(uint8_t *buf){
|
||||
// Read data twice since the first data we get is previous data
|
||||
ADCChannelSelect(ADC_CH_BAT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
|
||||
ADCChannelSelect(ADC_CH_BAT);
|
||||
CPUdelay(10);
|
||||
ADC_read(buf);
|
||||
|
||||
uint16_t bat_volt;
|
||||
|
||||
bat_volt = (uint16_t) (buf[0] << 8) | (uint16_t) (buf[1]);
|
||||
CPUdelay(10);
|
||||
// Battery voltage < 3V, turn off Elite.
|
||||
if(bat_volt < 8200 && bat_volt > 200){
|
||||
PIN_setOutputValue(pin_handle, enable_5v, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// theoretical boundary <20, 10~500, >100 (uA)
|
||||
#define GAIN_SMALL_BOUNDARY 40000 // 40 uA = 40,000,000 pA
|
||||
#define GAIN_MID_BOUNDARY1 20000 // 20 uA = 20,000,000 pA
|
||||
#define GAIN_MID_BOUNDARY2 400000 // 400 uA = 400,000,000 pA
|
||||
#define GAIN_LARGE_BOUNDARY 200000 // 200 uA = 200,000 nA
|
||||
|
||||
//#define GAIN_SMALL_BOUNDARY 8000 // 8 uA = 8,000,000 pA
|
||||
//#define GAIN_MID_BOUNDARY1 3000 // 3 uA = 3,000,000 pA
|
||||
//#define GAIN_MID_BOUNDARY2 90000 // 90 uA = 90,000,000 pA
|
||||
//#define GAIN_LARGE_BOUNDARY 70000 // 70 uA = 70,000 nA
|
||||
|
||||
|
||||
static int32_t AutoGainReadCurrent(uint8_t *buf){
|
||||
int32_t Real_Current = 0;
|
||||
|
||||
if(INSTRUCTION.ADCGainLevel == GAIN_AUTO){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
}
|
||||
|
||||
if(INSTRUCTION.ADCGainLevel == GAIN_200R){
|
||||
uint8_t CurrentCount1 = 0;
|
||||
while(CurrentCount1 < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount1++;
|
||||
if(CurrentCount1 == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// switch to mid range current
|
||||
if(Real_Current < GAIN_LARGE_BOUNDARY && Real_Current > -1*GAIN_LARGE_BOUNDARY){
|
||||
uint8_t CurrentCount = 0;
|
||||
// switch to small range current
|
||||
if (Real_Current < GAIN_MID_BOUNDARY1 && Real_Current > -1*GAIN_MID_BOUNDARY1){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
while(CurrentCount < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
CurrentCount = 0;
|
||||
INSTRUCTION.ADCGainLevel = GAIN_10K;
|
||||
while(CurrentCount < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LED_color(DARKLED, 0x00, 0xFF, 0x00);
|
||||
|
||||
// // switch to small range current
|
||||
// if (Real_Current < GAIN_MID_BOUNDARY1 && Real_Current > -1*GAIN_MID_BOUNDARY1){
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
// ReadCurrent(spi_ADC_rxbuf);
|
||||
// Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
// LED_color(DARKLED, 0xFF, 0x00, 0x00);
|
||||
// }
|
||||
}
|
||||
}
|
||||
else if(INSTRUCTION.ADCGainLevel == GAIN_10K){
|
||||
uint8_t CurrentCount1 = 0;
|
||||
while(CurrentCount1 < 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount1++;
|
||||
if(CurrentCount1 == 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// switch to large range current
|
||||
if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){
|
||||
uint8_t CurrentCount = 0;
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
while(CurrentCount < 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// switch to small range current
|
||||
else if (Real_Current < GAIN_MID_BOUNDARY1 && Real_Current > -1*GAIN_MID_BOUNDARY1){
|
||||
uint8_t CurrentCount = 0;
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
while(CurrentCount < 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 3){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(INSTRUCTION.ADCGainLevel == GAIN_200K){
|
||||
uint8_t CurrentCount1 = 0;
|
||||
while(CurrentCount1 < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount1++;
|
||||
if(CurrentCount1 == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
|
||||
// switch to mid range current
|
||||
if(Real_Current > GAIN_SMALL_BOUNDARY || Real_Current < -1*GAIN_SMALL_BOUNDARY){
|
||||
uint8_t CurrentCount = 0;
|
||||
// switch to large range current
|
||||
if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
while(CurrentCount < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
CurrentCount = 0;
|
||||
INSTRUCTION.ADCGainLevel = GAIN_10K;
|
||||
while(CurrentCount < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CurrentCount++;
|
||||
if(CurrentCount == 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// switch to large range current
|
||||
// if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
// ReadCurrent(spi_ADC_rxbuf);
|
||||
// Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
// }
|
||||
}
|
||||
}
|
||||
return Real_Current;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef ELITECCC
|
||||
#define ELITECCC
|
||||
|
||||
#include "EliteCCMode.h"
|
||||
|
||||
|
||||
// XXX : should we reset DAC output after STOP?
|
||||
static void CCModeReverseCurrent(CCCMode *CCC){
|
||||
if(CCC->StandBy){
|
||||
if(CT.StandByCounter == CCC->StandByTime){
|
||||
CCC->StandBy = false;
|
||||
CT.StandByCounter = 0;
|
||||
}
|
||||
else{
|
||||
CT.StandByCounter ++;
|
||||
}
|
||||
}
|
||||
else{
|
||||
// reverse charge/discharge
|
||||
if(CCC->BatteryV == CCC->VMax){
|
||||
CCC->StandBy = true;
|
||||
CCC->value = CCC->DischargeCurrent;
|
||||
}
|
||||
else if(CCC->BatteryV == CCC->VMin){
|
||||
CCC->StandBy = true;
|
||||
CCC->value = CCC->ChargeCurrent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
+98
-276
@@ -2,309 +2,131 @@
|
||||
#ifndef ELITECCMODE
|
||||
#define ELITECCMODE
|
||||
|
||||
#define CURRENT_LV_FOUR 4
|
||||
#define CURRENT_LV_THREE 3
|
||||
#define CURRENT_LV_TWO 2
|
||||
#define CURRENT_LV_ONE 1
|
||||
#define CURRENT_LV_ZERO 0
|
||||
static void CCModeDACControl(CCMode *CC, int32_t IUC_Measure_Difference);
|
||||
|
||||
/*********************************************************************
|
||||
* @struct Constant Current Code
|
||||
*
|
||||
* @brief A struct to handle CC mode command
|
||||
*/
|
||||
typedef struct _CURRENT_USER_CODE {
|
||||
/** current level range: 0-4 **/
|
||||
// current level = 0 => 0-499 nA => ADCGainLevel = 200K
|
||||
// current level = 1 => 500-999 nA => ADCGainLevel = 10K
|
||||
// current level = 2 => 0-499 uA => ADCGainLevel = 10K
|
||||
// current level = 3 => 500-999 uA => ADCGainLevel = 200R
|
||||
// current level = 4 => 0-499 mA => ADCGainLevel = 200R
|
||||
uint8_t lv;
|
||||
static int32_t CCModeReadCurrent(CCMode *CC){
|
||||
|
||||
/** current value **/
|
||||
// current value divide current level into 50000 pieces
|
||||
uint16_t value;
|
||||
static uint8_t VoltCurrentSwitch = 0;
|
||||
|
||||
/** Measure Current **/
|
||||
int32_t _MeasureCurrent;
|
||||
|
||||
/** transform a current user code (IUC) to real current in pA **/
|
||||
// handle current lv 0~2
|
||||
int32_t (*_Transform2RealpA)(struct _CURRENT_USER_CODE *);
|
||||
|
||||
/** transform an IUC to real current in nA **/
|
||||
// handle current lv 3~4
|
||||
int32_t (*_Transform2RealnA)(struct _CURRENT_USER_CODE *);
|
||||
|
||||
/** MeasureCurrent operation **/
|
||||
void (*SetMeasureCurrent)(struct _CURRENT_USER_CODE *, int32_t);
|
||||
|
||||
int32_t (*GetMeasureCurrent)(struct _CURRENT_USER_CODE *);
|
||||
}CURRENT_USER_CODE;
|
||||
|
||||
//static CURRENT_USER_CODE CurrentUserCode;
|
||||
|
||||
static int32_t CCModeReadCurrent(CURRENT_USER_CODE *CurrentUserCode){
|
||||
int32_t Real_Current = 0;
|
||||
CCModeReset = 0; // This flag will control DAC working
|
||||
|
||||
CCCurrent2IUC(CurrentUserCode);
|
||||
|
||||
// if(CurrentUserCode->lv == CURRENT_LV_FOUR){
|
||||
// Real_Current = CurrentUserCode->_Transform2RealnA(CurrentUserCode);
|
||||
// }
|
||||
// else{
|
||||
// Real_Current = CurrentUserCode->_Transform2RealpA(CurrentUserCode);
|
||||
// }
|
||||
|
||||
// set ADC gain according to constant current value
|
||||
SetCCModeGain(CurrentUserCode);
|
||||
|
||||
// read ADC current
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
CCModeDACEnable = 1; // This flag will control DAC working
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
Real_Current = 8787877;
|
||||
// Use 5-th measure value as real-measure value
|
||||
// because some value in the begin are garbage
|
||||
if(VoltCurrentSwitch < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 5){
|
||||
// read current
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
CC->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
else{
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CC->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch <10){
|
||||
// read volt
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 10){
|
||||
/** read battery voltage **/
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
CC->BatteryV = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_VOLT, spi_ADC_rxbuf);
|
||||
|
||||
CurrentUserCode->SetMeasureCurrent(CurrentUserCode, Real_Current);
|
||||
return Real_Current;
|
||||
// if Iin have a offset if current !=0
|
||||
CC->BatteryV = CC->BatteryV - (CC->value - CC_ZERO_POINT)*10/1e5; // I_set * 10R = V_Iin2GND (mA * ohm)
|
||||
VoltCurrentSwitch++;
|
||||
// NotifyReady = true;
|
||||
}
|
||||
else{
|
||||
VoltCurrentSwitch = 0;
|
||||
}
|
||||
NotifyVolt[0] = (uint8_t) (CC->BatteryV >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((CC->BatteryV & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((CC->BatteryV & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (CC->BatteryV & 0x000000FF);
|
||||
return CC->_MeasureData;
|
||||
}
|
||||
|
||||
static int32_t CCModeVoltOut(CURRENT_USER_CODE *CurrentUserCode){
|
||||
int32_t MeasureCurrent = 0;
|
||||
static int32_t CCModeVoltOut(CCMode *CC){
|
||||
int32_t IUCCurrent = 0;
|
||||
|
||||
if(CCModeReset){
|
||||
if(!CCModeDACEnable){
|
||||
// DAC should not work now
|
||||
return 0;
|
||||
}
|
||||
IUCCurrent = CC->_Transform2RealnA( (struct CCModePara *) CC);
|
||||
|
||||
// MeasureCurrent = CurrentUserCode->GetMeasureCurrent(CurrentUserCode);
|
||||
CCModeDACControl(CC, IUCCurrent - CC->_MeasureData);
|
||||
|
||||
NotifyCurrent[0] = (uint8_t) (MeasureCurrent >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((MeasureCurrent & 0x00FF0000) >> 16);
|
||||
NotifyCurrent[2] = (uint8_t) ((MeasureCurrent & 0x0000FF00) >> 8);
|
||||
NotifyCurrent[3] = (uint8_t) (MeasureCurrent & 0x000000FF);
|
||||
|
||||
NotifyVolt[0] = (uint8_t) (MeasureCurrent >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((MeasureCurrent & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((MeasureCurrent & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (MeasureCurrent & 0x000000FF);
|
||||
|
||||
// INSTRUCTION.VoltConstant = 24999 + 500;
|
||||
// DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
return MeasureCurrent;
|
||||
CCModeDACEnable = 0;
|
||||
return CC->_MeasureData;
|
||||
}
|
||||
|
||||
static void SetCCModeGain(CURRENT_USER_CODE *CurrentUserCode){
|
||||
switch(CurrentUserCode->lv){
|
||||
case CURRENT_LV_FOUR:{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
break;
|
||||
}
|
||||
case CURRENT_LV_THREE:{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
break;
|
||||
}
|
||||
case CURRENT_LV_TWO:{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_10K;
|
||||
break;
|
||||
}
|
||||
case CURRENT_LV_ONE:{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
break;
|
||||
}
|
||||
case CURRENT_LV_ZERO:{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
break;
|
||||
}
|
||||
default :{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
static void CCModeDACControl(CCMode *CC, int32_t IUC_Measure_Difference){
|
||||
int32_t step;
|
||||
|
||||
static void CCCurrent2IUC(CURRENT_USER_CODE *CurrentUserCode){
|
||||
if (INSTRUCTION.CurrentLV == CURRENT_LV_MA){
|
||||
// largest current ( 0~500 mA)
|
||||
CurrentUserCode->lv = CURRENT_LV_FOUR;
|
||||
CurrentUserCode->value = (uint16_t) (INSTRUCTION.ConstantCurrent);
|
||||
if(IUC_Measure_Difference < 300 && IUC_Measure_Difference > -300){
|
||||
step = 0;
|
||||
}
|
||||
else if (INSTRUCTION.CurrentLV == CURRENT_LV_UA){
|
||||
if(INSTRUCTION.ConstantCurrent >= 50000){
|
||||
// mid range current ( 500 uA ~ 999 uA)
|
||||
CurrentUserCode->lv = CURRENT_LV_THREE;
|
||||
CurrentUserCode->value = (uint16_t) (INSTRUCTION.ConstantCurrent - 50000);
|
||||
else if( CC->Charge && CC->BatteryV >= ( (int32_t) (CC->VMax - DAC_ZERO)/5 ) ){
|
||||
CC->value = 0;
|
||||
step = (IUC_Measure_Difference > 0) ? 1:-1;
|
||||
}
|
||||
else if( (!CC->Charge) && CC->BatteryV <= ( (int32_t) (CC->VMin - DAC_ZERO)/5 ) ){
|
||||
// Ignore VMin condition
|
||||
if(CC->Done < 25000){
|
||||
CC->Done ++;
|
||||
step = (IUC_Measure_Difference > 0) ? 2:-2;
|
||||
}
|
||||
// after ignore few second, active VMin condition
|
||||
else{
|
||||
CC->value = 0;
|
||||
step = (IUC_Measure_Difference > 0) ? 1:-1;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
step = (IUC_Measure_Difference > 0) ? 1:-1;
|
||||
}
|
||||
// over/under flow
|
||||
if( (INSTRUCTION.VoltConstant + step) > MAX_DAC_UC || (INSTRUCTION.VoltConstant + step) < MIN_DAC_UC ){
|
||||
if(step > 0){
|
||||
INSTRUCTION.VoltConstant = (INSTRUCTION.VoltConstant + MAX_DAC_UC)/2;
|
||||
}
|
||||
else{
|
||||
// mid range current ( 0 uA ~ 499 uA)
|
||||
CurrentUserCode->lv = CURRENT_LV_TWO;
|
||||
CurrentUserCode->value = (uint16_t) (INSTRUCTION.ConstantCurrent);
|
||||
INSTRUCTION.VoltConstant = (INSTRUCTION.VoltConstant + MIN_DAC_UC)/2;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(INSTRUCTION.ConstantCurrent >= 50000){
|
||||
// mid range current ( 500 nA ~ 999 nA)
|
||||
CurrentUserCode->lv = CURRENT_LV_ONE;
|
||||
CurrentUserCode->value = (uint16_t) (INSTRUCTION.ConstantCurrent - 50000);
|
||||
}
|
||||
else{
|
||||
// mid range current ( 0 nA ~ 499 nA)
|
||||
CurrentUserCode->lv = CURRENT_LV_ZERO;
|
||||
CurrentUserCode->value = (uint16_t) (INSTRUCTION.ConstantCurrent);
|
||||
}
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + step;
|
||||
}
|
||||
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
|
||||
// step = CC->Done;
|
||||
// NotifyImpedance[0] = (uint8_t) (step >> 24);
|
||||
// NotifyImpedance[1] = (uint8_t) ((step & 0x00FF0000) >> 16);
|
||||
// NotifyImpedance[2] = (uint8_t) ((step & 0x0000FF00) >> 8);
|
||||
// NotifyImpedance[3] = (uint8_t) (step & 0x000000FF);
|
||||
}
|
||||
|
||||
//static int32_t IUC2RealnA(){
|
||||
//
|
||||
//}
|
||||
//
|
||||
//static int32_t IUC2RealpA{
|
||||
//
|
||||
//}
|
||||
/*********************************************************************
|
||||
* @fn Transform2RealpA
|
||||
*
|
||||
* @brief transform an IUC into real current value in pA.
|
||||
*
|
||||
* @param self, which is an IUC
|
||||
*
|
||||
* @return an int32_t current value in pA
|
||||
*/
|
||||
static int32_t _Transform2RealpA(CURRENT_USER_CODE *self){
|
||||
int32_t IUCReal;
|
||||
/** current level range: 0-4 **/
|
||||
// current level = 0 => 0-499 nA => ADCGainLevel = 200K
|
||||
// current level = 1 => 500-999 nA => ADCGainLevel = 10K
|
||||
// current level = 2 => 0-499 uA => ADCGainLevel = 10K
|
||||
// current level = 3 => 500-999 uA => ADCGainLevel = 200R
|
||||
// current level = 4 => 0-499 mA => ADCGainLevel = 200R
|
||||
/* Transform setting CC into IUC
|
||||
*
|
||||
* User code in CC mode : 0 ~ 3000000
|
||||
* Real current value : -15.00000 ~ 15.00000 mA
|
||||
* => user code = 1500000 mapping to 0.00000 mA
|
||||
*/
|
||||
static void CCCurrent2IUC(CCMode *CC){
|
||||
int32_t CurrentValue = 0;
|
||||
|
||||
// Saturate if current > 500 uA
|
||||
if (self->lv == CURRENT_LV_FOUR){
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
if (self->lv == CURRENT_LV_THREE){
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
// 0-499 nA
|
||||
if (self->lv == CURRENT_LV_ZERO){
|
||||
IUCReal = (int32_t) (self->value) * 1e3;
|
||||
}
|
||||
|
||||
// 500-999 nA
|
||||
else if (self->lv == CURRENT_LV_ONE){
|
||||
IUCReal = ((int32_t) (self->value) * 1e3);
|
||||
IUCReal = IUCReal + 500e3;
|
||||
}
|
||||
|
||||
// 0-499 uA
|
||||
else if (self->lv == CURRENT_LV_TWO){
|
||||
IUCReal = (int32_t) (self->value) * 1e6;
|
||||
}
|
||||
return IUCReal;
|
||||
CC->value = INSTRUCTION.ConstantCurrent;
|
||||
CurrentValue = CC->value - CC_ZERO_POINT;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn Transform2RealnA
|
||||
*
|
||||
* @brief transform an IUC into real current value in nA.
|
||||
*
|
||||
* @param self, which is an IUC
|
||||
*
|
||||
* @return an int32_t current value in nA
|
||||
*/
|
||||
static int32_t _Transform2RealnA(CURRENT_USER_CODE *self){
|
||||
int32_t IUCReal;
|
||||
|
||||
// Saturate if current < 500 uA
|
||||
if (self->lv == CURRENT_LV_ZERO | self->lv == CURRENT_LV_ONE | self->lv == CURRENT_LV_TWO){
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 500-999 uA
|
||||
if (self->lv == CURRENT_LV_THREE){
|
||||
IUCReal = (int32_t) (self->value) * 1e3;
|
||||
IUCReal = IUCReal + 500e3;
|
||||
}
|
||||
|
||||
// 0-499 mA
|
||||
else if (self->lv == 4){
|
||||
IUCReal = (int32_t) (self->value) * 1e6;
|
||||
}
|
||||
return IUCReal;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn CompareCurrent
|
||||
*
|
||||
* @brief compare an int32 current with CURRENT_USER_CODE (IUC) type current.
|
||||
*
|
||||
* @param unit is current unit (0 = pA, 1 = nA)
|
||||
* value is current value
|
||||
*
|
||||
* @return 0 if equal
|
||||
* 1 if IUC is larger
|
||||
* 2 if int32 current is larger.
|
||||
*/
|
||||
static uint8_t CompareCurrent(CURRENT_USER_CODE *self, uint8_t unit, int32_t value){
|
||||
int32_t ErrorRangeIUCReal;
|
||||
|
||||
// unit = pA
|
||||
if (unit == 0){
|
||||
if (self->_Transform2RealpA(self) > value){
|
||||
return 1;
|
||||
}
|
||||
else if (self->_Transform2RealpA(self) < value){
|
||||
return 2;
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// unit = nA
|
||||
else if (unit == 1){
|
||||
if (self->_Transform2RealnA(self) > value){
|
||||
return 1;
|
||||
}
|
||||
else if (self->_Transform2RealnA(self) < value){
|
||||
return 2;
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
static void SetMeasureCurrent(CURRENT_USER_CODE *self, int32_t current){
|
||||
self->_MeasureCurrent = current;
|
||||
}
|
||||
|
||||
static int32_t GetMeasureCurrent(CURRENT_USER_CODE *self){
|
||||
LED_color(DARKLED, 0x0F, 0x00, 0xFF);
|
||||
return self->_MeasureCurrent;
|
||||
}
|
||||
|
||||
static CURRENT_USER_CODE *InitCurrentUserCode(){
|
||||
CURRENT_USER_CODE *CurrentUserCode = malloc(sizeof(CURRENT_USER_CODE));
|
||||
CurrentUserCode->lv = 0;
|
||||
CurrentUserCode->value = 0;
|
||||
CurrentUserCode->_MeasureCurrent = 0;
|
||||
CurrentUserCode->_Transform2RealnA = &_Transform2RealnA;
|
||||
CurrentUserCode->_Transform2RealpA = &_Transform2RealpA;
|
||||
CurrentUserCode->SetMeasureCurrent = &SetMeasureCurrent;
|
||||
CurrentUserCode->GetMeasureCurrent = &GetMeasureCurrent;
|
||||
return CurrentUserCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+440
-47
@@ -2,7 +2,7 @@
|
||||
#ifndef ELITECV
|
||||
#define ELITECV
|
||||
|
||||
static uint16_t SWVCurve() {
|
||||
static uint16_t SWVCurve(WorkMode *WorkModeData) {
|
||||
static uint8_t counter;
|
||||
static uint16_t outputV;
|
||||
static uint16_t Volt;
|
||||
@@ -57,7 +57,7 @@ static uint16_t SWVCurve() {
|
||||
return outputV;
|
||||
}
|
||||
|
||||
static uint16_t DPVCurve() {
|
||||
static uint16_t DPVCurve(WorkMode *WorkModeData) {
|
||||
static uint8_t counter;
|
||||
static uint16_t Volt1;
|
||||
static uint16_t Volt2;
|
||||
@@ -132,68 +132,461 @@ static uint16_t DPVCurve() {
|
||||
}
|
||||
}
|
||||
|
||||
static uint16_t CVCurve() {
|
||||
static uint8_t ramp0;
|
||||
static uint8_t ramp1;
|
||||
static uint16_t outputV;
|
||||
static bool direction_up;
|
||||
static bool current_direction_up;
|
||||
|
||||
static uint16_t CVCurve(CVMode *CV) {
|
||||
static uint16_t DACOutCode;
|
||||
static bool direction_up; // direction_up = true, if Vfinal > Vorigin
|
||||
static bool current_direction_up; // current_direction_up = true, Vstep => positive. vice versa
|
||||
static bool firstADCData; //firstADCdata=true,when min<x<max,cyclenumber--
|
||||
// reset origin volt at the begin
|
||||
if (DACReset) {
|
||||
outputV = INSTRUCTION.VoltOrigin;
|
||||
if (INSTRUCTION.VoltFinal > INSTRUCTION.VoltOrigin) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
if (CV->_VStop > CV->_VOrigin) {
|
||||
direction_up = true;
|
||||
current_direction_up = true;
|
||||
} else {
|
||||
direction_up = false;
|
||||
current_direction_up = false;
|
||||
}
|
||||
ramp0 = (uint8_t)(INSTRUCTION.VoltOrigin & 0x00FF); // right byte
|
||||
ramp1 = (uint8_t)((INSTRUCTION.VoltOrigin >> 8) & 0x00FF); // left byte
|
||||
DACReset = false;
|
||||
|
||||
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
|
||||
DAC_outputV(DACOutCode); // output VOLT_ORIGIN
|
||||
DACReset = false;
|
||||
firstADCData = true;
|
||||
return DACOutCode;
|
||||
}
|
||||
|
||||
// output a certain volt
|
||||
DAC_outputV(outputV);
|
||||
if (CT.StepTimeCounter == CV->_StepTime) {
|
||||
// Decide next direction
|
||||
if (CV->_VoVi_Switch == 0x00){ //user see Vout
|
||||
if (direction_up) {
|
||||
if (INSTRUCTION.VoltConstant >= CV->_VStop) {
|
||||
current_direction_up = false; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
firstADCData = false;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant <= CV->_VOrigin) {
|
||||
current_direction_up = true;
|
||||
firstADCData = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
|
||||
if (direction_up) {
|
||||
if (outputV >= INSTRUCTION.VoltFinal) {
|
||||
current_direction_up = false; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
} else if (outputV <= INSTRUCTION.VoltOrigin) {
|
||||
current_direction_up = true;
|
||||
if (INSTRUCTION.CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
|
||||
else if(current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant + CV->_Step > CV->_VStop){
|
||||
current_direction_up = false;
|
||||
}
|
||||
}
|
||||
else if(!current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant - CV->_Step < CV->_VOrigin){
|
||||
current_direction_up = true;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
if (firstADCData){
|
||||
CV->_CycleNumber--;
|
||||
firstADCData = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (INSTRUCTION.VoltConstant < CV->_VStop) {
|
||||
current_direction_up = true; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
firstADCData = false;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant > CV->_VOrigin) {
|
||||
current_direction_up = false;
|
||||
firstADCData = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
else if(current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant + CV->_Step > CV->_VOrigin){
|
||||
current_direction_up = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
else if(!current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant - CV->_Step < CV->_VStop){
|
||||
current_direction_up = true;
|
||||
}
|
||||
}
|
||||
if (firstADCData){//first data =2899mv,CV->_CycleNumber--;
|
||||
CV->_CycleNumber--;
|
||||
firstADCData = false;
|
||||
}
|
||||
}
|
||||
INSTRUCTION.CycleNumber--;
|
||||
}
|
||||
} else {
|
||||
if (outputV <= INSTRUCTION.VoltFinal) {
|
||||
current_direction_up = true; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
} else if (outputV >= INSTRUCTION.VoltOrigin) {
|
||||
current_direction_up = false;
|
||||
if (INSTRUCTION.CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
else if (CV->_VoVi_Switch == 0x01){ //user see Vin
|
||||
if (direction_up) {
|
||||
if (INSTRUCTION.VoltConstant >= CV->_VStop) {
|
||||
current_direction_up = false; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
firstADCData = false;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant <= CV->_VOrigin) {
|
||||
current_direction_up = true;
|
||||
firstADCData = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
|
||||
|
||||
else if(current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant + CV->_Step > CV->_VStop){
|
||||
current_direction_up = false;
|
||||
}
|
||||
}
|
||||
else if(!current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant - CV->_Step < CV->_VOrigin){
|
||||
current_direction_up = true;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
if (firstADCData){
|
||||
CV->_CycleNumber--;
|
||||
firstADCData = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (INSTRUCTION.VoltConstant < CV->_VStop) {
|
||||
current_direction_up = true; // problem occurs when origin == 0000 final == ffff!!!!!!
|
||||
firstADCData = false;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant > CV->_VOrigin){
|
||||
current_direction_up = false;
|
||||
firstADCData = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
else if(current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant + CV->_Step > CV->_VOrigin){
|
||||
current_direction_up = false;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
else if(!current_direction_up){
|
||||
if(INSTRUCTION.VoltConstant - CV->_Step < CV->_VStop){
|
||||
current_direction_up = true;
|
||||
}
|
||||
}
|
||||
if (firstADCData){//first data =2899mv,CV->_CycleNumber--;
|
||||
CV->_CycleNumber--;
|
||||
firstADCData = false;
|
||||
}
|
||||
}
|
||||
INSTRUCTION.CycleNumber--;
|
||||
}
|
||||
}
|
||||
// if (current_direction_up == true){
|
||||
// LED_color(DARKLED, 255, 0, 0);
|
||||
// }
|
||||
// else if (current_direction_up == false){
|
||||
// LED_color(DARKLED, 255, 0, 255);
|
||||
// }
|
||||
|
||||
// Next output voltage
|
||||
if (CV->_VoVi_Switch == 0x00){
|
||||
if (direction_up) {
|
||||
if (current_direction_up) {
|
||||
// DACUserCode overflow ?
|
||||
if (INSTRUCTION.VoltConstant + CV->_Step < INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
// reach Vfinal ?
|
||||
else if (INSTRUCTION.VoltConstant + CV->_Step > CV->_VStop) {
|
||||
INSTRUCTION.VoltConstant =CV->_VStop;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant >= CV->_VStop){
|
||||
INSTRUCTION.VoltConstant =CV->_VStop;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + CV->_Step;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// DACUserCode underflow ?
|
||||
if (INSTRUCTION.VoltConstant - CV->_Step > INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
// reach Vorigin ?
|
||||
else if (INSTRUCTION.VoltConstant - CV->_Step < CV->_VOrigin) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant <= CV->_VOrigin){
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant - CV->_Step;
|
||||
if(INSTRUCTION.VoltConstant > 60000){
|
||||
INSTRUCTION.VoltConstant = 0;
|
||||
current_direction_up = true;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (current_direction_up) {
|
||||
|
||||
if (current_direction_up) {
|
||||
if (outputV + INSTRUCTION.Step < outputV)
|
||||
outputV = 0xffff;
|
||||
else
|
||||
outputV = outputV + INSTRUCTION.Step;
|
||||
} else {
|
||||
if (outputV - INSTRUCTION.Step > outputV)
|
||||
outputV = 0x0000;
|
||||
else
|
||||
outputV = outputV - INSTRUCTION.Step;
|
||||
}
|
||||
if (INSTRUCTION.VoltConstant + CV->_Step < INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
|
||||
return outputV;
|
||||
else if (INSTRUCTION.VoltConstant + CV->_Step > CV->_VOrigin) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant >= CV->_VOrigin){
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + CV->_Step;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (INSTRUCTION.VoltConstant - CV->_Step > INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop ;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant - CV->_Step < CV->_VStop) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
else if(INSTRUCTION.VoltConstant <= CV->_VStop){
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant - CV->_Step;
|
||||
|
||||
if(INSTRUCTION.VoltConstant > 60000){
|
||||
INSTRUCTION.VoltConstant = 0;
|
||||
current_direction_up = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (CV->_VoVi_Switch == 0x01){
|
||||
if (direction_up) {
|
||||
if (current_direction_up) {
|
||||
// DACUserCode overflow ?
|
||||
if (INSTRUCTION.VoltConstant + CV->_Step < INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
// reach Vfinal ?
|
||||
else if (INSTRUCTION.VoltConstant + CV->_Step > CV->_VStop) {
|
||||
INSTRUCTION.VoltConstant =CV->_VStop;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant >= CV->_VStop){
|
||||
INSTRUCTION.VoltConstant =CV->_VStop;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + CV->_Step;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// DACUserCode underflow ?
|
||||
if (INSTRUCTION.VoltConstant - CV->_Step > INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
// reach Vorigin ?
|
||||
else if (INSTRUCTION.VoltConstant - CV->_Step < CV->_VOrigin) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant <= CV->_VOrigin){
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant - CV->_Step;
|
||||
if(INSTRUCTION.VoltConstant > 60000){
|
||||
INSTRUCTION.VoltConstant = 0;
|
||||
current_direction_up = true;
|
||||
if (CV->_CycleNumber == 0) {
|
||||
PeriodicEvent = false; // periodic event end
|
||||
DACReset = true;
|
||||
}
|
||||
CV->_CycleNumber--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (current_direction_up) {
|
||||
// DACUserCode overflow ?
|
||||
if (INSTRUCTION.VoltConstant + CV->_Step < INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
// ex:command 3->1V ,when 1 to 3V, 2.99+0.1 > 3V
|
||||
else if (INSTRUCTION.VoltConstant + CV->_Step > CV->_VOrigin) {
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant >= CV->_VOrigin){
|
||||
INSTRUCTION.VoltConstant = CV->_VOrigin;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + CV->_Step;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (INSTRUCTION.VoltConstant - CV->_Step > INSTRUCTION.VoltConstant) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop ;
|
||||
}
|
||||
else if (INSTRUCTION.VoltConstant - CV->_Step < CV->_VStop) {
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
else if(INSTRUCTION.VoltConstant <= CV->_VStop){
|
||||
INSTRUCTION.VoltConstant = CV->_VStop;
|
||||
}
|
||||
else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant - CV->_Step;
|
||||
|
||||
if(INSTRUCTION.VoltConstant > 60000){
|
||||
INSTRUCTION.VoltConstant = 0;
|
||||
current_direction_up = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
|
||||
DAC_outputV(DACOutCode);
|
||||
}
|
||||
return DACOutCode;
|
||||
}
|
||||
|
||||
static void CV_Plot(CVMode *CV){
|
||||
static uint8_t PreviousGain = GAIN_200R;
|
||||
|
||||
static uint8_t VoltCurrentSwitch = 0;
|
||||
uint16_t ADC_measure = 0;
|
||||
|
||||
if(VoltCurrentSwitch < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 5){
|
||||
// read current
|
||||
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
}
|
||||
else{
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
CV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
// else if(VoltCurrentSwitch < 9){
|
||||
// // read volt
|
||||
// ReadVolt(spi_ADC_rxbuf);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
// else if(VoltCurrentSwitch == 9){
|
||||
// /** read battery voltage **/
|
||||
// ReadVolt(spi_ADC_rxbuf);
|
||||
// ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
// //CV->MeasureVolt = 20000;
|
||||
// CV->MeasureVolt = DecodeADCVolt(ADC_measure);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
else if(VoltCurrentSwitch < 9){
|
||||
if(CV->_VoVi_Switch == 0x01){
|
||||
// read vin volt
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
}else if(CV->_VoVi_Switch == 0x00){
|
||||
// read vout volt
|
||||
ReadVoutVolt(spi_ADC_rxbuf);
|
||||
}
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 9){
|
||||
if(CV->_VoVi_Switch == 0x01){
|
||||
// read vin volt
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
//CV->MeasureVolt = 20000;
|
||||
CV->MeasureVolt = DecodeADCVolt(ADC_measure);
|
||||
}else if(CV->_VoVi_Switch == 0x00){
|
||||
// read vout volt
|
||||
ReadVoutVolt(spi_ADC_rxbuf);
|
||||
ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
CV->MeasureVolt = DecodeADCVoutVolt(ADC_measure);
|
||||
}
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
// else if (VoltCurrentSwitch < 13){
|
||||
// ReadBatVolt(spi_ADC_rxbuf);
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
// else if (VoltCurrentSwitch == 13){
|
||||
// // read battery volt
|
||||
// ReadBatVolt(spi_ADC_rxbuf);
|
||||
// ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
// CV->_MeasureBatvolt = DecodeADCBatVolt(ADC_measure);
|
||||
// CV->_MeasureBatvolt = CV->_MeasureBatvolt/10 - 250; // (5.00V) 5000->250 usercode
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
else{
|
||||
VoltCurrentSwitch = 0;
|
||||
}
|
||||
|
||||
NotifyCurrent[0] = (uint8_t) (CV->_MeasureData >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((CV->_MeasureData & 0x00FF0000) >> 16);
|
||||
NotifyCurrent[2] = (uint8_t) ((CV->_MeasureData & 0x0000FF00) >> 8);
|
||||
NotifyCurrent[3] = (uint8_t) (CV->_MeasureData & 0x000000FF);
|
||||
|
||||
if ((CV->_VoVi_Switch == 0x01) || (CV->_VoVi_Switch == 0x00)){ //user see Vin || user see Vout
|
||||
// NotifyVolt[0] = (uint8_t) (CV->MeasureVolt >> 24);
|
||||
// NotifyVolt[1] = (uint8_t) ((CV->MeasureVolt & 0x00FF0000) >> 16);
|
||||
// NotifyVolt[2] = (uint8_t) ((CV->MeasureVolt & 0x0000FF00) >> 8);
|
||||
// NotifyVolt[3] = (uint8_t) (CV->MeasureVolt & 0x000000FF);
|
||||
|
||||
int32_t RealV;
|
||||
RealV = (int32_t)(INSTRUCTION.VoltConstant - 25000)/5;
|
||||
NotifyVolt[0] = (uint8_t)((RealV & 0xFF000000) >> 24);
|
||||
NotifyVolt[1] = (uint8_t)((RealV & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t)((RealV & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t)(RealV & 0x000000FF);
|
||||
}
|
||||
|
||||
// NotifyBatVolt = (uint8_t) (CV->_MeasureBatvolt & 0x000000FF);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+5
@@ -57,4 +57,9 @@ static uint16_t DAC_outputV(uint16_t voltLV) {
|
||||
|
||||
#endif
|
||||
|
||||
static int32_t User2Real(uint16_t UserCode){
|
||||
/* transfer usercode to real voltage value (mV) */
|
||||
return (int32_t) ((UserCode - 25000)*2)/10;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+1280
-72
File diff suppressed because it is too large
Load Diff
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef ELITE_FLAG_CT_INIT
|
||||
#define ELITE_FLAG_CT_INIT
|
||||
|
||||
static void InitCT(){
|
||||
CT.SampleRate_counter = 1;
|
||||
CT.StepTimeCounter = 1;
|
||||
CT.NotifyCounter = 1;
|
||||
CT.StandByCounter = 0;
|
||||
}
|
||||
|
||||
static void InitFlag(){
|
||||
PeriodicEvent = false; // is there an PeriodicEvent?
|
||||
InitPeriodicEvent = true; // need to create a WorkModeData?
|
||||
DACReset = true;
|
||||
CCModeDACEnable = 0; // to make sure DAC work after ADC
|
||||
Free_Work_Mode = true; // Free(WorkModeData)
|
||||
// NotifyReady = false;
|
||||
// DiscardIVFirstData = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
+73
-12
@@ -2,22 +2,83 @@
|
||||
#ifndef ELITEIT
|
||||
#define ELITEIT
|
||||
|
||||
static int32_t IT_Plot() {
|
||||
#define absolute(a) ((a<0)? -a:a)
|
||||
|
||||
//static int32_t IT_Plot() {
|
||||
// // read ADC current
|
||||
// int32_t Real_Current = 0;
|
||||
// ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
// ADCChannelSelect(ADC_CH_CURRENT);
|
||||
// CPUdelay(10);
|
||||
// ADC_read(spi_ADC_rxbuf);
|
||||
//
|
||||
// // check if ADC over/under flow
|
||||
// // let the output saturate if over/under flow
|
||||
//// ADC_overflow(INSTRUCTION.ADCGainLevel, spi_ADC_rxbuf);
|
||||
//
|
||||
// // decode ADC value and put it into notify buffer
|
||||
// Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
//
|
||||
// return Real_Current;
|
||||
//}
|
||||
|
||||
static int32_t IT_Plot(WorkMode *WorkModeData) {
|
||||
|
||||
switch (INSTRUCTION.eliteFxn) {
|
||||
case IV_CURVE:{
|
||||
#define CURRENT_MODE WorkModeData->IV
|
||||
break;
|
||||
}
|
||||
case CV_CURVE:{
|
||||
#define CURRENT_MODE WorkModeData->CV
|
||||
break;
|
||||
}
|
||||
case IT_CURVE:{
|
||||
#define CURRENT_MODE WorkModeData->IT
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
#define CURRENT_MODE WorkModeData->IT
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// read ADC current
|
||||
int32_t Real_Current = 0;
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
int32_t RealCurrent = 0, RealVolt = 0;
|
||||
static uint8_t PreviousGain = GAIN_200R;
|
||||
|
||||
// check if ADC over/under flow
|
||||
// let the output saturate if over/under flow
|
||||
// ADC_overflow(INSTRUCTION.ADCGainLevel, spi_ADC_rxbuf);
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
RealCurrent = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
CURRENT_MODE->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
CURRENT_MODE->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
CURRENT_MODE->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
CURRENT_MODE->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
}
|
||||
else{
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
RealCurrent = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
CURRENT_MODE->_MeasureData = RealCurrent;
|
||||
|
||||
return Real_Current;
|
||||
|
||||
// if(INSTRUCTION.eliteFxn == IV_CURVE){
|
||||
// // RealVo = Vo - RealCurrent * 100R
|
||||
// RealVolt = (INSTRUCTION.VoltConstant - DAC_ZERO)/5 - 200*(RealCurrent/1e6);
|
||||
//
|
||||
// NotifyVolt[0] = (uint8_t) (RealVolt >> 24);
|
||||
// NotifyVolt[1] = (uint8_t) ((RealVolt & 0x00FF0000) >> 16);
|
||||
// NotifyVolt[2] = (uint8_t) ((RealVolt & 0x0000FF00) >> 8);
|
||||
// NotifyVolt[3] = (uint8_t) (RealVolt & 0x000000FF);
|
||||
// }
|
||||
return RealCurrent;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+174
-24
@@ -2,7 +2,7 @@
|
||||
#ifndef ELITEIV
|
||||
#define ELITEIV
|
||||
|
||||
static uint16_t VoltScan() {
|
||||
static uint16_t VoltScan(WorkMode *WorkModeData) {
|
||||
uint16_t Voltage;
|
||||
if (INSTRUCTION.VoltOrigin == INSTRUCTION.VoltFinal) {
|
||||
Voltage = Usercode_Correction_to_DAC(INSTRUCTION.VoltOrigin);
|
||||
@@ -10,28 +10,29 @@ static uint16_t VoltScan() {
|
||||
PeriodicEvent = false;
|
||||
return Voltage;
|
||||
} else if (INSTRUCTION.eliteFxn == SQUARE_WAVE_VOLTAMMETRY) {
|
||||
Voltage = SWVCurve();
|
||||
Voltage = SWVCurve(WorkModeData);
|
||||
} else if (INSTRUCTION.eliteFxn == DIFFERENTIAL_PULSE_VOLTAMMETRY) {
|
||||
Voltage = DPVCurve();
|
||||
} else if (INSTRUCTION.eliteFxn == CYCLIC_VOLTAMMETRY) {
|
||||
Voltage = CVCurve();
|
||||
Voltage = DPVCurve(WorkModeData);
|
||||
} else if (INSTRUCTION.eliteFxn == CV_CURVE) {
|
||||
Voltage = CVCurve(WorkModeData->CV);
|
||||
}
|
||||
|
||||
// IV plot mode
|
||||
else {
|
||||
Voltage = OneWayVoltScan();
|
||||
Voltage = OneWayVoltScan(WorkModeData->IV);
|
||||
}
|
||||
|
||||
return Voltage;
|
||||
}
|
||||
|
||||
static uint16_t OneWayVoltScan() {
|
||||
static uint16_t DACOutCode;
|
||||
static uint16_t OneWayVoltScan(IVMode *IV) {
|
||||
uint16_t DACOutCode;
|
||||
|
||||
// reset origin volt at the begin
|
||||
if (DACReset) {
|
||||
DACUserCode = INSTRUCTION.VoltOrigin;
|
||||
DACOutCode = Usercode_Correction_to_DAC(DACUserCode);
|
||||
// DACUserCode = IV->GetVOrigin((struct VoltOutPara *) IV);
|
||||
INSTRUCTION.VoltConstant = IV->_VOrigin;
|
||||
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
|
||||
DACReset = false;
|
||||
|
||||
// output VOLT_ORIGIN
|
||||
@@ -39,32 +40,181 @@ static uint16_t OneWayVoltScan() {
|
||||
return DACOutCode;
|
||||
}
|
||||
|
||||
if (StepTimeCounter == INSTRUCTION.StepTime) {
|
||||
if (INSTRUCTION.VoltOrigin < INSTRUCTION.VoltFinal) {
|
||||
if (CT.StepTimeCounter == IV->_StepTime){
|
||||
if (IV->_VOrigin < IV->_VStop) {
|
||||
// output the next output volt
|
||||
DACUserCode = DACUserCode + INSTRUCTION.Step;
|
||||
DACOutCode = Usercode_Correction_to_DAC(DACUserCode);
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + IV->_Step;
|
||||
// Only used in two-wire IV
|
||||
// if(INSTRUCTION.VoltConstant > IV->_VStop){
|
||||
// INSTRUCTION.VoltConstant = IV->_VStop;
|
||||
// }
|
||||
|
||||
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
|
||||
DAC_outputV(DACOutCode);
|
||||
|
||||
// end IV task if we reach INSTRUCTION.VoltFinal
|
||||
if (DACUserCode >= INSTRUCTION.VoltFinal) {
|
||||
// if (INSTRUCTION.VoltConstant >= IV->_VStop) {
|
||||
// PeriodicEvent = false;
|
||||
// DACReset = true;
|
||||
// }
|
||||
} else {
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant - IV->_Step;
|
||||
|
||||
// check if DACUserCode underflow
|
||||
if(INSTRUCTION.VoltConstant >= 60000){
|
||||
INSTRUCTION.VoltConstant = IV->_VStop;
|
||||
}
|
||||
|
||||
// output the next output volt
|
||||
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
|
||||
DAC_outputV(DACOutCode);
|
||||
|
||||
// end IV task if we reach INSTRUCTION.VoltFinal
|
||||
// if (INSTRUCTION.VoltConstant <= IV->_VStop){
|
||||
// PeriodicEvent = false;
|
||||
// DACReset = true;
|
||||
//// reset();
|
||||
// }
|
||||
}
|
||||
if (IV->_VoVi_Switch == 0x00 || IV->_VoVi_Switch == 0x01){ //user see Vout/user see Vin
|
||||
if (IV->_VOrigin < IV->_VStop) {
|
||||
if(INSTRUCTION.VoltConstant >= IV->_VStop){
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(INSTRUCTION.VoltConstant <= IV->_VStop){
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32_t RealV;
|
||||
RealV = DAC_to_realV(DACOutCode);
|
||||
NotifyVolt[0] = (uint8_t)((RealV & 0xFF000000) >> 24);
|
||||
NotifyVolt[1] = (uint8_t)((RealV & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t)((RealV & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t)(RealV & 0x000000FF);
|
||||
|
||||
}
|
||||
|
||||
return DACOutCode;
|
||||
}
|
||||
|
||||
static void IV_Plot(IVMode *IV) {
|
||||
static uint8_t VoltCurrentSwitch = 0;
|
||||
static uint8_t PreviousGain = GAIN_200R;
|
||||
uint16_t ADC_measure = 0;
|
||||
|
||||
if(VoltCurrentSwitch < 5){
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 5){
|
||||
// read current
|
||||
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
if(PreviousGain != INSTRUCTION.ADCGainLevel){
|
||||
PreviousGain = INSTRUCTION.ADCGainLevel;
|
||||
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
}
|
||||
else{
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
IV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
// else if(VoltCurrentSwitch < 9){
|
||||
// // read volt
|
||||
// ReadVolt(spi_ADC_rxbuf);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
// else if(VoltCurrentSwitch == 9){
|
||||
// /** read battery voltage **/
|
||||
// ReadVolt(spi_ADC_rxbuf);
|
||||
// ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
// IV->MeasureVolt = DecodeADCVolt(ADC_measure);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
else if(VoltCurrentSwitch < 9){
|
||||
if(IV->_VoVi_Switch == 0x01){
|
||||
// read vin volt
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
}else if(IV->_VoVi_Switch == 0x00){
|
||||
// read vout volt
|
||||
ReadVoutVolt(spi_ADC_rxbuf);
|
||||
}
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 9){
|
||||
if(IV->_VoVi_Switch == 0x01){
|
||||
// read vin volt
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
IV->MeasureVolt = DecodeADCVolt(ADC_measure);
|
||||
}else if(IV->_VoVi_Switch == 0x00){
|
||||
// read vout volt
|
||||
ReadVoutVolt(spi_ADC_rxbuf);
|
||||
ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
IV->MeasureVolt = DecodeADCVoutVolt(ADC_measure);
|
||||
}
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
// else if (VoltCurrentSwitch < 13){
|
||||
// ReadBatVolt(spi_ADC_rxbuf);
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
// else if (VoltCurrentSwitch == 13){
|
||||
// // read battery volt
|
||||
// ReadBatVolt(spi_ADC_rxbuf);
|
||||
// ADC_measure = (uint16_t) (spi_ADC_rxbuf[0] << 8) | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
// IV->_MeasureBatvolt = DecodeADCBatVolt(ADC_measure);
|
||||
// IV->_MeasureBatvolt = IV->_MeasureBatvolt/10 - 250; // (5.00V) 5000->250 usercode
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
else{
|
||||
VoltCurrentSwitch = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NotifyCurrent[0] = (uint8_t) (IV->_MeasureData >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((IV->_MeasureData & 0x00FF0000) >> 16);
|
||||
NotifyCurrent[2] = (uint8_t) ((IV->_MeasureData & 0x0000FF00) >> 8);
|
||||
NotifyCurrent[3] = (uint8_t) (IV->_MeasureData & 0x000000FF);
|
||||
|
||||
if((IV->_VoVi_Switch == 0x01) || (IV->_VoVi_Switch == 0x00)){ //user see Vin || user see Vout
|
||||
NotifyVolt[0] = (uint8_t) (IV->MeasureVolt >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((IV->MeasureVolt & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((IV->MeasureVolt & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (IV->MeasureVolt & 0x000000FF);
|
||||
|
||||
if (IV->_VOrigin < IV->_VStop) {
|
||||
if(IV->MeasureVolt >= ((int32_t) (IV->_VStop) - DAC_ZERO)/5){
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
}
|
||||
} else {
|
||||
// output the next output volt
|
||||
DACUserCode = DACUserCode - INSTRUCTION.Step;
|
||||
DACOutCode = Usercode_Correction_to_DAC(DACUserCode);
|
||||
DAC_outputV(DACOutCode);
|
||||
|
||||
// end IV task if we reach INSTRUCTION.VoltFinal
|
||||
if (DACUserCode <= INSTRUCTION.VoltFinal) {
|
||||
}
|
||||
else{
|
||||
if(IV->MeasureVolt <= ((int32_t) (IV->_VStop) - DAC_ZERO)/5){
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return DACOutCode;
|
||||
|
||||
// NotifyBatVolt = (uint8_t) (IV->_MeasureBatvolt & 0x000000FF);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+37
-12
@@ -20,6 +20,16 @@
|
||||
#define CURRENT_LV_UA 0x01
|
||||
#define CURRENT_LV_MA 0x02
|
||||
|
||||
/* DAC reset parameter */
|
||||
#define DAC_ZERO 25000
|
||||
#define DAC_POS_MAX 0x0000
|
||||
#define DAC_NEG_MAX 0xFFFF
|
||||
|
||||
// Step time macro
|
||||
#define STEPTIME_HALF_SEC 5000
|
||||
#define STEPTIME_ONE_SEC 10000
|
||||
#define STEPTIME_TWO_SEC 20000
|
||||
|
||||
/*==============================
|
||||
==== headstage instruction ====
|
||||
=============================*/
|
||||
@@ -30,23 +40,32 @@ struct HEADSTAGE_INSTRUCTION {
|
||||
/** Sample rate **/
|
||||
// SampleRate = SampleRateTable[SampleRateIndex]
|
||||
uint8_t SampleRateIndex;
|
||||
uint16_t SampleRate;
|
||||
uint32_t SampleRate;
|
||||
|
||||
/** DAC parameter **/
|
||||
// volt san parameter
|
||||
uint16_t VoltOrigin;
|
||||
uint16_t VoltFinal;
|
||||
uint16_t Step;
|
||||
uint8_t StepTime;
|
||||
uint16_t StepTime;
|
||||
|
||||
// constant volt
|
||||
// which is used in CC mode as VMax and VMin
|
||||
uint16_t VoltConstant;
|
||||
|
||||
/** ADC parameter **/
|
||||
uint8_t ADCGainLevel;
|
||||
|
||||
uint8_t AutoGainEnable;
|
||||
|
||||
/** Notify parameter **/
|
||||
uint16_t NotifyRate;
|
||||
|
||||
/** Constant Current Parameter **/
|
||||
uint8_t CurrentLV; // nA? uA? mA?
|
||||
uint32_t ConstantCurrent;
|
||||
// Charge is a bool; true => current > 0, vice versa
|
||||
uint8_t Charge;
|
||||
int32_t ConstantCurrent;
|
||||
uint16_t VoltLimit;
|
||||
|
||||
/** Resister Measure **/
|
||||
uint8_t ResisterMeter;
|
||||
@@ -56,6 +75,8 @@ struct HEADSTAGE_INSTRUCTION {
|
||||
|
||||
uint8_t CycleNumber;
|
||||
|
||||
uint8_t VoVi_Switch;
|
||||
|
||||
} INSTRUCTION = {0};
|
||||
|
||||
/*********************************************************************
|
||||
@@ -70,18 +91,22 @@ struct HEADSTAGE_INSTRUCTION {
|
||||
static void InitEliteInstruction(){
|
||||
INSTRUCTION.chip_id = 0;
|
||||
INSTRUCTION.SampleRateIndex = 1;
|
||||
INSTRUCTION.SampleRate = 10;
|
||||
INSTRUCTION.SampleRate = 100;
|
||||
INSTRUCTION.VoltOrigin = DAC_ZERO;
|
||||
INSTRUCTION.VoltFinal = DAC_POS_MAX;
|
||||
INSTRUCTION.VoltFinal = DAC_ZERO;
|
||||
INSTRUCTION.Step = 0x0005; // 0x0005 = 1mV
|
||||
INSTRUCTION.StepTime = STEPTIME_HALF_SEC; // about 0.5 sec
|
||||
INSTRUCTION.VoltConstant = 24999; // is about 0V
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
INSTRUCTION.ResisterMeter = RESISTER_METER_SMALL;
|
||||
INSTRUCTION.CurrentLV = 0x00;
|
||||
INSTRUCTION.StepTime = STEPTIME_ONE_SEC; // about 0.5 sec
|
||||
INSTRUCTION.VoltConstant = DAC_ZERO; // is about 0V
|
||||
INSTRUCTION.ADCGainLevel = GAIN_AUTO;
|
||||
INSTRUCTION.AutoGainEnable = 1;
|
||||
INSTRUCTION.NotifyRate = STEPTIME_ONE_SEC/10;
|
||||
INSTRUCTION.ResisterMeter = RESISTER_METER_LARGE;
|
||||
INSTRUCTION.Charge = 1;
|
||||
INSTRUCTION.ConstantCurrent = 0x00000000;
|
||||
INSTRUCTION.VoltLimit = 0x0000;
|
||||
INSTRUCTION.eliteFxn = 0; // default is a null event
|
||||
INSTRUCTION.CycleNumber = 0;
|
||||
INSTRUCTION.VoVi_Switch = 0x01; //VoVi_Switch == 0 => user see Vo / VoVi_Switch == 1 => user see Vi
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -97,7 +122,7 @@ static void GetInstructionParameter(uint8 *ins){
|
||||
// CurrentLV=0 => unit is nA
|
||||
// CurrentLV=1 => unit is uA
|
||||
// CurrentLV=2 => unit is mA
|
||||
INSTRUCTION.CurrentLV = (*ins);
|
||||
// INSTRUCTION.CurrentLV = (*ins);
|
||||
|
||||
// ConstantCurrentRange=0 => current value is 0~499
|
||||
// ConstantCurrentRange=1 => current value is 500~999
|
||||
|
||||
+11
-4
@@ -29,7 +29,7 @@ static void WorkModeLED() {
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
case CYCLIC_VOLTAMMETRY: {
|
||||
case CV_CURVE: {
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
@@ -50,14 +50,17 @@ static void WorkModeLED() {
|
||||
break;
|
||||
}
|
||||
case VT_CURVE: {
|
||||
// WORKLED();
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
case IT_CURVE: {
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
|
||||
case CONSTANT_CURRENT:{
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
case VIS_RST: {
|
||||
LEDPowerON();
|
||||
break;
|
||||
@@ -66,6 +69,10 @@ static void WorkModeLED() {
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
case READ_VOUT_VALUE: {
|
||||
WORKLED();
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
LEDPowerON();
|
||||
@@ -82,7 +89,7 @@ static void KeyWorkModeLED() {
|
||||
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
|
||||
break;
|
||||
}
|
||||
case CYCLIC_VOLTAMMETRY:{
|
||||
case CV_CURVE:{
|
||||
LED_color(LIGHTLED, 0xF0, 0xF0, 0x00);
|
||||
break;
|
||||
}
|
||||
|
||||
+30
@@ -24,6 +24,7 @@ static uint32_t not_time_stamp;
|
||||
static uint8_t NotifyCurrent[4] = {0};
|
||||
static uint8_t NotifyVolt[4] = {0};
|
||||
static uint8_t NotifyImpedance[4] = {0};
|
||||
static uint8_t NotifyBatVolt = 0;
|
||||
|
||||
/**
|
||||
* counter of notify send.
|
||||
@@ -106,6 +107,35 @@ static void SendNotify() {
|
||||
// cyclic voltametry cycle number
|
||||
not_buf[17] = INSTRUCTION.CycleNumber;
|
||||
|
||||
//battery volt
|
||||
not_buf[18] = NotifyBatVolt;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
|
||||
}
|
||||
|
||||
static void FlushNotify(){
|
||||
not_buf[0] = INSTRUCTION.chip_id;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
not_buf[i + 1] = 0;
|
||||
not_buf[i + 5] = 0;
|
||||
not_buf[i + 9] = 0;
|
||||
}
|
||||
|
||||
// 1 Timestamp = 32 usec; 31 Timestamp ~= 1 msec
|
||||
not_time_stamp = 0; // msec
|
||||
|
||||
not_buf[13] = not_time_stamp & 0xff;
|
||||
not_buf[14] = (not_time_stamp >> 8) & 0xff;
|
||||
not_buf[15] = (not_time_stamp >> 16) & 0xff;
|
||||
not_buf[16] = (not_time_stamp >> 24) & 0xff;
|
||||
|
||||
// cyclic voltametry cycle number
|
||||
not_buf[17] = 0x00;
|
||||
|
||||
//battery volt
|
||||
not_buf[18] = 0x00;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
|
||||
}
|
||||
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef ELITERVout
|
||||
#define ELITERVout
|
||||
|
||||
static void RVout_Plot(RVoutMode *RVout) {
|
||||
// ADC gain is don't care when measuring voltage
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
|
||||
// read ADC VoutVolt
|
||||
ReadVoutVolt(spi_ADC_rxbuf);
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
RVout->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_DAC, spi_ADC_rxbuf);
|
||||
|
||||
NotifyVolt[0] = (uint8_t) (RVout->_MeasureData >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((RVout->_MeasureData & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((RVout->_MeasureData & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (RVout->_MeasureData & 0x000000FF);
|
||||
}
|
||||
|
||||
#endif
|
||||
+20
-18
@@ -3,14 +3,17 @@
|
||||
#define ELITERESET
|
||||
|
||||
static void reset() {
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
CCModeReset = 1;
|
||||
InitEliteInstruction();
|
||||
SampleRate_counter = 1;
|
||||
StepTimeCounter = 1;
|
||||
InitFlag();
|
||||
InitCT();
|
||||
|
||||
// IV/CV mode reset
|
||||
DiscardIVFirstData = 0;
|
||||
avg_number = 0;
|
||||
ADCRealCurrent_long = 0;
|
||||
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
|
||||
if (INSTRUCTION.eliteFxn == CONSTANT_CURRENT){
|
||||
INSTRUCTION.eliteFxn = 0;
|
||||
|
||||
@@ -46,14 +49,15 @@ static void reset() {
|
||||
}
|
||||
|
||||
static void Eliteinterrupt() {
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
CCModeReset = 1;
|
||||
InitEliteInstruction();
|
||||
StepTimeCounter = 1;
|
||||
SampleRate_counter = 1;
|
||||
InitFlag();
|
||||
InitCT();
|
||||
|
||||
// IV/CV mode reset
|
||||
DiscardIVFirstData = 0;
|
||||
avg_number = 0;
|
||||
ADCRealCurrent_long = 0;
|
||||
ADCGainControl(GAIN_AUTO);
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
|
||||
LEDPowerON();
|
||||
for (int i = 0; i < BLE_INS_BUFF_SIZE; i++) {
|
||||
@@ -85,12 +89,10 @@ static void Eliteinterrupt() {
|
||||
}
|
||||
|
||||
static void CleanBuffer() {
|
||||
PeriodicEvent = false;
|
||||
DACReset = true;
|
||||
CCModeReset = 1;
|
||||
// InitEliteInstruction();
|
||||
SampleRate_counter = 1;
|
||||
StepTimeCounter = 1;
|
||||
InitFlag();
|
||||
InitEliteInstruction();
|
||||
InitCT();
|
||||
DiscardIVFirstData = 0;
|
||||
avg_number = 0;
|
||||
ADCRealCurrent_long = 0;
|
||||
|
||||
|
||||
+10
-6
@@ -2,17 +2,21 @@
|
||||
#ifndef ELITEVT
|
||||
#define ELITEVT
|
||||
|
||||
static void VT_Plot() {
|
||||
static void VT_Plot(VTMode *VT) {
|
||||
// ADC gain is don't care when measuring voltage
|
||||
uint8_t ADCGain = 0;
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
|
||||
// read ADC volt
|
||||
ADCChannelSelect(ADC_CH_VOLT);
|
||||
CPUdelay(10);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
ReadVolt(spi_ADC_rxbuf);
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
DecodeADCValue(ADCGain, ADC_CH_VOLT, spi_ADC_rxbuf);
|
||||
VT->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_VOLT, spi_ADC_rxbuf);
|
||||
|
||||
NotifyVolt[0] = (uint8_t) (VT->_MeasureData >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((VT->_MeasureData & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((VT->_MeasureData & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (VT->_MeasureData & 0x000000FF);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+655
@@ -0,0 +1,655 @@
|
||||
/**
|
||||
*
|
||||
* struct WorkMode{
|
||||
* // Measure Only
|
||||
* ITMode;
|
||||
* VTMode;
|
||||
*
|
||||
* // Measure + VoltOut
|
||||
* RTMode;
|
||||
* IVMode;
|
||||
* CVMode;
|
||||
*
|
||||
* // Volt out only
|
||||
* VOutMode
|
||||
* }
|
||||
*
|
||||
* -------------------------------
|
||||
* // Measure Only
|
||||
* struct ITMode{
|
||||
* MeasureData
|
||||
* SetMeasureData()
|
||||
* GetMeasureData()
|
||||
* }
|
||||
*
|
||||
* -------------------------------
|
||||
* // VoltOut parameter
|
||||
* stuct VOutMode{
|
||||
* Vout_UC
|
||||
* VoltOrigin
|
||||
* Vstop;
|
||||
* Step;
|
||||
* StepTime;
|
||||
* CycleNumber;
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ELITE_WORK_DATA
|
||||
#define ELITE_WORK_DATA
|
||||
|
||||
#include "EliteInstruction.h"
|
||||
#define IV_CURVE 0b00010000
|
||||
#define CV_CURVE 0b00100000
|
||||
#define VOLT_OUTPUT 0b00110000
|
||||
#define ZT_CURVE 0b01000000
|
||||
#define VT_CURVE 0b01010000
|
||||
#define IT_CURVE 0b01100000
|
||||
#define SET_SAMPLE_RATE 0b01110000
|
||||
#define SET_ADC_GAIN 0b10000000
|
||||
#define DIFFERENTIAL_PULSE_VOLTAMMETRY 0b10100000
|
||||
#define SQUARE_WAVE_VOLTAMMETRY 0b10110000
|
||||
#define POTENTIAL_STATE 0b11000000
|
||||
#define CONSTANT_CURRENT 0b11010000
|
||||
#define READ_VOUT_VALUE 0b11100000
|
||||
|
||||
static bool Free_Work_Mode = false;
|
||||
typedef void (*InitWorkData) ();
|
||||
|
||||
/***** Template of Measure and VoltOut parameter *****/
|
||||
#define MEASURE \
|
||||
int32_t _MeasureData; \
|
||||
uint16_t _VoVi_Switch
|
||||
// void (*SetMeasureData) (struct Measure *, int32_t); \
|
||||
// int32_t (*GetMeasureData) (struct Measure *)
|
||||
|
||||
/* VoltOut is an UserCode */
|
||||
/* VOrigin, VStop, Step are all UserCode */
|
||||
#define VOUT_PARA \
|
||||
uint16_t _VoltOut; \
|
||||
uint16_t _VOrigin; \
|
||||
uint16_t _VStop; \
|
||||
uint16_t _Step; \
|
||||
uint16_t _StepTime; \
|
||||
uint16_t _CycleNumber
|
||||
// void (*SetVoltOut) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetVoltOut) (struct VoltOutPara *); \
|
||||
// void (*SetVOrigin) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetVOrigin) (struct VoltOutPara *); \
|
||||
// void (*SetVStop) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetVStop) (struct VoltOutPara *); \
|
||||
// void (*SetStep) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetStep) (struct VoltOutPara *); \
|
||||
// void (*SetStepTime) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetStepTime) (struct VoltOutPara *); \
|
||||
// void (*SetCycleNumber) (struct VoltOutPara *, uint16_t); \
|
||||
// uint16_t (*GetCycleNumber) (struct VoltOutPara *)
|
||||
|
||||
|
||||
/* CC Mode parameter
|
||||
* @ Measure : measure current value (nA)
|
||||
* @ Charge : Charge or Discharge
|
||||
* @ BatteryV : Vin measure battery voltage (mV)
|
||||
* @ value : constant current setting.
|
||||
* Current value divide current level into 3,000,001 pieces
|
||||
* 1,500,000 is zero point; 3,000,000 is 15mA
|
||||
* Current = (value - 1,500,000)/100,000 mA
|
||||
* @ Done : Done = false => Ignore Vmin condition;
|
||||
* Done will be true, if BatteryV <= Vmin last for about 12sec in discharge mode
|
||||
* @ VMax : voltage upper bound in charge mode
|
||||
* CC->value will set to zero if BatteryV >= VMax in charge mode
|
||||
* @ VMin : voltage lower bound in charge mode
|
||||
* CC->value will set to zero if BatteryV <=> VMin in charge mode
|
||||
* Note that VMax and VMin are always larger or equal to zero
|
||||
* @_Transform2RealnA : transform a current user code (IUC) to real current in nA
|
||||
*/
|
||||
#define CC_PARA \
|
||||
MEASURE; \
|
||||
uint8_t Charge; \
|
||||
int32_t BatteryV; \
|
||||
int32_t value; \
|
||||
uint16_t Done; \
|
||||
uint16_t VMax; \
|
||||
uint16_t VMin; \
|
||||
int32_t (*_Transform2RealnA)(struct CCModePara *)
|
||||
|
||||
|
||||
#define LIMIT \
|
||||
uint32_t _LimitValue; \
|
||||
void (*SetLimitValue) (struct Limit *, uint32_t); \
|
||||
uint32_t (*GetLimitValue) (struct Limit*)
|
||||
|
||||
struct Measure{
|
||||
MEASURE;
|
||||
};
|
||||
|
||||
struct VoltOutPara{
|
||||
VOUT_PARA;
|
||||
};
|
||||
|
||||
struct Limit{
|
||||
LIMIT;
|
||||
};
|
||||
|
||||
struct CCModePara{
|
||||
CC_PARA;
|
||||
};
|
||||
/***** End of Measure and VoltOut parameter *****/
|
||||
|
||||
|
||||
/***** Measure Only Mode *****/
|
||||
//void _SetMeasureData(struct Measure *self, int32_t Data){
|
||||
// self->_MeasureData = Data;
|
||||
//}
|
||||
//
|
||||
//int32_t _GetMeasureData(struct Measure *self){
|
||||
// return self->_MeasureData;
|
||||
//}
|
||||
|
||||
|
||||
/**** Limit Mode ****/
|
||||
//LimitValue
|
||||
void _SetLimitValue(struct Limit *self, uint32_t LimitValue){
|
||||
self->_LimitValue = LimitValue;
|
||||
}
|
||||
uint32_t _GetLimitValue(struct Limit *self){
|
||||
return self->_LimitValue;
|
||||
}
|
||||
|
||||
/* IT Mode Data */
|
||||
typedef struct _ITMode{
|
||||
MEASURE;
|
||||
LIMIT;
|
||||
}ITMode;
|
||||
|
||||
ITMode * InitITMode(){
|
||||
ITMode *ret = malloc(sizeof(ITMode));
|
||||
ret->_MeasureData = 0;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
|
||||
ret->_LimitValue = 0;
|
||||
|
||||
ret->SetLimitValue = &_SetLimitValue;
|
||||
ret->GetLimitValue = &_GetLimitValue;
|
||||
return ret;
|
||||
}
|
||||
/* End of IT Mode Data */
|
||||
|
||||
/* VT Mode Data */
|
||||
typedef struct _VTMode{
|
||||
MEASURE;
|
||||
}VTMode;
|
||||
|
||||
VTMode * InitVTMode(){
|
||||
VTMode *ret = malloc(sizeof(VTMode));
|
||||
ret->_MeasureData = 0;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
return ret;
|
||||
}
|
||||
/* End of VT Mode Data */
|
||||
|
||||
/* ReadVOut Mode Data */
|
||||
typedef struct _RVoutMode{
|
||||
MEASURE;
|
||||
}RVoutMode;
|
||||
|
||||
RVoutMode * InitRVoutMode(){
|
||||
RVoutMode *ret = malloc(sizeof(RVoutMode));
|
||||
ret->_MeasureData = 0;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
return ret;
|
||||
}
|
||||
/* End of ReadVOut Mode Data */
|
||||
/***** End of Measure Only Mode *****/
|
||||
|
||||
|
||||
/**** VoltOut Only Mode ****/
|
||||
//// VoltOut
|
||||
//void _SetVoltOut(struct VoltOutPara *self, uint16_t VoltOut){
|
||||
// self->_VoltOut = VoltOut;
|
||||
//}
|
||||
//uint16_t _GetVoltOut(struct VoltOutPara *self){
|
||||
// return self->_VoltOut;
|
||||
//}
|
||||
//
|
||||
//// VOrigin
|
||||
//void _SetVOrigin(struct VoltOutPara *self, uint16_t VOrigin){
|
||||
// self->_VOrigin = VOrigin;
|
||||
//}
|
||||
//uint16_t _GetVOrigin(struct VoltOutPara *self){
|
||||
// return self->_VOrigin;
|
||||
//}
|
||||
//
|
||||
//// VStop
|
||||
//void _SetVStop(struct VoltOutPara *self, uint16_t VStop){
|
||||
// self->_VStop = VStop;
|
||||
//}
|
||||
//uint16_t _GetVStop(struct VoltOutPara *self){
|
||||
// return self->_VStop;
|
||||
//}
|
||||
//
|
||||
//// Step
|
||||
//void _SetStep(struct VoltOutPara *self, uint16_t Step){
|
||||
// self->_Step = Step;
|
||||
//}
|
||||
//uint16_t _GetStep(struct VoltOutPara *self){
|
||||
// return self->_Step;
|
||||
//}
|
||||
//
|
||||
//// StepTime
|
||||
//void _SetStepTime(struct VoltOutPara *self, uint16_t StepTime){
|
||||
// self->_StepTime = StepTime;
|
||||
//}
|
||||
//uint16_t _GetStepTime(struct VoltOutPara *self){
|
||||
// return self->_StepTime;
|
||||
//}
|
||||
//
|
||||
//// CycleNumber
|
||||
//void _SetCycleNumber(struct VoltOutPara *self, uint16_t CycleNumber){
|
||||
// self->_CycleNumber = CycleNumber;
|
||||
//}
|
||||
//uint16_t _GetCycleNumber(struct VoltOutPara *self){
|
||||
// return self->_CycleNumber;
|
||||
//}
|
||||
|
||||
|
||||
/* VoltOut Mode Data */
|
||||
typedef struct _VoltOutMode{
|
||||
VOUT_PARA;
|
||||
}VoltOutMode;
|
||||
|
||||
VoltOutMode *InitVoltOutMode(){
|
||||
VoltOutMode *ret = malloc(sizeof(VoltOutMode));
|
||||
ret->_VoltOut = INSTRUCTION.VoltConstant; // 25000 is DAC_ZERO
|
||||
ret->_VOrigin = DAC_ZERO;
|
||||
ret->_VStop = DAC_ZERO;
|
||||
ret->_Step = 0;
|
||||
ret->_StepTime = 10000; // STEPTIME_ONE_SEC
|
||||
ret->_CycleNumber = 1;
|
||||
|
||||
// ret->SetVoltOut = &_SetVoltOut;
|
||||
// ret->GetVoltOut = &_GetVoltOut;
|
||||
// ret->SetVOrigin = &_SetVOrigin;
|
||||
// ret->GetVOrigin = &_GetVOrigin;
|
||||
// ret->SetVStop = &_SetVStop;
|
||||
// ret->GetVStop = &_GetVStop;
|
||||
// ret->SetStep = &_SetStep;
|
||||
// ret->GetStep = &_GetStep;
|
||||
// ret->SetStepTime = &_SetStepTime;
|
||||
// ret->GetStepTime = &_GetStepTime;
|
||||
// ret->SetCycleNumber = &_SetCycleNumber;
|
||||
// ret->GetCycleNumber = &_GetCycleNumber;
|
||||
return ret;
|
||||
}
|
||||
/* End of VoltOut Mode Data */
|
||||
/**** End of VoltOut Only Mode ****/
|
||||
|
||||
|
||||
/**** Measure + VoltOut Mode ****/
|
||||
/* IV Mode Data */
|
||||
typedef struct _IVMode{
|
||||
MEASURE;
|
||||
int32_t MeasureVolt;
|
||||
VOUT_PARA;
|
||||
LIMIT;
|
||||
int32_t _MeasureBatvolt;
|
||||
}IVMode;
|
||||
|
||||
IVMode *InitIVMode(){
|
||||
IVMode *ret = malloc(sizeof(IVMode));
|
||||
ret->_MeasureData = 0;
|
||||
ret->MeasureVolt = (INSTRUCTION.VoltOrigin - DAC_ZERO)/5;
|
||||
ret->_VoVi_Switch = INSTRUCTION.VoVi_Switch;
|
||||
|
||||
ret->_VoltOut = DAC_ZERO;
|
||||
ret->_VOrigin = INSTRUCTION.VoltOrigin;
|
||||
ret->_VStop = INSTRUCTION.VoltFinal;
|
||||
ret->_Step = INSTRUCTION.Step;
|
||||
ret->_StepTime = INSTRUCTION.StepTime;
|
||||
ret->_CycleNumber = 1;
|
||||
ret->_MeasureBatvolt = 0;
|
||||
|
||||
|
||||
// ret->SetVoltOut = &_SetVoltOut;
|
||||
// ret->GetVoltOut = &_GetVoltOut;
|
||||
// ret->SetVOrigin = &_SetVOrigin;
|
||||
// ret->GetVOrigin = &_GetVOrigin;
|
||||
// ret->SetVStop = &_SetVStop;
|
||||
// ret->GetVStop = &_GetVStop;
|
||||
// ret->SetStep = &_SetStep;
|
||||
// ret->GetStep = &_GetStep;
|
||||
// ret->SetStepTime = &_SetStepTime;
|
||||
// ret->GetStepTime = &_GetStepTime;
|
||||
// ret->SetCycleNumber = &_SetCycleNumber;
|
||||
// ret->GetCycleNumber = &_GetCycleNumber;
|
||||
|
||||
ret->_LimitValue = 1e5;
|
||||
|
||||
ret->SetLimitValue = &_SetLimitValue;
|
||||
ret->GetLimitValue = &_GetLimitValue;
|
||||
return ret;
|
||||
}
|
||||
/* End of IV Mode Data */
|
||||
|
||||
/* RT Mode Data */
|
||||
typedef struct _RTMode{
|
||||
MEASURE;
|
||||
VOUT_PARA;
|
||||
}RTMode;
|
||||
|
||||
RTMode * InitRTMode(){
|
||||
RTMode *ret = malloc(sizeof(RTMode));
|
||||
ret->_MeasureData = 0;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
|
||||
ret->_VoltOut = DAC_ZERO; // 25000 is DAC_ZERO
|
||||
ret->_VOrigin = DAC_ZERO;
|
||||
ret->_VStop = DAC_ZERO;
|
||||
ret->_Step = 0;
|
||||
ret->_StepTime = 10000; // STEPTIME_ONE_SEC
|
||||
ret->_CycleNumber = 1;
|
||||
|
||||
// ret->SetVoltOut = &_SetVoltOut;
|
||||
// ret->GetVoltOut = &_GetVoltOut;
|
||||
// ret->SetVOrigin = &_SetVOrigin;
|
||||
// ret->GetVOrigin = &_GetVOrigin;
|
||||
// ret->SetVStop = &_SetVStop;
|
||||
// ret->GetVStop = &_GetVStop;
|
||||
// ret->SetStep = &_SetStep;
|
||||
// ret->GetStep = &_GetStep;
|
||||
// ret->SetStepTime = &_SetStepTime;
|
||||
// ret->GetStepTime = &_GetStepTime;
|
||||
// ret->SetCycleNumber = &_SetCycleNumber;
|
||||
// ret->GetCycleNumber = &_GetCycleNumber;
|
||||
return ret;
|
||||
}
|
||||
/* End of RT Mode Data */
|
||||
|
||||
/* CV Mode*/
|
||||
typedef struct _CVMode{
|
||||
MEASURE;
|
||||
int32_t MeasureVolt;
|
||||
VOUT_PARA;
|
||||
int32_t _MeasureBatvolt;
|
||||
}CVMode;
|
||||
|
||||
CVMode * InitCVMode(){
|
||||
CVMode *ret = malloc(sizeof(CVMode));
|
||||
ret->_MeasureData = (INSTRUCTION.VoltOrigin- DAC_ZERO)/5;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
ret->MeasureVolt = 20000;
|
||||
|
||||
ret->_VoltOut = DAC_ZERO; // 25000 is DAC_ZERO
|
||||
ret->_VOrigin = INSTRUCTION.VoltOrigin;
|
||||
ret->_VStop = INSTRUCTION.VoltFinal;
|
||||
ret->_Step = INSTRUCTION.Step;
|
||||
ret->_StepTime = INSTRUCTION.StepTime; // STEPTIME_ONE_SEC
|
||||
ret->_CycleNumber = INSTRUCTION.CycleNumber;
|
||||
ret->_VoVi_Switch = INSTRUCTION.VoVi_Switch;
|
||||
ret->_MeasureBatvolt = 0;
|
||||
// ret->SetVoltOut = &_SetVoltOut;
|
||||
// ret->GetVoltOut = &_GetVoltOut;
|
||||
// ret->SetVOrigin = &_SetVOrigin;
|
||||
// ret->GetVOrigin = &_GetVOrigin;
|
||||
// ret->SetVStop = &_SetVStop;
|
||||
// ret->GetVStop = &_GetVStop;
|
||||
// ret->SetStep = &_SetStep;
|
||||
// ret->GetStep = &_GetStep;
|
||||
// ret->SetStepTime = &_SetStepTime;
|
||||
// ret->GetStepTime = &_GetStepTime;
|
||||
// ret->SetCycleNumber = &_SetCycleNumber;
|
||||
// ret->GetCycleNumber = &_GetCycleNumber;
|
||||
return ret;
|
||||
}
|
||||
/*End of CV Mode*/
|
||||
|
||||
/* Const Current Mode */
|
||||
#define CC_ZERO_POINT 0
|
||||
#define MAX_DAC_UC 50000
|
||||
#define MIN_DAC_UC 0
|
||||
|
||||
/*********************************************************************
|
||||
* @struct Constant Current Code
|
||||
*
|
||||
* @brief A struct to handle CC mode command
|
||||
*/
|
||||
typedef struct _CCMode{
|
||||
CC_PARA;
|
||||
}CCMode;
|
||||
|
||||
/*********************************************************************
|
||||
* @fn Transform2RealnA
|
||||
*
|
||||
* @brief transform an IUC into real current value in nA.
|
||||
*
|
||||
* @param self, which is an IUC
|
||||
*
|
||||
* @return an int32_t current value in nA
|
||||
*/
|
||||
int32_t _Transform2RealnA(struct CCModePara *self){
|
||||
int32_t IUCReal;
|
||||
|
||||
// self->value : 0 ~ 1500000 (which is 0 ~ 1500000 (10nA) )
|
||||
if(self->Charge){
|
||||
IUCReal = (self->value - CC_ZERO_POINT) * 10;
|
||||
}
|
||||
else{
|
||||
IUCReal = -1 * (self->value - CC_ZERO_POINT) * 10;
|
||||
}
|
||||
return IUCReal;
|
||||
}
|
||||
|
||||
CCMode * InitCCMode(){
|
||||
CCMode *ret = malloc(sizeof(CCMode));
|
||||
ret->_MeasureData = 0;
|
||||
ret->Charge = INSTRUCTION.Charge;
|
||||
ret->BatteryV = 0;
|
||||
ret->Done = 0;
|
||||
|
||||
ret->value = INSTRUCTION.ConstantCurrent;
|
||||
ret->VMax = INSTRUCTION.VoltLimit + DAC_ZERO;
|
||||
ret->VMin = INSTRUCTION.VoltLimit + DAC_ZERO;
|
||||
ret->_Transform2RealnA = &_Transform2RealnA;
|
||||
return ret;
|
||||
}
|
||||
/*End of Const Current Mode Mode*/
|
||||
|
||||
/* Cycle CC Mode */
|
||||
typedef struct _CCCMode{
|
||||
CC_PARA;
|
||||
|
||||
/* Vmax and Vmin */
|
||||
// Vmax protect battery charge
|
||||
// Vmin protect battery discharge, uint = mV
|
||||
|
||||
/* Charge/Discharge Current */
|
||||
int32_t ChargeCurrent;
|
||||
int32_t DischargeCurrent;
|
||||
uint8_t CycleNumber;
|
||||
|
||||
bool StandBy;
|
||||
uint32_t StandByTime;
|
||||
}CCCMode;
|
||||
|
||||
CCCMode * InitCCCMode(){
|
||||
CCCMode *ret = malloc(sizeof(CCCMode));
|
||||
ret->_MeasureData = 0;
|
||||
ret->Charge = 1;
|
||||
ret->BatteryV = 0;
|
||||
|
||||
ret->value = CC_ZERO_POINT;
|
||||
ret->VMax = MAX_DAC_UC; // max DAC UserCode
|
||||
ret->VMin = MIN_DAC_UC; // min DAC UserCode
|
||||
ret->ChargeCurrent = 0;
|
||||
ret->DischargeCurrent = 0;
|
||||
ret->CycleNumber = 0;
|
||||
ret->StandBy = false;
|
||||
ret->StandByTime = 0;
|
||||
ret->_Transform2RealnA = &_Transform2RealnA;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* End of Cycle CC Mode */
|
||||
|
||||
/** Potential State Mode **/
|
||||
typedef struct _PS{
|
||||
// measure
|
||||
MEASURE; // circuit current
|
||||
int32_t ReferenceVolt;
|
||||
int32_t _MeasureVolt;
|
||||
VOUT_PARA;
|
||||
}PSMode;
|
||||
|
||||
PSMode *InitPSMode(){
|
||||
PSMode *ret = malloc(sizeof(PSMode));
|
||||
ret->_MeasureData = 0;
|
||||
// ret->SetMeasureData = &_SetMeasureData;
|
||||
// ret->GetMeasureData = &_GetMeasureData;
|
||||
ret->ReferenceVolt = 0;
|
||||
ret->_MeasureVolt = INSTRUCTION.VoltOrigin;
|
||||
|
||||
ret->_VoltOut = DAC_ZERO; // 25000 is DAC_ZERO
|
||||
ret->_VOrigin = INSTRUCTION.VoltOrigin;
|
||||
ret->_VStop = INSTRUCTION.VoltFinal;
|
||||
ret->_Step = INSTRUCTION.Step;
|
||||
ret->_StepTime = INSTRUCTION.StepTime; // STEPTIME_ONE_SEC
|
||||
ret->_CycleNumber = INSTRUCTION.CycleNumber;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** End of Potential State Mode **/
|
||||
|
||||
typedef union _WorkMode{
|
||||
// Measure only
|
||||
ITMode *IT;
|
||||
VTMode *VT;
|
||||
|
||||
// Output Only
|
||||
VoltOutMode *VO;
|
||||
|
||||
// Measure + Output
|
||||
IVMode *IV;
|
||||
CVMode *CV;
|
||||
RTMode *RT;
|
||||
CCMode *CC;
|
||||
// CCCMode *CCC;
|
||||
PSMode *PS;
|
||||
|
||||
//test mode
|
||||
RVoutMode *RVout;
|
||||
}WorkMode;
|
||||
|
||||
WorkMode *CreateWorkMode(){
|
||||
WorkMode *ret = malloc(sizeof(WorkMode));
|
||||
return ret;
|
||||
}
|
||||
|
||||
void InitWorkMode(WorkMode *WM){
|
||||
switch(INSTRUCTION.eliteFxn){
|
||||
case IV_CURVE:
|
||||
WM->IV = InitIVMode();
|
||||
break;
|
||||
case CV_CURVE:
|
||||
WM->CV = InitCVMode();
|
||||
break;
|
||||
case VOLT_OUTPUT:
|
||||
WM->VO = InitVoltOutMode();
|
||||
break;
|
||||
case ZT_CURVE:
|
||||
WM->RT = InitRTMode();
|
||||
break;
|
||||
case VT_CURVE:
|
||||
WM->VT = InitVTMode();
|
||||
break;
|
||||
case IT_CURVE:
|
||||
WM->IT = InitITMode();
|
||||
break;
|
||||
case CONSTANT_CURRENT:
|
||||
WM->CC = InitCCMode();
|
||||
break;
|
||||
// case CYCLE_CONSTANT_CURRENT:
|
||||
// WM->CCC = InitCCCMode();
|
||||
// break;
|
||||
case READ_VOUT_VALUE:
|
||||
WM->RVout = InitRVoutMode();
|
||||
break;
|
||||
default:
|
||||
WM->VT = InitVTMode();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void FreeWorkMode(WorkMode *WM){
|
||||
switch(INSTRUCTION.eliteFxn){
|
||||
case IV_CURVE:
|
||||
if(WM->IV != NULL){
|
||||
free(WM->IV);
|
||||
WM->IV = NULL;
|
||||
}
|
||||
break;
|
||||
case CV_CURVE:
|
||||
if(WM->CV != NULL){
|
||||
free(WM->CV);
|
||||
WM->CV = NULL;
|
||||
}
|
||||
break;
|
||||
case VOLT_OUTPUT:
|
||||
if(WM->VO != NULL){
|
||||
free(WM->VO);
|
||||
WM->VO = NULL;
|
||||
}
|
||||
break;
|
||||
case ZT_CURVE:
|
||||
if(WM->RT != NULL){
|
||||
free(WM->RT);
|
||||
WM->RT = NULL;
|
||||
}
|
||||
break;
|
||||
case VT_CURVE:
|
||||
if(WM->VT != NULL){
|
||||
free(WM->VT);
|
||||
WM->VT = NULL;
|
||||
}
|
||||
break;
|
||||
case IT_CURVE:
|
||||
if(WM->IT != NULL){
|
||||
free(WM->IT);
|
||||
WM->IT = NULL;
|
||||
}
|
||||
break;
|
||||
case CONSTANT_CURRENT:
|
||||
if(WM->CC != NULL){
|
||||
free(WM->CC);
|
||||
WM->CC = NULL;
|
||||
}
|
||||
break;
|
||||
case READ_VOUT_VALUE:
|
||||
if(WM->RVout != NULL){
|
||||
free(WM->RVout);
|
||||
WM->RVout = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// case CYCLE_CONSTANT_CURRENT:
|
||||
// if(WM->CCC != NULL){
|
||||
// free(WM->CCC);
|
||||
// WM->CCC = NULL;
|
||||
// }
|
||||
// break;
|
||||
default:
|
||||
if(WM->IV != NULL){
|
||||
free(WM->IV);
|
||||
WM->IV = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// free(WM);
|
||||
}
|
||||
|
||||
#endif
|
||||
+96
-51
@@ -9,62 +9,107 @@ static void ZT_notify(int32_t impedance);
|
||||
// => calculate the resister
|
||||
// change the output voltage step
|
||||
// => get a R-T curve (with resolution = 1 sample/volt step )
|
||||
static void ZT_Plot() {
|
||||
int32_t Real_Resister = 0;
|
||||
static uint16_t CurrentMeasure=0, VoltMeasure=0;
|
||||
uint8_t SPICurrent[SPI_ADC_SIZE]={0}, SPIVolt[SPI_ADC_SIZE]={0};
|
||||
static uint8_t VoltCurrentSwitch = 0;
|
||||
static void ZT_Plot(RTMode *RT) {
|
||||
// int32_t Real_Resister = 0;
|
||||
// static uint16_t CurrentMeasure=0, VoltMeasure=0;
|
||||
// uint8_t SPICurrent[SPI_ADC_SIZE]={0}, SPIVolt[SPI_ADC_SIZE]={0};
|
||||
// static uint8_t VoltCurrentSwitch = 0;
|
||||
|
||||
int32_t volt_32 = 0;
|
||||
int32_t current_32 = 0;
|
||||
int32_t resister_32 = 0;
|
||||
|
||||
if(INSTRUCTION.AutoGainEnable){
|
||||
current_32 = AutoGainReadCurrent(spi_ADC_rxbuf);
|
||||
}
|
||||
else{
|
||||
ReadCurrent(spi_ADC_rxbuf);
|
||||
current_32 = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
|
||||
|
||||
volt_32 = User2Real(INSTRUCTION.VoltConstant)*1e6;
|
||||
// ReadVolt(SPIVolt);
|
||||
// VoltMeasure = (uint16_t) (SPIVolt[0] << 8) | (uint16_t) (SPIVolt[1]);
|
||||
// volt_32 = DecodeADCVolt(VoltMeasure)*1e4;
|
||||
resister_32 = volt_32 / current_32;
|
||||
volt_32 = volt_32 / 1e6; //mV
|
||||
|
||||
|
||||
NotifyVolt[0] = (uint8_t) (volt_32 >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((volt_32 & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((volt_32 & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (volt_32 & 0x000000FF);
|
||||
|
||||
NotifyCurrent[0] = (uint8_t) (current_32 >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((current_32 & 0x00FF0000) >> 16);
|
||||
NotifyCurrent[2] = (uint8_t) ((current_32 & 0x0000FF00) >> 8);
|
||||
NotifyCurrent[3] = (uint8_t) (current_32 & 0x000000FF);
|
||||
|
||||
NotifyImpedance[0] = (uint8_t) (resister_32 >> 24);
|
||||
NotifyImpedance[1] = (uint8_t) ((resister_32 & 0x00FF0000) >> 16);
|
||||
NotifyImpedance[2] = (uint8_t) ((resister_32 & 0x0000FF00) >> 8);
|
||||
NotifyImpedance[3] = (uint8_t) (resister_32 & 0x000000FF);
|
||||
|
||||
/* Elite 100 = 100R
|
||||
Elite 1000 = 1KR
|
||||
Elite 10000 = 10KR
|
||||
Elite 100000 = 100KR
|
||||
Elite 1000000 = 1MR
|
||||
*/
|
||||
|
||||
// set ADC GAIN
|
||||
if(INSTRUCTION.ResisterMeter == RESISTER_METER_SMALL){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
}
|
||||
else if(INSTRUCTION.ResisterMeter == RESISTER_METER_MIDDLE1){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
}
|
||||
else if(INSTRUCTION.ResisterMeter == RESISTER_METER_MIDDLE2){
|
||||
INSTRUCTION.ADCGainLevel = GAIN_10K;
|
||||
}
|
||||
else{
|
||||
INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
}
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
// if(INSTRUCTION.ResisterMeter == RESISTER_METER_LARGE){
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
// }
|
||||
// else if(INSTRUCTION.ResisterMeter == RESISTER_METER_MIDDLE2){
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_200R;
|
||||
// }
|
||||
// else if(INSTRUCTION.ResisterMeter == RESISTER_METER_MIDDLE1){
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_10K;
|
||||
// }
|
||||
// else{
|
||||
// INSTRUCTION.ADCGainLevel = GAIN_200K;
|
||||
// }
|
||||
// ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
|
||||
if(VoltCurrentSwitch < 9){
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(SPICurrent);
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 9){
|
||||
// read current
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(10);
|
||||
ADC_read(SPICurrent);
|
||||
CurrentMeasure = (uint16_t) (SPICurrent[0] << 8) | (uint16_t) (SPICurrent[1]);
|
||||
VoltCurrentSwitch ++;
|
||||
}
|
||||
else if(VoltCurrentSwitch <18){
|
||||
// read volt
|
||||
ADCChannelSelect(ADC_CH_VOLT);
|
||||
CPUdelay(10);
|
||||
ADC_read(SPIVolt);
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
else if(VoltCurrentSwitch == 18){
|
||||
// read volt
|
||||
ADCChannelSelect(ADC_CH_VOLT);
|
||||
CPUdelay(10);
|
||||
ADC_read(SPIVolt);
|
||||
VoltMeasure = (uint16_t) (SPIVolt[0] << 8) | (uint16_t) (SPIVolt[1]);
|
||||
VoltCurrentSwitch++;
|
||||
}
|
||||
else{
|
||||
VoltCurrentSwitch = 0;
|
||||
}
|
||||
// Use 9-th measure value as real-measure value
|
||||
// because some value in the begin are garbage
|
||||
// if(VoltCurrentSwitch < 9){
|
||||
// ADCChannelSelect(ADC_CH_CURRENT);
|
||||
// CPUdelay(10);
|
||||
// ADC_read(SPICurrent);
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
// else if(VoltCurrentSwitch == 9){
|
||||
// // read current
|
||||
// ADCChannelSelect(ADC_CH_CURRENT);
|
||||
// CPUdelay(10);
|
||||
// ADC_read(SPICurrent);
|
||||
// CurrentMeasure = (uint16_t) (SPICurrent[0] << 8) | (uint16_t) (SPICurrent[1]);
|
||||
// VoltCurrentSwitch ++;
|
||||
// }
|
||||
// else if(VoltCurrentSwitch <18){
|
||||
// // read volt
|
||||
// ADCChannelSelect(ADC_CH_VOLT);
|
||||
// CPUdelay(10);
|
||||
// ADC_read(SPIVolt);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
// else if(VoltCurrentSwitch == 18){
|
||||
// // read volt
|
||||
// ADCChannelSelect(ADC_CH_VOLT);
|
||||
// CPUdelay(10);
|
||||
// ADC_read(SPIVolt);
|
||||
// VoltMeasure = (uint16_t) (SPIVolt[0] << 8) | (uint16_t) (SPIVolt[1]);
|
||||
// VoltCurrentSwitch++;
|
||||
// }
|
||||
// else{
|
||||
// VoltCurrentSwitch = 0;
|
||||
// }
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
DecodeResister(INSTRUCTION.ADCGainLevel, CurrentMeasure, VoltMeasure);
|
||||
// DecodeResister(INSTRUCTION.ADCGainLevel, CurrentMeasure, VoltMeasure);
|
||||
// Real_Resister = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
#define ADC_CS IOID_8
|
||||
#define DAC_CS IOID_9
|
||||
|
||||
#define Turnon100R IOID_5
|
||||
#define Turnon200R IOID_5
|
||||
#define Turnon10K IOID_6
|
||||
|
||||
/* I2C */
|
||||
@@ -45,7 +45,7 @@ const PIN_Config BLE_IO[] = {
|
||||
enable_10v | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // 10V_enable
|
||||
enable_5v | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // 5V_enable
|
||||
shutdown_6994 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // turn off power
|
||||
Turnon100R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
Turnon200R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
Turnon10K | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
switch_on | PIN_INPUT_EN | PIN_PULLDOWN,
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
|
||||
#ifndef VERSION_DATE
|
||||
#define VERSION_DATE
|
||||
|
||||
#define VERSION_DATE_YEAR 20
|
||||
#define VERSION_DATE_MONTH 3
|
||||
#define VERSION_DATE_DAY 13
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 49
|
||||
|
||||
// this is NOT the version hash !!
|
||||
// it's the last version hash
|
||||
#define VERSION_HASH bbc6c231a263d20f751cd2807f863e4e7783c8ef
|
||||
#define VERSION_GIT_BRANCH Elite_OBJ_Version
|
||||
#endif
|
||||
+192
-80
@@ -59,7 +59,7 @@ VIS_FUH = 0b1001_0000 # 9x flush
|
||||
VIS_INT = 0b0110_0000 # 6x interrupt
|
||||
VIS_SHIFT_200K = 0b1010_0000 # Ax shift gear to 200K
|
||||
VIS_SHIFT_10K = 0b1110_0000 # Ex shift gear to 10K
|
||||
VIS_SHIFT_100R = 0b1000_0000 # 8x shift gear to 100R
|
||||
VIS_SHIFT_200R = 0b1000_0000 # 8x shift gear to 100R
|
||||
|
||||
|
||||
=========================
|
||||
@@ -190,14 +190,14 @@ MUX
|
||||
PGA
|
||||
programmable gain amplifier configuration
|
||||
(Full Scale Range = FSR)
|
||||
000 = FSR is ��6.144 V
|
||||
001 = FSR is ��4.096 V
|
||||
010 = FSR is ��2.048 V (default)
|
||||
011 = FSR is ��1.024 V
|
||||
100 = FSR is ��0.512 V
|
||||
101 = FSR is ��0.256 V
|
||||
110 = FSR is ��0.256 V
|
||||
111 = FSR is ��0.256 V
|
||||
000 = FSR is 6.144 V
|
||||
001 = FSR is 4.096 V
|
||||
010 = FSR is 2.048 V (default)
|
||||
011 = FSR is 1.024 V
|
||||
100 = FSR is 0.512 V
|
||||
101 = FSR is 0.256 V
|
||||
110 = FSR is 0.256 V
|
||||
111 = FSR is 0.256 V
|
||||
|
||||
M
|
||||
ADC operating mode
|
||||
@@ -431,6 +431,7 @@ static Clock_Struct periodicClock;
|
||||
#include "simple_gatt_profile.h"
|
||||
|
||||
static bool PeriodicEvent = false;
|
||||
static bool InitPeriodicEvent = true;
|
||||
static ICall_Semaphore semaphore;
|
||||
static uint16_t events;
|
||||
|
||||
@@ -491,6 +492,7 @@ static uint8 channel_table[CHANNEL_COUNT] = {0};
|
||||
*/
|
||||
static int8 channel_pointer = -1;
|
||||
static uint8_t not_buf[BLE_DAT_BUFF_SIZE] = {0};
|
||||
static uint8_t cis_buf[BLE_CIS_BUFF_SIZE] = {0};
|
||||
|
||||
/*=====================================
|
||||
==== headstage function prototype ====
|
||||
@@ -535,6 +537,7 @@ static void ADC_test_read(uint8_t *ADCdata); // for auto shifting
|
||||
static void ADCGainControl(uint8_t ADCLevel);
|
||||
static void ADCChannelSelect(uint8_t ADCChannel);
|
||||
static int32_t DecodeADCVolt(uint16_t ADC_measure);
|
||||
static int32_t DecodeADCVoutVolt(uint16_t ADC_measure);
|
||||
static int32_t DecodeADCCurrent(uint8_t ADCGain, uint16_t ADC_measure);
|
||||
static void Impedance_Calculate(uint16_t Voltage, int32_t Current);
|
||||
static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_raw);
|
||||
@@ -575,11 +578,13 @@ static void set_update_instruction_callback(update_instruction_callback_type cal
|
||||
#define VIS_INT 0b01100000
|
||||
#define VIS_SHIFT_200K 0b10100000
|
||||
#define VIS_SHIFT_10K 0b11100000
|
||||
#define VIS_SHIFT_100R 0b10000000
|
||||
#define VIS_SHIFT_200R 0b10000000
|
||||
#define VIS_DEVICE_SHINY 0b00010000
|
||||
#define VIS_SHINY_DIS 0b00100000
|
||||
|
||||
// real instruction
|
||||
#define IV_CURVE 0b00010000
|
||||
#define CYCLIC_VOLTAMMETRY 0b00100000
|
||||
#define CV_CURVE 0b00100000
|
||||
#define VOLT_OUTPUT 0b00110000
|
||||
#define ZT_CURVE 0b01000000
|
||||
#define VT_CURVE 0b01010000
|
||||
@@ -590,9 +595,11 @@ static void set_update_instruction_callback(update_instruction_callback_type cal
|
||||
#define SQUARE_WAVE_VOLTAMMETRY 0b10110000
|
||||
#define POTENTIAL_STATE 0b11000000
|
||||
#define CONSTANT_CURRENT 0b11010000
|
||||
#define SET_RESISTER_LEVEL 0b11100000
|
||||
#define READ_VOUT_VALUE 0b11100000
|
||||
#define CYCLE_CONSTANT_CURRENT 0b11110000
|
||||
|
||||
// CIS instruction
|
||||
#define CIS_VERSION 0x40
|
||||
|
||||
// test instruction
|
||||
#define ADC_TEST 0b10010000
|
||||
@@ -601,32 +608,20 @@ static void set_update_instruction_callback(update_instruction_callback_type cal
|
||||
static uint16_t DAC_outputV(uint16_t voltLV);
|
||||
static int32_t DAC_to_realV(uint16_t DACcode);
|
||||
|
||||
/* DAC reset parameter */
|
||||
#define DAC_ZERO 0x85B2
|
||||
#define DAC_POS_MAX 0x0000
|
||||
#define DAC_NEG_MAX 0xFFFF
|
||||
static uint16_t DACUserCode = 0x0000;
|
||||
|
||||
static uint32_t SampleRateTable[6] = {10, 100, 1000, 5000, 10000, 100000}; // 1 =>100 Hz, 10000=>0.01 Hz
|
||||
static uint16_t SampleRate_counter = 1;
|
||||
static uint32_t SampleRateTable[6] = {100, 1000, 10000, 50000, 100000, 1000000}; // 100 =>100 Hz, 1000000=>0.01 Hz
|
||||
|
||||
// record value for IV curve to calculate average current
|
||||
static int16_t avg_number = 0;
|
||||
static uint8_t DiscardIVFirstData = 1;
|
||||
static uint16_t avg_number = 0;
|
||||
static long long ADCRealCurrent_long = 0;
|
||||
|
||||
// Step time macro
|
||||
#define STEPTIME_HALF_SEC 5000
|
||||
#define STEPTIME_ONE_SEC 10000
|
||||
#define STEPTIME_TWO_SEC 20000
|
||||
|
||||
// Constant Current Mode function
|
||||
static uint8_t CCModeReset = 1;
|
||||
static uint8_t CCModeDACEnable = 0;
|
||||
static int32_t CCModeReadCurrent();
|
||||
static int32_t CCModeVoltOut();
|
||||
static void SetCCModeGain();
|
||||
static void CCCurrent2IUC();
|
||||
static int32_t IUC2RealnA();
|
||||
static int32_t IUC2RealpA();
|
||||
|
||||
// for DPVCurve SWVCurve
|
||||
static uint16_t Amplitude;
|
||||
@@ -635,17 +630,28 @@ static uint16_t PulseWidth_16;
|
||||
static uint8_t PulsePeriod;
|
||||
static uint16_t PulsePeriod_16;
|
||||
|
||||
static uint16_t StepTime_16 = 0;
|
||||
static uint8_t StepTimeCounter = 1;
|
||||
// counter
|
||||
struct _CT{
|
||||
uint32_t SampleRate_counter;
|
||||
uint16_t StepTimeCounter;
|
||||
uint16_t NotifyCounter;
|
||||
uint32_t StandByCounter;
|
||||
}CT = {0};
|
||||
|
||||
//static bool NotifyReady = false;
|
||||
static void InitFlag();
|
||||
static void InitCT();
|
||||
|
||||
#include "EliteWorkData.h"
|
||||
// real instruction fxn
|
||||
static uint16_t VoltScan(); // used in I-V and cyclic
|
||||
static uint16_t VoltScan(WorkMode *WorkModeData); // used in I-V and cyclic
|
||||
static void DACCode2Real2Notify(uint16_t DACcode); // send notify voltage after VoltScan()
|
||||
|
||||
//static void VOLT_OUTPUT();
|
||||
static void ZT_Plot();
|
||||
static void VT_Plot();
|
||||
static int32_t IT_Plot();
|
||||
static void ZT_Plot(RTMode *RT);
|
||||
static void VT_Plot(VTMode *VT);
|
||||
static int32_t IT_PlotIT_Plot(WorkMode *WorkModeData);
|
||||
static void RVout_Plot(RVoutMode *RVout);
|
||||
|
||||
// the following fxn do the same thing
|
||||
// IVCurve_T is called if Vorigin > Vfinal, vice versa
|
||||
@@ -655,11 +661,11 @@ static uint8_t OldStep2NewStep(uint8_t OldStep);
|
||||
static uint16_t OldStep2NewStepTime(uint8_t StepTime);
|
||||
static uint8_t IVdone = 0;
|
||||
|
||||
static uint16_t OneWayVoltScan();
|
||||
static uint16_t OneWayVoltScan(IVMode *IV);
|
||||
static void ramp_test();
|
||||
static uint16_t DPVCurve();
|
||||
static uint16_t CVCurve();
|
||||
static uint16_t SWVCurve();
|
||||
static uint16_t DPVCurve(WorkMode *WorkModeData);
|
||||
static uint16_t CVCurve(CVMode *CV);
|
||||
static uint16_t SWVCurve(WorkMode *WorkModeData);
|
||||
|
||||
static void reset();
|
||||
static void Eliteinterrupt();
|
||||
@@ -670,6 +676,7 @@ static void SendNotify();
|
||||
static bool If10Von = false;
|
||||
static void TurnOn10V();
|
||||
|
||||
|
||||
#include "EliteInstruction.h"
|
||||
#include "EliteADC.h"
|
||||
#include "EliteDAC.h"
|
||||
@@ -682,6 +689,7 @@ static void TurnOn10V();
|
||||
|
||||
#include "EliteDeviceCorrection.h"
|
||||
#include "EliteNotify.h"
|
||||
#include "EliteFlagCTInit.h"
|
||||
#include "EliteReset.h"
|
||||
#include "EliteLED.h"
|
||||
#include "EliteKeyDetect.h"
|
||||
@@ -691,7 +699,10 @@ static void TurnOn10V();
|
||||
#include "EliteITCurve.h"
|
||||
#include "EliteVTCurve.h"
|
||||
#include "EliteZTCurve.h"
|
||||
#include "EliteCCCMode.h"
|
||||
#include "impedance_meter.h"
|
||||
#include "EliteReadVout.h"
|
||||
#include "Elite_version.h"
|
||||
|
||||
// update instruction for Z meter
|
||||
static void update_ZM_instruction(uint8 *ins) {
|
||||
@@ -700,7 +711,7 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
INSTRUCTION.chip_id = chip_ID;
|
||||
|
||||
uint8_t oper = ins[1] & 0xF0; // this is don't care in RIS
|
||||
uint8_t data_length = ins[1] & 0x0F;
|
||||
// uint8_t data_length = ins[1] & 0x0F;
|
||||
|
||||
if (!If10Von) {
|
||||
// TurnOn10V();
|
||||
@@ -711,33 +722,37 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
case INS_TYPE_RIS: {
|
||||
switch (ins[2]) {
|
||||
case IV_CURVE: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = IV_CURVE;
|
||||
DACReset = true;
|
||||
INSTRUCTION.SampleRate = 10;
|
||||
INSTRUCTION.SampleRate = 100;
|
||||
|
||||
if (ins[3] | ins[4]) {
|
||||
// if (ins[3] | ins[4]) {
|
||||
INSTRUCTION.VoltOrigin = ((uint16_t)(ins[3]) << 8) | (uint16_t)(ins[4]);
|
||||
// INSTRUCTION.VoltOrigin = Usercode_Correction_to_DAC(INSTRUCTION.VoltOrigin);
|
||||
}
|
||||
if (ins[5] | ins[6]) {
|
||||
// }
|
||||
// if (ins[5] | ins[6]) {
|
||||
INSTRUCTION.VoltFinal = ((uint16_t)(ins[5]) << 8) | (uint16_t)(ins[6]);
|
||||
// INSTRUCTION.VoltFinal = Usercode_Correction_to_DAC(INSTRUCTION.VoltFinal);
|
||||
}
|
||||
// }
|
||||
|
||||
if (ins[7] | ins[8]) {
|
||||
INSTRUCTION.Step = ((uint16_t)(ins[7]) << 8) | (uint16_t)(ins[8]);
|
||||
INSTRUCTION.Step = StepCode2DACcode(INSTRUCTION.Step);
|
||||
}
|
||||
if (ins[9]) {
|
||||
// if (ins[9]) {
|
||||
INSTRUCTION.StepTime = ins[9];
|
||||
INSTRUCTION.StepTime = OldStep2NewStepTime(INSTRUCTION.StepTime);
|
||||
}
|
||||
// }
|
||||
// if(ins[10]) {
|
||||
//INSTRUCTION.VoVi_Switch = ins[10];
|
||||
INSTRUCTION.VoVi_Switch = 0x01;
|
||||
// }
|
||||
break;
|
||||
}
|
||||
|
||||
case DIFFERENTIAL_PULSE_VOLTAMMETRY: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = DIFFERENTIAL_PULSE_VOLTAMMETRY;
|
||||
DACReset = true;
|
||||
|
||||
@@ -768,11 +783,14 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
if (ins[13]) {
|
||||
PulseWidth = ins[13];
|
||||
}
|
||||
if(ins[14]) {
|
||||
INSTRUCTION.VoVi_Switch = ins[14];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SQUARE_WAVE_VOLTAMMETRY: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = SQUARE_WAVE_VOLTAMMETRY;
|
||||
DACReset = true;
|
||||
|
||||
@@ -799,34 +817,42 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
if (ins[12]) {
|
||||
PulseWidth = ins[12];
|
||||
}
|
||||
if ( ins[13]) {
|
||||
INSTRUCTION.VoVi_Switch = ins[13];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CYCLIC_VOLTAMMETRY: {
|
||||
CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = CYCLIC_VOLTAMMETRY;
|
||||
case CV_CURVE: {
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = CV_CURVE;
|
||||
DACReset = true;
|
||||
INSTRUCTION.SampleRate = 100;
|
||||
|
||||
if (ins[3] | ins[4]) {
|
||||
// if (ins[3] | ins[4]) {
|
||||
INSTRUCTION.VoltOrigin = ((uint16_t)(ins[3]) << 8) | (uint16_t)(ins[4]);
|
||||
INSTRUCTION.VoltOrigin = Usercode_Correction_to_DAC(INSTRUCTION.VoltOrigin);
|
||||
}
|
||||
if (ins[5] | ins[6]) {
|
||||
// INSTRUCTION.VoltOrigin = Usercode_Correction_to_DAC(INSTRUCTION.VoltOrigin);
|
||||
// }
|
||||
// if (ins[5] | ins[6]) {
|
||||
INSTRUCTION.VoltFinal = ((uint16_t)(ins[5]) << 8) | (uint16_t)(ins[6]);
|
||||
INSTRUCTION.VoltFinal = Usercode_Correction_to_DAC(INSTRUCTION.VoltFinal);
|
||||
}
|
||||
// INSTRUCTION.VoltFinal = Usercode_Correction_to_DAC(INSTRUCTION.VoltFinal);
|
||||
// }
|
||||
|
||||
if (ins[7] | ins[8]) {
|
||||
INSTRUCTION.Step = ((uint16_t)(ins[7]) << 8) | (uint16_t)(ins[8]);
|
||||
INSTRUCTION.Step = StepCode2DACcode(INSTRUCTION.Step);
|
||||
}
|
||||
if (ins[9]) {
|
||||
// if (ins[9]) {
|
||||
INSTRUCTION.StepTime = ins[9];
|
||||
INSTRUCTION.StepTime = OldStep2NewStepTime(INSTRUCTION.StepTime);
|
||||
}
|
||||
// }
|
||||
if (ins[10]) {
|
||||
INSTRUCTION.CycleNumber = ins[10];
|
||||
}
|
||||
// if(ins[11]) {
|
||||
//INSTRUCTION.VoVi_Switch = ins[11];
|
||||
INSTRUCTION.VoVi_Switch = 0x01;
|
||||
// }
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -834,21 +860,19 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
case VOLT_OUTPUT: {
|
||||
INSTRUCTION.eliteFxn = VOLT_OUTPUT;
|
||||
INSTRUCTION.VoltConstant = ( ((uint16_t)(ins[3])) << 8) | (uint16_t)(ins[4]);
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
// DAC_outputV(INSTRUCTION.VoltConstant);
|
||||
break;
|
||||
}
|
||||
|
||||
// impedance test
|
||||
case ZT_CURVE: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = ZT_CURVE;
|
||||
// INSTRUCTION.VoltConstant = ( ((uint16_t)(ins[3])) << 8) | (uint16_t)(ins[4]);
|
||||
break;
|
||||
}
|
||||
|
||||
case VT_CURVE: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = VT_CURVE;
|
||||
// SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
|
||||
// VT_Plot(); // enable 10v = 0
|
||||
@@ -856,7 +880,7 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
}
|
||||
|
||||
case IT_CURVE: {
|
||||
CleanBuffer();
|
||||
// CleanBuffer();
|
||||
INSTRUCTION.eliteFxn = IT_CURVE;
|
||||
// IT_Plot(); // enable 10v = 1
|
||||
break;
|
||||
@@ -864,7 +888,7 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
case SET_SAMPLE_RATE: {
|
||||
INSTRUCTION.SampleRateIndex = ins[3];
|
||||
INSTRUCTION.SampleRate = SampleRateTable[INSTRUCTION.SampleRateIndex];
|
||||
SampleRate_counter = 1;
|
||||
CT.SampleRate_counter = 1;
|
||||
break;
|
||||
}
|
||||
case POTENTIAL_STATE: {
|
||||
@@ -881,20 +905,52 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
|
||||
case CONSTANT_CURRENT:{
|
||||
INSTRUCTION.eliteFxn = CONSTANT_CURRENT;
|
||||
INSTRUCTION.CurrentLV = ins[3];
|
||||
INSTRUCTION.ConstantCurrent = ( (uint32_t) (ins[4])<<24 | (uint32_t) (ins[5])<<16 | (uint32_t) (ins[6])<<8 | (uint32_t) (ins[7]) );
|
||||
INSTRUCTION.SampleRate = 2;
|
||||
INSTRUCTION.Charge = ins[3];
|
||||
INSTRUCTION.VoltLimit = ((uint16_t) ins[4] << 8) | ((uint16_t) ins[5]);
|
||||
INSTRUCTION.ConstantCurrent = ( (uint32_t) (ins[6])<<24 | (uint32_t) (ins[7])<<16 | (uint32_t) (ins[8])<<8 | (uint32_t) (ins[9]) );
|
||||
INSTRUCTION.NotifyRate = 1000;
|
||||
|
||||
// if(!INSTRUCTION.Charge){
|
||||
// INSTRUCTION.VoltConstant = 50000;
|
||||
// }
|
||||
// GetInstructionParameter(ins+2);
|
||||
// CCCurrent2IUC();
|
||||
break;
|
||||
}
|
||||
|
||||
case CYCLE_CONSTANT_CURRENT:{
|
||||
|
||||
break;
|
||||
}
|
||||
case SET_ADC_GAIN: {
|
||||
INSTRUCTION.ADCGainLevel = ins[3];
|
||||
if(INSTRUCTION.ADCGainLevel != GAIN_AUTO){
|
||||
INSTRUCTION.AutoGainEnable = 0;
|
||||
}
|
||||
else{
|
||||
INSTRUCTION.AutoGainEnable = 1;
|
||||
}
|
||||
// if(INSTRUCTION.ADCGainLevel == GAIN_200R){
|
||||
// LED_color(DARKLED, 0x0F, 0x00, 0x00);
|
||||
// }
|
||||
// else if(INSTRUCTION.ADCGainLevel == GAIN_10K){
|
||||
// LED_color(DARKLED, 0x0F, 0x00, 0x0F);
|
||||
// }
|
||||
// else if(INSTRUCTION.ADCGainLevel == GAIN_200K){
|
||||
// LED_color(DARKLED, 0x0F, 0x02, 0xFF);
|
||||
// }
|
||||
break;
|
||||
}
|
||||
|
||||
case SET_RESISTER_LEVEL:{
|
||||
INSTRUCTION.ResisterMeter = ins[3];
|
||||
case READ_VOUT_VALUE:{
|
||||
// INSTRUCTION.ResisterMeter = ins[3];
|
||||
INSTRUCTION.eliteFxn = READ_VOUT_VALUE;
|
||||
/*uint8_t ReadVoutBuf[2] = {0};
|
||||
|
||||
ADC_write(0xA4);
|
||||
ADC_read(ReadVoutBuf);
|
||||
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, 2, ReadVoutBuf);*/
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -903,15 +959,27 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
int32_t ADCRealValue = 0;
|
||||
uint8_t CIS_buf[9] = {0};
|
||||
|
||||
ADCGainControl(ins[3]);
|
||||
ADCChannelSelect(ins[4]);
|
||||
CPUdelay(1600);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
// for(int i=0 ; i<10 ; i++){
|
||||
ADCGainControl(ins[3]);
|
||||
ADCChannelSelect(ins[4]);
|
||||
CPUdelay(10);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
// CPUdelay(10);
|
||||
//
|
||||
// ADCValueTemp = ( uint16_t) (spi_ADC_rxbuf[0]) << 8 | (uint16_t) (spi_ADC_rxbuf[1]);
|
||||
// ADCValueAVG = ADCValueAVG + ADCValueTemp;
|
||||
// }
|
||||
// ADCValueAVG = ADCValueAVG / 10;
|
||||
// ADCValueTemp = (uint16_t) (ADCValueAVG);
|
||||
|
||||
CIS_buf[0] = chip_ID;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
CIS_buf[i + 1] = spi_ADC_rxbuf[i];
|
||||
for(int i=0; i<4 ; i++){
|
||||
CIS_buf[i+1] = spi_ADC_rxbuf[i];
|
||||
}
|
||||
// CIS_buf[1] = (uint8_t) ((ADCValueTemp & 0xFF00) >> 8);
|
||||
// CIS_buf[2] = (uint8_t) (ADCValueTemp & 0x00FF);
|
||||
// CIS_buf[3] = spi_ADC_rxbuf[2];
|
||||
// CIS_buf[4] = spi_ADC_rxbuf[3];
|
||||
|
||||
// decode ADC measure value
|
||||
ADCRealValue = DecodeADCValue(ins[3], ins[4], spi_ADC_rxbuf);
|
||||
@@ -972,6 +1040,9 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
}
|
||||
|
||||
case VIS_STI: {
|
||||
for(int i=0 ; i<12 ; i++){
|
||||
FlushNotify();
|
||||
}
|
||||
PeriodicEvent = true;
|
||||
break;
|
||||
}
|
||||
@@ -983,30 +1054,58 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
|
||||
case VIS_INT: {
|
||||
Eliteinterrupt();
|
||||
for(int i=0 ; i<12 ; i++){
|
||||
FlushNotify();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VIS_SHIFT_200K: {
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 0);
|
||||
LED_color(DARKLED, 0xFF, 0xB4, 0x00);
|
||||
break;
|
||||
}
|
||||
|
||||
case VIS_SHIFT_10K: {
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 1);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 0);
|
||||
LED_color(DARKLED, 0x14, 0xC8, 0xFF);
|
||||
break;
|
||||
}
|
||||
|
||||
case VIS_SHIFT_100R: {
|
||||
case VIS_SHIFT_200R: {
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 1);
|
||||
PIN_setOutputValue(pin_handle, Turnon200R, 1);
|
||||
LED_color(DARKLED, 0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
}
|
||||
|
||||
case VIS_DEVICE_SHINY:{
|
||||
LED_color(DARKLED, 0xFF, 0x00, 0xFF);
|
||||
// uint8_t deviceShinySwitch = (ins[2] & 0b11110000) >> 4;//1:open 0:close
|
||||
// if(deviceShinySwitch == 1){
|
||||
// LED_color(DARKLED, 0xFF, 0x00, 0xFF);
|
||||
// }else if(deviceShinySwitch == 0){
|
||||
// if(PeriodicEvent){
|
||||
// WORKLED();
|
||||
// }else if(!PeriodicEvent){
|
||||
// LEDPowerON();
|
||||
// }
|
||||
// }
|
||||
break;
|
||||
}
|
||||
|
||||
case VIS_SHINY_DIS:{
|
||||
if(PeriodicEvent){
|
||||
WORKLED();
|
||||
}else if(!PeriodicEvent){
|
||||
LEDPowerON();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
@@ -1020,6 +1119,19 @@ static void update_ZM_instruction(uint8 *ins) {
|
||||
I2CWrite(0x01, 0xAB);
|
||||
break;
|
||||
}
|
||||
|
||||
case CIS_VERSION:{
|
||||
cis_buf[0] = VERSION_DATE_YEAR;
|
||||
cis_buf[1] = VERSION_DATE_MONTH;
|
||||
cis_buf[2] = VERSION_DATE_DAY;
|
||||
cis_buf[3] = VERSION_DATE_HOUR;
|
||||
cis_buf[4] = VERSION_DATE_MINUTE;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CIS_BUFF_CHAR, BLE_CIS_BUFF_SIZE, cis_buf);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+113
-37
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* impedance_meter.h
|
||||
*
|
||||
* Created on: 2019�~1��15��
|
||||
* Created on: 2019/01/15
|
||||
* Author: benny
|
||||
*/
|
||||
#ifndef HEADSTAGE_H
|
||||
@@ -19,8 +19,9 @@
|
||||
// header
|
||||
#include <ti/drivers/PIN.h>
|
||||
#include "board.h"
|
||||
#include "EliteWorkData.h"
|
||||
|
||||
static void SimpleBLEPeripheral_performPeriodicTask(CURRENT_USER_CODE *CurrentUserCode);
|
||||
static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData);
|
||||
|
||||
static void SimpleBLEPeripheral_clockHandler(UArg arg) {
|
||||
// Store the event.
|
||||
@@ -51,6 +52,7 @@ static void ZM_init() {
|
||||
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
|
||||
|
||||
InitEliteInstruction();
|
||||
ADCGainControl(GAIN_AUTO);
|
||||
elite_gptimer_open();
|
||||
|
||||
// PIN_registerIntCb(pin_handle, switch_on_callback);
|
||||
@@ -72,10 +74,12 @@ static void DACCode2Real2Notify(uint16_t DACcode) {
|
||||
|
||||
#define IsPeriodicMode() ( \
|
||||
(INSTRUCTION.eliteFxn == IV_CURVE) || \
|
||||
(INSTRUCTION.eliteFxn == CV_CURVE) || \
|
||||
(INSTRUCTION.eliteFxn == IT_CURVE) || \
|
||||
(INSTRUCTION.eliteFxn == VT_CURVE) || \
|
||||
(INSTRUCTION.eliteFxn == ZT_CURVE) || \
|
||||
(INSTRUCTION.eliteFxn == CONSTANT_CURRENT) \
|
||||
(INSTRUCTION.eliteFxn == CONSTANT_CURRENT) || \
|
||||
(INSTRUCTION.eliteFxn == READ_VOUT_VALUE) \
|
||||
)
|
||||
|
||||
/*********************************************************************
|
||||
@@ -87,61 +91,110 @@ static void DACCode2Real2Notify(uint16_t DACcode) {
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static void SimpleBLEPeripheral_performPeriodicTask(CURRENT_USER_CODE *CurrentUserCode) {
|
||||
static void SimpleBLEPeripheral_performPeriodicTask(WorkMode *WorkModeData) {
|
||||
if ( IsPeriodicMode() ){
|
||||
|
||||
// XXX Using nwe clock => StepTime/SampleRate should change
|
||||
if (StepTimeCounter == INSTRUCTION.StepTime){
|
||||
StepTimeCounter = 1;
|
||||
// DAC counter
|
||||
if (CT.StepTimeCounter == INSTRUCTION.StepTime){
|
||||
CT.StepTimeCounter = 1;
|
||||
}
|
||||
else{
|
||||
StepTimeCounter++;
|
||||
CT.StepTimeCounter++;
|
||||
}
|
||||
|
||||
if (SampleRate_counter == INSTRUCTION.SampleRate){
|
||||
SampleRate_counter = 1;
|
||||
// ADC counter
|
||||
if (CT.SampleRate_counter == INSTRUCTION.SampleRate){
|
||||
CT.SampleRate_counter = 1;
|
||||
}
|
||||
else{
|
||||
SampleRate_counter++;
|
||||
CT.SampleRate_counter++;
|
||||
}
|
||||
|
||||
// notify counter
|
||||
if (CT.NotifyCounter == INSTRUCTION.NotifyRate){
|
||||
CT.NotifyCounter = 1;
|
||||
}
|
||||
else{
|
||||
CT.NotifyCounter ++;
|
||||
}
|
||||
|
||||
/** Periodic Event **/
|
||||
// Default working mode is DAC out -> ADC read -> send notify
|
||||
// Default working flow is DAC out -> ADC read -> send notify
|
||||
// We will need a flag to control DAC, if we want to exchange to ADC -> DAC -> notify
|
||||
// This flag can be named by FxnNameReset
|
||||
// This flag can be named by FxnNameDACReset
|
||||
|
||||
// In IV, CV, and func-gen mode, DAC will output voltage
|
||||
// else DAC do nothing.
|
||||
EliteDACControl();
|
||||
EliteDACControl(WorkModeData);
|
||||
|
||||
// Control ADC to sample rate
|
||||
EliteADCControl(CurrentUserCode);
|
||||
EliteADCControl(WorkModeData);
|
||||
|
||||
// Notify control, check if we need to send notify
|
||||
EliteNotifyControl();
|
||||
|
||||
}
|
||||
|
||||
else if(INSTRUCTION.eliteFxn == VOLT_OUTPUT){
|
||||
// assign WorkModeData->VO = INSTRUCTION.VoltConstant
|
||||
WorkModeData->VO->_VoltOut = INSTRUCTION.VoltConstant;
|
||||
// UserCode -> DAC code -> DAC out
|
||||
DAC_outputV(Usercode_Correction_to_DAC(WorkModeData->VO->_VoltOut));
|
||||
// DAC_outputV(WorkModeData->VO->_VoltOut); // for voltage output calibration
|
||||
FreeWorkMode(WorkModeData);
|
||||
PeriodicEvent = false;
|
||||
InitPeriodicEvent = true;
|
||||
}
|
||||
else{
|
||||
PeriodicEvent = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void EliteDACControl(CURRENT_USER_CODE *CurrentUserCode) {
|
||||
static void EliteDACControl(WorkMode *WorkModeData) {
|
||||
if (INSTRUCTION.eliteFxn == IV_CURVE) {
|
||||
// output a certain voltage and put it into NotifyVolt
|
||||
DACCode2Real2Notify(VoltScan());
|
||||
if(WorkModeData->IV->_VoVi_Switch == 0x00){ //user see Vout
|
||||
//DACCode2Real2Notify(VoltScan(WorkModeData));
|
||||
uint16_t DACcode;
|
||||
DACcode = VoltScan(WorkModeData);
|
||||
|
||||
}
|
||||
else if (WorkModeData->IV->_VoVi_Switch == 0x01){ //user see Vin
|
||||
VoltScan(WorkModeData);
|
||||
}
|
||||
}
|
||||
else if(INSTRUCTION.eliteFxn == CV_CURVE){
|
||||
if (WorkModeData->CV->_VoVi_Switch == 0x00){
|
||||
DACCode2Real2Notify(VoltScan(WorkModeData));
|
||||
}
|
||||
else if (WorkModeData->CV->_VoVi_Switch == 0x01){
|
||||
VoltScan(WorkModeData);
|
||||
}
|
||||
}
|
||||
else if (INSTRUCTION.eliteFxn == ZT_CURVE){
|
||||
if(INSTRUCTION.ResisterMeter == RESISTER_METER_SMALL){
|
||||
// output 5mV
|
||||
INSTRUCTION.VoltConstant = 24999 + 50;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
// output 1V
|
||||
if (DACReset) {
|
||||
INSTRUCTION.VoltConstant = 25000 + 5000;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
DACReset = false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
// output 100mV
|
||||
INSTRUCTION.VoltConstant = 24999 + 500;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
// output 1V
|
||||
if (DACReset) {
|
||||
INSTRUCTION.VoltConstant = 25000 + 5000;
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
DACReset = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(INSTRUCTION.eliteFxn == CONSTANT_CURRENT){
|
||||
CCModeVoltOut(CurrentUserCode);
|
||||
// DAC_outputV(Usercode_Correction_to_DAC(CurrentUserCode->value));
|
||||
if (DACReset) {
|
||||
DAC_outputV(Usercode_Correction_to_DAC(25000));
|
||||
DACReset = false;
|
||||
}
|
||||
CCModeVoltOut(WorkModeData->CC);
|
||||
}
|
||||
|
||||
else{
|
||||
@@ -150,32 +203,52 @@ static void EliteDACControl(CURRENT_USER_CODE *CurrentUserCode) {
|
||||
}
|
||||
}
|
||||
|
||||
static void EliteADCControl(CURRENT_USER_CODE *CurrentUserCode) {
|
||||
if (SampleRate_counter == INSTRUCTION.SampleRate) {
|
||||
static void EliteADCControl(WorkMode *WorkModeData) {
|
||||
if (CT.SampleRate_counter == INSTRUCTION.SampleRate - 1) {
|
||||
switch (INSTRUCTION.eliteFxn) {
|
||||
case IV_CURVE:{
|
||||
IT_Plot();
|
||||
IV_Plot(WorkModeData->IV);
|
||||
// IT_Plot(WorkModeData);
|
||||
break;
|
||||
}
|
||||
case CV_CURVE:{
|
||||
CV_Plot(WorkModeData->CV);
|
||||
break;
|
||||
}
|
||||
case IT_CURVE:{
|
||||
IT_Plot();
|
||||
IT_Plot(WorkModeData);
|
||||
// NotifyReady = true;
|
||||
break;
|
||||
}
|
||||
case VT_CURVE:{
|
||||
// read volt through ADC and put it into notify buffer
|
||||
VT_Plot();
|
||||
VT_Plot(WorkModeData->VT);
|
||||
// NotifyReady = true;
|
||||
break;
|
||||
}
|
||||
case ZT_CURVE:{
|
||||
ZT_Plot();
|
||||
ZT_Plot(WorkModeData->RT);
|
||||
// NotifyReady = true;
|
||||
break;
|
||||
}
|
||||
case CONSTANT_CURRENT:{
|
||||
CCModeReadCurrent(CurrentUserCode);
|
||||
CCModeReadCurrent(WorkModeData->CC);
|
||||
// CCModeReverseCurrent(WorkModeData->CC);
|
||||
break;
|
||||
}
|
||||
case READ_VOUT_VALUE:{
|
||||
RVout_Plot(WorkModeData->RVout);
|
||||
|
||||
/*uint8_t ReadVoutBuf[2] = {0};
|
||||
|
||||
ADC_write(0xA4);
|
||||
ADC_read(ReadVoutBuf);
|
||||
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, 2, ReadVoutBuf);*/
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
IT_Plot(WorkModeData);
|
||||
// NotifyReady = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -183,17 +256,21 @@ static void EliteADCControl(CURRENT_USER_CODE *CurrentUserCode) {
|
||||
}
|
||||
|
||||
static void EliteNotifyControl() {
|
||||
if ((INSTRUCTION.eliteFxn == IV_CURVE)) {
|
||||
if ((INSTRUCTION.eliteFxn == IV_CURVE) || (INSTRUCTION.eliteFxn == CV_CURVE)) {
|
||||
// output the last notify, and reset Elite
|
||||
if (!PeriodicEvent) {
|
||||
SendNotify();
|
||||
reset();
|
||||
} else if (StepTimeCounter == INSTRUCTION.StepTime - 1) {
|
||||
} else if (CT.StepTimeCounter == INSTRUCTION.StepTime/2) {
|
||||
SendNotify();
|
||||
}
|
||||
}
|
||||
|
||||
else if (SampleRate_counter == INSTRUCTION.SampleRate) {
|
||||
else if(INSTRUCTION.eliteFxn == CONSTANT_CURRENT){
|
||||
if(CT.NotifyCounter == INSTRUCTION.NotifyRate){
|
||||
SendNotify();
|
||||
}
|
||||
}
|
||||
else if (CT.SampleRate_counter == INSTRUCTION.SampleRate) {
|
||||
SendNotify();
|
||||
}
|
||||
}
|
||||
@@ -209,7 +286,6 @@ static uint16_t OldStep2NewStepTime(uint8_t StepTime) {
|
||||
|
||||
switch (StepTimeLevel) {
|
||||
case 0: { //0.5 sec
|
||||
LED_color(LIGHTLED, 0xFF, 0xFF, 0xFF);
|
||||
return STEPTIME_HALF_SEC;
|
||||
}
|
||||
case 1: { //1 sec
|
||||
|
||||
+21
-4
@@ -529,7 +529,7 @@ static void SimpleBLEPeripheral_init(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "EliteWorkData.h"
|
||||
/*********************************************************************
|
||||
* @fn SimpleBLEPeripheral_taskFxn
|
||||
*
|
||||
@@ -551,14 +551,14 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
|
||||
ZM_init();
|
||||
Elite_SPI_init();
|
||||
CURRENT_USER_CODE *CurrentUserCode = InitCurrentUserCode();
|
||||
WorkMode *WorkModeData = CreateWorkMode();
|
||||
|
||||
uint8_t key = 0;
|
||||
uint16_t counter6994 = 0;
|
||||
bool EliteOn = 0;
|
||||
|
||||
// init DAC, set output ~= 0 V
|
||||
DAC_outputV(Usercode_Correction_to_DAC(24999));
|
||||
DAC_outputV(Usercode_Correction_to_DAC(25000));
|
||||
elite_gptimer_start();
|
||||
|
||||
// Application main loops
|
||||
@@ -627,17 +627,34 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
counter6994++;
|
||||
}
|
||||
EliteKeyPress(key);
|
||||
if(Free_Work_Mode){
|
||||
FreeWorkMode(WorkModeData);
|
||||
InitEliteInstruction();
|
||||
ADCGainControl(INSTRUCTION.ADCGainLevel);
|
||||
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
|
||||
|
||||
Free_Work_Mode = false;
|
||||
}
|
||||
} else {
|
||||
EliteOn = TurnOnElite(key);
|
||||
}
|
||||
}
|
||||
// if there is periodic event
|
||||
else {
|
||||
if(InitPeriodicEvent){
|
||||
InitWorkMode(WorkModeData);
|
||||
InitPeriodicEvent = false;
|
||||
}
|
||||
|
||||
// Perform periodic application task
|
||||
SimpleBLEPeripheral_performPeriodicTask(CurrentUserCode);
|
||||
SimpleBLEPeripheral_performPeriodicTask(WorkModeData);
|
||||
|
||||
// Turn off Elite if battery voltage < 3V
|
||||
// ReadBatVolt(spi_ADC_rxbuf);
|
||||
|
||||
key = PIN_getInputValue(switch_on);
|
||||
EliteKeyPress(key); // onPress=> key = 0; 1.lighten LED 2.long press shut down 2650
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
|
||||
#input="./Elite_test.txt"
|
||||
input="D:/Elite/Calibration_data/$1.txt"
|
||||
output="./simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDeviceCorrection.h"
|
||||
|
||||
#variable
|
||||
declare -i current_line=79
|
||||
declare -i col_index=0
|
||||
declare -i row_index=0
|
||||
#declare -i coeff=1
|
||||
#declare -i offset=0
|
||||
|
||||
declare -i current_gain=0
|
||||
#declare -i vin_gain=0
|
||||
#declare -i vout_gain=0
|
||||
MAC="MAC"
|
||||
|
||||
#constant
|
||||
declare -i ADC_CURRENT_GAIN_NUMBER=3
|
||||
declare -i ADC_VOLTAGE_GAIN_NUMBER=1
|
||||
declare -i DAC_GAIN_NUMBER=1
|
||||
|
||||
while read -r line; do
|
||||
for word in $line; do
|
||||
# get device MAC
|
||||
if [ $row_index -eq 0 ] && [ $col_index -eq 1 ];then
|
||||
MAC=$word
|
||||
sed -i "${current_line} i {" "$output"
|
||||
sed -i "${current_line} i \\\n#ifdef BOARD_${MAC}" "$output"
|
||||
sed -i 's/:/_/g' "$output"
|
||||
current_line=$current_line+3
|
||||
fi
|
||||
|
||||
#get ADC current cali data
|
||||
declare -i Iin_range=2+$ADC_CURRENT_GAIN_NUMBER
|
||||
if [ $row_index -gt 1 ] && [ $row_index -lt $Iin_range ];then
|
||||
|
||||
if [ $col_index -eq 1 ];then
|
||||
sed -i "${current_line} i \\\t.ADC_current[${current_gain}].coeff = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
|
||||
elif [ $col_index -eq 2 ];then
|
||||
sed -i "${current_line} i \\\t.ADC_current[${current_gain}].offset = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
|
||||
if [ $current_gain -lt 2 ];then
|
||||
current_gain=$current_gain+1
|
||||
else
|
||||
current_gain=0
|
||||
fi
|
||||
fi
|
||||
|
||||
#get DAC Vout cali data
|
||||
declare -i Vout_range=$Iin_range+$DAC_GAIN_NUMBER
|
||||
elif [ $row_index -gt 1 ] && [ $row_index -lt $Vout_range ];then
|
||||
if [ $col_index -eq 1 ];then
|
||||
sed -i "${current_line} i \\\t.Usercode2DAC.coeff = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
|
||||
elif [ $col_index -eq 2 ];then
|
||||
sed -i "${current_line} i \\\t.Usercode2DAC.offset = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
|
||||
#get ADC Vin cali data
|
||||
declare -i Vin_range=$Vout_range+$ADC_VOLTAGE_GAIN_NUMBER
|
||||
elif [ $row_index -gt 1 ] && [ $row_index -lt $Vin_range ];then
|
||||
if [ $col_index -eq 1 ];then
|
||||
sed -i "${current_line} i \\\t.ADC_volt.coeff = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
|
||||
elif [ $col_index -eq 2 ];then
|
||||
sed -i "${current_line} i \\\t.ADC_volt.offset = ($word)," "$output"
|
||||
current_line=$current_line+1
|
||||
fi
|
||||
fi
|
||||
|
||||
#update index
|
||||
if [ $col_index -lt 2 ];then
|
||||
col_index=$col_index+1
|
||||
else
|
||||
col_index=0
|
||||
row_index=$row_index+1
|
||||
fi
|
||||
done
|
||||
done < $input
|
||||
|
||||
sed -i "${current_line} i };" "$output"
|
||||
current_line=$current_line+1
|
||||
sed -i "${current_line} i #endif" "$output"
|
||||
Reference in New Issue
Block a user