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.

CC2652R: Problem with off chip BIM

Part Number: CC2652R
Other Parts Discussed in Thread: CC3200, , UNIFLASH, Z-STACK

As I mentioned in https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/825080 I'm trying to reflash a CC2652R with a zb image stored in an external flash received via UART from a CC3200.

I've generated an oad image to store in CC2652R internal flash, the .zigbee image to reflash with this commands:

Then I flashed CC2652R with off_chip_bim and the oad app generated in the previous step with uniflash as shown in next image:

The linker script I used for my app is the same as in zed_sw_ota_client example. Linker Script:

/* Retain interrupt vector table variable                                    */
--retain=g_pfnVectors
/* Override default entry point.                                             */
--entry_point ResetISR
/* Allow main() to take args                                                 */
--args 0x8
/* Suppress warnings and errors:                                             */
/* - 10063: Warning about entry point not being _c_int00                     */
/* - 16011, 16012: 8-byte alignment errors. Observed when linking in object  */
/*   files compiled using Keil (ARM compiler)                                */
--diag_suppress=10063,16011,16012

/* The following command line options are set as part of the CCS project.    */
/* If you are building using the command line, or for some reason want to    */
/* define them here, you can uncomment and modify these lines as needed.     */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone.              */
/*                                                                           */
/* --heap_size=0                                                             */
/* --stack_size=256                                                          */
/* --library=rtsv7M3_T_le_eabi.lib                                           */

/* The starting address of the application.  Normally the interrupt vectors  */
/* must be located at the beginning of the application.                      */

#define FLASH_BASE              0x00000000
#ifdef ONE_PAGE_NV
#define FLASH_NV_BASE           0x54000
#define FLASH_NV_SIZE           0x2000
#else
#define FLASH_NV_BASE           0x52000
#define FLASH_NV_SIZE           0x4000
#endif

#define FLASH_LAST_BASE         0x56000
#define FLASH_LAST_SIZE         0x2000
#define RAM_BASE                0x20000000
#define RAM_SIZE                0x14000

#define OAD_HDR_START           FLASH_BASE
#define OAD_HDR_SIZE            0xA8
#define OAD_HDR_END             (OAD_HDR_START + OAD_HDR_SIZE - 1)

#define ENTRY_START             (OAD_HDR_END + 1)
#define ENTRY_SIZE              0x40
#define ENTRY_END               (ENTRY_START + ENTRY_SIZE - 1)

#define FLASH_START             (ENTRY_END + 1)
#define FLASH_END               (FLASH_NV_BASE - FLASH_START)
#define FLASH_SIZE              (FLASH_END - FLASH_START)

#define PAGE_SIZE               0x2000

/* System memory map */

MEMORY
{
    ENTRY (RX) : origin = ENTRY_START, length = ENTRY_SIZE

    FLASH_IMG_HDR (RX) : origin = OAD_HDR_START, length = OAD_HDR_SIZE

    /* Application stored in and executes from internal flash */
    FLASH (RX) : origin = FLASH_START, length = FLASH_SIZE

    /* FLASH NV */
    FLASH_NV (RWX) : origin = FLASH_NV_BASE, length = FLASH_NV_SIZE
    /* Last flash page */
    FLASH_LAST (RX) : origin = FLASH_LAST_BASE, length = FLASH_LAST_SIZE
    /* Application uses internal RAM for data */
    SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
}

/* Section allocation in memory */

SECTIONS
{
    GROUP > FLASH_IMG_HDR
    {
        .image_header //align PAGE_SIZE
    }

    GROUP > ENTRY
    {
        .resetVecs LOAD_START(prgEntryAddr)
        .intvecs
        EntrySection
    }

    .text           :   > FLASH

    config_const { mac_user_config.obj(.const) } > FLASH

    .const          :   > FLASH
    .constdata      :   > FLASH
    .rodata         :   > FLASH
    .cinit          :   > FLASH LOAD_END(flashEndAddr)
    .pinit          :   > FLASH
    .init_array     :   > FLASH
    .emb_text       :   > FLASH
    //.ccfg           :   > FLASH_LAST (HIGH)

    GROUP > SRAM
    {
        .data LOAD_START(ramStartHere)
        .bss
        .vtable
        .vtable_ram
         vtable_ram
        .sysmem
        .nonretenvar
    } LOAD_END(heapStart)

    .stack          :   >  SRAM (HIGH) LOAD_START(heapEnd)
}

/* Create global constant that points to top of stack */
/* CCS: Change stack size under Project Properties    */
__STACK_TOP = __stack + __STACK_SIZE;

I'm able to store the .zigbee image in the external flash as i receive it from UART, but when i restar the cc2652 in order to execute bim portion of code(I use

SysCtrlSystemReset()) it doesn't work and the bim turns on red light(bim is in debug mode).

To be honest, I'm really lost with this problem. Is there any steps I'm missing or doing wrong? What further tests can I carry out? 

Thanks in advance,

Matias