changed low freq. clock source to IRC

Dependents:   BLE_ANCS_SDAPI_IRC

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

DTM - Direct Test Mode

DTM - Direct Test Mode

Module for testing RF/PHY using DTM commands. More...

Typedefs

typedef uint32_t dtm_cmd_t
 BLE DTM command codes.
typedef uint32_t dtm_event_t
 BLE DTM event type.
typedef uint32_t dtm_freq_t
 BLE DTM frequency type.
typedef uint32_t dtm_pkt_type_t
 BLE DTM packet types.

Functions

uint32_t dtm_init (void)
 Function for initializing or re-initializing DTM module.
uint32_t dtm_wait (void)
 Function for giving control to dtmlib for handling timer and radio events.
uint32_t dtm_cmd (dtm_cmd_t cmd, dtm_freq_t freq, uint32_t length, dtm_pkt_type_t payload)
 Function for calling when a complete command has been prepared by the Tester.
bool dtm_event_get (dtm_event_t *p_dtm_event)
 Function for reading the result of a DTM command.
bool dtm_set_timer (uint32_t new_timer)
 Function for configuring the timer to use.
bool dtm_set_txpower (uint32_t new_tx_power)
 Function for configuring the transmit power.

Detailed Description

Module for testing RF/PHY using DTM commands.


Typedef Documentation

typedef uint32_t dtm_cmd_t

BLE DTM command codes.

DTM command type.

Definition at line 35 of file ble_dtm.h.

typedef uint32_t dtm_event_t

BLE DTM event type.

Type for handling DTM event.

Definition at line 72 of file ble_dtm.h.

typedef uint32_t dtm_freq_t

BLE DTM frequency type.

Physical channel, valid range: 0..39.

Definition at line 75 of file ble_dtm.h.

typedef uint32_t dtm_pkt_type_t

BLE DTM packet types.

Type for holding the requested DTM payload type.

Definition at line 78 of file ble_dtm.h.


Function Documentation

uint32_t dtm_cmd ( dtm_cmd_t  cmd,
dtm_freq_t  freq,
uint32_t  length,
dtm_pkt_type_t  payload 
)

Function for calling when a complete command has been prepared by the Tester.

Parameters:
[in]cmdOne of the DTM_CMD values (bits 14:15 in the 16-bit UART format).
[in]freqPhys. channel no - actual frequency = (2402 + freq * 2) MHz (bits 8:13 in the 16-bit UART format).
[in]lengthPayload length, 0..37 (bits 2:7 in the 16-bit UART format).
[in]payloadOne of the DTM_PKT values (bits 0:1 in the 16-bit UART format).
Returns:
DTM_SUCCESS or one of the DTM_ERROR_ values
bool dtm_event_get ( dtm_event_t p_dtm_event )

Function for reading the result of a DTM command.

Parameters:
[out]p_dtm_eventPointer to buffer for 16 bit event code according to DTM standard.
Returns:
true: new event, false: no event since last call, this event has been read earlier
uint32_t dtm_init ( void   )

Function for initializing or re-initializing DTM module.

Returns:
DTM_SUCCESS on successful initialization of the DTM module.
bool dtm_set_timer ( uint32_t  new_timer )

Function for configuring the timer to use.

Note:
Must be called when no DTM test is running.
Parameters:
[in]new_timerIndex (0..2) of timer to be used by the DTM library
Returns:
true: success, new timer was selected, false: parameter error
bool dtm_set_txpower ( uint32_t  new_tx_power )

Function for configuring the transmit power.

Note:
Must be called when no DTM test is running.
Parameters:
[in]new_tx_powerNew output level, +4..-40, in steps of 4.
Returns:
true: tx power setting changed, false: parameter error
uint32_t dtm_wait ( void   )

Function for giving control to dtmlib for handling timer and radio events.

Will return to caller at 625us intervals or whenever another event than radio occurs (such as UART input). Function will put MCU to sleep between events.

Returns:
Time counter, incremented every 625 us.