| /* |
| * |
| * Copyright (c) 2020 Project CHIP Authors |
| * Copyright (c) 2020 Texas Instruments Incorporated |
| * All rights reserved. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * These arguments were used when this file was generated. They will be automatically applied on subsequent loads |
| * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. |
| * @cliArgs --board "/ti/boards/CC26X2R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@4.40.05.02_eng" |
| * @versions {"tool":"1.9.0+2015","templates":null} |
| */ |
| |
| /** |
| * Import the modules used in this configuration. |
| */ |
| const ble = scripting.addModule("/ti/ble5stack/ble"); |
| const CCFG = scripting.addModule("/ti/devices/CCFG"); |
| const rfdesign = scripting.addModule("/ti/devices/radioconfig/rfdesign"); |
| const dmm = scripting.addModule("/ti/dmm/dmm"); |
| const AESCCM = scripting.addModule("/ti/drivers/AESCCM"); |
| const AESCCM1 = AESCCM.addInstance(); |
| const AESCCM2 = AESCCM.addInstance(); |
| const AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); |
| const AESCTRDRBG1 = AESCTRDRBG.addInstance(); |
| const AESECB = scripting.addModule("/ti/drivers/AESECB"); |
| const AESECB1 = AESECB.addInstance(); |
| const AESECB2 = AESECB.addInstance(); |
| const ECDH = scripting.addModule("/ti/drivers/ECDH"); |
| const ECDH1 = ECDH.addInstance(); |
| const ECDH2 = ECDH.addInstance(); |
| const NVS = scripting.addModule("/ti/drivers/NVS"); |
| const NVS1 = NVS.addInstance(); |
| const NVS2 = NVS.addInstance(); |
| const RF = scripting.addModule("/ti/drivers/RF"); |
| const RTOS = scripting.addModule("/ti/drivers/RTOS"); |
| const SHA2 = scripting.addModule("/ti/drivers/SHA2"); |
| const SHA21 = SHA2.addInstance(); |
| const TRNG = scripting.addModule("/ti/drivers/TRNG"); |
| const TRNG1 = TRNG.addInstance(); |
| const TRNG2 = TRNG.addInstance(); |
| const TRNG3 = TRNG.addInstance(); |
| const UART = scripting.addModule("/ti/drivers/UART"); |
| const UART1 = UART.addInstance(); |
| const UART2 = UART.addInstance(); |
| const Button = scripting.addModule("/ti/drivers/apps/Button"); |
| const Button1 = Button.addInstance(); |
| const Button2 = Button.addInstance(); |
| const LED = scripting.addModule("/ti/drivers/apps/LED"); |
| const LED1 = LED.addInstance(); |
| const LED2 = LED.addInstance(); |
| const thread = scripting.addModule("/ti/thread/thread"); |
| |
| /** |
| * Write custom configuration values to the imported modules. |
| */ |
| ble.maxConnNum = 1; |
| ble.numOfAdvSets = 1; |
| ble.lockProject = true; |
| ble.maxPDUSize = 255; |
| ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param1"; |
| ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; |
| ble.connUpdateParamsPeripheral.reqMinConnInt = 30; |
| ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; |
| ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; |
| ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; |
| ble.advSet1.advParam1.primIntMax = 200; |
| ble.advSet1.advData1.$name = "ti_ble5stack_broadcaster_advertisement_data0"; |
| ble.advSet1.scanRes1.$name = "ti_ble5stack_broadcaster_advertisement_data1"; |
| |
| CCFG.enableBootloader = true; |
| CCFG.enableBootloaderBackdoor = true; |
| CCFG.dioBootloaderBackdoor = 13; |
| CCFG.levelBootloaderBackdoor = "Active low"; |
| CCFG.srcClkLF = "Derived from HF XOSC"; |
| CCFG.ccfgTemplate.$name = "ti_devices_CCFGTemplate0"; |
| |
| dmm.project = "ti_thread_thermostat_remote_display"; |
| dmm.stackRoles = ["blePeripheral","threadFTD"]; |
| dmm.lockStackRoles = true; |
| dmm.numApplicationStates = 10; |
| dmm.applicationState0 = "ANY"; |
| dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; |
| dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; |
| dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; |
| dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; |
| dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; |
| dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; |
| dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; |
| dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; |
| dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; |
| dmm.policyArray.create(4); |
| dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; |
| dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; |
| dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; |
| dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; |
| dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; |
| dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; |
| dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; |
| dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; |
| dmm.policyArray[1].blePeripheral.weight = 25; |
| dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; |
| dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; |
| dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; |
| dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; |
| dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; |
| dmm.policyArray[2].threadFTD.weight = 30; |
| dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; |
| dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; |
| dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; |
| dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; |
| dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; |
| dmm.policyArray[3].threadFTD.weight = 1; |
| |
| AESCCM1.$name = "CONFIG_AESCCM0"; |
| |
| AESCCM2.$name = "CONFIG_AESCCM_1"; |
| |
| AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; |
| AESCTRDRBG1.aesctrObject.$name = "CONFIG_AESCTR_0"; |
| |
| AESECB1.$name = "CONFIG_AESECB0"; |
| |
| AESECB2.$name = "CONFIG_AESECB_1"; |
| |
| ECDH1.$name = "CONFIG_ECDH0"; |
| |
| ECDH2.$name = "CONFIG_ECDH_1"; |
| |
| NVS1.$name = "CONFIG_NVSINTERNAL"; |
| NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0"; |
| NVS1.internalFlash.regionBase = 0xAA000; |
| NVS1.internalFlash.regionSize = 0x4000; |
| |
| NVS2.$name = "CONFIG_NVSEXTERNAL"; |
| NVS2.nvsType = "External"; // NVS Region Type |
| NVS2.$hardware = system.deviceData.board.components.MX25R8035F; |
| |
| RTOS.name = "FreeRTOS"; |
| |
| SHA21.$name = "CONFIG_SHA2_0"; |
| |
| TRNG1.$name = "CONFIG_TRNG_0"; |
| |
| TRNG2.$name = "CONFIG_TRNG_1"; |
| |
| TRNG3.$name = "CONFIG_TRNG_APP"; |
| |
| UART1.$name = "CONFIG_UART_DEBUG"; |
| UART1.uart.$assign = "UART1"; |
| UART1.uart.txPin.$assign = "boosterpack.4"; |
| UART1.uart.rxPin.$assign = "boosterpack.3"; |
| UART1.txPinInstance.$name = "CONFIG_PIN_4"; |
| UART1.rxPinInstance.$name = "CONFIG_PIN_5"; |
| |
| UART2.$name = "CONFIG_DISPLAY_UART"; |
| UART2.txPinInstance.$name = "CONFIG_PIN_6"; |
| UART2.rxPinInstance.$name = "CONFIG_PIN_7"; |
| |
| |
| /* Left Button */ |
| Button1.$name = "CONFIG_BTN_LEFT"; |
| Button1.$hardware = system.deviceData.board.components["BTN-1"]; |
| Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; |
| Button1.gpioPin.pull = "Pull Up"; |
| Button1.gpioPin.interruptTrigger = "Falling Edge"; |
| |
| /* Left Button */ |
| Button2.$name = "CONFIG_BTN_RIGHT"; |
| Button2.$hardware = system.deviceData.board.components["BTN-2"]; |
| Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; |
| Button2.gpioPin.pull = "Pull Up"; |
| Button2.gpioPin.interruptTrigger = "Falling Edge"; |
| |
| /* Red LED */ |
| LED1.$name = "CONFIG_LED_RED"; |
| LED1.$hardware = system.deviceData.board.components.LED_RED; |
| LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; |
| LED1.gpioPin.mode = "Output"; |
| LED1.gpioPin.callbackFunction = ""; |
| |
| /* Green LED */ |
| LED2.$name = "CONFIG_LED_GREEN"; |
| LED2.$hardware = system.deviceData.board.components.LED_GREEN; |
| LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; |
| LED2.gpioPin.mode = "Output"; |
| LED2.gpioPin.callbackFunction = ""; |
| |
| thread.deviceTypeReadOnly = true; |
| thread.pm.$name = "ti_thread_pm_thread_pm0"; |
| thread.rf.$name = "ti_thread_rf_thread_rf0"; |
| thread.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40"; |
| thread.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0"; |
| thread.network.$name = "ti_thread_network_thread_network0"; |
| thread.security.$name = "ti_thread_security_thread_security0"; |
| |
| /** |
| * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future |
| * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to |
| * re-solve from scratch. |
| */ |
| UART2.uart.$suggestSolution = "UART0"; |
| UART2.uart.txPin.$suggestSolution = "boosterpack.30"; |
| UART2.uart.rxPin.$suggestSolution = "boosterpack.29"; |