nrfxlib API 2.7.99
Loading...
Searching...
No Matches
nRF Distance Measurement interface

Data Structures

struct  nrf_dm_iq_tones_t
 Container of IQ values for local and remote measured tones. More...
 
struct  nrf_dm_iq_tones_sinr_indicator_t
 
union  nrf_dm_dist_estimates_t
 Container of distance estimate results for a number of different methods, in meters. More...
 
struct  nrf_dm_report_t
 Output data for distance estimation. More...
 
struct  nrf_dm_antenna_gpio_t
 
struct  nrf_dm_antenna_config_t
 
struct  nrf_dm_ppi_config_t
 
struct  nrf_dm_config_t
 

Macros

#define NRF_DM_DEFAULT_SINGLE_ANTENNA_CONFIG
 
#define NRF_DM_DEFAULT_ANTENNA_COMP   (NRF_DM_ANTENNA_COMP_1_1)
 
#define NRF_DM_DEFAULT_CONFIG
 Default configuration define, note that both role and rng_seed needs to be configured even when using the default config.
 
#define NRF_DM_PROC_EXECUTE_DURATION_OVERHEAD_US   (200)
 Maximum overhead duration in microseconds for pre- and post-processing in nrf_dm_proc_execute when executing in initiator role.The full (expected) duration of the call to nrf_dm_proc_execute is given by: nrf_dm_get_duration_us(&config) + NRF_DM_PROC_EXECUTE_DURATION_OVERHEAD_US.
 
#define NRF_DM_CHANNEL_MAP_LEN   75
 This is the length, in number of channels, of the channel map used within the library.
 

Enumerations

enum  nrf_dm_quality_t { NRF_DM_QUALITY_OK = 0 , NRF_DM_QUALITY_POOR = 1 , NRF_DM_QUALITY_DO_NOT_USE = 2 , NRF_DM_QUALITY_CRC_FAIL = 3 }
 Quality of the procedure. More...
 
enum  nrf_dm_sinr_indicator_t { NRF_DM_SINR_INDICATOR_HIGH = 0 , NRF_DM_SINR_INDICATOR_MEDIUM = 1 , NRF_DM_SINR_INDICATOR_LOW = 2 , NRF_DM_SINR_INDICATOR_VERY_LOW = 3 }
 SINR indicator for IQ measurements. More...
 
enum  nrf_dm_role_t { NRF_DM_ROLE_NONE = 0 , NRF_DM_ROLE_INITIATOR = 1 , NRF_DM_ROLE_REFLECTOR = 2 }
 Role definition. More...
 
enum  nrf_dm_status_t { NRF_DM_STATUS_SUCCESS = 0 , NRF_DM_STATUS_FAIL_SYNC = 1 , NRF_DM_STATUS_EVENT_FAIL_TIMEOUT = 2 , NRF_DM_STATUS_CONF_INVALID = 3 }
 Status of the procedure. More...
 
enum  nrf_dm_ranging_mode_t { NRF_DM_RANGING_MODE_RTT , NRF_DM_RANGING_MODE_MCPD }
 Ranging modes. More...
 
enum  nrf_dm_antenna_composition_t {
  NRF_DM_ANTENNA_COMP_1_1 , NRF_DM_ANTENNA_COMP_2_1 , NRF_DM_ANTENNA_COMP_3_1 , NRF_DM_ANTENNA_COMP_4_1 ,
  NRF_DM_ANTENNA_COMP_1_2 , NRF_DM_ANTENNA_COMP_1_3 , NRF_DM_ANTENNA_COMP_1_4 , NRF_DM_ANTENNA_COMP_2_2
}
 Configuration options for antenna configurations. More...
 

Functions

void nrf_dm_init (const nrf_dm_ppi_config_t *ppi_cfg, const nrf_dm_antenna_config_t *antenna_cfg, NRF_TIMER_Type *timer)
 Initialize the distance measurement procedure.
 
nrf_dm_status_t nrf_dm_configure (const nrf_dm_config_t *config)
 Configures the distance measurement procedure.
 
uint32_t nrf_dm_get_duration_us (const nrf_dm_config_t *config)
 Get the duration in microseconds that it will take to execute the distance measurement in initiator role with the given configuration. A reflector needs to reserve more time because it needs to be waiting for the initiators initial sync packet.
 
nrf_dm_status_t nrf_dm_proc_execute (uint32_t timeout_us)
 Start the distance measurement.
 
void nrf_dm_populate_report (nrf_dm_report_t *p_report)
 Partially populate the report. This populates the report but does not set the distance estimates and the quality.
 
void nrf_dm_get_hopping_sequence (const nrf_dm_config_t *config, uint8_t hopping_sequence[75])
 Get the channel hopping sequence used for a given configuration instance.
 
nrf_dm_quality_t nrf_dm_calc (nrf_dm_report_t *p_report)
 Estimate the distance Fills nrf_dm_report_t with distance estimates either mcpd or rtt according to the raw data in the report.
 
float nrf_dm_high_precision_calc (nrf_dm_report_t *p_report)
 Estimate the distance with more computation-intensive higher precision algorithm.
 
const char * nrf_dm_version_string_get (void)
 Get a null-terminated string containing the library revision.
 

Detailed Description

Interface for the Nordic distance measurement library.