EasyManuals Logo

Analog Devices ADRV9001 User Manual

Analog Devices ADRV9001
338 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
Page #40 background imageLoading...
Page #40 background image
UG-1828 Preliminary Technical Data
Rev. PrC | Page 40 of 338
delay(1);
bcm2835_gpio_write(CE_PIN, HIGH);
return 0;
}
int32_t customer_adi_adrv9001_hal_resetbPin_set(void *devHalCfg, uint8_t pinLevel)
{
/* Customer code goes here */
if (pinLevel == 1){
bcm2835_gpio_write(RESET_PIN, HIGH);
}else{
bcm2835_gpio_write(RESET_PIN, LOW);
}
return 0;
}
In this example of the Raspberry Pi platform the Makefile must also be altered to suit. As this example uses the bcm2835 library, an
additional link must be made in the Makefile, as shown here:
-lm -lbcm2835 -lpthread
This link will allow the compiler to access the bcm2835 library, provided it is installed correctly on the Raspberry Pi. Similar measures will
need to be taken on a customer platform if additional libraries are needed for control of their platform.
Once the auto-generated code has been verified as operational, and then modified to suit the customers platform, it is safe to remove all
files, folders and function calls (including print statements that are not needed) containing code that does not pertain to the customer’s
platform. Doing so requires that the customer is certain that all calls to the removed functions have been replaced by their bespoke code or
removed altogether. Once finished, again review the Makefile and remove any unnecessary links and includes from the compilation process.
API Error Handling and Debug
Logging Functions
The API provides a simple logging feature function that may be enabled for debugging purposes. Available logging levels are given by
adi_common_LogLevel_e as shown in Table 11.
Table 11. Logging Level
Function Name Purpose
ADI_LOGLEVEL_TRACE Log everything in exhaustive detail. Used only for development
ADI_LOGLEVEL_DEBUG Log diagnostic information
ADI_LOGLEVEL_INFO Log state changes in the application
ADI_LOGLEVEL_WARN Log bad, but recoverable events
ADI_LOGLEVEL_ERROR Log events that cannot be recovered from
ADI_LOGLEVEL_FATAL Log events that are likely to be fatal
ADI_LOGLEVEL_NONE Disable all logging
When logging is enabled, the APIs log various messages to the system via the HAL. This feature requires an implementation for the
customer_LogWrite function. To enable logging, set #define ADI_COMPILED_LOGLEVEL to one of the defined log levels other than
ADI_LOGLEVEL_NONE. Any log initialization (e.g., opening files) must be done by the application before calling any APIs, or messages
will not be logged properly. Log levels increase in severity numerically. When a given level is used, messages logged with a log level at least
as severe (greater than or equal to) as the set level will be published. Less severe logging calls will be compiled out of the API. By default,
ADI_COMPILED_LOGLEVEL is set to ADI_LOGLEVEL_WARN, which means that only messages with severities of
ADI_LOGLEVEL_WARN, ADI_LOGLEVEL_ERROR, and ADI_LOGLEVEL_FATAL will be included. Log levels are passed to

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Analog Devices ADRV9001 and is the answer not in the manual?

Analog Devices ADRV9001 Specifications

General IconGeneral
BrandAnalog Devices
ModelADRV9001
CategoryTransceiver
LanguageEnglish

Related product manuals