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.

Problem with ZB_WRITE_CONFIGURATION

Other Parts Discussed in Thread: CC2530

Hello, i have problem with configuring my parameters using ZB_WRITE_CONFIGURATION command.

 i am using ZNP CC2530 ZStack, i connect the cc2530 to an external 8051 uc through SPI interface, everything is working fine, i get all expected bytes from CC2530, but i have found that nothing of the parameters i changed by explicitly is really changed. for example i would like to change the ZCD_NV_STARTUP_OPTION to be 3 instead od default value 0, i get all the message that tells me the command is success, bu t when i try to read the value after i reset i found it unchanged. what seems to be the problem???

  • What ZNP command do you use before and after you set ZCD_NV_STARTUP_OPTION to 3? Could you describe the steps more clearly?

  • Here are the commands i used, as i mentioned all the commands gives the expected output until i read the values of the parameters and i find that the values are not changed

    cc2530_reset(CC2530_RESET_ON); // put zigbee in reset state on
    delayms(DELAY_LONG);
    cc2530_reset(CC2530_RESET_OFF); // put zigbee in reset state off
    SYS_RESET_IND();

    ZB_WRITE_CONFIGURATION(ZCD_NV_STARTUP_OPTION);

    cc2530_reset(CC2530_RESET_ON); // put zigbee in reset state on
    delayms(DELAY_LONG);
    cc2530_reset(CC2530_RESET_OFF); // put zigbee in reset state off
    SYS_RESET_IND();

    ZB_WRITE_CONFIGURATION(ZCD_NV_LOGICAL_TYPE);

    cc2530_reset(CC2530_RESET_ON); // put zigbee in reset state on
    delayms(DELAY_LONG);
    cc2530_reset(CC2530_RESET_OFF); // put zigbee in reset state off
    SYS_RESET_IND();

    ZB_WRITE_CONFIGURATION(ZCD_NV_PAN_ID);

    ZB_WRITE_CONFIGURATION(ZCD_NV_CHANLIST);
    ZB_WRITE_CONFIGURATION(ZCD_NV_ZDO_DIRECT_CB);
    AF_REGISTER(HA_END_POINT, HA_PROFILE_ID, HA_HOME_DEVICE, HA_DEVICE_VERSION, sizeof(HA_IN_CLUSTERS_ID), HA_IN_CLUSTERS_ID, sizeof(HA_OUT_CLUSTERS_ID), HA_OUT_CLUSTERS_ID);
    ZDO_STARTUP_FROM_APP();

    ZB_READ_CONFIGURATION(ZCD_NV_STARTUP_OPTION);
    ZB_READ_CONFIGURATION(ZCD_NV_LOGICAL_TYPE);
    ZB_READ_CONFIGURATION(ZCD_NV_PAN_ID);
    ZB_READ_CONFIGURATION(ZCD_NV_CHANLIST);
    ZB_READ_CONFIGURATION(ZCD_NV_ZDO_DIRECT_CB);

    ZDO_MGMT_PERMIT_JOIN_REQ(Permit_Connection);

  • I also tried to use SYS_OSAL_NV_WRITE & SYS_OSAL_NV_READ and still no result, when read the byte i get 0x02 as output which means according to the documentation ZInvalidParameter, please advise

  • Try to put ZB_WRITE_CONFIGURATION(ZCD_NV_STARTUP_OPTION); right before ZDO_START_FROM_APP().

  • i did that but the same resullt

  • hello anybody i need help please in this problem, i can't find any solution or any logic reason and sending to technical support will be useless i tried this before.

  • i tried to use SYS_OSAL_NV_WRITE instead of ZB_WRITE_CONFIGURATION but unfortunately i got the same result and no change in the parameter i am trying to change, i think maybe there is a variable or something in the firmware of the ZNP which is uploaded to the CC2530 that prevents the change of these parameters, what do you think???

  • To start the CC2530ZNP, clearing the previous network information:

    1. Write a '3' to ZCD_NV_STARTUP_OPTION

    2. Reset the CC2530

    3. This will clear all network state and network configuration.

    4. This also resets ZCD_NV_STARTUP_OPTION back to zero.

     

    To re-erase network config & state, you need to repeat the above process. ZCD_NV_STARTUP_OPTION is meaningless after the CC2530ZNP starts.

  • i tried also to change any parameter such as ZCD_NV_LOGICAL_TYPE to be 0x01 (router), but also still when i try to read it's value i found it's still the default value 0x00 (coordinator)