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.

CC2530: Flash Banks - Losing required data in flash due to overwrite

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, TIMAC

Hey,

I assume the following is the Start and End address of the flash banks in CC2530, Bank 0 is used by Code Memory, Bank 1 is also used partly by code memory and XDATA

_BANK7_END 0003FFFF
_BANK7_START 00038000
_BANK6_END 00037FFF
_BANK6_START 00030000
_BANK5_END 0002FFFF
_BANK5_START 00028000
_BANK4_END 00027FFF
_BANK4_START 00020000
_BANK3_END 0001FFFF
_BANK3_START 00018000
_BANK2_END 00017FFF
_BANK2_START 00010000
_BANK1_END 0000FFFF
_BANK1_START 00008000
_BANK0_END 00007FFF
_BANK0_START 00000000

For my application I want to store some data once onto the flash and I want the data to be present even if the node reboots, I am having problems in writing data in bank 1 as data is overwritten with some code data. Also I am not being able to view the data from address 0x010000  onwards corresponding to bank 2. But I can still Flash Write and Flash Read from that location,

Please provide some help on which flash bank can be chosen so that I can avoid flash overwrite with code data.

Thanks,

Suhrith

  • Hi Suhrith,

    Are you still using Z-Stack for this application?  You could modify the f8w2530.xcl to reserve flash pages for this purpose but my recommendation is that you utilize the already-existing NV driver to store your own NV items.  Please refer to OSAL_Nv.c/h and ZComDef.h files as well as the OSAL and API document for more information.

    Regards,
    Ryan

  • Hi Ryan,

    No I am not using Z-Stack for this application, to modify f8w2530.xcl I think i need to use Stack, I am not sure on how to use the NV Driver without Stack.

    Regards,

    Suhrith  

  • Hey Suhrith,

    TIMAC 1.5.2 is more lightweight than Z-Stack concerning Flash/RAM requirements and also includes the OSAL NV driver.  You can use either as a reference and extract the OSAL NV driver to use for your own application purposes.

    Regards,
    Ryan