Warmboot can be used in TES but can't be used to generate C99 code for warmboot due to the evaluation system limitations. In this document, a code sample of how you might use warmboot via APIs. Warmboot is detailed in greater detail in our User Guide.
There are two types of warmboot APIs: memory optimised and non-memory optimised. The ‘Max Array’ functions are the non-memory optimised version and the ‘Unique Array’ is the memory optimised version. In this document we will use the memory optimised functions.
The warmboot APIs are shown below and detailed more extensively in the doxygen file that comes with our SDK.

To use these, the general steps are:
- Use the adi_adrv9001_cals_InitCals_WarmBoot_UniqueEnabledCals_Get() function to calculate the memory requirements
- Assign the correct amount of memory as calculated
- Use the adi_adrv9001_cals_InitCals_WarmBoot_Coefficients_UniqueArray_Get/Set() functions to set and get wb coefficients to/from the assigned memory location
This should have much lower memory requirements than the non-memory optimised version.
A code snippet is shown below. This code snippet is an edited version of the auto-generated 'main.c' C99 code from TES. This file was used to replace the 'main.c' file and compiled and run in a similar fashion to as described here. An example method of reading and writing the coefficients to a binary file is also included. This may be useful if you intend to load calibrations that were stored previously.
|
/* This file contains code automatically generated by a machine. */
/* Transceiver Name: ADRV9002*/
#include "initialize.h"
int main()
adi_adrv9001_Device_t * adrv9001Device_0 = (adi_adrv9001_Device_t *) calloc(1, sizeof(adi_adrv9001_Device_t));
adi_fpga9001_Device_t * fpga9001Device_0 = (adi_fpga9001_Device_t *) calloc(1, sizeof(adi_fpga9001_Device_t));
error_code = linux_uio_initialize(adrv9001Device_0, fpga9001Device_0, NULL, NULL, NULL, NULL, NULL);
error_code = initialize(adrv9001Device_0, fpga9001Device_0);
error_code = calibrate(adrv9001Device_0);
adi_adrv9001_InitCals_t initCals = {
adi_adrv9001_Warmboot_CalNumbers_t calNumbers = {};
free(wb_memStartAddress_get);
error_code = adi_adrv9001_HwReset(adrv9001Device_0);
//7. Wb cal
error_code = calibrate(adrv9001Device_0);
error_code = prime(adrv9001Device_0);
error_code = beginReceiving(adrv9001Device_0, fpga9001Device_0);
error_code = dataCapture(fpga9001Device_0);
error_code = stopReceiving(fpga9001Device_0);
error_code = beginTransmitting(adrv9001Device_0, fpga9001Device_0);
error_code = stopTransmitting(fpga9001Device_0);
return error_code; |