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.

How to reset Radio register to default value on CC254x

Other Parts Discussed in Thread: CC2545, CC2543

Hi ,

There is a problem that i don't know how to reset radio register on CC254x, please someone give me a hand.

I need to reset Radio part only and without reset MCU, so i can't use the watch dog reset.

Is there a easy way to reset all the radio register to default value on CC2543/cc2545 ?

The Radio register including Radio XREG, Tx FIFO, Rx FIFO, Radio RAM.

The Radio Ram, Tx FIFO ,Rx FIFO can be reset by sample code on CC254x PER as below, but how to reset  Radio XREG to default value on CC254x.

/*******************************************************************************
* @fn halRfInit
*
* @brief Reset Radio RAM-Based Registers, TXFIFO and RXFIFO.
* Also set the default output power setting.
*
* @param void
*
* @return void
*/
void halRfInit(void) {
/* Clear radio memory.
* The RAM registers don't have a default value set after power on */
memset((void*)RFCORE_RAM_PAGE, 0, RFCORE_RAM_PAGE_SZ);

// Reset RXFIFO and TXFIFO.
halRfCommand(CMD_RXFIFO_RESET);
halRfCommand(CMD_TXFIFO_RESET);

#if (chip == 2541)
TXPOWER = TXPOWER_0_DBM; // Set default output power: 0dBm.
#else
TXPOWER = TXPOWER_4_DBM; // Set default output power: 4dBm.
#endif
return;
}

  • Hello Jack,

    The Radio RAM register are in RAM and hence have no reset value. You will have to use a array to store and load the values in the radio RAM area from RFCORE_RAM_PAGE to RFCORE_RAM_PAGE_SZ.

  • Hello Eirik,

    Thank you for your reply, but may be i should describe my question more clearly .

    I can clear the Radio Ram to Zero and reset the Tx or Rx FIFO, but I can't reset the Radio XREG(0x6180 to 0x61FC).

    The Radio XREG have reset value on CC254x user guide 23.12.3.1 XREG Register Descriptions.

    I want to reset the Radio XREG to the reset value because I need to switch two different Radio setting by different author. You know sometimes engineer only set the register which they need..........

    If there is a easy way to set Radio XREG to default value will very helpful.

    BR,

    Jack

  • Hello Jack,

    Ok, wow I understand.

    Sorry, only a chip reset or power cycle will reset the registers. You will have to read, store and write them manually. 

  • Hi Eirik,

    Got it, thanks for your recommend .

    BR,

    Jack