Skip to content

Commit

Permalink
device: CC1352P: Add support for hardware flow control
Browse files Browse the repository at this point in the history
Some devices have the ability to run with hardware flow control, e.g.
sonoff's dongle. Lets add a config option for it.

Signed-off-by: Olliver Schinagl <[email protected]>
  • Loading branch information
oliv3r committed Aug 17, 2024
1 parent cd34759 commit 01200b1
Showing 1 changed file with 213 additions and 0 deletions.
213 changes: 213 additions & 0 deletions coordinator/Z-Stack_3.x.0/znp_CC1352P_2_powermode.syscfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/**
* 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/CC1352P_2_LAUNCHXL" --rtos "tirtos7" --product "[email protected]"
* @versions {"tool":"1.16.1+2960"}
*/

/**
* Import the modules used in this configuration.
*/
const CCFG = scripting.addModule("/ti/devices/CCFG");
const rfdesign = scripting.addModule("/ti/devices/radioconfig/rfdesign");
const Display = scripting.addModule("/ti/display/Display", {}, false);
const Display1 = Display.addInstance();
const AESCBC = scripting.addModule("/ti/drivers/AESCBC");
const AESCBC1 = AESCBC.addInstance();
const AESCCM = scripting.addModule("/ti/drivers/AESCCM");
const AESCCM1 = AESCCM.addInstance();
const AESECB = scripting.addModule("/ti/drivers/AESECB");
const AESECB1 = AESECB.addInstance();
const DMA = scripting.addModule("/ti/drivers/DMA");
const ECDH = scripting.addModule("/ti/drivers/ECDH");
const ECDH1 = ECDH.addInstance();
const ECDSA = scripting.addModule("/ti/drivers/ECDSA");
const ECDSA1 = ECDSA.addInstance();
const NVS = scripting.addModule("/ti/drivers/NVS");
const NVS1 = NVS.addInstance();
const NVS2 = NVS.addInstance();
const Power = scripting.addModule("/ti/drivers/Power");
const RF = scripting.addModule("/ti/drivers/RF");
const SHA2 = scripting.addModule("/ti/drivers/SHA2");
const SHA21 = SHA2.addInstance();
const SPI = scripting.addModule("/ti/drivers/SPI", {}, false);
const SPI1 = SPI.addInstance();
const TRNG = scripting.addModule("/ti/drivers/TRNG");
const TRNG1 = TRNG.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 Settings = scripting.addModule("/ti/posix/tirtos/Settings");
const BIOS = scripting.addModule("/ti/sysbios/BIOS");
const Boot = scripting.addModule("/ti/sysbios/family/arm/cc26xx/Boot");
const GateMutexPri = scripting.addModule("/ti/sysbios/gates/GateMutexPri");
const HeapCallback = scripting.addModule("/ti/sysbios/heaps/HeapCallback");
const Clock = scripting.addModule("/ti/sysbios/knl/Clock");
const Idle = scripting.addModule("/ti/sysbios/knl/Idle");
const Idle1 = Idle.addInstance();
const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore");
const Swi = scripting.addModule("/ti/sysbios/knl/Swi");
const Task = scripting.addModule("/ti/sysbios/knl/Task");
const Error = scripting.addModule("/ti/sysbios/runtime/Error");
const Memory = scripting.addModule("/ti/sysbios/runtime/Memory");
const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback");
const System = scripting.addModule("/ti/sysbios/runtime/System");
const zstack = scripting.addModule("/ti/zstack/zstack");

/**
* Write custom configuration values to the imported modules.
*/
CCFG.xoscCapArray = true;
CCFG.xoscCapArrayDelta = 0xC1;
CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 15;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.forceVddr = true;
CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

rfdesign.rfDesign = "LAUNCHXL-CC1352P-2";

Display1.$name = "CONFIG_DISPLAY";
Display1.uart.$name = "CONFIG_DISPLAY_UART";
Display1.uart.flowControl = true;
Display1.uart.uart.$assign = "UART1";
Display1.uart.uart.txPin.$assign = "boosterpack.4";
Display1.uart.uart.rxPin.$assign = "boosterpack.3";
Display1.uart.uart.ctsPin.$assign = "boosterpack.19";
Display1.uart.uart.rtsPin.$assign = "boosterpack.36";
scripting.suppress("Connected to hardware,@@@.+?@@@ is connected to XDS110 UART on the CC1352P-2 LaunchPad\\. Consider selecting it in 'use hardware' above\\. @@@.+?@@@", Display1.uart.uart, "txPin");
scripting.suppress("Connected to hardware,@@@.+?@@@ is connected to XDS110 UART on the CC1352P-2 LaunchPad\\. Consider selecting it in 'use hardware' above\\. @@@.+?@@@", Display1.uart.uart, "rxPin");

AESCBC1.$name = "CONFIG_AESCBC_0";

AESCCM1.$name = "CONFIG_AESCCM_0";
AESCCM1.interruptPriority = "2";

AESECB1.$name = "CONFIG_AESECB_0";
AESECB1.interruptPriority = "1";

ECDH1.$name = "CONFIG_ECDH_0";

ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
NVS1.internalFlash.regionSize = 0x6000;
NVS1.internalFlash.regionBase = 0x50000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
NVS2.$hardware = system.deviceData.board.components.MX25R8035F;
NVS2.externalFlash.$name = "ti_drivers_nvs_NVSSPI25X0";
NVS2.externalFlash.regionSize = 0x256000;
NVS2.externalFlash.verifyBufferSize = 64;

RF.$hardware = system.deviceData.board.components["SKY13317-373LF"];
RF.rfAntennaPin0.$assign = "DIO_28";
RF.rfAntennaPin1.$assign = "DIO_29";
RF.rfAntennaPin2.$assign = "DIO_30";

SHA21.$name = "CONFIG_SHA2_0";

TRNG1.$name = "CONFIG_TRNG_0";

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.button.$assign = "boosterpack.13";

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.button.$assign = "boosterpack.8";

LED1.$name = "CONFIG_LED_RED";
LED1.$hardware = system.deviceData.board.components.LED_RED;
LED1.ledPin.$assign = "boosterpack.39";
LED1.gpioPin.$name = "CONFIG_GPIO_RLED";

LED2.$name = "CONFIG_LED_GREEN";
LED2.$hardware = system.deviceData.board.components.LED_GREEN;
LED2.ledPin.$assign = "boosterpack.40";
LED2.gpioPin.$name = "CONFIG_GPIO_GLED";

const NVSSPI25XDevice = scripting.addModule("/ti/drivers/nvs/NVSSPI25XDevice", {}, false);
const NVSSPI25XDevice1 = NVSSPI25XDevice.addInstance({}, false);
NVSSPI25XDevice1.$name = "CONFIG_NVS_SPI_0";
NVS2.externalFlash.spiFlashDevice = NVSSPI25XDevice1;
NVSSPI25XDevice1.chipSelect.$assign = "boosterpack.38";
NVSSPI25XDevice1.chipSelectPinInstance.$name = "CONFIG_GPIO_0";

SPI1.$name = "CONFIG_SPI_0";
NVSSPI25XDevice1.sharedSpiInstance = SPI1;
SPI1.sclkPinInstance.$name = "CONFIG_PIN_SPI_SCLK";
SPI1.pociPinInstance.$name = "CONFIG_PIN_SPI_MISO";
SPI1.picoPinInstance.$name = "CONFIG_PIN_SPI_MOSI";
SPI1.spi.$assign = "SSI0";
SPI1.spi.sclkPin.$assign = "boosterpack.7";
SPI1.spi.pociPin.$assign = "boosterpack.14";
SPI1.spi.picoPin.$assign = "boosterpack.15";
SPI1.spi.dmaRxChannel.$assign = "DMA_CH3";
SPI1.spi.dmaTxChannel.$assign = "DMA_CH4";

BIOS.assertsEnabled = false;
BIOS.rtsGateType = "BIOS_GateMutexPri";
BIOS.heapSize = 0x00000000;
BIOS.heapType = "HeapCallback";

const Hwi = scripting.addModule("/ti/sysbios/family/arm/m3/Hwi", {}, false);
Hwi.enableException = false;
Hwi.nvicCCR = [];

HeapCallback.initFxn = "osalHeapInitFxn";
HeapCallback.allocInstFxn = "osalHeapAllocFxn";
HeapCallback.freeInstFxn = "osalHeapFreeFxn";
HeapCallback.getStatsInstFxn = "osalHeapGetStatsFxn";
HeapCallback.isBlockingInstFxn = "osalHeapIsBlockingFxn";

Clock.tickPeriod = 10;
Clock.swiPriority = 4;

const Timer = scripting.addModule("/ti/sysbios/family/arm/cc26xx/Timer", {}, false);
Timer.rtc.$assign = "RTC0";

Idle1.$name = "powerIdle";
Idle1.idleFxn = "Power_idleFunc";

Semaphore.supportsPriority = false;

Swi.numPriorities = 6;

Task.checkStackFlag = false;
Task.defaultStackSize = 512;
Task.idleTaskStackSize = 512;
Task.numPriorities = 6;

Error.policy = "Error_SPIN";

System.abortFxn = "System_abortSpin";
System.exitFxn = "System_exitSpin";
System.maxAtexitHandlers = 1;
System.supportModule = "SysCallback";

zstack.deviceType = "znp";
zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
zstack.rf.txPower = "20";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
zstack.network.$name = "ti_zstack_network_zstack_network0";
zstack.advanced.$name = "ti_zstack_advanced_zstack_advanced0";
zstack.advanced.routing.$name = "ti_zstack_advanced_zstack_routing0";
zstack.advanced.packetSending.$name = "ti_zstack_advanced_zstack_packet_sending0";
zstack.advanced.tableSize.$name = "ti_zstack_advanced_zstack_table_size0";

0 comments on commit 01200b1

Please sign in to comment.