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.

Uploading new firmware version for CC2530

Other Parts Discussed in Thread: CC2530

Hello,

We need to provide the firmware up gradation in the field for CC2530. I am planning to use the debug interface to flash the new firmware image to CC2530. Does any boot loader code is required for this operation? If yes which memory location will be allocated for this? We are having our custom board with cc2530.

Also I am facing an issue while writing into the flash using the debug mode but I am able to read chip id, read flash data and erase the flash. 

I am enabling the DMA using below command:

// Enable DMA
debug_config = 0x22;
debug_command(CMD_WR_CONFIG, &debug_config, 1);

After sending this command when I try to read the value, returned value is always 0xff. 

I have enabled the debug mode before sending this command.

Any help on this issue is greatly appreciated. 

  • If you use debug interface to download FW, there is no need for boot loader.

  • Hi YK Chen,

    Thanks for the reply. The other part of the query was writing to the flash. I am not able to write any data to the flash memory of cc2530 using debug mode. But I am able to read the data, chip ID and erase the flash. I am following the example code by TI i.e. swra410. Any help in this regard is greatly appreciated.

    Thanks & Regards
    Mangala
  • Hi,

    Below is the DMA descriptor. I am using IAR to compile the code. Please do let me know is the DMA description is correct?

    const BYTE dma_desc[32] = {
    /* Debug Interface -> Buffer 0 (Channel 1) */
    HIBYTE(DBGDATA), /* src[15:8] */
    LOBYTE(DBGDATA), /* src[7:0] */
    HIBYTE(ADDR_BUF0), /* dest[15:8] */
    LOBYTE(ADDR_BUF0), /* dest[7:0] */
    HIBYTE(PROG_BLOCK_SIZE),
    LOBYTE(PROG_BLOCK_SIZE),
    31, /* trigger DBG_BW */
    0x11, /* increment destination */

    /* Debug Interface -> Buffer 1 (Channel 2) */
    HIBYTE(DBGDATA), /* src[15:8] */
    LOBYTE(DBGDATA), /* src[7:0] */
    HIBYTE(ADDR_BUF1), /* dest[15:8] */
    LOBYTE(ADDR_BUF1), /* dest[7:0] */
    HIBYTE(PROG_BLOCK_SIZE),
    LOBYTE(PROG_BLOCK_SIZE),
    31, /* trigger DBG_BW */
    0x11, /* increment destination */

    /* Buffer 0 -> Flash controller (Channel 3) */
    HIBYTE(ADDR_BUF0), /* src[15:8] */
    LOBYTE(ADDR_BUF0), /* src[7:0] */
    HIBYTE(FWDATA), /* dest[15:8] */
    LOBYTE(FWDATA), /* dest[7:0] */
    HIBYTE(PROG_BLOCK_SIZE),
    LOBYTE(PROG_BLOCK_SIZE),
    0x12, /* trigger FLASH */
    0x42, /* increment source */

    /* Buffer 1 -> Flash controller (Channel 4) */
    HIBYTE(ADDR_BUF1), /* src[15:8] */
    LOBYTE(ADDR_BUF1), /* src[7:0] */
    HIBYTE(FWDATA), /* dest[15:8] */
    LOBYTE(FWDATA), /* dest[7:0] */
    HIBYTE(PROG_BLOCK_SIZE),
    LOBYTE(PROG_BLOCK_SIZE),
    0x12, /* trigger FLASH */
    0x42 /* increment source */
    };

    I am not able to write any data to flash.

    Regards

    Mangala