Contiki-NG
Files | Functions
CC13xx/CC26xx IEEE Address Control

Driver for the retrieval of an IEEE address from flash. More...

Files

file  ieee-addr.c
 Driver for the CC13xx/CC26xx IEEE addresses.
 
file  ieee-addr.h
 Header file with register and macro declarations for the cc26xx IEEE address driver.
 

Functions

void ieee_addr_cpy_to (uint8_t *dst, uint8_t len)
 Copy the node's IEEE address to a destination memory area. More...
 

IEEE address locations

The address of the secondary location can be configured by the platform or example

#define IEEE_ADDR_LOCATION_PRIMARY   0x500012F0
 Primary IEEE address location.
 
#define IEEE_ADDR_LOCATION_SECONDARY   0x0001FFC8
 Secondary IEEE address location.
 

Detailed Description

Driver for the retrieval of an IEEE address from flash.

The user can specify a hardcoded IEEE address through the IEEE_ADDR_CONF_HARDCODED configuration macro.

If the user does not hard-code an address, then one will be read from either the primary location (InfoPage) or from the secondary location (on flash).

In order to allow the user to easily program nodes with addresses, the secondary location is given priority: If it contains a valid address then it will be chosen in favour of the one on InfoPage.

In this context, an address is valid if at least one of the 8 bytes does not equal 0xFF. If all 8 bytes are 0xFF, then the primary location will be used.

In all cases, the address is assumed to be written little-endian.

Lastly, it is possible to override the 2 LSB's of the address by using the NODE_ID make variable.

Function Documentation

◆ ieee_addr_cpy_to()

void ieee_addr_cpy_to ( uint8_t *  dst,
uint8_t  len 
)

Copy the node's IEEE address to a destination memory area.

Parameters
dstA pointer to the destination area where the IEEE address is to be written
lenThe number of bytes to write to destination area

This function will copy len LS bytes and it will invert byte order in the process. The factory address on devices is normally little-endian, therefore you should expect dst to store the address in a big-endian order.

Definition at line 48 of file ieee-addr.c.