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: Factor Reset definitions

Part Number: CC2530

Hi Guys, 

I working to finish my CC2530 device, I am using a CC2530 2.4.0 Zstack and I would like to understanding how I can implement a factory reset in my device.When I using the CC2530 reset key my device continue to store the NWK parameters (PAN ID, NWK SRC Address and etc.). 

Someone can give me any idea how to implement it?

BR

Alex

  • You can use the following two lines to do factory reset.

    zgWriteStartupOptions(ZG_STARTUP_SET, ( ZCD_STARTOPT_DEFAULT_NETWORK_STATE | ZCD_STARTOPT_DEFAULT_CONFIG_STATE) );
    SystemReset();
  • Hi Mr Yikai, thanks a lot now is working well. I used the P1_7 to start call the function below.

    /*********************************************************************
    * @fn zclSampleSw_HandleReset
    *
    * @brief Handle the P1_7 to starting Reset with Factory Reset
    *
    *
    * @return none
    */

    static void zclSampleLight_HandleReset( void )
    {

    zgWriteStartupOptions(ZG_STARTUP_SET, ( ZCD_STARTOPT_DEFAULT_NETWORK_STATE | ZCD_STARTOPT_DEFAULT_CONFIG_STATE) );
    SystemReset();
    HalLedSet( HAL_LED_1, HAL_LED_MODE_ON );

    }