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.

CC2640: How to change device address after initialization

Part Number: CC2640
Other Parts Discussed in Thread: CC2650,

I can change the device address pre-initialization per TI's sample code using:

ICall_registerApp(&selfEntity, &sem);

//Hard code the DB Address till CC2650 board gets its own IEEE address
uint8 bdAddress[B_ADDR_LEN] = { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 };
HCI_EXT_SetBDADDRCmd(bdAddress);

But I don't know how to change it after initialization.  If I call HCI_EXT_SetBDADDRCmd(newAddr), the address will change briefly but revert back to the old address.  I read that HCI_EXT_SetBDADDRCmd(bdAddress) can only be used while the stack is in the standby state but I don't know how to put it in standby other than by reset.

Anybody know how to do this?

Thanks

  • Hello Steve,
    Please refer to section "1.3.2.1 Static Device Address" in the BT Core spec.

    "A device may choose to initialize its static address to a new value after each
    power cycle. A device shall not change its static address value once initialized
    until the device is power cycled."

    You must reset the device to change the static device address.
  • Here is how I’ve implemented setting the device address in a device that has already been initialized.

     

    I store the Device address in SNV (FLASH) internal to the CC2640.  At initialization time, the address is read from SNV and written to the device address.  This device address will now appear in the beacon.

     

    To change the device address:

     

    The host CPU sends a command with the new address to the CC2640.  The CC2640 writes it to SNV.  The Host CPU asserts reset to the CC2640.  The device address is updated with the new value during initialization.

     

    Easy as pie!

     

  • Thanks for sharing your solution.