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.

CC2652P: Flash open failed in cc2652P.

Part Number: CC2652P
Other Parts Discussed in Thread: UNIFLASH


I am using MX25R8035FM2IH0 flash for cc2652P module with zr sw ota client. i am using sdk 5.10. i am doing following steps.

1. erase the device using flash programmer 2 /uniflash.

2. program the bim_offchip_hex file which is compiled from ccs.

3. leds turn on after this.

4. program the zr sw ota client hex file which is compiled from ccs.

5. the code starts working.

6. then i just reset the device then the code stops working only bim is working.

futher when i debugged more i found an issue with the following .

static bool extFlashReadInfo(void)
int ret;
const uint8_t wbuf[] = { BLS_CODE_MDID, 0xFF, 0xFF, 0x00 };

ret = bspSpiWrite(wbuf, sizeof(wbuf)); ...............................................// code failed here.
if (ret)
extFlashDeselect(); ..........................................// it goes here 
return (false);

ret = bspSpiRead(infoBuf, sizeof(infoBuf)); .....................................// the infobuf filled with 0 value.

return (ret == 0);

static bool extFlashVerifyPart(void)
if (!extFlashReadInfo())
return (false);

pFlashInfo = flashInfo;
while (pFlashInfo->deviceSize > 0)
if (infoBuf[0] == pFlashInfo->manfId && infoBuf[1] == pFlashInfo->devId)   ..//////////////////////failed here beacuse of infobuf consists 0 only.

return (pFlashInfo->deviceSize > 0);
// return (0);

please guide me for this issue. also please tell about the following highlighted part.

int bspSpiWrite(const uint8_t *buf, size_t len)
while (len > 0)
uint32_t ul;

SSIDataPut(BLS_SPI_BASE, *buf);

return (0);

please guide.

  • Hello Chintamani,

    Please make sure you have a factory image programmed into your external flash device, this is described in the Building and Downloading Target Applications section of the Z-Stack User's Guide.


  • Hello Ryan,

    i have followed all the steps as mentioned in the document. also follow the below sequence using ccs debug. but after reset main program wont started.

    Flashing OTA Client Sequence

    In order to use OTA Client functionality, the BIM must be loaded into the device. It is recommended that prior to loading any application, a memory erase operation is performed on the device to avoid previous configuration or NV usage affects the device.

    1. Erase complete flash
    2. Flash BIM (using the .hex file)
    3. Flash Client OTA application (using the *_oad.bin without overwriting the BIM)
    4. Perform any upgrade operation

    please guide also please tell in what  address  *_oad.bin will flash? is that 0xA8?

  • Can you confirm that you programmed a factory image (preferably the BLE Project Zero to start) onto your external flash device?  Please use UNIFLASH to program the BIM hex file and application binary image.  0x00 to 0xA8 is reserved for the OAD header, the rest of the flash area is used for the application, stack, NV memory, and CCFG.  You can review the OAD Image Tool to understand the hex to bin conversion and command linker (.cmd) and output .map files to review the flash memory layout.


  • Hi Ryan,

    I have done all this but my OTA is failed here ( ( zclOTA_Permit == FALSE ) ||
    ( *otaClient_ImageUpgradeStatus != OTA_STATUS_NORMAL ) )

    i am getting zclOTA_Permit  ==FALSE. the flag is doesn't set true anywhere. please guide where is the problem.

  • Can you please remove the zclOTA_Permit condition or use zclOTA_PermitOta(TRUE) from your application to determine how this changes the behavior?