Go to the documentation of this file.
18 #define DIV_U64(x, y) no_os_div_u64(x, y)
19 #define DIV_S64(x, y) no_os_div_s64(x, y)
20 #define DIV_ROUND_CLOSEST NO_OS_DIV_ROUND_CLOSEST
21 #define DIV_ROUND_CLOSEST_ULL NO_OS_DIV_ROUND_CLOSEST_ULL
82 #define HAL_SPIWRITEARRAY_BUFFERSIZE 341
332 uint8_t *data, uint32_t count);
405 uint8_t *readdata, uint32_t count);
459 uint8_t fieldVal, uint8_t mask, uint8_t startBit);
511 uint8_t *fieldVal, uint8_t mask, uint8_t startBit);
622 uint32_t errorCode,
const char *comment);
const char * name
Definition: clk_axi_clkgen.h:51
#define SYSREF_SRC_INTERNAL
Definition: ad9528.h:275
Driver for the Analog Devices AXI-ADC-CORE module.
adiHalErr_t ADIHAL_spiWriteBytes(void *devHalInfo, uint16_t *addr, uint8_t *data, uint32_t count)
Writes an array of SPI writes to an ADI Device.
Definition: no_os_hal.c:181
int32_t axi_dac_data_setup(struct axi_dac *dac)
AXI DAC Data Setup.
Definition: axi_dac_core.c:1193
#define RX_OS_JESD_BASEADDR
Definition: parameters.h:126
const char * name
Definition: clk_axi_clkgen.h:45
IIO application descriptor initialization parameters.
Definition: iio_app.h:101
uint16_t channel_divider
Definition: ad9528.h:345
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
adiLogLevel_t
An enumerated type in bit mask format to list the log message categories or groups.
Definition: adi_hal.h:57
Config file for ADRV9009 project.
uint32_t log_level
Definition: adi_hal.h:31
#define SYSREF_NSHOT_4_PULSES
Definition: ad9528.h:287
#define ADXCVR_REFCLK
Definition: axi_adxcvr.h:55
int32_t axi_dac_init_begin(struct axi_dac **dac_core, const struct axi_dac_init *init)
Begin AXI DAC Initialization.
Definition: axi_dac_core.c:1098
struct no_os_uart_init_param uart_init_params
Definition: iio_app.h:115
#define IIO_APP_DEVICE(_name, _dev, _dev_descriptor, _read_buff, _write_buff, _default_trigger_id)
Definition: iio_app.h:47
struct no_os_spi_desc * spi_adrv_desc
Definition: adi_hal.h:30
adiHalErr_t ADIHAL_spiWriteByte(void *devHalInfo, uint16_t addr, uint8_t data)
Performs a Single SPI write to an ADI Device.
Definition: no_os_hal.c:163
adiHalErr_t ADIHAL_setTimeout(void *devHalInfo, uint32_t halTimeout_ms)
Sets the a timeout duration for the HAL functions.
Definition: no_os_hal.c:56
@ GPIO_PS
Definition: xilinx_gpio.h:56
@ SYSREF_CONT_OFF
Definition: adi_hal.h:69
@ SPI_PS
Definition: xilinx_spi.h:62
uint32_t size
Definition: iio_app.h:63
Definition: axi_dmac.h:127
@ UART_PL
Definition: xilinx_uart.h:57
struct axi_clkgen * rx_clkgen
Definition: app_clocking.c:90
#define DDR_MEM_BASEADDR
Definition: parameters.h:64
Header file of SPI Interface.
struct adxcvr * tx_adxcvr
Definition: app_jesd.c:53
struct no_os_gpio_desc * gpio_adrv_resetb
Definition: adi_hal.h:28
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
enum xil_uart_type type
Definition: xilinx_uart.h:69
@ RPOLE2_900_OHM
Definition: ad9523.h:336
int jesd204_topology_init(struct jesd204_topology **topology, struct jesd204_topology_dev *devs, unsigned int devs_number)
Output channel configuration.
Definition: ad9528.h:330
ADI JESD204B/C AXI_ADXCVR Highspeed Transceiver Device structure.
Definition: altera_adxcvr.h:89
AXI ADC Initialization Parameters structure.
Definition: axi_adc_core.h:143
@ ADIHAL_LOG_NONE
Definition: adi_hal.h:58
struct axi_dmac * rx_dmac
Definition: iio_axi_adc.h:81
int32_t axi_adc_write(struct axi_adc *adc, uint32_t reg_addr, uint32_t reg_data)
AXI ADC Data Write.
Definition: axi_adc_core.c:71
Driver for the Analog Devices AXI CLKGEN.
int32_t axi_dmac_transfer_wait_completion(struct axi_dmac *dmac, uint32_t timeout_ms)
Definition: axi_dmac.c:525
IIO application descriptor.
Definition: iio_app.h:80
struct jesd204_dev * jdev
Definition: axi_jesd204_rx.h:81
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
adiHalErr_t ADIHAL_spiReadByte(void *devHalInfo, uint16_t addr, uint8_t *readdata)
Performs a Single SPI Read from an ADI Device.
Definition: no_os_hal.c:196
#define AXI_ADC_RSTN
Definition: axi_adc_core.h:47
void * buff
Definition: iio_app.h:64
Header file of Delay functions.
uint32_t axi_jesd204_rx_status_read(struct axi_jesd204_rx *jesd)
Read status of the JESD204 Receive Peripherial.
Definition: axi_jesd204_rx.c:212
const struct no_os_gpio_platform_ops xil_gpio_ops
Xilinx platform specific GPIO platform ops structure.
Definition: xilinx_gpio.c:450
int32_t ad9528_clk_set_rate(struct ad9528_dev *dev, uint32_t chan, uint32_t rate)
Set channel rate.
Definition: ad9528.c:1222
Definition: clk_axi_clkgen.h:50
adiHalErr_t ADIHAL_resetHw(void *devHalInfo)
Performs a hardware reset on the ADI Device.
Definition: no_os_hal.c:130
AXI ADC Device Descriptor.
Definition: axi_adc_core.h:122
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:414
#define ADC_DDR_BASEADDR
Definition: main.c:62
@ ADIHAL_WAIT_TIMEOUT
Definition: adi_hal.h:47
sysrefReqMode_t
Definition: adi_hal.h:67
int32_t axi_adc_init_begin(struct axi_adc **adc_core, const struct axi_adc_init *init)
Begin AXI ADC Initialization.
Definition: axi_adc_core.c:587
#define ADRV_CS
Definition: parameters.h:162
@ UART_PS
Definition: xilinx_uart.h:59
int32_t number
Definition: no_os_gpio.h:83
adiHalErr_t ADIHAL_closeHw(void *devHalInfo)
Closes any platform hardware drivers, handles, etc that were necessary for the ADI Device.
Definition: no_os_hal.c:113
iio configuration.
Definition: iio_axi_adc.h:77
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:520
Definition: clk_axi_clkgen.h:44
Driver for the Analog Devices AXI-DAC-CORE module.
Definition: iio_axi_dac.h:71
int32_t axi_jesd204_rx_init(struct axi_jesd204_rx **jesd204, const struct jesd204_rx_init *init)
Device initialization, JESD FSM ON.
Definition: axi_jesd204_rx.c:911
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
Definition: jesd204.h:248
struct jesd204_dev * jdev
Definition: jesd204.h:240
const char * name
Definition: axi_jesd204_rx.h:90
#define DRIVER_MODE_LVDS
Definition: ad9528.h:253
Definition: jesd204.h:239
@ CPOLE1_16_PF
Definition: ad9523.h:356
@ SYSREF_PULSE
Definition: adi_hal.h:70
adiHalErr_t ADIHAL_spiReadBytes(void *devHalInfo, uint16_t *addr, uint8_t *readdata, uint32_t count)
Performs a Multi SPI Read from an ADI Device.
Definition: no_os_hal.c:217
Contains Talise ADI HAL function prototypes type definitions for adi_hal.c.
struct axi_jesd204_tx * tx_jesd
Definition: app_jesd.c:50
#define AXI_ADC_REG_RSTN
Definition: axi_adc_core.h:45
struct xil_spi_init_param xil_spi_param
Definition: parameters.c:51
iio_axi_adc_descriptor
Definition: iio_axi_adc.h:53
uint8_t spi_adrv_csn
Definition: adi_hal.h:33
uint32_t device_id
Definition: no_os_spi.h:142
#define RX_OS_CLKGEN_BASEADDR
Definition: parameters.h:122
#define SPI_CS_DECODE
Definition: xilinx_spi.h:47
#define RX_DMA_BASEADDR
Definition: parameters.h:64
#define SYSREF_PATTERN_NSHOT
Definition: ad9528.h:278
void * extra_spi
Definition: adi_hal.h:32
#define RX_OS_XCVR_BASEADDR
Definition: parameters.h:130
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
struct iio_data_buffer * read_buff
Definition: iio_app.h:71
Definition: axi_dmac.h:102
#define no_os_min(x, y)
Definition: no_os_util.h:59
int main(void)
Definition: headless1.c:174
struct axi_dmac * rx_dmac
Definition: main.c:171
int jesd204_fsm_start(struct jesd204_topology *topology, unsigned int link_idx)
Driver for the ADI AXI-ADXCVR Module.
int32_t iio_axi_adc_init(struct iio_axi_adc_desc **desc, struct iio_axi_adc_init_param *init)
Registers a iio_axi_adc_desc for reading/writing and parameterization of axi_adc device.
Definition: iio_axi_adc.c:476
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
taliseSpiSettings_t * adrv9009_spi_settings_get(void)
Function for obtaining SPI settings.
Definition: headless1.c:152
@ ADIHAL_WARNING
Definition: adi_hal.h:49
struct axi_dmac * tx_dmac
Definition: main.c:181
#define TX_XCVR_BASEADDR
Definition: parameters.h:58
const struct no_os_gpio_init_param clkchip_gpio_init_param
Definition: common_data.c:55
@ IRQ_DISABLED
Definition: axi_dmac.h:79
struct axi_jesd204_rx * rx_os_jesd
Definition: app_jesd.c:57
int32_t axi_dac_set_datasel(struct axi_dac *dac, int32_t chan, enum axi_dac_data_sel sel)
AXI DAC Set Data type for specific channel.
Definition: axi_dac_core.c:590
const char * name
Definition: axi_dac_core.h:70
@ ADIHAL_GEN_SW
Definition: adi_hal.h:48
#define JESD204_LINKS_ALL
Definition: jesd204.h:49
adiHalErr_t ADIHAL_sysrefReq(void *devHalInfo, sysrefReqMode_t mode)
Performs a SYSREF request to the clock generation device.
Definition: no_os_hal.c:144
struct no_os_gpio_init_param * gpio_resetb
Definition: ad9528.h:501
struct ad9528_dev * clkchip_device
Definition: app_clocking.c:82
struct iio_data_buffer * write_buff
Definition: iio_app.h:72
@ SPI_PL
Definition: xilinx_spi.h:60
struct xil_gpio_init_param xil_gpio_param
Definition: parameters.c:46
#define FIRMWARE
Definition: app_config.h:55
struct axi_clkgen * tx_clkgen
Definition: app_clocking.c:91
Driver for the Analog Devices AXI-DMAC core.
#define DAC_DDR_BASEADDR
Definition: parameters.h:41
adiHalErr_t ADIHAL_spiWriteField(void *devHalInfo, uint16_t addr, uint8_t fieldVal, uint8_t mask, uint8_t startBit)
Performs a write to the specified field in a SPI register.
Definition: no_os_hal.c:232
uint8_t num_channels
Definition: axi_adc_core.h:149
void iio_axi_dac_get_dev_descriptor(struct iio_axi_dac_desc *desc, struct iio_device **dev_descriptor)
Create structure describing a device, channels and attributes.
Definition: iio_axi_dac.c:646
@ ADIHAL_LOG_SPI
Definition: adi_hal.h:62
uint32_t axi_jesd204_tx_status_read(struct axi_jesd204_tx *jesd)
Read status of the JESD204 Transmit Peripherial.
Definition: axi_jesd204_tx.c:170
adiHalErr_t ADIHAL_setLogLevel(void *devHalInfo, uint16_t halLogLevel)
Writes a character array to a log file to facilitate debugging.
Definition: no_os_hal.c:287
Definition: axi_dac_core.h:68
struct jesd204_dev * jdev
Definition: ad9528.h:492
Header file of iio_axi_adc.
Definition: altera_adxcvr.h:102
uint32_t dest_addr
Definition: axi_dmac.h:107
#define TRX_A_RESETB_GPIO
Definition: parameters.h:176
#define CLK_RESETB_GPIO
Definition: parameters.h:178
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
const char * name
Definition: altera_adxcvr.h:103
taliseInit_t talInit
Definition: talise_config.c:82
struct axi_dmac * tx_dmac
Definition: iio_axi_dac.h:75
AXI DAC Device Descriptor.
Definition: axi_dac_core.h:53
struct axi_adc_init rx_adc_init
Definition: main.c:144
@ ADIHAL_LOG_WARN
Definition: adi_hal.h:60
@ ADIHAL_LOG_MSG
Definition: adi_hal.h:59
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: xilinx_uart.h:67
@ ADIHAL_OK
Definition: adi_hal.h:43
struct no_os_spi_init_param spi_init
Definition: ad9528.h:499
enum xil_spi_type type
Definition: xilinx_spi.h:74
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
uint32_t dac_buffer_dma[1024 *16]
Definition: headless1.c:38
int iio_app_run(struct iio_app_desc *app)
Definition: iio_axi_dac.h:53
struct adxcvr * rx_adxcvr
Definition: app_jesd.c:52
struct axi_dac * tx_dac
Definition: iio_axi_dac.h:73
#define RX_XCVR_BASEADDR
Definition: parameters.h:66
Structure holding the initialization parameters for Xilinx platform specific SPI parameters when usin...
Definition: xilinx_spi.h:72
int iio_app_init(struct iio_app_desc **app, struct iio_app_init_param app_init_param)
@ ADIHAL_TIMER_FAIL
Definition: adi_hal.h:46
adiHalErr_t ADIHAL_wait_us(void *devHalInfo, uint32_t time_us)
Delay or sleep for the specified number of microseconds.
Definition: no_os_hal.c:262
#define SOURCE_VCO
Definition: ad9528.h:258
bool export_no_os_clk
Definition: ad9528.h:504
Definition: axi_jesd204_tx.h:70
struct axi_dmac_init rx_dmac_init
Definition: main.c:162
struct jesd204_dev * jdev
Definition: axi_jesd204_tx.h:92
uint8_t gpio_adrv_resetb_num
Definition: adi_hal.h:35
int32_t axi_jesd204_tx_init(struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init)
Device initialization.
Definition: axi_jesd204_tx.c:819
struct axi_clkgen * rx_os_clkgen
Definition: app_clocking.c:92
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
@ NO
Definition: axi_dmac.h:98
#define ADXCVR_SYS_CLK_CPLL
Definition: axi_adxcvr.h:48
const struct no_os_uart_platform_ops xil_uart_ops
Xilinx platform specific UART platform ops structure.
Definition: xilinx_uart.c:520
const uint32_t sine_lut_iq[1024]
Definition: axi_dac_core.c:145
struct axi_adc * rx_adc
Definition: iio_axi_adc.h:79
unsigned int no_os_hweight8(uint8_t word)
#define AXI_ADC_MMCM_RSTN
Definition: axi_adc_core.h:46
int32_t axi_dmac_init(struct axi_dmac **dmac_core, const struct axi_dmac_init *init)
Definition: axi_dmac.c:334
uint8_t divider_phase
Definition: ad9528.h:343
#define RX_CORE_BASEADDR
Definition: parameters.h:63
struct axi_dmac_init tx_dmac_init
Definition: main.c:172
uint8_t driver_mode
Definition: ad9528.h:338
#define NULL
Definition: wrapper.h:64
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:110
const struct no_os_spi_platform_ops xil_spi_ops
Spi engine platform specific SPI platform ops structure.
Definition: xilinx_spi.c:453
@ ADIHAL_GPIO_FAIL
Definition: adi_hal.h:45
struct no_os_gpio_desc * gpio_adrv_sysref_req
Definition: adi_hal.h:29
#define CLK_CS
Definition: parameters.h:161
adiHalErr_t ADIHAL_writeToLog(void *devHalInfo, adiLogLevel_t logLevel, uint32_t errorCode, const char *comment)
Writes a character array to a log file to facilitate debugging.
Definition: no_os_hal.c:269
#define SOURCE_SYSREF_VCO
Definition: ad9528.h:260
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
int32_t iio_axi_dac_init(struct iio_axi_dac_desc **desc, struct iio_axi_dac_init_param *init)
Registers a iio_axi_dac_desc for reading/writing and parameterization of axi_dac device.
Definition: iio_axi_dac.c:659
Definition: axi_jesd204_rx.h:57
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
struct ad9528_platform_data * pdata
Definition: ad9528.h:503
taliseInit_t * adrv9009_initial_settings_get(void)
Function for obtaining initial settings.
Definition: headless1.c:162
Header file of iio_axi_dac.
void * extra_gpio
Definition: adi_hal.h:34
uint8_t device_id
Definition: no_os_uart.h:112
Driver for the Analog Devices AXI-JESD204-RX peripheral.
int32_t ad9528_init(struct ad9528_init_param *init_param)
Initializes the AD9528.
Definition: ad9528.c:299
#define RX_JESD_BASEADDR
Definition: parameters.h:65
struct axi_dac_init tx_dac_init
Definition: main.c:155
Structure holding the initialization parameters for Xilinx platform specific GPIO parameters.
Definition: xilinx_gpio.h:64
struct axi_jesd204_rx * rx_jesd
Definition: app_jesd.c:49
#define ADXCVR_SYS_CLK_QPLL0
Definition: axi_adxcvr.h:50
#define STREAM
Definition: app_config.h:58
@ SYSREF_CONT_ON
Definition: adi_hal.h:68
@ ADIHAL_ERR
Definition: adi_hal.h:50
struct no_os_clk_desc * clk_out
Definition: axi_adxcvr.h:93
JESD204B/C Receive Peripheral Initialization Structure.
Definition: axi_jesd204_rx.h:88
uint8_t output_dis
Definition: ad9528.h:336
const char * name
Definition: axi_jesd204_tx.h:101
@ GPIO_PL
Definition: xilinx_gpio.h:54
int32_t axi_dmac_transfer_start(struct axi_dmac *dmac, struct axi_dma_transfer *dma_transfer)
Definition: axi_dmac.c:385
int32_t axi_dac_load_custom_data(struct axi_dac *dac, const uint32_t *custom_data_iq, uint32_t custom_tx_count, uint32_t address)
AXI DAC Load custom data.
Definition: axi_dac_core.c:1063
@ AXI_DAC_DATA_SEL_DMA
Definition: axi_dac_core.h:86
@ ADIHAL_LOG_ALL
Definition: adi_hal.h:63
@ ADIHAL_SPI_FAIL
Definition: adi_hal.h:44
#define RX_OS_DMA_BASEADDR
Definition: parameters.h:252
#define TX_JESD_BASEADDR
Definition: parameters.h:90
Header file of utility functions.
adiHalErr_t ADIHAL_openHw(void *devHalInfo, uint32_t halTimeout_ms)
Performs a platform hardware initialization for the ADI Device.
Definition: no_os_hal.c:61
#define SYSREF_LEVEL_HIGH
Definition: ad9528.h:293
struct no_os_uart_init_param iio_uart_ip
Definition: common_data.c:46
uint8_t signal_source
Definition: ad9528.h:339
@ NO_OS_SPI_MODE_0
Definition: no_os_spi.h:61
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
void iio_axi_adc_get_dev_descriptor(struct iio_axi_adc_desc *desc, struct iio_device **dev_descriptor)
Get device descriptor.
Definition: iio_axi_adc.c:463
uint8_t channel_num
Definition: ad9528.h:332
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
struct iio_app_device * devices
Definition: iio_app.h:107
JESD204B/C Transmit Peripheral Initialization Structure.
Definition: axi_jesd204_tx.h:99
uint32_t size
Definition: axi_dmac.h:103
enum xil_gpio_type type
Definition: xilinx_gpio.h:66
struct no_os_clk_desc ** clk_desc
Definition: ad9528.h:490
int32_t ad9528_setup(struct ad9528_dev **device, struct ad9528_init_param init_param)
Initializes the AD9528.
Definition: ad9528.c:702
const char * name
Definition: axi_adc_core.h:145
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_rx.h:104
@ ADIHAL_LOG_ERR
Definition: adi_hal.h:61
uint32_t nb_devices
Definition: iio_app.h:109
@ RZERO_1850_OHM
Definition: ad9523.h:350
Definition: axi_dmac.h:110
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_tx.h:125
int32_t adxcvr_init(struct adxcvr **ad_xcvr, const struct adxcvr_init *init)
adxcvr_init
Definition: altera_adxcvr.c:438
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
Driver for the Analog Devices AXI-JESD204-TX peripheral.
#define TALISE_NUM_CHANNELS
Definition: app_talise.h:51
adiHalErr_t ADIHAL_spiReadField(void *devHalInfo, uint16_t addr, uint8_t *fieldVal, uint8_t mask, uint8_t startBit)
Performs a read from a particular bit field in a SPI register.
Definition: no_os_hal.c:247
#define RX_OS_CORE_BASEADDR
Definition: parameters.h:139
adiHalErr_t
Enum of possible Errors Detected by HAL layer to be communicated to ADI APIs.
Definition: adi_hal.h:42