Production Line Tool v5.0
The DA1470x Production Line Tool Software Package
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
p_dll.h File Reference

Production tests API header file. More...

#include "dbg_dll.h"
#include "ic_specifics.h"

Go to the source code of this file.

Classes

struct  __pdll_fw_versions
 Holds the prod_test_XXX.bin and p_dll library versions. More...
 
struct  __gu_scan_data
 Holds the GU scan data. More...
 
struct  __rx_stats
 Holds the production test results for each device. More...
 
struct  __pdll_rf_test
 p_dll library parameters for the RF test. More...
 
struct  __pdll_audio_test
 p_dll library parameters for the audio test. More...
 
struct  __pdll_audio_tone
 p_dll library parameters for audio tone generation. Mainly used at the Golden Unit. More...
 
struct  __pdll_gpio_toggle
 p_dll library parameters for GPIO toggle operation. More...
 
struct  __pdll_gpio_watchdog
 p_dll library parameters for GPIO watchdog operation. More...
 
struct  __pdll_gpio_set
 p_dll library parameters for GPIO set operation. More...
 
struct  __pdll_gpio_get
 p_dll library parameters for GPIO get status test. More...
 
struct  __pdll_custom_test
 p_dll library parameters for the custom test/ More...
 
struct  __pdll_rdtester_init
 p_dll library parameters for the rd tester init command. More...
 
struct  __pdll_rdtester_vbat_uart_rst
 p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command. More...
 
struct  __pdll_rdtester_rst
 p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command. More...
 
struct  __pdll_rdtester
 p_dll library parameters for the rd tester commands. Commands send from the Golden Unit to the CPLD. More...
 
struct  __pdll_scan_test
 p_dll library parameters for the scan test. More...
 
struct  __pdll_xtal_test
 p_dll library parameters for the XTAL trim test. More...
 
struct  __pdll_sensor_test
 p_dll library parameters for the sensor test. More...
 
struct  __pdll_sleep_test
 p_dll library parameters for setting the devices into the various sleep mode. More...
 
struct  __pdll_uart_loop_test
 p_dll library parameters for UART loop test. More...
 
struct  __pdll_ble_adv_start_test
 p_dll library parameters for starting BLE advertisements through an HCI command send to the DUT. More...
 
struct  __pdll_ble_adv_stop_test
 p_dll library parameters for stopping BLE advertisements through an HCI command send to the DUT. More...
 
struct  __pdll_ext32Khz_test
 p_dll library parameters for testing the external 32Khz low power crystal. More...
 
struct  __pdll_adc_vbat_en
 p_dll library parameters for enabling the VBAT measurement using the internal ADC. More...
 
struct  __pdll_set_tx_pwr
 p_dll library parameters for setting the TX power level in RF test mode. More...
 
union  __pdll_test_data
 p_dll library parameters for the device test data. More...
 
struct  __pdll_device
 p_dll library parameters for each different device. More...
 

Macros

#define __bool_true_false_are_defined   1
 
#define bool   char
 
#define true   1
 
#define false   0
 
#define P_DLL_EXPORTS
 
#define P_DLL_API   __declspec(dllexport)
 
#define PDLL_UART_BAUD_RATE   115200
 
#define MAX_DEVS_TO_SCAN   16
 
#define BD_ADDR_SIZE   6
 
#define LOG_PARAM_STR_SIZE   32
 
#define TEST_NAME_STR_SIZE   13
 
#define HCI_UART_LOOP_70x_DATA_SIZE   252
 
#define RF_RSSI_TEST_TX_PACKETS   500
 
#define TIMESTAMP_SIZE   480
 
#define PDLL_HCI_STANDARD_ERROR_CODE_BASE   1000
 A macro that defines the P_DLL HCI standard error code base. More...
 

Typedefs

typedef enum __PDLL_RETURN_CODES PDLL_RET
 The P_DLL return status codes.
 
typedef enum __pdll_test_id _pdll_test_id
 The available production tests and operations. Used at __pdll_device::test.
 
typedef enum __payload_type _payload_type
 RF TX payload types.
 
typedef enum __audio_test_op _audio_test_op
 Commands for audio test.
 
typedef enum __audio_tone_op _audio_tone_op
 Commands for audio tone.
 
typedef enum __sensor_iface _sensor_iface
 Sensor tests interface selection.
 
typedef enum __gpio_state _gpio_state
 GPIO state.
 
typedef enum __gpio_pwr_lvl _gpio_pwr_lvl
 GPIO power level.
 
typedef enum __gpio_mode _gpio_mode
 GPIO mode.
 
typedef enum __sleep_modes _sleep_modes
 The sleep modes supported.
 
typedef enum __baud_rate _baud_rate
 The UART baud rates supported in the UART loop test.
 
typedef enum __adv_channel _adv_channel
 BLE advertisement channels for the HCI BLE scan test.
 
typedef enum __pdll_tx_pwr_lvl _pdll_tx_pwr_lvl
 RF test transmit output power levels.
 
typedef enum __pdll_adv_tx_pwr_lvl _pdll_adv_tx_pwr_lvl
 Advertisments GAP transmit output power levels.
 
typedef struct __pdll_fw_versions _pdll_fw_versions
 Holds the prod_test_XXX.bin and p_dll library versions.
 
typedef struct __gu_scan_data _gu_scan_data
 Holds the GU scan data.
 
typedef struct __rx_stats _rx_stats
 Holds the production test results for each device.
 
typedef void(* _user_callback_pdll) (uint32_t com_port_number, int status, _rx_stats *rx_stats_t)
 
typedef struct __pdll_rf_test _pdll_rf_test
 p_dll library parameters for the RF test.
 
typedef struct __pdll_audio_test _pdll_audio_test
 p_dll library parameters for the audio test.
 
typedef struct __pdll_audio_tone _pdll_audio_tone
 p_dll library parameters for audio tone generation. Mainly used at the Golden Unit.
 
typedef struct __pdll_gpio_toggle _pdll_gpio_toggle
 p_dll library parameters for GPIO toggle operation.
 
typedef struct __pdll_gpio_watchdog _pdll_gpio_watchdog
 p_dll library parameters for GPIO watchdog operation.
 
typedef struct __pdll_gpio_set _pdll_gpio_set
 p_dll library parameters for GPIO set operation.
 
typedef struct __pdll_gpio_get _pdll_gpio_get
 p_dll library parameters for GPIO get status test.
 
typedef struct __pdll_custom_test _pdll_custom_test
 p_dll library parameters for the custom test/
 
typedef struct __pdll_rdtester_init _pdll_rdtester_init
 p_dll library parameters for the rd tester init command.
 
typedef struct __pdll_rdtester_vbat_uart_rst _pdll_rdtester_vbat_uart_rst
 p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
 
typedef struct __pdll_rdtester_rst _pdll_rdtester_rst
 p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
 
typedef struct __pdll_rdtester _pdll_rdtester
 p_dll library parameters for the rd tester commands. Commands send from the Golden Unit to the CPLD.
 
typedef struct __pdll_scan_test _pdll_scan_test
 p_dll library parameters for the scan test.
 
typedef struct __pdll_xtal_test _pdll_xtal_test
 p_dll library parameters for the XTAL trim test.
 
typedef struct __pdll_sensor_test _pdll_sensor_test
 p_dll library parameters for the sensor test.
 
typedef struct __pdll_sleep_test _pdll_sleep_test
 p_dll library parameters for setting the devices into the various sleep mode.
 
typedef struct __pdll_uart_loop_test _pdll_uart_loop_test
 p_dll library parameters for UART loop test.
 
typedef struct __pdll_ble_adv_start_test _pdll_ble_adv_start_test
 p_dll library parameters for starting BLE advertisements through an HCI command send to the DUT.
 
typedef struct __pdll_ble_adv_stop_test _pdll_ble_adv_stop_test
 p_dll library parameters for stopping BLE advertisements through an HCI command send to the DUT.
 
typedef struct __pdll_ext32Khz_test _pdll_ext32Khz_test
 p_dll library parameters for testing the external 32Khz low power crystal.
 
typedef struct __pdll_adc_vbat_en _pdll_adc_vbat_en
 p_dll library parameters for enabling the VBAT measurement using the internal ADC.
 
typedef struct __pdll_set_tx_pwr _pdll_set_tx_pwr
 p_dll library parameters for setting the TX power level in RF test mode.
 
typedef union __pdll_test_data _pdll_test_data
 p_dll library parameters for the device test data.
 
typedef struct __pdll_device _pdll_device
 p_dll library parameters for each different device.
 

Enumerations

enum  __PDLL_RETURN_CODES {
  PDLL_SUCCESS = 0 , PDLL_PARAMS_ERROR , PDLL_RX_TIMEOUT , PDLL_TX_TIMEOUT ,
  PDLL_UNEXPECTED_EVENT , PDLL_CANNOT_ALLOCATE_MEMORY , PDLL_INTERNAL_ERROR , PDLL_THREAD_CREATION_ERROR ,
  PDLL_DBG_DLL_ERROR , PDLL_INVALID_DBG_PARAMS , PDLL_COM_PORT_START , PDLL_COM_PORT_OK ,
  PDLL_COM_PORT_FAILED , PDLL_FW_VERSION_GET_START , PDLL_FW_VERSION_GET_OK , PDLL_RDTESTER_INIT_START ,
  PDLL_RDTESTER_INIT_OK , PDLL_RDTESTER_UART_CONNECT_START , PDLL_RDTESTER_UART_CONNECT_OK , PDLL_RDTESTER_UART_LOOPBACK_START ,
  PDLL_RDTESTER_UART_LOOPBACK_OK , PDLL_RDTESTER_VBAT_UART_CNTRL_START , PDLL_RDTESTER_VBAT_UART_CNTRL_OK , PDLL_RDTESTER_VPP_CNTRL_START ,
  PDLL_RDTESTER_VPP_CNTRL_OK , PDLL_RDTESTER_RST_PULSE_START , PDLL_RDTESTER_RST_PULSE_OK , PDLL_RDTESTER_UART_PULSE_START ,
  PDLL_RDTESTER_UART_PULSE_OK , PDLL_RDTESTER_XTAL_PULSE_START , PDLL_RDTESTER_XTAL_PULSE_OK , PDLL_RDTESTER_PULSE_WIDTH_START ,
  PDLL_RDTESTER_PULSE_WIDTH_OK , PDLL_RDTESTER_VBAT_CNTRL_START , PDLL_RDTESTER_VBAT_CNTRL_OK , PDLL_RDTESTER_VBAT_UART_RST_CNTRL_START ,
  PDLL_RDTESTER_VBAT_UART_RST_CNTRL_OK , PDLL_RDTESTER_INVALID_COMMAND , PDLL_XTAL_TRIM_START , PDLL_XTAL_TRIM_OK ,
  PDLL_XTAL_TRIM_OUT_OF_RANGE , PDLL_XTAL_TRIM_FREQ_CAL_NOT_CONNECTED , PDLL_XTAL_TRIM_WRITE_FAILED , PDLL_XTAL_TRIM_READ_START ,
  PDLL_XTAL_TRIM_READ_OK , PDLL_UART_RESYNC_START , PDLL_UART_RESYNC_OK , PDLL_UART_RESYNC_FAILED ,
  PDLL_CONT_PKT_TX_START , PDLL_CONT_PKT_TX_STARTED_OK , PDLL_HCI_TEST_STOP_START , PDLL_HCI_TEST_STOPPED_OK ,
  PDLL_PKT_TX_START , PDLL_PKT_TX_STARTED_OK , PDLL_PKT_TX_ENDED_OK , PDLL_PKT_RX_STATS_START ,
  PDLL_PKT_RX_STATS_STARTED_OK , PDLL_PKT_RX_STATS_STOP_START , PDLL_PKT_RX_STATS_STOPPED_OK , PDLL_PKT_RX_START ,
  PDLL_PKT_RX_STARTED_OK , PDLL_CUSTOM_ACTION_START , PDLL_CUSTOM_ACTION_OK , PDLL_BLE_SCAN_START ,
  PDLL_BLE_SCAN_OK , PDLL_BLE_ADV_START , PDLL_BLE_ADV_START_OK , PDLL_BLE_ADV_STOP_START ,
  PDLL_BLE_ADV_STOPPED_OK , PDLL_AUDIO_TONE_START , PDLL_AUDIO_TONE_STARTED_OK , PDLL_AUDIO_TONE_STOP ,
  PDLL_AUDIO_TONE_STOPPED_OK , PDLL_AUDIO_TEST_START , PDLL_AUDIO_TEST_ALREADY_ACTIVE , PDLL_AUDIO_TEST_STARTED_OK ,
  PDLL_AUDIO_TEST_STOP , PDLL_AUDIO_TEST_STOPPED_OK , PDLL_AUDIO_TEST_PASSED , PDLL_AUDIO_TEST_FAILED ,
  PDLL_AUDIO_TEST_INVALID_COMMAND , PDLL_GPIO_TOGGLE_START , PDLL_GPIO_TOGGLE_ERROR , PDLL_GPIO_TOGGLE_FINISHED_OK ,
  PDLL_GPIO_SET_START , PDLL_GPIO_SET_ERROR , PDLL_GPIO_SET_FINISHED_OK , PDLL_GPIO_GET_START ,
  PDLL_GPIO_GET_ERROR , PDLL_GPIO_GET_FINISHED_OK , PDLL_GPIO_WD_START , PDLL_GPIO_WD_ERROR ,
  PDLL_GPIO_WD_OK , PDLL_SENSOR_TEST_START , PDLL_SENSOR_TEST_OK , PDLL_SLEEP_START ,
  PDLL_SLEEP_OK , PDLL_UART_LOOP_START , PDLL_UART_LOOP_FAILED , PDLL_UART_LOOP_OK ,
  PDLL_EXT32Khz_TEST_START , PDLL_EXT32Khz_TEST_FAILED , PDLL_EXT32Khz_TEST_OK , PDLL_ADC_VBAT_START ,
  PDLL_ADC_VBAT_OK , PDLL_SET_TX_PWR_START , PDLL_SET_TX_PWR_OK , PDLL_TIMESTAMP_RD_START ,
  PDLL_TIMESTAMP_RD_OK , PDLL_RESET_MODE_START , PDLL_RESET_MODE_OK
}
 The P_DLL return status codes. More...
 
enum  __pdll_test_id {
  dut_com_init = 0 , cont_pkt_tx = 1 , pkt_tx = 2 , start_pkt_rx_stats = 4 ,
  custom_test = 6 , xtal_trim = 7 , scan_test = 9 , rdtester_init = 10 ,
  rdtester_uart_connect = 11 , rdtester_uart_loop = 12 , rdtester_vbat_uart_ctrl = 13 , rdtester_vpp_ctrl = 14 ,
  rdtester_rst_pulse = 15 , rdtester_xtal_pulse_uart = 16 , rdtester_xtal_pulse = 17 , rdtester_pulse_width = 18 ,
  rdtester_vbat_ctrl = 19 , rdtester_vbat_uart_rst_ctrl = 20 , uart_resync = 21 , audio_test = 22 ,
  audio_tone = 23 , gpio_toggle = 24 , gpio_set = 25 , gpio_get = 26 ,
  gpio_wd = 27 , sensor_test = 28 , sleep = 29 , uart_loop = 30 ,
  ble_adv_start = 31 , ble_adv_stop = 32 , ext32Khz_test = 33 , adc_vbat = 34 ,
  set_tx_pwr = 36 , timestamp_rd = 37 , INVALID_TEST = 38
}
 The available production tests and operations. Used at __pdll_device::test. More...
 
enum  __payload_type {
  TX_TYPE_PSEUDO_RAND_9 = 0 , TX_TYPE_ALT_BITS_1100 , TX_TYPE_ALT_BITS_10 , TX_TYPE_PSEUDO_RAND_15 ,
  TX_TYPE_ALL_BITS_1 , TX_TYPE_ALL_BITS_0 , TX_TYPE_ALT_BITS_0011 , TX_TYPE_ALT_BITS_0101 ,
  INVALID_TX_PAYLOAD_TYPE
}
 RF TX payload types. More...
 
enum  __audio_test_op { AUDIO_TEST_START = 1 , AUDIO_TEST_STOP , INVALID_AUDIO_TEST }
 Commands for audio test. More...
 
enum  __audio_tone_op { AUDIO_TONE_START = 1 , AUDIO_TONE_STOP , INVALID_AUDIO_TONE_OP }
 Commands for audio tone. More...
 
enum  __sensor_iface { SENSOR_IFACE_SPI = 0 , SENSOR_IFACE_I2C , INVALID_SENSOR_IFACE }
 Sensor tests interface selection. More...
 
enum  __gpio_state { GPIO_STATE_LOW = 0 , GPIO_STATE_HIGH , INVALID_GPIO_STATE }
 GPIO state. More...
 
enum  __gpio_pwr_lvl { GPIO_LVL_3V3 = 0 , GPIO_LVL_1V8 , INVALID_GPIO_LVL }
 GPIO power level. More...
 
enum  __gpio_mode {
  GPIO_MODE_INPUT = 0 , GPIO_MODE_INPUT_PULLUP = 1 , GPIO_MODE_INPUT_PULLDOWN = 2 , GPIO_MODE_OUTPUT = 3 ,
  GPIO_MODE_OUTPUT_PUSH_PULL = 4 , GPIO_MODE_OUTPUT_OPEN_DRAIN = 5 , INVALID_GPIO_MODE
}
 GPIO mode. More...
 
enum  __sleep_modes { NO_SLEEP = 0 , EXTENDED_SLEEP , DEEP_SLEEP , INVALID_SLEEP_MODE }
 The sleep modes supported. More...
 
enum  __baud_rate {
  UART_BAUDRATE_9K6 = 0 , UART_BAUDRATE_19K2 , UART_BAUDRATE_57K6 , UART_BAUDRATE_115K2 ,
  UART_BAUDRATE_1M , UART_BAUDRATE_2M
}
 The UART baud rates supported in the UART loop test. More...
 
enum  __adv_channel { ADV_CH37 = 0x01 , ADV_CH38 = 0x02 , ADV_CH39 = 0x04 , ADV_ALLCH = 0x07 }
 BLE advertisement channels for the HCI BLE scan test. More...
 
enum  __pdll_tx_pwr_lvl {
  RF_TX_PWR_LVL_MIN_VAL = 0U , RF_TX_PWR_LVL_MINUS_50d0 = 0U , RF_TX_PWR_LVL_MINUS_18d0 = 1U , RF_TX_PWR_LVL_MINUS_12d0 = 2U ,
  RF_TX_PWR_LVL_MINUS_8d0 = 3U , RF_TX_PWR_LVL_MINUS_6d0 = 4U , RF_TX_PWR_LVL_MINUS_3d0 = 5U , RF_TX_PWR_LVL_MINUS_2d0 = 6U ,
  RF_TX_PWR_LVL_MINUS_1d0 = 7U , RF_TX_PWR_LVL_0d0 = 8U , RF_TX_PWR_LVL_PLUS_1d5 = 9U , RF_TX_PWR_LVL_PLUS_2d0 = 10U ,
  RF_TX_PWR_LVL_PLUS_3d0 = 11U , RF_TX_PWR_LVL_PLUS_4d0 = 12U , RF_TX_PWR_LVL_PLUS_4d5 = 13U , RF_TX_PWR_LVL_PLUS_5d0 = 14U ,
  RF_TX_PWR_LVL_PLUS_6d0 = 15U
}
 RF test transmit output power levels. More...
 
enum  __pdll_adv_tx_pwr_lvl {
  GAP_TX_POWER_MIN = 0U , GAP_TX_POWER_MINUS_50_dBm = 0U , GAP_TX_POWER_MINUS_26_dBm = 1U , GAP_TX_POWER_MINUS_22_dBm = 2U ,
  GAP_TX_POWER_MINUS_18_dBm = 3U , GAP_TX_POWER_MINUS_12_dBm = 4U , GAP_TX_POWER_MINUS_8_dBm = 5U , GAP_TX_POWER_MINUS_6_dBm = 6U ,
  GAP_TX_POWER_MINUS_3_dBm = 7U , GAP_TX_POWER_MINUS_2_dBm = 8U , GAP_TX_POWER_MINUS_1_dBm = 9U , GAP_TX_POWER_0_dBm = 10U ,
  GAP_TX_POWER_1_5_dBm = 11U , GAP_TX_POWER_2_dBm = 12U , GAP_TX_POWER_3_dBm = 13U , GAP_TX_POWER_4_dBm = 14U ,
  GAP_TX_POWER_4_5_dBm = 15U , GAP_TX_POWER_5_dBm = 16U , GAP_TX_POWER_6_dBm = 17U , GAP_TX_POWER_MAX = 17U
}
 Advertisments GAP transmit output power levels. More...
 

Functions

P_DLL_API PDLL_RET pdll_dbg_init (const _dbg_params *dbg_params_t)
 p_dll library debug initialization function. More...
 
P_DLL_API PDLL_RET pdll_dbg_close (void)
 Closes the debug library. More...
 
P_DLL_API PDLL_RET pdll_init (void)
 p_dll library initialization function. More...
 
P_DLL_API PDLL_RET pdll_set_device_params (const _pdll_device *dev)
 Sets the p_dll library specific device parameters. More...
 
P_DLL_API PDLL_RET pdll_perform_test (_pdll_test_id test_id)
 Starts the test operations of the p_dll library. More...
 

Detailed Description

Production tests API header file.

Copyright (C) 2022 Dialog Semiconductor. This computer program includes Confidential, Proprietary Information of Dialog Semiconductor. All Rights Reserved.

bluet.nosp@m.ooth.nosp@m..supp.nosp@m.ort@.nosp@m.diase.nosp@m.mi.c.nosp@m.om

Definition in file p_dll.h.