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.

CC2640R2F: RAM retention during reset

Part Number: CC2640R2F

I am testing the behavior of the _bim_var variable in bim_main.c:

// BIM variable
#ifdef __TI_COMPILER_VERSION__
  #pragma location = BIM_VAR_ADDR
  #pragma NOINIT(_bim_var)
  uint32_t _bim_var;
#elif __IAR_SYSTEMS_ICC__
  __no_init uint32_t _bim_var @ BIM_VAR_ADDR;
#endif

void main(void)
{
    setSearchVar(_bim_var, &FN, &IT);
    ......
}

The variable is supposed to be random every time the board is re-powered, however, I found out it's value is unchanged if I power down and power up the board again within a few seconds. So I would like to confirm under what circumstances will the RAM be re-initialized?

I found several reset source described in CC2640R2F's TRM:

0h = Power on reset
1h = Reset pin
2h = Brown out detect on VDDS
3h = Brown out detect on VDD
4h = Brown out detect on VDDR
5h = Clock loss detect
6h = Software reset via SYSRESET register
7h = Software reset via PRCM warm reset request

Is the RAM retention has something to do with the reset sources?

Best regards,

Shuyang

  • Hi

    On CC26xx platforms, RAM is retained between resets.

    When the device is powered down, no guarantee is provided that the RAM is left unaltered. Actually, the RAM will get "naturally" erased at the end. But this takes time. 

    If you need to be sure that the data is not lost, then you have to keep the data Flash.

    I hope this will help,

    Best regards,