ADF7030-1 Device Drivers API Reference Manual  Alpha 0.0.1
Device Drivers for ADF7030-1 Transceiver
SPI Interface layer
Collaboration diagram for SPI Interface layer:

Data Structures

struct  ADI_ADF7030_1_RADIO_SPI_STATUS_TYPE
 

Macros

#define ADF7030_1_SPI_BUFFER_SIZE   256u
 
#define ADF7030_1_SPI_MAX_TRX_SIZE   (ADF7030_1_SPI_BUFFER_SIZE - 8u)
 
#define ADF703x_INT1_GPIO_PIN   ADI_GPIO_PIN_15
 
#define ADF703x_INT1_GPIO_PORT   ADI_GPIO_PORT0
 
#define ADF703x_INT2_GPIO_PIN   ADI_GPIO_PIN_0
 
#define ADF703x_INT2_GPIO_PORT   ADI_GPIO_PORT1
 
#define SPI_CS_NUM   ADI_SPI2_CS3
 
#define SPI_DEV_BITRATE   3000000
 
#define SPI_DEV_NUM   2
 

Enumerations

enum  ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE {
  PNTR_SETUP_ADDR = 0,
  PNTR_SRAM_ADDR = 1,
  PNTR_MCR_LOW = 2,
  PNTR_MCR_HIGH = 3,
  PNTR_IRQ_CTRL_ADDR = 4,
  PNTR_CUSTOM0_ADDR = 5,
  PNTR_CUSTOM1_ADDR = 6,
  PNTR_CUSTOM2_ADDR = 7
}
 
enum  ADI_ADF7030_1_RADIO_SPI_TRX_TYPE {
  SPI_WRITE = 0,
  SPI_READ = 1
}
 

Functions

uint32_t adf7030_1__SPI_Block_Xfer (ADI_SPI_HANDLE hSPIDevice, uint32_t cmdOffset, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE PNTR_ID, uint32_t Addr, uint32_t nbBytes, void *pDataIO, void *pDataRef)
 Generic function to read or write a number of bytes between the Host and the PHY adf703x. More...
 
uint32_t adf7030_1__SPI_byte_block_transaction (ADI_SPI_HANDLE *hSPIDevice, uint32_t offset, uint32_t nb_bytes, uint8_t *pDataIO, uint8_t *pDataRef)
 Generic SPI Block Read/Write a number of byte(s) to the adf7030-1. More...
 
uint32_t adf7030_1__SPI_byte_random_transaction (ADI_SPI_HANDLE *hSPIDevice, uint32_t offset, uint32_t nb_word, uint8_t *pAddrIO, uint8_t *pDataIO)
 
void adf7030_1__SPI_FindMMapPointer (ADI_SPI_HANDLE hSPIDevice, uint32_t Addr, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE *pPNTR_ID, int32_t *ByteOffset)
 This function return the best Pointer id + offset for subsequent SPI transfert to the PHY "Addr" provided. More...
 
uint32_t adf7030_1__SPI_GetMMapPointers (ADI_SPI_HANDLE hSPIDevice, uint32_t *pPNTR)
 Get SPI Radio mmap pointers access. More...
 
uint32_t adf7030_1__SPI_Init (void)
 Initializes SPI device for communication with the adf7030-1 PHY. More...
 
uint32_t adf7030_1__SPI_rd_byte_b_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t AddrIn, uint32_t num_xfrs, uint8_t *pDataOut)
 Read a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" + AddrIn offset Generic 8bits bloc address read from memory (HRM 1.4.4.2.4) More...
 
uint32_t adf7030_1__SPI_rd_byte_p_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint8_t *pDataOut)
 Read a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 8bits bloc pointer read from memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of unaligned data to the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_rd_cmp_byte_b_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t AddrIn, uint32_t num_xfrs, uint8_t *pDataOut, uint8_t *pDataRef)
 Read & Compare a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" + AddrIn offset Generic 8bits bloc address read from memory (HRM 1.4.4.2.4) More...
 
uint32_t adf7030_1__SPI_rd_cmp_byte_p_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint8_t *pDataOut, uint8_t *pDataRef)
 Read & Compare a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 8bits bloc pointer read from memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of unaligned data to the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_rd_cmp_word_b_a (ADI_SPI_HANDLE hSPIDevice, uint32_t AddrIn, uint32_t num_xfrs, uint32_t *pDataOut, uint32_t *pDataRef)
 Read & Compare a number of word(s) from the adf7030-1 to memory of Host Generic 32bits bloc address read from memory (HRM 1.4.4.2.3). This Function should be used when reading a large block of 32bits word from the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_rd_cmp_word_b_p (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint32_t *pDataOut, uint32_t *pDataRef)
 Read & Compare a number of word(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 32bits bloc pointer read from memory (HRM 1.4.4.2.5/9) More...
 
uint32_t adf7030_1__SPI_rd_word_b_a (ADI_SPI_HANDLE hSPIDevice, uint32_t AddrIn, uint32_t num_xfrs, uint32_t *pDataOut)
 Read a number of word(s) from the adf7030-1 to memory of Host Generic 32bits bloc address read from memory (HRM 1.4.4.2.3). This Function should be used when reading a large block of 32bits word from the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_rd_word_b_p (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint32_t *pDataOut)
 Read a number of word(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 32bits bloc pointer read from memory (HRM 1.4.4.2.5/9) More...
 
uint32_t adf7030_1__SPI_SetMMapCustomPntr0 (ADI_SPI_HANDLE hSPIDevice, uint32_t Addr)
 Change the SPI Radio mmap custom pointers 0 location. More...
 
uint32_t adf7030_1__SPI_SetMMapPointers (ADI_SPI_HANDLE hSPIDevice, uint32_t *pPNTR)
 Set SPI Radio mmap pointers access. More...
 
uint32_t adf7030_1__SPI_SetSpeed (const uint32_t RateHz)
 Change SPI Host to PHY Communication bitrate. More...
 
uint32_t adf7030_1__SPI_UnInit (void)
 Uninitializes SPI device used to communication with the adf7030-1 PHY. More...
 
uint32_t adf7030_1__SPI_word_block_transaction (ADI_SPI_HANDLE *hSPIDevice, uint32_t offset, uint32_t nb_word, uint32_t *pDataIO, uint32_t *pDataRef)
 Generic SPI Block Read/Write a number of words(s) to the adf7030-1. More...
 
uint32_t adf7030_1__SPI_word_random_transaction (ADI_SPI_HANDLE *hSPIDevice, uint32_t offset, uint32_t nb_word, uint32_t *pRemoteAddrIO, uint32_t *pHostDataIO, bool pHostDataIO_isArray)
 Generic SPI Random Read/Write a number of words(s) to the adf7030-1. More...
 
uint32_t adf7030_1__SPI_wr_byte_b_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t AddrIn, uint32_t num_xfrs, uint8_t *pDataIn)
 Write a number of byte(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr" + AddrIn Generic 8bits bloc address write to memory (HRM 1.4.4.2.4) More...
 
uint32_t adf7030_1__SPI_wr_byte_p_a (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint8_t *pDataIn)
 Write a number of byte(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr". Generic 8bits bloc pointer write to memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of 8bits word to the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_wr_word_b_a (ADI_SPI_HANDLE hSPIDevice, uint32_t AddrIn, uint32_t num_xfrs, uint32_t *pDataIn)
 Write a number of word(s) from Host to memory of the adf7030-1 Generic 32bits bloc address write to memory (HRM 1.4.4.2.3). This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_wr_word_b_p (ADI_SPI_HANDLE hSPIDevice, ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pntrID, uint32_t num_xfrs, uint32_t *pDataIn)
 Write a number of word(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr" Generic 32bits bloc pointer write to memory (HRM 1.4.4.2.5/9) This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE). More...
 
uint32_t adf7030_1__SPI_wr_word_r_a (ADI_SPI_HANDLE hSPIDevice, uint32_t AddrIn, uint32_t *pHostOffset, uint32_t *pAddrIn, uint32_t *pDataIn, uint32_t num_xfrs)
 Write a number of word(s) from Host to memory of the adf7030-1 Generic 32bits random address write to memory (HRM 1.4.4.2.7). This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE). More...
 

Variables

uint32_t ADF7030_1_SPI_PNTR [8]
 
ADI_SPI_HANDLE hSPIDevice
 
uint8_t spi_rxbuf [ADF7030_1_SPI_BUFFER_SIZE]
 
uint8_t spi_txbuf [ADF7030_1_SPI_BUFFER_SIZE]
 
uint8_t SPIMem [ADI_SPI_MEMORY_SIZE]
 

Detailed Description

Macro Definition Documentation

#define ADF7030_1_SPI_BUFFER_SIZE   256u

define size of data buffers, DMA max size is 255 ( 8bytes max used for command framing in word transfert ) 32bits trx = 62 8bits trx = 252

Definition at line 22 of file adf7030-1__spi.h.

Enumeration Type Documentation

Enumeration of different SPI pointer type

Definition at line 48 of file adf7030-1__spi.h.

Enumeration of Host SPI transaction type

Definition at line 60 of file adf7030-1__spi.h.

Function Documentation

uint32_t adf7030_1__SPI_Block_Xfer ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  cmdOffset,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  PNTR_ID,
uint32_t  Addr,
uint32_t  nbBytes,
void *  pDataIO,
void *  pDataRef 
)

Generic function to read or write a number of bytes between the Host and the PHY adf703x.

Note
If the number of bytes to be transfered exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut down into smaller sub spi transaction until the transfer operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]cmdOffsetLocation within the spitx_buff where the spi command byte is located.
[in]PNTR_IDSPI pointer ID to use as base address for writing the block of data.
[in]AddrInAddress location at which the SPI write should start transfert in the PHY.
[in]nbBytesNumber of bytes to read or write to be performed. If nbBytes is bigger than ADI_SPI_MEMORY_SIZE, the custom spi pntr0 will be used to transfert the data. The shadow ADF7030_1_SPI_PNTR[PNTR_CUSTOM0_ADDR] and the PHY value (in the radio) will be restored to there original value.
[in|out]pDataIO Pointer to the start of the Host data block. On exit, pDataIO is pointing nbBytes away from its original value.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 1003 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_rd_cmp_byte_b_a(), adf7030_1__SPI_rd_cmp_byte_p_a(), adf7030_1__SPI_rd_cmp_word_b_a(), adf7030_1__SPI_rd_cmp_word_b_p(), adf7030_1__SPI_wr_byte_b_a(), adf7030_1__SPI_wr_byte_p_a(), adf7030_1__SPI_wr_word_b_a(), and adf7030_1__SPI_wr_word_b_p().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_byte_block_transaction ( ADI_SPI_HANDLE *  hSPIDevice,
uint32_t  offset,
uint32_t  nb_bytes,
uint8_t *  pDataIO,
uint8_t *  pDataRef 
)

Generic SPI Block Read/Write a number of byte(s) to the adf7030-1.

Note
Blocking SPI transfert without DMA.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]offsetByte location from where the spi frame starts in the spi_txbuf.
[in]nb_byteNumber of Byte(s) transfert.
[in,out]pDataIOIn TX, data is read from address pointed by pDataIO. In RX, data is written back at address pointed by pDataIO.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 1322 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Block_Xfer().

Here is the caller graph for this function:

void adf7030_1__SPI_FindMMapPointer ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  Addr,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE pPNTR_ID,
int32_t *  ByteOffset 
)

This function return the best Pointer id + offset for subsequent SPI transfert to the PHY "Addr" provided.

Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrDesired Radio PHY address.
[out]pPNTR_IDPointer to PNTR_ID variable to access "Addr" location of mmap eg. ADF7030_1_SPI_PNTR[PNTR_CUSTOM0_ADDR].
[out]ByteOffsetPointer to the positive byte offset variable between "Addr" and ADF7030_1_SPI_PNTR[pPNTR_ID].
Returns
None

Definition at line 247 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), adf7030_1_ReadPatchInfo(), and adf7030_1_WritePatchInfo().

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_GetMMapPointers ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t *  pPNTR 
)

Get SPI Radio mmap pointers access.

Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[out]pPNTRPointer to location of mmap user defined pointer 0 eg. ADF7030_1_SPI_PNTR[PNTR_CUSTOM0_ADDR].
Returns
Status
  • #SUCCESS If the readback of mmap pointers was succesfull.
  • #FAILURE [D] If the readback failed.

Definition at line 221 of file adf7030-1__spi.c.

Here is the call graph for this function:

uint32_t adf7030_1__SPI_Init ( void  )

Initializes SPI device for communication with the adf7030-1 PHY.

Note
This function open the SPI peripheral in "blocking mode" without DMA transfert assistance. blablabla...
Returns
Status
  • #SUCCESS If SPI peripheral was succesfully initialise
  • #FAILURE [D] SPI peripheral failed to initialise
See also
adf7030_1__SPI_UnInit().

Definition at line 83 of file adf7030-1__spi.c.

uint32_t adf7030_1__SPI_rd_byte_b_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint8_t *  pDataOut 
)

Read a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" + AddrIn offset Generic 8bits bloc address read from memory (HRM 1.4.4.2.4)

Note
If the number of bytes to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]AddrInAddress location at which the SPI read should start.
[in]num_xfrsNumber of bytes read to be performed.
[out]pDataOutPointer to the data block to be transmitted.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 673 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_GetBytes(), adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferCmd(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), and adf7030_1_ReadPatchInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_byte_p_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint8_t *  pDataOut 
)

Read a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 8bits bloc pointer read from memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of unaligned data to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of bytes to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]num_xfrsNumber of byte write to be performed.
[out]pDataOutPointer to the data block to be transmitted.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 814 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), and adf7030_1_ReadPatchInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_cmp_byte_b_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint8_t *  pDataOut,
uint8_t *  pDataRef 
)

Read & Compare a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" + AddrIn offset Generic 8bits bloc address read from memory (HRM 1.4.4.2.4)

Note
If the number of bytes to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]AddrInAddress location at which the SPI read should start.
[in]num_xfrsNumber of bytes read to be performed.
[out]pDataOutPointer to the data block to be transmitted.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 718 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_rd_byte_b_a(), adf7030_1__XferConfig(), and adf7030_1__XferPatch().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_cmp_byte_p_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint8_t *  pDataOut,
uint8_t *  pDataRef 
)

Read & Compare a number of bytes(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 8bits bloc pointer read from memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of unaligned data to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of bytes to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]num_xfrsNumber of byte write to be performed.
[out]pDataOutPointer to the data block to be transmitted.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 857 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_rd_byte_p_a(), adf7030_1__XferConfig(), and adf7030_1__XferPatch().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_cmp_word_b_a ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint32_t *  pDataOut,
uint32_t *  pDataRef 
)

Read & Compare a number of word(s) from the adf7030-1 to memory of Host Generic 32bits bloc address read from memory (HRM 1.4.4.2.3). This Function should be used when reading a large block of 32bits word from the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of words to read exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the reading operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrInAddress location at which the SPI write should start.
[in]num_xfrsNumber of 32bits word write to be performed.
[out]pDataOutPointer to the write back location in the host. On exit, pDataOut is pointing at the location of the AddrIn + num_xfrs of the host memory.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 437 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_rd_word_b_a(), and adf7030_1__XferConfig().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_cmp_word_b_p ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint32_t *  pDataOut,
uint32_t *  pDataRef 
)

Read & Compare a number of word(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 32bits bloc pointer read from memory (HRM 1.4.4.2.5/9)

Note
If the number of words to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]num_xfrsNumber of 32bits word read to be performed.
[out]pDataOutPointer to the write back location in the host.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 574 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_rd_word_b_p().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_word_b_a ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint32_t *  pDataOut 
)

Read a number of word(s) from the adf7030-1 to memory of Host Generic 32bits bloc address read from memory (HRM 1.4.4.2.3). This Function should be used when reading a large block of 32bits word from the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of words to read exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the reading operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrInAddress location at which the SPI write should start.
[in]num_xfrsNumber of 32bits word write to be performed.
[out]pDataOutPointer to the write back location in the host. On exit, pDataOut is pointing at the location of the AddrIn + num_xfrs of the host memory.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 392 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Xfer_Mem(), and adf7030_1__XferConfig().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_rd_word_b_p ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint32_t *  pDataOut 
)

Read a number of word(s) from memory of the adf7030-1 to Host starting at location pointed by "pntr" Generic 32bits bloc pointer read from memory (HRM 1.4.4.2.5/9)

Note
If the number of words to be received exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]num_xfrsNumber of 32bits word read to be performed.
[out]pDataOutPointer to the write back location in the host.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 532 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_GetBytes(), adf7030_1__SPI_GetMMapPointers(), and adf7030_1__SPI_Xfer_Mem().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_SetMMapCustomPntr0 ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  Addr 
)

Change the SPI Radio mmap custom pointers 0 location.

Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrValue of the ADF7030_1_SPI_PNTR[PNTR_CUSTOM0_ADDR].
Returns
Status
  • #SUCCESS If the "Addr" is within range for the SPI transfer.
  • #FAILURE [D] If no PointerID is available.

Definition at line 299 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), adf7030_1_ReadPatchInfo(), and adf7030_1_WritePatchInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_SetMMapPointers ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t *  pPNTR 
)

Set SPI Radio mmap pointers access.

Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pPNTRPointer to location of mmap user defined pointer 0 eg. ADF7030_1_SPI_PNTR[PNTR_CUSTOM0_ADDR].
Returns
Status
  • #SUCCESS If the configuration of mmap pointers was succesfull.
  • #FAILURE [D] If the configuration of mmap pointers failed.

Definition at line 199 of file adf7030-1__spi.c.

Here is the call graph for this function:

uint32_t adf7030_1__SPI_SetSpeed ( const uint32_t  RateHz)

Change SPI Host to PHY Communication bitrate.

Note
Default speed is set to 3.5MBps, anything faster should really used DMA operation mode which is corrently not supported
Parameters
[in]RateHzTarget bitrate (in Hz) for SPI communication.
Returns
Status
  • #SUCCESS If SPI peripheral was succesfully released
  • #FAILURE [D] SPI peripheral failed to release
See also
adi_spi_SetBitrate().

Definition at line 173 of file adf7030-1__spi.c.

uint32_t adf7030_1__SPI_UnInit ( void  )

Uninitializes SPI device used to communication with the adf7030-1 PHY.

Note
This function release and deallocate memory used by the SPI peripheral
Returns
Status
  • #SUCCESS If SPI peripheral was succesfully released
  • #FAILURE [D] SPI peripheral failed to release
See also
adf7030_1__SPI_Init().

Definition at line 146 of file adf7030-1__spi.c.

uint32_t adf7030_1__SPI_word_block_transaction ( ADI_SPI_HANDLE *  hSPIDevice,
uint32_t  offset,
uint32_t  nb_word,
uint32_t *  pDataIO,
uint32_t *  pDataRef 
)

Generic SPI Block Read/Write a number of words(s) to the adf7030-1.

Note
Blocking SPI transfert without DMA.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]offsetByte location from where the spi frame starts in the spi_txbuf.
[in]nb_wordNumber of Word(s) transfert.
[in,out]pDataIOIn TX, data is read from address pointed by pDataIO. In RX, data is written back at address pointed by pDataIO.
[in]pDataRefPointer to the start of the Ref Host data block. If set, the SPI readback data will be compared with the data pointed by pDataRef. This can be used to compare data between Host and PHY directly within the readback.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 1190 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Block_Xfer().

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_word_random_transaction ( ADI_SPI_HANDLE *  hSPIDevice,
uint32_t  offset,
uint32_t  nb_word,
uint32_t *  pRemoteAddrIO,
uint32_t *  pHostDataIO,
bool  pHostDataIO_isArray 
)

Generic SPI Random Read/Write a number of words(s) to the adf7030-1.

Note
Blocking SPI transfert without DMA.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]offsetByte location from where the spi frame starts in the spi_txbuf.
[in]nb_wordNumber of Word(s) transfert.
[in,out]pDataIOIn TX, data is read from address pointed by pDataIO. In RX, data is written back at address pointed by pDataIO.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 1485 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_wr_word_r_a().

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_wr_byte_b_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint8_t *  pDataIn 
)

Write a number of byte(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr" + AddrIn Generic 8bits bloc address write to memory (HRM 1.4.4.2.4)

Note
If the number of bytes to be transmitted exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for writing the block of data.
[in]AddrInAddress location at which the SPI write should start.
[in]num_xfrsNumber of byte write to be performed.
[in]pDataInPointer to the data block to be transmitted.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 624 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_SetBytes(), adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferCfgSeq(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), and adf7030_1_WritePatchInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_wr_byte_p_a ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint8_t *  pDataIn 
)

Write a number of byte(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr". Generic 8bits bloc pointer write to memory (HRM 1.4.4.2.6/10) This Function should be used when writing a large block of 8bits word to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of bytes to be transmitted exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for reading the block of data.
[in]num_xfrsNumber of byte write to be performed.
[in]pDataInPointer to the data block to be transmitted.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.

Definition at line 770 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferCfgSeq(), adf7030_1__XferConfig(), adf7030_1__XferPatch(), and adf7030_1_WritePatchInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_wr_word_b_a ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  AddrIn,
uint32_t  num_xfrs,
uint32_t *  pDataIn 
)

Write a number of word(s) from Host to memory of the adf7030-1 Generic 32bits bloc address write to memory (HRM 1.4.4.2.3). This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of words to be transfered exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrInAddress location at which the SPI write should start.
[in]num_xfrsNumber of 32bits word write to be performed.
[in]pDataInPointer to the data block to be transmitted. On exit, pDataIn is pointing at the location of the AddrIn + num_xfrs of the host memory.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 343 of file adf7030-1__spi.c.

Referenced by adf7030_1__EjectPatch(), adf7030_1__InjectPatch(), adf7030_1__SPI_Xfer_Mem(), adf7030_1__XferCfgSeq(), and adf7030_1__XferConfig().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_wr_word_b_p ( ADI_SPI_HANDLE  hSPIDevice,
ADI_ADF7030_1_RADIO_SPI_PNTR_TYPE  pntrID,
uint32_t  num_xfrs,
uint32_t *  pDataIn 
)

Write a number of word(s) from Host to memory of the adf7030-1 starting at location pointed by "pntr" Generic 32bits bloc pointer write to memory (HRM 1.4.4.2.5/9) This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of words to be transfered exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow or boundary check is done.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]pntrIDSPI pointer ID to use as base address for writing the block of data.
[in]num_xfrsNumber of 32bits word write to be performed.
[in]pDataInPointer to the data block to be transmitted.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 488 of file adf7030-1__spi.c.

Referenced by adf7030_1__SPI_Block_Xfer(), adf7030_1__SPI_GetBytes(), adf7030_1__SPI_SetBytes(), adf7030_1__SPI_SetMMapCustomPntr0(), adf7030_1__SPI_SetMMapPointers(), adf7030_1__SPI_Xfer_Mem(), and adf7030_1__XferCfgSeq().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t adf7030_1__SPI_wr_word_r_a ( ADI_SPI_HANDLE  hSPIDevice,
uint32_t  AddrIn,
uint32_t *  pHostOffset,
uint32_t *  pAddrIn,
uint32_t *  pDataIn,
uint32_t  num_xfrs 
)

Write a number of word(s) from Host to memory of the adf7030-1 Generic 32bits random address write to memory (HRM 1.4.4.2.7). This Function should be used when writing a large block of 32bits word to the radio (above ADI_SPI_MEMORY_SIZE).

Note
If the number of words to be transfered exceeds the maximum SPI buffer size allocated, the spi transfert is automatically cut into smaller sub spi transaction until the writting operation is completed. No buffer owerflow checking.
Parameters
[in]hSPIDeviceHandle to Glue SPI peripheral device used to communicate with the adf7030-1.
[in]AddrInAddress location (of the Radio) at which the SPI write should start writing words.
[in]pDataInOffsetPointer to the word alligned offset buffer.
[in]pDataInPointer to the memory block from which data will be transfert according to the offset value. phy_data[AddrIn + AddrOffset] = pDataIn[AddrOffset]. On exit, pDataIn is pointing at the address of the last transfered word on the host memory.
[in]num_xfrsNumber of 32bits word write to be performed.
Returns
Status
  • #SUCCESS If the transfert was succesfull to the adf7030-1.
  • #FAILURE [D] If the transfert failed.
See also
blabla()

Definition at line 913 of file adf7030-1__spi.c.

Here is the call graph for this function: