This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P: ZigBee OTA not starting in Custom Board

Part Number: CC1352P
Other Parts Discussed in Thread: SYSCONFIG,

Hi All,

Added the OTA Client feature to the zr_light and able to test successfully in the EVK.

Now moving it to custom board is not starting the OTA process and in the beginning only it is getting aborted.

The SPI_CS pin is the only change different from EVK(IOID_20) and Custom board(IOID_11).

Made this changes in following places

1. SysConfig - Slave Select GPIO Instance

2. CC1352P_2_LAUNCHXL_fxns.c - IOID_20 to IOID_11, all occurance in this file

3. BIM_OFF_CHIP's bsp.h - BSP_IOID_FLASH_CS

But still the issue was there.

Kindly let me know is anything missed.

Thanks & Regards,

Yasar Arafath

  • Have you monitored the SPI interface and found any differences between your working board and your custom boad?

    Could you also share the (syscfg) setup on the working board?

  • Yes, Verified the SPI interface with spiffsexternal SDK example.

    Screenshot of  the working Launchpad's CS selection

    Attached the working Launchpad's .syscfg file

    zr_light - copy.txt
    /**
     * 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" --product "simplelink_cc13x2_26x2_sdk@4.10.00.78"
     * @versions {"data":"2020021217","timestamp":"2020021217","tool":"1.4.0+1234","templates":"2020021217"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const CCFG     = scripting.addModule("/ti/devices/CCFG");
    const rfdesign = scripting.addModule("/ti/devices/radioconfig/rfdesign");
    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 ECJPAKE  = scripting.addModule("/ti/drivers/ECJPAKE");
    const ECJPAKE1 = ECJPAKE.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 TRNG     = scripting.addModule("/ti/drivers/TRNG");
    const TRNG1    = TRNG.addInstance();
    const UART     = scripting.addModule("/ti/drivers/UART");
    const UART1    = 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 zstack   = scripting.addModule("/ti/zstack/zstack");
    
    /**
     * Write custom configuration values to the imported modules.
     */
    CCFG.xoscCapArray             = true;
    CCFG.xoscCapArrayDelta        = 0xC1;
    CCFG.enableBootloaderBackdoor = true;
    CCFG.dioBootloaderBackdoor    = 15;
    CCFG.levelBootloaderBackdoor  = "Active low";
    CCFG.forceVddr                = true;
    CCFG.ccfgTemplate.$name       = "ti_devices_CCFGTemplate0";
    
    rfdesign.rfDesign = "LAUNCHXL-CC1352P-2";
    
    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";
    
    ECJPAKE1.$name = "CONFIG_ECJPAKE_0";
    
    NVS1.$name                    = "CONFIG_NVSINTERNAL";
    NVS1.internalFlash.$name      = "ti_drivers_nvs_NVSCC26XX0";
    NVS1.internalFlash.regionBase = 0x52000;
    NVS1.internalFlash.regionSize = 0x4000;
    
    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"];
    
    SHA21.$name = "CONFIG_SHA2_0";
    
    TRNG1.$name = "CONFIG_TRNG_0";
    
    UART1.$hardware           = system.deviceData.board.components.XDS110UART;
    UART1.$name               = "CONFIG_DISPLAY_UART";
    UART1.txPinInstance.$name = "CONFIG_PIN_UART_TX";
    UART1.rxPinInstance.$name = "CONFIG_PIN_UART_RX";
    UART1.uart.$name          = "MyUART1";
    
    Button1.$name                     = "CONFIG_BTN_LEFT";
    Button1.$hardware                 = system.deviceData.board.components["BTN-1"];
    Button1.gpioPin.$name             = "CONFIG_GPIO_BTN1";
    Button1.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN1";
    
    Button2.$name                     = "CONFIG_BTN_RIGHT";
    Button2.$hardware                 = system.deviceData.board.components["BTN-2"];
    Button2.gpioPin.$name             = "CONFIG_GPIO_BTN2";
    Button2.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN2";
    
    LED1.$name                                   = "CONFIG_LED_RED";
    LED1.$hardware                               = system.deviceData.board.components.LED_RED;
    LED1.dimmable                                = true;
    LED1.pwmPin.$name                            = "CONFIG_PWM_RED";
    LED1.pwmPin.timerObject.$name                = "CONFIG_GPTIMER_0";
    LED1.pwmPin.timerObject.timer.$name          = "MyGPTM1";
    LED1.pwmPin.timerObject.pwmPinInstance.$name = "CONFIG_PIN_RLED";
    
    LED2.$name                     = "CONFIG_LED_GREEN";
    LED2.$hardware                 = system.deviceData.board.components.LED_GREEN;
    LED2.gpioPin.$name             = "CONFIG_GPIO_GLED";
    LED2.gpioPin.pinInstance.$name = "CONFIG_PIN_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.slaveSelectGpioInstance.$name             = "CONFIG_GPIO_0";
    NVSSPI25XDevice1.slaveSelectGpioInstance.pinInstance.$name = "CONFIG_PIN_0";
    
    const SPI                          = scripting.addModule("/ti/drivers/SPI", {}, false);
    const SPI1                         = SPI.addInstance({}, false);
    SPI1.$name                         = "CONFIG_SPI_0";
    NVSSPI25XDevice1.sharedSpiInstance = SPI1;
    SPI1.sclkPinInstance.$name         = "CONFIG_PIN_SPI_SCLK";
    SPI1.misoPinInstance.$name         = "CONFIG_PIN_SPI_MISO";
    SPI1.mosiPinInstance.$name         = "CONFIG_PIN_SPI_MOSI";
    SPI1.spi.$name                     = "MySSI1";
    
    zstack.deviceType                            = "zr";
    zstack.deviceTypeReadOnly                    = true;
    zstack.rf.$name                              = "ti_zstack_rf_zstack_rf0";
    zstack.rf.primaryChannels                    = [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26];
    zstack.rf.radioConfig.$name                  = "ti_devices_radioconfig_settings_ieee_15_40";
    zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
    zstack.pm.$name                              = "ti_zstack_pm_zstack_pm0";
    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";
    
    /**
     * 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.
     */
    RF.rfAntennaPin0.$suggestSolution                                 = "41";
    RF.rfAntennaPin1.$suggestSolution                                 = "42";
    RF.rfAntennaPin2.$suggestSolution                                 = "43";
    UART1.uart.$suggestSolution                                       = "UART0";
    UART1.uart.txPin.$suggestSolution                                 = "19";
    UART1.uart.rxPin.$suggestSolution                                 = "18";
    Button1.gpioPin.gpioPin.$suggestSolution                          = "21";
    Button2.gpioPin.gpioPin.$suggestSolution                          = "20";
    LED1.pwmPin.timerObject.timer.$suggestSolution                    = "GPTM0";
    LED1.pwmPin.timerObject.timer.pwmPin.$suggestSolution             = "11";
    LED2.gpioPin.gpioPin.$suggestSolution                             = "12";
    NVSSPI25XDevice1.slaveSelectGpioInstance.gpioPin.$suggestSolution = "30";
    SPI1.spi.$suggestSolution                                         = "SSI0";
    SPI1.spi.sclkPin.$suggestSolution                                 = "16";
    SPI1.spi.misoPin.$suggestSolution                                 = "14";
    SPI1.spi.mosiPin.$suggestSolution                                 = "15";
    SPI1.spi.dmaRxChannel.$suggestSolution                            = "DMA_CH3";
    SPI1.spi.dmaTxChannel.$suggestSolution                            = "DMA_CH4";
    

    .syscfg format is not supporting. So renamed it to .txt.

    Thanks & Regards,

    Yasar Arafath

  • Hi Yasar,

    Do you have the BLE project zero sample application loaded onto the external flash memory?  https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/895596 

    Regards,
    Ryan

  • Hi Ryan,

    Do you mean to mention, I have to follow the procedure in below link?

    Thanks & Regards,

    Yasar Arafath

  • That is correct.

    Regards,
    Ryan

  • Hi Ryan,

    In the custom board with the release unsecure BIM we are trying the OTA with zr_light as mentioned already 


    In the above link followed the below procedure and still not able to initiate the OTA.

    Thanks & Regards,

    Yasar Arafath

  • Hi Yasar,

    You will also need to call OTA_saveFactoryImage from your application to actively write to the external flash memory.  So the corresponding steps should be similar to such:

    1. Program erase_storage_offchip_cc13x2lp.hex to remove external flash memory contents
    2. Program bim_offchip and modified zed_sw_ota_client (FACTORY_IMAGE defined and OTA_saveFactoryImage() called, perhaps by pushbutton)
    3. Invoke OTA_saveFactoryImage so that the factory image is saved to the external flash memory contents
    4. Erase all device memory and re-program only bim_offchip to verify zed_sw_ota_client is then loaded

    You will also need to define EXTERNAL_IMAGE_CHECK if your application plans to use OTA_hasFactoryImage

    Regards,
    Ryan