Hello there,
actually I'm looking for a unique number or address of a CC2540 chip.
I want to be sure that the chip is uniqe. So the Boardaddress is not enough because it can be changed by the user,
Thank you for your help
Greetings
Sebastian
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.
Hello there,
actually I'm looking for a unique number or address of a CC2540 chip.
I want to be sure that the chip is uniqe. So the Boardaddress is not enough because it can be changed by the user,
Thank you for your help
Greetings
Sebastian
Each CC2540 is programmed with a unique 48-bit MAC address. This is contained in the information page and can't be changed. You can find the MAC address at address 0x780E-0x7813. See Section 2.2.3 of the user guide for more information on this.
I don't know if the MAC address was what you meant by "boardaddress", but if so, note that the MAC address in the information page is known as the primary IEEE address. There is also a secondary IEEE address, which can be programmed by the equipment manufacturer, but even that can't be changed by the user (unless you by user mean a developer with access to the debug interface of the chip).
Thank you for this information.
You are right with user i meant somebody that uses for example a development kit to copy a known address.
But the one thing that i don't understand at this moment is how i Can get the information page via HCI commands.
I hope that this is possible and you can help me with that.
Thanks a lot
Greetings Sebastian
You can read the MAC address (BD_ADDR) of a device using the HCI_Read_BD_Addr command. This will return the actual address used by the device, which may be the primary or secondary address, or another address set with the device-specific HCI command HCI_EXT_SetBDADDRCmd. You can also use this command to set back to default in case the address had been modified. The default will be either the primary or secondary IEEE address. It is the secondary if such an address is present (non-0xFFFFFF), otherwise the primary.
If you want to access the primary IEEE address from an application running on a CC2540, you can simply read it from the information page (XDATA memory range). There is no side-effect of this, so you can do this without any consideration about what the stack might do with the same addresses.
I am not quite sure what you are trying to accomplish here. If you want to make sure that no one tampers with the device address on a product you have designed based on the CC2540, you should lock the device from debugging when you program the flash. That way, the only way to modify anything in the program from the debug interface is to erase the whole flash. The intruder would then have to develop a complete new application.
If you want to make sure that no one spoofs your device address on the air, it does not really help ensuring that you always use the primary address. They could still spoof the address using a CC2540 or another device. To avoid this, you need to use a private address scheme as defined in GAP.
Hi, how could read the secondary MAC address from a program that running on the same device - is it a specific fixed memory adrress like for the primary one? Thanks
Hi,
The secondary IEEE address is stored in the uppermost flash page at address 0x7EA from the start of the page. That means that it is readable from XDATA memory at address 0xFFEA when the uppermost flash bank is selected through MEMCTR.XBANK. The uppermost flash bank is 3 for a CC2540F128 and 7 for a CC2540F256.
Hi,
Is there an register in the Flash that the name of the device (CC2540) can be written. Basically, rather than using the MAC address to identify the unit when slave is broadcasting, I want to use the name (that I specify, kinda like the SSID).
Also I like to know if the SmartRF Flash Programmer can be scripted or automated with labview - I'm trying to automate the firmware flashing process of the CC2540.
Thanks in anticipation.
Hi, sorry for letting this old thread up, I have question related to this topic.
I want to write the ID number into each sold out product. I see in SmartRF progr tool, there is function to change some bytes at specified address in hex file, but I have no idea what address I need to write to, and how to read these values in runtime, I guess by using osal_snv_read()... ?
Can anyone help me out. Thank you.