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.

CC2430 xdata memory

Other Parts Discussed in Thread: CC2430

Hi

I need to access the full 8K of CC2430 memory. The IAR compiler seems to be pre-setup to use 0xF000 to 0xFFFF. I can't see where this is set in options, header files or the ddf files. I just know that if I do a test "uint8_t myblock[4000]" the linker complains of insufficient space.

I really need to use the full 8K (0xE000 - 0xFFFF) and don't mind the fact that the first 4K is not preserved in low power modes.

Any examples anywhere would help

 

Thanks

 

 

  • Hi Joma,

    The magic files you search for is: lnk51ew_cc2430.xcl (...\Program Files\IAR Systems\Embedded Workbench X.X\8051\config).

    In that file, you will find definitions for the range of XDATA. Here's the definition from version 7.30B of EW8051:

    //    IXDATA
    //
    -D_IXDATA_START=0xF000         // The internal xdata is 4k.
    // The end limit is 4 bytes lower on CC2430/31 for rev. D, compared to rev. A, B and C
    // -D_IXDATA_END=0xFD57        // Revision A, B and C
    -D_IXDATA_END=0xFD53           // Revison D (this setting is safe for all revisions)
    //                                FD54 (FD58) to FEFF used for reg savings
    //                                FF00 to FFFF mapped to IDATA
    //

  • Hello,

    i have the same problem.

    Someone can write what is the configuration in IAR (in the option, stack/heap page) and how changement must to do in the .xcl file ?

     

    Thank you

    GM

  • Hi Giordano

    The reply from xyzzy works. Open the file lnk51ew_cc2430.xcl (...\Program Files\IAR Systems\Embedded Workbench X.X\8051\config).

    Change the line...

    -D_IXDATA_START=0xF000         // The internal xdata is 4k.

    to...

    -D_IXDATA_START=0xE000         // The internal xdata is 8k.

    This works fine but you need to remember that only the upper 4K (0xF000 to 0xFFFF) will be retained in PM2 and PM3 on the CC2430. I use the lower 4K as temporary buffer space which is only needed for PM0.

    I have also switched from using IAR to Keil which in my opinion, is a much better tool for the job I am doing. Setting up the memory range is trivial in Keil.


    Joma