EasyManua.ls Logo

Analog Devices ADRV9002

Analog Devices ADRV9002
277 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Preliminary Technical Data UG-1828
Rev. PrB | Page 33 of 277
SOFTWARE INTEGRATION
The ADRV9001 API package was developed using the ZC706 Evaluation platform. This section describes how to use the provided
ADRV9001 API in a custom hardware/software environment. This is readily accomplished because the API was developed abiding by
ANSI C constructs while maintaining Linux system call transparency. The ANSI C standard was followed to ensure agnostic processor
and operating system integration with the ADRV9001 API code.
LOGGING
DEVICE LAYER
ADRV9001
COMMON
PLATFORM LAYER
adi_platform
HARDWARE ABSTRACTION LAYER
APPLICATION HAL
IMPLEMENTATION
APPLICATION USES
PLATFORM LAYER
AS AN INTERFACE
TO MAP TO
THEIR HAL
MODIFICATION BY
APPLICATION IS
FORBIDDEN
ERROR
HAL
PLATFORM
SPI
LOGGING TIMER
PLATFORM
SPI LOGGING TIMER
24159-015
Figure 15. Evaluation System Software Stack
HARDWARE ABSTRACTION LAYER
Users who develop code to target custom hardware platforms use different drivers for the peripherals such as the SPI and GPIO
compared to the drivers chosen for the ADI evaluation platform. The hardware abstraction layer (HAL) interface is a set of function
pointers that the ADRV9001 API uses when it must access the target platform hardware. The ADI HAL is defined in
adi_adrv9001_hal_customer.h. The prototypes of the required functions defined in adi_adrv9001_hal_customer.h are an interface
between the ADRV9001 API and the HAL; modifying them breaks the ADRV9001 API.
The implementation of this interface is platform dependent and must be implemented by the end user. The function pointer associated
with the user HAL layer must be set in adi_platform.c. The current adi_platform.c provides example code that sets the HAL function
pointers for the ZC706 evaluation platform specific functions.
The following is a list of the functions that need to be completed by the user to implement the HAL for the users system found in
adi_adrv9001_hal_customer.c :
int32_t customer_adi_adrv9001_hal_open(void *devHalCfg)
int32_t customer_adi_adrv9001_hal_close(void *devHalCfg)
int32_t customer_adi_adrv9001_hal_spi_write(void *devHalCfg, const uint8_t txData[], uint32_t
numTxBytes)
int32_t customer_adi_adrv9001_hal_spi_read(void *devHalCfg, const uint8_t txData[], uint8_t
rxData[], uint32_t numTxRxBytes)
int32_t customer_adi_adrv9001_hal_resetbPin_set(void *devHalCfg, uint8_t pinLevel)
int32_t customer_adi_adrv9001_hal_mcs_pulse(void *devHalCfg, uint8_t numberOfPulses)
int32_t customer_adi_adrv9001_hal_ssi_reset(void *devHalCfg)
A full description of all HAL functions can be found in the ADRV9001_API.chm document.
1. Edit the functions in the C files to call appropriate functions (eg SPI read/write, I2C read/write) for the chosen platform.
2. Define the CUSTOMER_PLATFORM in the adi_platform.c file to make it call the HAL for the users system.
The host can then use the compile_on_platform.py script to compile initialization code for the ADRV9002 on the chosen platform
though SSH. Run the script using Python2.7 and follow instructions.

Table of Contents

Related product manuals