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.

zb_WriteConfiguration not working

Other Parts Discussed in Thread: CC2530

I've been developing my ZigBee application with a couple of CC2530EMs (which use CC2530f256 chips) and have them working just fine.  Then we designed a couple of new modules with CC2530f128 chips, and we seem to be having problems, but I can't tell if it is related to the chip change or maybe something else.  The bug that we run in to when trying to run our application on the new modules is that when trying to set the device type using the zb_WriteConfiguration function, the NV memory seems to never be set.  Is this related to the difference in chip?  Or is there some other reason that zb_WriteConfiguration might not work?

 

Matt

  • Matt:

    Are you running the CC2530 as a ZNP? if this is the case, do you reset the CC2530 after a NV write? What is the response to your zb_WriteConfiguration?

    LPRF Rocks the World

  • What exactly does it mean to "run as ZNP"? Either way, yes I reset after the NV write, then on startup again I read from NV to see if the configuration was set, and it does not.  The zb_WriteConfiguration does not return anything when I try to use it.  I can't figure out why the zb_WriteConfiguration doesn't write to NV! Could it be because I'm using the CC2530f128 but developed the application testing it on a CC2530f256??

     

    Thank you so much for your time and help.

     

    Matt

  • If you take a look in the hal_board_cfg.h file, you will find flash memory page definitions for NV. The CC2530f256 (and your CC2530f128) use a banked memory model, so you'll see default declarations of HAL_NV_PAGE_END 126 and HAL_NV_PAGE_CNT 6. These default values for the 'f256 won't work on the 'f128 because it only has 64 pages of flash memory. Try using HAL_NV_PAGE_END 62 - this will reserve six flash pages (57-62) for NV memory.

    The 2nd comment line for this block of #define staements also says "NV page definitions must coincide with segment declaration in project *.xcl file". This means that you will also need change the linker control file ( ...\Projects\zstack\Tools\CC2530DB\f8w2530.xcl ) if you change the #defined value of HAL_NV_PAGE_CNT (not recommended).