Datasheet & Register overview
General remarks
Communication with the Pozyx device is performed by reading from and writing to certain register addresses. This can be performed through the I2C bus or wirelessly with ultra-wideband. In total 256 register addresses are available, denoted by their hexadecimal value. We can subdivide the address space in a number of logical groups.
Register addresses | Description |
---|---|
0x00 - 0x0F | Status data |
0x10 - 0x2F | Configuration data |
0x30 - 0x9F | Sensor data |
0xA0 - 0xFFF | Function addresses |
The first three groups, i.e., status, configuration and sensor data, are directly pointed to memory. Each address is pointed to a single byte of data. This memory can be accessed by reading or writing to it. All data is internally stored using the little-endian representation. For example, the x-position is a 32bit integer (4 bytes) and is stored at register addresses 0x30 till 0x33. Because we use the little-endian representation the least significant byte of the 32bit integer is stored at address 0x30, the second least significant byte is stored at the address 0x31, and so on. Note that multiple subsequent registers can be read from or written to in one sequence. The last logical group, the function addresses, are not related to memory bytes. Rather, by accessing these registers a function on the Pozyx device is triggered. This typically involves writing data (i.e. the function parameters) to that memory address and reading the return value of the function. All data is again represented using the little-endian representation. Note that, unlike the data registers, it is not possible to call multiple subsequent addresses in one call.
Register map
Overview
Register address | Num bytes | Type | Name | Variable type | Short description |
---|---|---|---|---|---|
Status registers | |||||
0x0 | 1 | R | POZYX_WHO_AM_I | uint8_t | Returns the constant value 0x43. |
0x1 | 1 | R | POZYX_FIRMWARE_VER | uint8_t | Returns the POZYX firmware version. |
0x2 | 1 | R | POZYX_HARDWARE_VER | uint8_t | Returns the POZYX hardware version. |
0x3 | 1 | R | POZYX_ST_RESULT | uint8_t | Returns the self-test result |
0x4 | 1 | R | POZYX_ERRORCODE | uint8_t | Describes a possibly system error. |
0x5 | 1 | R | POZYX_INT_STATUS | uint8_t | Indicates the source of the interrupt. |
0x6 | 1 | R | POZYX_CALIB_STATUS | uint8_t | Returns the calibration status. |
Configuration registers | |||||
0x10 | 1 | R/W | POZYX_INT_MASK | uint8_t | Indicates which interrupts are enabled. |
0x11 | 1 | R/W | POZYX_INT_CONFIG | uint8_t | Configure the interrupt pin |
0x14 | 1 | R/W | POZYX_POS_FILTER | uint8_t | new - Configure any additional positioning filter |
0x15 | 1 | R/W | POZYX_CONFIG_LEDS | uint8_t | Configure the LEDs |
0x16 | 1 | R/W | POZYX_POS_ALG | uint8_t | Algorithm used for positioning |
0x17 | 1 | R/W | POZYX_POS_NUM_ANCHORS | uint8_t | Configure the number of anchors and selection procedure |
0x18 | 2 | R/W | POZYX_POS_INTERVAL | uint16_t | Defines the update interval in ms in continuous positioning. |
0x1A | 2 | R/W | POZYX_NETWORK_ID | uint16_t | The network id. |
0x1C | 1 | R/W | POZYX_UWB_CHANNEL | uint8_t | UWB channel number. |
0x1D | 1 | R/W | POZYX_UWB_RATES | uint8_t | Configure the UWB datarate and pulse repetition frequency (PRF) |
0x1E | 1 | R/W | POZYX_UWB_PLEN | uint8_t | Configure the UWB preamble length. |
0x1F | 1 | R/W | POZYX_UWB_GAIN | int8_t | Configure the power gain for the UWB transmitter |
0x20 | 1 | R/W | POZYX_UWB_XTALTRIM | uint8_t | Trimming value for the uwb crystal. |
0x21 | 1 | R/W | POZYX_RANGE_PROTOCOL | uint8_t | new - The ranging protocol |
0x22 | 1 | R/W | POZYX_OPERATION_MODE | uint8_t | Configure the mode of operation of the pozyx device |
0x23 | 1 | R/W | POZYX_SENSORS_MODE | uint8_t | Configure the mode of operation of the sensors |
0x27 | 1 | R/W | POZYX_CONFIG_GPIO1 | uint8_t | Configure GPIO pin 1. |
0x28 | 1 | R/W | POZYX_CONFIG_GPIO2 | uint8_t | Configure GPIO pin 2. |
0x29 | 1 | R/W | POZYX_CONFIG_GPIO3 | uint8_t | Configure GPIO pin 3. |
0x2A | 1 | R/W | POZYX_CONFIG_GPIO4 | uint8_t | Configure GPIO pin 4. |
Positioning data | |||||
0x30 | 4 | R/W | POZYX_POS_X | int32_t | x-coordinate of the device in mm. |
0x34 | 4 | R/W | POZYX_POS_Y | int32_t | y-coordinate of the device in mm. |
0x38 | 4 | R/W | POZYX_POS_Z | int32_t | z-coordinate of the device in mm. |
0x3C | 2 | R | POZYX_POS_ERR_X | int16_t | estimated error covariance of x |
0x3E | 2 | R | POZYX_POS_ERR_Y | int16_t | estimated error covariance of y |
0x40 | 2 | R | POZYX_POS_ERR_Z | int16_t | estimated error covariance of z |
0x42 | 2 | R | POZYX_POS_ERR_XY | int16_t | estimated covariance of xy |
0x44 | 2 | R | POZYX_POS_ERR_XZ | int16_t | estimated covariance of xz |
0x46 | 2 | R | POZYX_POS_ERR_YZ | int16_t | estimated covariance of yz |
Sensor data | |||||
0x4E | 2 | R | POZYX_MAX_LIN_ACC | uint16_t | new - Maximum linear acceleration |
0x50 | 4 | R | POZYX_PRESSURE | uint32_t | Pressure data |
0x54 | 2 | R | POZYX_ACCEL_X | int16_t | Accelerometer data (in mg) |
0x56 | 2 | R | POZYX_ACCEL_Y | int16_t | |
0x58 | 2 | R | POZYX_ACCEL_Z | int16_t | |
0x5A | 2 | R | POZYX_MAGN_X | int16_t | Magnemtometer data |
0x5C | 2 | R | POZYX_MAGN_Y | int16_t | |
0x5E | 2 | R | POZYX_MAGN_Z | int16_t | |
0x60 | 2 | R | POZYX_GYRO_X | int16_t | Gyroscope data |
0x62 | 2 | R | POZYX_GYRO_Y | int16_t | |
0x64 | 2 | R | POZYX_GYRO_Z | int16_t | |
0x66 | 2 | R | POZYX_EUL_HEADING | int16_t | Euler angles heading (or yaw) |
0x68 | 2 | R | POZYX_EUL_ROLL | int16_t | Euler angles roll |
0x6A | 2 | R | POZYX_EUL_PITCH | int16_t | Euler angles pitch |
0x6C | 2 | R | POZYX_QUAT_W | int16_t | Weight of quaternion. |
0x6E | 2 | R | POZYX_QUAT_X | int16_t | x of quaternion |
0x70 | 2 | R | POZYX_QUAT_Y | int16_t | y of quaternion |
0x72 | 2 | R | POZYX_QUAT_Z | int16_t | z of quaternion |
0x74 | 2 | R | POZYX_LIA_X | int16_t | Linear acceleration in x-direction |
0x76 | 2 | R | POZYX_LIA_Y | int16_t | |
0x78 | 2 | R | POZYX_LIA_Z | int16_t | |
0x7A | 2 | R | POZYX_GRAV_X | int16_t | x-component of gravity vector |
0x7C | 2 | R | POZYX_GRAV_Y | int16_t | y-component of gravity vector |
0x7E | 2 | R | POZYX_GRAV_Z | int16_t | z-component of gravity vector |
0x80 | 1 | R | POZYX_TEMPERATURE | int8_t | Temperature |
General data | |||||
0x81 | 1 | R | POZYX_DEVICE_LIST_SIZE | uint8_t | Returns the number of devices stored internally |
0x82 | 2 | R | POZYX_RX_NETWORK_ID | uint16_t | The network id of the latest received message |
0x84 | 1 | R | POZYX_RX_DATA_LEN | uint8_t | The length of the latest received message |
0x85 | 1 | R/W | POZYX_GPIO1 | uint8_t | Value of the GPIO pin 1 |
0x86 | 1 | R/W | POZYX_GPIO2 | uint8_t | Value of the GPIO pin 2 |
0x87 | 1 | R/W | POZYX_GPIO3 | uint8_t | Value of the GPIO pin 3 |
0x88 | 1 | R/W | POZYX_GPIO4 | uint8_t | Value of the GPIO pin 4 |
Status registers
POZYX_WHO_AM_I
This register identifies the Pozyx device. This can be used to make sure that Pozyx is connected properly.
Default value: 0x43.
uint8_t whoami;
Pozyx.regRead(POZYX_WHO_AM_I, &whoami, 1);
POZYX_FIRMWARE_VER
The value of this register describes the firmware version installed on the devices. It is recommended to have all devices run on the same firmware version.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | MAJOR | MINOR |
Bit flag | Description |
---|---|
MINOR | Indicate the minor version number |
MAJOR | Indicate the major version number |
Note that the very first firmware version, i.e. v1.0, follows a different numbering convention and will return the value 1 as the firmware version.
uint8_t firmware_version;
Pozyx.regRead(POZYX_FIRMWARE_VER, &firmware_version, 1);
POZYX_HARDWARE_VER
The value of this register describes the hardware type and version. The value is programmed during production and cannot be changed.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | TYPE | VERSION |
Bit flag | Description |
---|---|
VERSION | Indicate the Hardware version. Possible values: |
TYPE | The type of hardware |
uint8_t hardware_version;
Pozyx.regRead(POZYX_HARDWARE_VER, &hardware_version, 1);
POZYX_ST_RESULT
This register shows the results of the internal selftest. The self test is automatically initiated at device startup.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | UWB | PRESS | IMU | GYRO | MAGN | ACC |
Bit flag | Description |
---|---|
ACC | A value of 1 means that the selftest passed for the accelerometer. A 0 means failure. |
MAGN | A value of 1 means that the selftest passed for the mangetometer. A 0 means failure. This value is 0 for the pozyx anchors because they are not equipped with this sensor. |
GYRO | A value of 1 means that the selftest passed for the gyroscope. A 0 means failure. This value is 0 for the pozyx anchors because they are not equipped with this sensor. |
IMU | A value of 1 means that the selftest passed for the IMU microcontroller. A 0 means failure. This value is 0 for the pozyx anchors because they are not equipped with this sensor. |
PRESS | A value of 1 means that the selftest passed for the pressure sensor. A 0 means failure. This value is 0 for the pozyx anchors because they are not equipped with this sensor. |
UWB | A value of 1 means that the selftest passed for the ultra-wideband transceiver. A 0 means failure. |
uint8_t selftest;
Pozyx.regRead(POZYX_ST_RESULT, &selftest, 1);
POZYX_ERRORCODE
This register hold the error code whenever an error occurs on the pozyx platform.
The presence of an error is indicated by the ERR-bit in the POZYX_INT_STATUS register.
Possible values:
Value | Description |
---|---|
0x00 | POZYX_SUCCESS |
0x01 | POZYX_ERROR_I2C_WRITE |
0x02 | POZYX_ERROR_I2C_CMDFULL |
0x03 | POZYX_ERROR_ANCHOR_ADD |
0x04 | POZYX_ERROR_COMM_QUEUE_FULL |
0x05 | POZYX_ERROR_I2C_READ |
0x06 | POZYX_ERROR_UWB_CONFIG |
0x07 | POZYX_ERROR_OPERATION_QUEUE_FULL |
0xA0 | POZYX_ERROR_TDMA |
0x08 | POZYX_ERROR_STARTUP_BUSFAULT |
0x09 | POZYX_ERROR_FLASH_INVALID |
0X0A | POZYX_ERROR_NOT_ENOUGH_ANCHORS |
0X0B | POZYX_ERROR_DISCOVERY |
0x0C | POZYX_ERROR_CALIBRATION |
0x0D | POZYX_ERROR_FUNC_PARAM |
0x0E | POZYX_ERROR_ANCHOR_NOT_FOUND |
0x0F | POZYX_ERROR_FLASH |
0x10 | POZYX_ERROR_MEMORY |
0x11 | POZYX_ERROR_RANGING |
0x12 | POZYX_ERROR_RTIMEOUT1 |
0x13 | POZYX_ERROR_RTIMEOUT2 |
0x14 | POZYX_ERROR_TXLATE |
0x15 | POZYX_ERROR_UWB_BUSY |
0x16 | POZYX_ERROR_POSALG |
0x17 | POZYX_ERROR_NOACK |
0xE0 | POZYX_ERROR_SNIFF_OVERFLOW |
0xF0 | POZYX_ERROR_NO_PPS |
0xF1 | POZYX_ERROR_NEW_TASK |
0xFE | POZYX_ERROR_UNRECDEV |
0xFF | POZYX_ERROR_GENERAL |
uint8_t error_code;
Pozyx.regRead(POZYX_ERRORCODE, &error_code, 1);
POZYX_INT_STATUS
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | FUNC | RX_DATA | IMU | POS | ERR |
Bit flag | Description |
---|---|
ERR | Indicates that an has error occured. |
POS | Indicates that a new position estimate is available. |
IMU | Indicates that a new IMU measurement is available. |
RX_DATA | Indicates that the pozyx device has received some data over its wireless uwb link. |
FUNC | Indicates that a register function call has finished (excluding positioning). |
uint8_t interrupt_status;
Pozyx.regRead(POZYX_INT_STATUS, &interrupt_status, 1);
POZYX_CALIB_STATUS
Part of the calibration of the motion sensors occurs in the background when the system is running. For this calibration, each sensor requires its own typical device movements to become fully calibrated. This register contains information about the calibration status of the motion sensors.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | SYS Calib Status | GYR Calib Status | ACC Calib Status | MAG Calib Status |
Bit flag | Description |
---|---|
SYS Calib Status | Current system calibration status, depends on status of all sensors. Possible values |
GYR Calib Status | Current gyroscope calibration status, depends on status of the gyroscope. Possible values |
ACC Calib Status | Current accelerometer calibration status, depends on status of the accelerometer. Possible values |
MAG Calib Status | Current magnetometer calibration status, depends on status of the magnetometer. Possible values |
uint8_t calib_status;
Pozyx.regRead(POZYX_CALIB_STATUS, &calib_status, 1);
Configuration registers
POZYX_INT_MASK
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | PIN | - | - | FUNC | RX_DATA | IMU | POS | ERR |
Bit flag | Description |
---|---|
ERR | Enables interrupts whenever an error occurs. |
POS | Enables interrupts whenever a new positiong update is availabe. |
IMU | Enables interrupts whenever a new IMU update is availabe. |
RX_DATA | Enables interrupts whenever data is received through the ultra-wideband network. |
FUNC | Enables interrupts whenever a register function call has completed. |
PIN | Configures the interrupt pin. |
// disable all interrupts
uint8_t interrupt_mask = 0;
Pozyx.regWrite(POZYX_INT_MASK, &interrupt_mask, 1);
POZYX_INT_CONFIG
This register configures the external interrupt pin of the Pozyx device. It should be configured in combination with the POZYX_INT_MASK register.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | LATCH | ACT | MODE | PINNUM |
Bit flag | Description |
---|---|
PINNUM | Selects the pin used by the interrupt. Possible values: |
MODE | Select the interrupt pin mode. Possible values: |
ACT | The voltage level when an interrupt happens. Possible values: |
LATCH | Select if the interrupt pin should latch after an interrupt. Possible values: |
uint8_t interrupt_pin : 3;
uint8_t interrupt_mode : 1;
uint8_t interrupt_act : 1;
uint8_t interrupt_latch : 3
uint8_t intterupt_config = interrupt_pin & (interrupt_mode<<3) & (interrupt_act<<4) & (interrupt_latch<<5);
Pozyx.regWrite(POZYX_INT_CONFIG, &intterupt_config, 1);
POZYX_POS_FILTER
This register selects and configures any additional positioning filters used by the pozyx device.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | STRENGTH | FILTER |
Bit flag | Description |
---|---|
STRENGTH | Indicates the strength of the filter. In general, the position will be delayed by the number of samples equal to the strength. |
FILTER | This is the filter type. Possible values: 0x1 : FIR. A low-pass filter is applied which filters out high-frequency jitters. 0x3 : MOVING_AVERAGE. A moving average filter is applied, which smoothens the trajectory. 0x4 : MOVING_MEDIAN. A moving median filter is applied, which filters out outliers. |
POZYX_CONFIG_LEDS
This register configures the functionality of the 6 LEDs on the pozyx device. At all times, the user can control LEDs 1 through 4 using POZYX_LED_CTRL.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | LEDTX | LEDRX | LED4 | LED3 | LED2 | LED1 |
Bit flag | Description |
---|---|
LED_1 | Possible values: |
LED_2 | Possible values: |
LED_3 | Possible values: |
LED_4 | Possible values: |
LED_RX | Possible values: |
LED_TX | Possible values: |
// configure all leds in manual mode
uint8_t led_conf = 0;
Pozyx.regWrite(POZYX_CONFIG_LEDS, &led_conf, 1);
POZYX_POS_ALG
This register selects and configures the positioning algorithm used by the pozyx device.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | DIM | ALGORITHM |
Bit flag | Description |
---|---|
ALGORITHM | Indicates which algorithm to use for positioning 0x4 : Tracking. This tracking algorithm is designed for operation at update rates > 1Hz. It uses UWB-measurements, some IMU data and information from previous timesteps. Only available for 3D positioning |
DIM | This indicates the spatial dimension. Possible values: 0x1 : 2,5D. In this mode, the x and y coordinates are estimated. However, anchors and tags are not required to be located in the same horizontal plane. For this mode it is necessary that the z-coordinates of the anchors and tag are known. For the tag it must be stored in the POZYX_POS_Z register. In general this mode results in superior positioning accuracy as compared to full 3D when the anchors cannot be placed well. It is especially usefull when the tag is mounted on a robot or VR-helmet. 0x3 : 3D. In three dimensional mode, the x,y and z coordinates are estimated. In order to obtain a good vertical accuracy, it is required to place the anchors at different heights. Check out the documentation for more information on anchor placement. |
// use the UWB_ONLY algorithm in 2D
uint8_t algorithm = 0;
uint8_t pos_dim = 2;
uint8_t pos_alg = algorithm | (pos_dim<<4);
Pozyx.regWrite(POZYX_POS_ALG, &pos_alg, 1);
POZYX_POS_NUM_ANCHORS
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | MODE | - | - | - | NUM |
Bit flag | Description |
---|---|
NUM | 4 bits to indicate the maximum number of anchors to be used for positioning. Value between 3 and 15. |
MODE | a single bit to indicate wether to choose from a fixed set of anchors or perform automatic anchor selection. Possible values: |
// select 4 anchors automatically
uint8_t num_anchors = 4;
boolean_t b_autoselect_anchors = true
uint8_t data = num_anchors | (b_autoselect_anchors << 7);
Pozyx.regWrite(POZYX_POS_NUM_ANCHORS, &data , 1);
POZYX_POS_INTERVAL
Pozyx can be run in continuous mode to provide continuous positioning. The interval in milliseconds between successive updates can be configured with this register. The value is capped between 10ms and 60000ms (1 minute). Writing the value 0 to this registers disables the continuous mode.
// perform continuous positioning every 1 second
uint16_t interval_ms = 1000;
Pozyx.regWrite(POZYX_POS_INTERVAL, (uint8_t*)&interval_ms , 2);
POZYX_NETWORK_ID
This is the 16bit network address of the pozyx device. This value should be unique within the network.
// read out the network id
uint16_t network_id;
Pozyx.regRead(POZYX_NETWORK_ID, (uint8_t*)&network_id, 2);
POZYX_UWB_CHANNEL
Select the ultra-wideband transmission and reception channel. In general the transmission range increases at lower frequencies, i.e., lower channels. Allow up to 20ms to let the device switch channel.
Warning: to enable wireless communication between two devices they must operate on the same channel.
Default value: 0x05
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | UWB_CHANNEL |
Bit flag | Description |
---|---|
UWB_CHANNEL | Indicate the UWB channel. Possible values: |
POZYX_UWB_RATES
This register describes the UWB bitrate and nominal pulse repition frequency (PRF). Generally speaking, lower data rates give increased receiver sensitivity, increased link margin and longer range but due to longer frame lengths for a given number of data bytes they result in increased air occupancy per frame and a reduction in the number of individual transmissions that can take place per unit time.
16 MHz PRF gives a marginal reduction in transmitter power consumption over 64 MHz PRF. 16 MHz and 64 MHz PRF can coexist on the same physical channel without interfering.
For more information we refer to UWB settings.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | PRF | BITRATE |
Bit flag | Description |
---|---|
BITRATE | Indicate the UWB bitrate. Possible values: |
PRF | Indicates the pulse repetition frequency to be used. Possible values |
POZYX_UWB_PLEN
This register describes the preamble length of the UWB wireless packets. In general, a larger preamble length will result in increased range at the expense of longer airtime. For more information we refer to UWB settings.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | PLEN |
Bit flag | Description |
---|---|
PLEN | Indicate the UWB preamble length. Possible values: |
POZYX_UWB_GAIN
Warning: when changing channel, bitrate or preamble length, the power is also overwritten to the default value for this UWB configuration.
Warning: changing this value can make the Pozyx device fall out of regulation.
This register contains the UWB transmit gain. A larger gain will result in more tranmission power and a larger range. Before using this device in a non-experimental setup, the gain must be adjusted to meet regulations. Possible values are between 0 and 67. 1dB = 2 int.
POZYX_UWB_XTALTRIM
This register contains the trimming value to fine-tune the operating frequency of the crystal oscillator used by the ultra-wideband front-end. By carefully selecting this value, the operating frequency can be tuned with an error of 1ppm. A smaller error on the operating frequency will increase the sensitivity of the UWB receiver.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | TRIMVAL |
POZYX_RANGE_PROTOCOL
This register determines how the ranging measurements are made.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | RANGE PROTOCOL |
Bit flag | Description |
---|---|
RANGE PROTOCOL | 0x0: PRECISION (Default value). This method provides accurate measurements in all UWB settings but takes the most time. 0x1: FAST. This method is more than twice as fast as the PRECISION method, however, it can only be used when ranging or positioning continuously. Furthermore, the results in the first 100ms will be very inaccurate (up to a few meters in error). After this time, the algorithm will have stabilized and will give the same accuracy as the PRECISION method. This method is only guaranteed to work accurate for preamble lengths up to 1536. |
POZYX_OPERATION_MODE
This register defines the operation modus of the pozyx device. It"s default value is determined by the presence of the T/A jumper on the pozyx board. When the jumper is present, the device is in tag mode. Note that the operation mode is independent of the hardware type.
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | - | - | - | - | OP MODE |
Bit flag | Description |
---|---|
OP MODE | Possible values: |
POZYX_SENSORS_MODE
This register configures the mode of operation for the onboard sensors. It takes about 7ms to switch between two modes of operation, or 19ms to go from MODE_OFF to any other mode. Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | - | OP MODE |
Bit flag | Description |
---|---|
OP_MODE | Possible values: Fusion modes: |
POZYX_CONFIG_GPIO1
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | PULL | MODE |
Bit flag | Description |
---|---|
MODE | Indicates the input or output mode of the pin |
PULL | When selecting input or open-drain output, the pin can be internally connected with a pull-up (to 0V) or pull-down (to 3.3V) resistor. |
// configure the GPIO as a digital input without pull up or pull down resistors.
uint8_t gpio_pull_1 = 0;
uint8_t gpio_mode_1 = 0;
uint8_t gpio_conf_1 = (gpio_pull_1 << 3) | gpio_mode_1 ;
Pozyx.regWrite(POZYX_CONFIG_GPIO1, &gpio_conf_1, 1);
POZYX_CONFIG_GPIO2
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | PULL | MODE |
Bit flag | Description |
---|---|
MODE | Indicates the input or output mode of the pin |
PULL | When selecting input or open-drain output, the pin can be internally connected with a pull-up (to 0V) or pull-down (to 3.3V) resistor. |
// configure the GPIO as a digital input without pull up or pull down resistors.
uint8_t gpio_pull_2 = 0;
uint8_t gpio_mode_2 = 0;
uint8_t gpio_conf_2 = (gpio_pull_2 << 3) | gpio_mode_2 ;
Pozyx.regWrite(POZYX_CONFIG_GPIO2, &gpio_conf_2, 1);
POZYX_CONFIG_GPIO3
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | PULL | MODE |
Bit flag | Description |
---|---|
MODE | Indicates the input or output mode of the pin |
PULL | When selecting input or open-drain output, the pin can be internally connected with a pull-up (to 0V) or pull-down (to 3.3V) resistor. |
// configure the GPIO as a digital input without pull up or pull down resistors.
uint8_t gpio_pull_3 = 0;
uint8_t gpio_mode_3 = 0;
uint8_t gpio_conf_3 = (gpio_pull_3 << 3) | gpio_mode_3 ;
Pozyx.regWrite(POZYX_CONFIG_GPIO3, &gpio_conf_3, 1);
POZYX_CONFIG_GPIO4
Register contents:
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | - | - | - | PULL | MODE |
Bit flag | Description |
---|---|
MODE | Indicates the input or output mode of the pin |
PULL | When selecting input or open-drain output, the pin can be internally connected with a pull-up (to 0V) or pull-down (to 3.3V) resistor. |
// configure the GPIO as a digital input without pull up or pull down resistors.
uint8_t gpio_pull_4 = 0;
uint8_t gpio_mode_4 = 0;
uint8_t gpio_conf_4 = (gpio_pull_4 << 3) | gpio_mode_4 ;
Pozyx.regWrite(POZYX_CONFIG_GPIO4, &gpio_conf_4, 1);
Positioning data
POZYX_POS_X
The x-coordinate of the device in millimeter (mm). The position is relative to the anchor positions supplied.
// Read out the 3 coordinates in mm
int32_t coordinates[3];
Pozyx.regRead(POZYX_POS_X, (uint8_t*)&coordinates, 3*sizeof(int32_t));
Sensor data
POZYX_MAX_LIN_ACC
This register contains the maximum measured norm of the 3D linear acceleration. This value is reset after reading the register. The sensor data is represented as an unsigned 16-bit integer. 1mg = 1 int.
POZYX_PRESSURE
This register holds the pressure exerted on the pozyx device. At sealevel the pressure is The pressure is stored as an unsigned 32-bit integer. 1mPa = 1 int.
// read out the raw pressure data
uint32_t pressure_raw;
Pozyx.regRead(POZYX_PRESSURE, (uint8_t*)&pressure_raw, sizeof(uint32_t));
POZYX_ACCEL_X
This register contains the offset compensated acceleration in the x-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1mg = 1 int.
// read out the raw acceleration data
int16_t acceleration_raw[3];
Pozyx.regRead(POZYX_ACCEL_X, (uint8_t*)&acceleration_raw, 3*sizeof(int16_t));
POZYX_ACCEL_Y
This register contains the offset compensated acceleration in the y-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1mg = 1 int.
// read out the raw acceleration data
int16_t acceleration_raw[3];
Pozyx.regRead(POZYX_ACCEL_X, (uint8_t*)&acceleration_raw, 3*sizeof(int16_t));
POZYX_ACCEL_Z
This register contains the offset compensated acceleration in the z-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1mg = 1 int.
// read out the raw acceleration data
int16_t acceleration_raw[3];
Pozyx.regRead(POZYX_ACCEL_X, (uint8_t*)&acceleration_raw, 3*sizeof(int16_t));
POZYX_MAGN_X
This register contains the magnetic field strength along the x-axis of the Pozyx device. The sensor data is stored as a signed 16-bit integer. 1µT = 16 int.
// read out the raw magnetometer data
int16_t magn_raw[3];
Pozyx.regRead(POZYX_MAGN_X, (uint8_t*)&magn_raw, 3*sizeof(int16_t));
POZYX_MAGN_Y
This register contains the magnetic field strength along the y-axis of the Pozyx device. The sensor data is stored as a signed 16-bit integer. 1µT = 16 int.
// read out the raw magnetometer data
int16_t magn_raw[3];
Pozyx.regRead(POZYX_MAGN_X, (uint8_t*)&magn_raw, 3*sizeof(int16_t));
POZYX_MAGN_Z
This register contains the magnetic field strength along the y-axis of the Pozyx device. The sensor data is stored as a signed 16-bit integer. 1µT = 16 int.
// read out the raw magnetometer data
int16_t magn_raw[3];
Pozyx.regRead(POZYX_MAGN_X, (uint8_t*)&magn_raw, 3*sizeof(int16_t));
POZYX_GYRO_X
This register contains the offset compensated angular velocity for the x-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw gyroscope data
int16_t gyro_raw[3];
Pozyx.regRead(POZYX_GYRO_X, (uint8_t*)&gyro_raw, 3*sizeof(int16_t));
POZYX_GYRO_Y
This register contains the offset compensated angular velocity for the y-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw gyroscope data
int16_t gyro_raw[3];
Pozyx.regRead(POZYX_GYRO_X, (uint8_t*)&gyro_raw, 3*sizeof(int16_t));
POZYX_GYRO_Z
This register contains the offset compensated angular velocity for the z-axis of the Pozyx device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw gyroscope data
int16_t gyro_raw[3];
Pozyx.regRead(POZYX_GYRO_X, (uint8_t*)&gyro_raw, 3*sizeof(int16_t));
POZYX_EUL_HEADING
This register contains the absolute heading or yaw of the device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw heading data
int16_t heading_raw;
Pozyx.regRead(POZYX_EUL_HEADING, (uint8_t*)&heading_raw, sizeof(int16_t));
POZYX_EUL_ROLL
This register contains the roll of the device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw roll data
int16_t roll_raw;
Pozyx.regRead(POZYX_EUL_ROLL, (uint8_t*)&roll_raw, sizeof(int16_t));
POZYX_EUL_PITCH
This register contains the pitch of the device. The sensor data is represented as a signed 16-bit integer. 1degree = 16 int.
// read out the raw roll data
int16_t pitch_raw;
Pozyx.regRead(POZYX_EUL_PITCH, (uint8_t*)&pitch_raw, sizeof(int16_t));
POZYX_QUAT_W
The orientation can be represented using quaternions (w, x, y, z). This register contains the weight w and is represented as a signed 16-bit integer. 1quaternion(unit less) = 2^14 int = 16384 int.
// read out the orientation as a quaternion
int16_t quat_raw[4];
Pozyx.regRead(POZYX_QUAT_W, (uint8_t*)&quat_raw, 4*sizeof(int16_t));
POZYX_QUAT_X
The orientation can be represented using quaternions (w, x, y, z). This register contains the x and is represented as a signed 16-bit integer. 1quaternion(unit less) = 2^14 int = 16384 int.
// read out the orientation as a quaternion
int16_t quat_raw[4];
Pozyx.regRead(POZYX_QUAT_W, (uint8_t*)&quat_raw, 4*sizeof(int16_t));
POZYX_QUAT_Y
The orientation can be represented using quaternions (w, x, y, z). This register contains the y and is represented as a signed 16-bit integer. 1quaternion(unit less) = 2^14 int = 16384 int.
// read out the orientation as a quaternion
int16_t quat_raw[4];
Pozyx.regRead(POZYX_QUAT_W, (uint8_t*)&quat_raw, 4*sizeof(int16_t));
POZYX_QUAT_Z
The orientation can be represented using quaternions (w, x, y, z). This register contains the z and is represented as a signed 16-bit integer. 1quaternion(unit less) = 2^14 int = 16384 int.
// read out the orientation as a quaternion
int16_t quat_raw[4];
Pozyx.regRead(POZYX_QUAT_W, (uint8_t*)&quat_raw, 4*sizeof(int16_t));
POZYX_LIA_X
The linear acceleration is the total acceleration minus the gravity. The linear acceleration expressed the acceleration due to movement. This register holds the linear acceleration along the x-axis of the pozyx device (i.e. body coordinates). 1mg = 16 int.
// read out the linear acceleration data
int16_t lia_raw[3];
Pozyx.regRead(POZYX_LIA_X, (uint8_t*)&lia_raw, 3*sizeof(int16_t));
POZYX_LIA_Y
The linear acceleration is the total acceleration minus the gravity. The linear acceleration expressed the acceleration due to movement. This register holds the linear acceleration along the y-axis of the pozyx device (i.e. body coordinates). 1mg = 16 int.
// read out the linear acceleration data
int16_t lia_raw[3];
Pozyx.regRead(POZYX_LIA_X, (uint8_t*)&lia_raw, 3*sizeof(int16_t));
POZYX_LIA_Z
The linear acceleration is the total acceleration minus the gravity. The linear acceleration expressed the acceleration due to movement. This register holds the linear acceleration along the z-axis of the pozyx device (i.e. body coordinates). 1mg = 16 int.
// read out the linear acceleration data
int16_t lia_raw[3];
Pozyx.regRead(POZYX_LIA_X, (uint8_t*)&lia_raw, 3*sizeof(int16_t));
POZYX_GRAV_X
Gravity is a force of 1g( = 9.80665 m/s2 ) directed towards the ground. This register represents the gravity component in the x-axis and is represented by a singed 16-bit integer. 1mg = 16 int.
// read out the gravity data
int16_t grav_raw[3];
Pozyx.regRead(POZYX_GRAV_X, (uint8_t*)&grav_raw, 3*sizeof(int16_t));
POZYX_GRAV_Y
Gravity is a force of 1g( = 9.80665 m/s2 ) directed towards the ground. This register represents the gravity component in the y-axis and is represented by a singed 16-bit integer. 1mg = 16 int.
// read out the gravity data
int16_t grav_raw[3];
Pozyx.regRead(POZYX_GRAV_X, (uint8_t*)&grav_raw, 3*sizeof(int16_t));
POZYX_GRAV_Z
Gravity is a force of 1g( = 9.80665 m/s2 ) directed towards the ground. This register represents the gravity component in the z-axis and is represented by a singed 16-bit integer. 1mg = 16 int.
// read out the gravity data
int16_t grav_raw[3];
Pozyx.regRead(POZYX_GRAV_X, (uint8_t*)&grav_raw, 3*sizeof(int16_t));
POZYX_TEMPERATURE
Read out the internal chip temperature. This is loosely related to the ambient room temperature. For more accurate ambient temperature measurements, it is recommended to use a separate sensor.
// read out the temperature
int8_t temperature;
Pozyx.regRead(POZYX_TEMPERATURE, &temperature, 1);
General data
POZYX_DEVICE_LIST_SIZE
See the functional description for more info on the device list.
uint8_t device_list_size;
Pozyx.regRead(POZYX_DEVICE_LIST_SIZE, &device_list_size, 1);
POZYX_RX_NETWORK_ID
See the functional description for more info on receiving messages.
uint16_t rx_network_id;
Pozyx.regRead(POZYX_RX_NETWORK_ID, (uint16_t*)&rx_network_id, 2);
POZYX_RX_DATA_LEN
See the functional description for more info on receiving messages.
uint8_t rx_datalen;
Pozyx.regRead(POZYX_RX_DATA_LEN, &rx_datalen, 1);
POZYX_GPIO1
This register can be read from to obtain the current state of the GPIO pin if it is configured as an input. When the pin is configured as an output, the value written will determine the new state of the pin.
Possible values:
0 : The digital state of the pin is LOW at 0V.
1 : The digital state of the pin is HIGH at 3.3V.
Default value: 0
uint8_t gpio_1;
Pozyx.regRead(POZYX_GPIO1, &gpio_1, 1);
POZYX_GPIO2
This register can be read from to obtain the current state of the GPIO pin if it is configured as an input. When the pin is configured as an output, the value written will determine the new state of the pin.
Possible values:
0 : The digital state of the pin is LOW at 0V.
1 : The digital state of the pin is HIGH at 3.3V.
Default value: 0
uint8_t gpio_2;
Pozyx.regRead(POZYX_GPIO2, &gpio_2, 1);
POZYX_GPIO3
This register can be read from to obtain the current state of the GPIO pin if it is configured as an input. When the pin is configured as an output, the value written will determine the new state of the pin.
Possible values:
0 : The digital state of the pin is LOW at 0V.
1 : The digital state of the pin is HIGH at 3.3V.
Default value: 0
uint8_t gpio_3;
Pozyx.regRead(POZYX_GPIO3, &gpio_3, 1);
POZYX_GPIO4
This register can be read from to obtain the current state of the GPIO pin if it is configured as an input. When the pin is configured as an output, the value written will determine the new state of the pin.
Possible values:
0 : The digital state of the pin is LOW at 0V.
1 : The digital state of the pin is HIGH at 3.3V.
Default value: 0
uint8_t gpio_4;
Pozyx.regRead(POZYX_GPIO4, &gpio_4, 1);
Register functions
Register address | Param bytes | Return bytes | Name | Short description |
---|---|---|---|---|
0xB0 | 0 | 1 | POZYX_RESET_SYS | Reset the Pozyx device |
0xB1 | 1 | 1 | POZYX_LED_CTRL | Control LEDS 1 to 4 on the board |
0xB2 | 2-100 | 1 | POZYX_TX_DATA | Write data in the UWB transmit (TX) buffer |
0xB3 | 3 | 1 | POZYX_TX_SEND | Transmit the TX buffer to some other pozyx device |
0xB4 | 0 | <=100 | POZYX_RX_DATA | Read data from the UWB receive (RX) buffer |
0xB5 | 2 | 1 | POZYX_DO_RANGING | Initiate ranging measurement |
0xB6 | 0 | 1 | POZYX_DO_POSITIONING | Initiate the positioning process. |
0xB7 | 32 | 1 | POZYX_POS_SET_ANCHOR_IDS | Set the list of anchor ID"s used for positioning. |
0xB8 | 0 | 33 | POZYX_POS_GET_ANCHOR_IDS | Read the list of anchor ID"s used for positioning. |
0xB9 | 0 | 1 | POZYX_FLASH_RESET | Reset a portion of the configuration in flash memory |
0xBA | >=1 | 1 | POZYX_FLASH_SAVE | Store a portion of the configuration in flash memory |
0xBB | 1 | 21 | POZYX_FLASH_DETAILS | Return information on what is stored in flash |
Device list functions | ||||
0xC0 | <=2 | <=41 | POZYX_DEVICES_GETIDS | Get all the network IDs"s of devices in the device list. |
0xC1 | 3 | 1 | POZYX_DEVICES_DISCOVER | Obtain the network ID"s of all pozyx devices within range. |
0xC2 | 1 | 1 | POZYX_DEVICES_CALIBRATE | Obtain the coordinates of the pozyx (anchor) devices within range. |
0xC3 | 0 | 1 | POZYX_DEVICES_CLEAR | Clear the list of all pozyx devices. |
0xC4 | 15 | 1 | POZYX_DEVICE_ADD | Add a pozyx device to the devices list |
0xC5 | 2 | 24 | POZYX_DEVICE_GETINFO | Get the stored device information for a given pozyx device |
0xC6 | 2 | 12 | POZYX_DEVICE_GETCOORDS | Get the stored coordinates of a given pozyx device |
0xC7 | 2 | 9 | POZYX_DEVICE_GETRANGEINFO | Get the stored range inforamation of a given pozyx device |
0xC8 | 3 | <=40 | POZYX_CIR_DATA | Get the channel impulse response (CIR) coefficients |
POZYX_RESET_SYS
Calling this function resets the Pozyx device. This also clears the device list and returns the settings to their defualt state (including UWB settings)
POZYX_LED_CTRL
This function gives control over the 4 onboard pozyx LEDS.
INPUT PARAMETERS
As an input a single byte is required.
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | |
Bit flag | USELED_4 | USELED 3 | USELED 2 | USELED 1 | LED_4 | LED_3 | LED_2 | LED_1 |
Bit flag | Description |
---|---|
LED_1 | Give the status of the given LED . Possible values: |
USELED_1 | Bit to indicate if we want to override the status of the given LED. Possible values: |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_TX_DATA
This function fills the transmit buffer with data bytes. Ready to be transmitted on the next call to POZYX_TX_SEND.
INPUT PARAMETERS
This function takes 3 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Buffer offset. This value indicates where the offset inside the transmit buffer to start writing the the data bytes. To start from the beginning of the buffer, use the value 0. |
byte 1 | data byte 0 |
byte 2 | data byte 1 |
... | ... |
byte 100 | data byte 99 |
OUTPUT
The function returns one result byte for success or failure. 0 is failure (for example when the data buffer is full). 1 is success.
POZYX_TX_SEND
This function initiates the wireless transfer of all the data stored in the transmitter buffer (which should be filled by calling POZYX_TX_DATA). Upon successful reception of the message by the destination node, the destination node will answer with an acknowledgement (ACK) message. When a REG_READ or a REG_FUNC message was transmitted, the ACK will contain the requested data and the RX_DATA bit is set POZYX_INT_STATUS and an interrupt is fired if the RX_DATA bit is enabled in POZYX_INT_MASK. The received ACK data can be read from POZYX_RX_DATA. Depending on the UWB settings, it may take a few up to tens of milliseconds before an ACK is to be expected. After sending the data, the transmission buffer is emptied.
INPUT PARAMETERS
This function takes 3 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Network address of destination node. |
byte 1 | |
byte 2 | Option byte. Possible values are: |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_RX_DATA
This function lets you read from the received data buffer. This buffer is filled whenever data is wirelessly received by the UWB receiver. Upon this event, the RX_DATA bit is set POZYX_INT_STATUS and an interrupt is fired if the RX_DATA bit is enabled in POZYX_INT_MASK. The RX data buffer is cleared after reading it. When a new data message arrives before the RX buffer was read, it will be overwritten and the previously received data will be lost. Note that the receiver must be turned on the receive incoming messages. This is done automatically whenever an acknowledgment is expected (after a POZYX_TX_SEND operation).
INPUT PARAMETERS
This function takes 2 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | buffer offset (optional). This value indicates where the offset inside the receive buffer to start reading the the data bytes. To start from the beginning of the buffer, use the value 0. Default value = 0. |
OUTPUT
This function returns the requested bytes from the receive buffer.
byte number | Description |
---|---|
byte 0 | Success byte |
byte 1 | data byte 0 |
byte 2 | data byte 1 |
... | ... |
byte 100 | data byte 99 |
POZYX_DO_RANGING
This function initiates a ranging operation. When ranging is finished (after about 15ms) the FUNC bit is set POZYX_INT_STATUS and an interrupt is fired if the FUNC bit is enabled in POZYX_INT_MASK. The range information can be obtained using POZYX_DEVICE_GETRANGEINFO. The device will be added to the device list if it wasn't present before.
INPUT PARAMETERS
This function takes 2 bytes of input parameters.
byte number | Description |
---|---|
byte 0 | Network address of the remote device. |
byte 1 |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_DO_POSITIONING
This function initiates a positioning operation. Calling this function will turn of continuous positioning. When positioning is finished (after about 70ms) the POS bit is set POZYX_INT_STATUS and an interrupt is fired if the POS bit is enabled in POZYX_INT_MASK. The result is stored in the positioning registers starting from POZYX_POS_X
See the functional description for more info on the positioning process.
INPUT PARAMETERS
This function takes 0 bytes of input parameters.
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_POS_SET_ANCHOR_IDS
This function sets the anchor network IDs that can be used for the positioning algorithm. The positioning algorithm will select the first NUM (as given in POZYX_POS_NUM_ANCHORS) anchors from this list only when the MODE (as given in POZYX_POS_NUM_ANCHORS) is set to the fixed anchor set. Note that the actual anchor coordinates must be provided by POZYX_ADD_ANCHOR for each anchor id.
INPUT PARAMETERS
This function takes a variable number of input bytes. Note that the total number must be dividable by two.
byte number | Description |
---|---|
byte 0 | Network address of 1st anchor node. |
byte 1 | |
byte 2 | Network address of 2nd anchor node. |
byte 3 | |
byte 4 | Network address of 3th anchor node. |
byte 5 | |
byte .. | ... |
byte 18 | Network address of 10th anchor node. |
byte 19 |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_POS_GET_ANCHOR_IDS
This function returns the anchor IDs that are used for the positioning algorithm. When the positioning algorithm is set to the automatic anchor selection mode in (POZYX_POS_NUM_ANCHORS), this list will be filled automatically with the anchors chosen by the anchor selection algorithm.
INPUT PARAMETERS
No input parameters (0 bytes)
OUTPUT
This function will return up to 20 anchor ID"s.
byte number | Description |
---|---|
byte 0 | Success byte. 0 is failure. 1 is success. |
byte 1 | Network address of 1st anchor node. |
byte 2 | |
byte 3 | Network address of 2nd anchor node. |
byte 4 | |
byte 5 | Network address of 3th anchor node. |
byte 6 | |
byte .. | ... |
byte 19 | Network address of 10th anchor node. |
byte 20 |
POZYX_FLASH_RESET
Clear the saved flash memory content and reset all the registers to their default values. Clearing data from the flash memory may take some time.
INPUT PARAMETERS
This function does not require input.
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_FLASH_SAVE
This function let"s you store the content of writable registers in the non-volatile flash memory. On the next boot of the system the saved content of these registers is automatically loaded. This way, any configuration is not lost after the device is reset or powered down. Note that storing data in the flash memory may take some time.
INPUT PARAMETERS
This function takes a minimum of of 1 byte as input parameters.
byte number | Description |
---|---|
byte 0 | Type. What type of data do you want to store. Possible values: |
byte 1 | only required if byte 0 = 0x01; |
byte 2-10 | optional if byte 0 = 0x01; |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_FLASH_DETAILS
This function returns detailed information about which data registers are stored in flash memory.
INPUT PARAMETERS
This function does not require input.
OUTPUT
The function returns 21 bytes of information.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1-20 | Every bit in these 20 bytes (160 bits) represents a register ranging from register 0x00 to 0x9F. The first bit represents register 0x00, the second bit represents register 0x01, etc.. A bit that is set, means the register content has been saved in flash. If the bit is not set, the register is not saved. |
POZYX_DEVICES_GETIDS
This function returns the network IDs of all devices in the internal device list.
INPUT PARAMETERS
Up to 2 optional input parameters (<=2 bytes)
byte number | Description |
---|---|
byte 0 | Offset (optional). This function will return network ID"s starting from this offset in the list of network ID"s. The default value is 0. |
byte 1 | size (optional). Number of network ID"s to return, starting from the offset. The default value is (20-offset), i.e., returning the complete list. Possible values are between 1 and 20. |
OUTPUT
This function will return up to 20 device ID"s (41 bytes) depending on the input parameters.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1 | Network address of the network device number (offset+1). |
byte 2 | |
byte 3 | Network address of the network device number (offset+2). |
byte 4 | |
byte 5 | Network address of the network device number (offset+3). |
byte 6 | |
... | ... |
byte 39 | Network address of the network device number (offset+size). |
byte 34 |
POZYX_DEVICES_DISCOVER
This function performs a discovery operation to identify other pozyx devices within radio range. Newly discovered devices will be added to the internal device list. This process may take several milliseconds.
INPUT PARAMETERS
This function takes up to 3 bytes of input parameters. When omitted, the default values are used.
byte number | Description |
---|---|
byte 0 | Discover options (optional). This determines which type of devices should be discovered. The type is given by theoperation mode in POZYX_OPERATION_MODE. Possible values: |
byte 1 | Number of Idle slots (optional). The number of slots to wait for a response of an undiscovered device. If no response was received the discovery process is terminated. The default value is 3 idle slots. |
byte 2 | Idle slot duration (optional). The time duration in milliseconds of the idle slot. Depending on the ultra-wideband settings a shorter or longer slot duration must be chosen. The default value is 10ms. |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_DEVICES_CALIBRATE
This function estimates the relative position of up to 6 pozyx devices within range. This function can be used for quickly setting up the positioning system. This procedure may take several hundres of milliseconds depending on the number of devices in range and the number of range measurements requested. During the calibration proces LED 2 will turned on. At the end of calibration the corresponding bit in the POZYX_CALIB_STATUS register will be set. Note that only the coordinates of pozyx devices within range are determined. The resulting coordinates are stored in the internal device list. It is advised that during the calibration process, the pozyx tag is not used for other wireless communication. More information can be found here.
INPUT PARAMETERS
This function takes a number of optional bytes as input parameters. When omitted, the default values are used. Also, when no network id"s of the anchors are supplied, the anchors will be automatically discovered.
byte number | Description |
---|---|
byte 0 | Calibration options (optional). Possible values: |
byte 1 | Number of Measurements (optional). This describes the number of range measurements that should be made for the estimation. Note that a larger number of measurements will increase the accuracy of the relative coordinates, but will also make the process take longer. The default value is 10 measurments. |
byte 2-3 | Network id anchor 0 (optional). Optionally the network id of the first anchor is given. This anchor will be used to define the origin, i.e., it"s coordinates will be forced to zero. |
byte 4-5 | Network id anchor 1 (optional). Optionally the network id of the second anchor is given. This anchor will be used to determine the x-axis, i.e., its y coordinate will be forced to zero. |
byte 6-7 | Network id anchor 2 (optional). Optionally the network id of the third anchor is given. This anchor will be used to determine the which way is up for the y-coordinate, i.e., its y coordinate will be forced to be positive. |
byte 8-9 | Network id anchor 3 (optional). Optionally the network id of the fourth anchor is given. |
byte 10-11 | Network id anchor 4 (optional). Optionally the network id of the fifth anchor is given. |
byte 12-13 | Network id anchor 5 (optional). Optionally the network id of the sixth anchor is given. |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_DEVICES_CLEAR
This function empties the internal list of devices.
INPUT PARAMETERS
No input parameters (0 bytes)
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_DEVICE_ADD
This function adds a device to the internal list of devices. When the device is already present in the device list, the values will be overwritten. Read more about the internal devices list here.
INPUT PARAMETERS
This function takes 15 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Network address of the device. |
byte 1 | |
byte 2 | Special flag describing the device |
byte 3 | x-coordinate of the device |
byte 4 | |
byte 5 | |
byte 6 | |
byte 7 | y-coordinate of the device |
byte 8 | |
byte 9 | |
byte 10 | |
byte 11 | z-coordinate of the device |
byte 12 | |
byte 13 | |
byte 14 |
OUTPUT
The function returns one result byte for success or failure. 0 is failure. 1 is success.
POZYX_DEVICE_GETINFO
This function returns all the data available about a given pozyx device.
INPUT PARAMETERS
This function takes 2 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Network address of pozyx device. |
byte 1 |
OUTPUT
The function returns 15 bytes of data.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1 | Network address of the device. |
byte 2 | |
byte 3 | Special flag describing the device |
byte 4 | x-coordinate of the device |
byte 5 | |
byte 6 | |
byte 7 | |
byte 8 | y-coordinate of the device |
byte 9 | |
byte 10 | |
byte 11 | |
byte 12 | z-coordinate of the device |
byte 13 | |
byte 14 | |
byte 15 |
POZYX_DEVICE_GETCOORDS
This function returns the coordinates of a given pozyx device as they are stored in the internal device list. The coordinates are either inputted by the user using POZYX_DEVICES_ADD or obtained automatically with POZYX_DEVICES_CALIBRATE.
INPUT PARAMETERS
This function takes 2 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Network address of pozyx device. |
byte 1 |
OUTPUT
The function returns 13 bytes of information.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1 | x-coordinate of the device |
byte 2 | |
byte 3 | |
byte 4 | |
byte 5 | y-coordinate of the device |
byte 6 | |
byte 7 | |
byte 8 | |
byte 9 | z-coordinate of the device |
byte 10 | |
byte 11 | |
byte 12 |
POZYX_DEVICE_GETRANGEINFO
This function returns all the latest range information about a given pozyx device. This function does not initiate any ranging operation. Range information will be available as a result of calling POZYX_DO_RANGING directly or after positioning (where the range measurements with the anchors will be available)
INPUT PARAMETERS
This function takes 2 bytes as input parameters.
byte number | Description |
---|---|
byte 0 | Network address of pozyx device. |
byte 1 |
OUTPUT
The function returns 11 bytes of information.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1 | Timestamp of last range measurement |
byte 2 | |
byte 3 | |
byte 4 | |
byte 5 | Last range measurement in mm. The resolution of a range measurement is 4.69mm (corresponding to a timing resolution of 15.65ps) |
byte 6 | |
byte 7 | |
byte 8 | |
byte 9 | Received signal strength value of last range measurement |
byte 10 |
POZYX_CIR_DATA
This function returns the channel impulse response (CIR) of the last received ultra-wideband message. The CIR can be used for diagnostic purposes, or to run custom timing algorithms. Using the default PRF of 64MHz, a total of 1016 complex coefficients are available. For a PRF of 16MHz, 996 complex coefficients are available. Every complex coefficient is represented by 4 bytes (2 for the real part and 2 for the imaginary part). The coefficients are taken at an interval of 1.0016ns, or more precisely, at half the period of a 499.2MHz sampling frequency.
INPUT PARAMETERS
This function takes 3 bytes as input parameters.
byte number | Description |
---|---|
byte 0-1 | CIR buffer offset. This value indicates where the offset inside the CIR buffer to start reading the the data bytes. Possible values range between 0 and 1015. |
byte 2 | Data length. The number of coefficients to read from the CIR buffer. Possible values range between 1 and 49. |
OUTPUT
This function returns the requested bytes from the CIR buffer.
byte number | Description |
---|---|
byte 0 | Return byte indicating success or failure of the function. 0 is failure. 1 is success. |
byte 1-2 | CIR coefficient 0+offset (real value). |
byte 3-4 | CIR coefficient 0+offset (imaginary value). |
byte 5-6 | CIR coefficient 1+offset (real value). |
byte 7-8 | CIR coefficient 1+offset (imaginary value). |
... | ... |
byte 95-96 | CIR coefficient 48+offset (real value). |
byte 97-98 | CIR coefficient 48+offset (imaginary value). |