precision-converters-firmware
Loading...
Searching...
No Matches
Macros | Functions | Variables
app_config.h File Reference

Configuration file for AD4692 device applications. More...

#include <stdint.h>
#include "common_macros.h"
#include "app_config_stm32.h"
Include dependency graph for app_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define USE_VIRTUAL_COM_PORT
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define DEV_AD4692
 
#define ACTIVE_DEVICE_NAME   "ad4692"
 
#define NO_OF_CHANNELS   16
 
#define HW_MEZZANINE_NAME   "EVAL-AD4692-ARDZ"
 
#define AD4692_AS_SLOT_REG(n)   (0x100 + (n))
 
#define ADC_RESOLUTION   16
 
#define FIRMWARE_NAME   "ad4692_iio"
 
#define IIO_UART_BAUD_RATE   (230400)
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#define USE_SDRAM
 
#define BYTES_PER_SAMPLE   sizeof(uint16_t)
 
#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)
 
#define CONV_TRIGGER_PERIOD_NSEC(x)   (((float)(1.0 / x) * 1000000) * 1000)
 
#define CONV_TRIGGER_DUTY_CYCLE_NSEC(x)   (CONV_TRIGGER_PERIOD_NSEC(x) / 10)
 
#define AD4692_VREF   4096000
 
#define AD4692_SHIFT_N   3
 
#define CNV_ON_TIME   50
 
#define N_CYCLE_OFFSET   2
 
#define NUM_OF_IIO_DEVICES   2
 

Functions

int32_t init_system (void)
 Initialize the system peripherals.
 
int init_gpio (void)
 Initialize the GPIO peripheral.
 
int init_pwm (void)
 Initialize the PWM interface.
 
void ad4692_data_capture_callback (void *ctx)
 Interrupt Service Routine to monitor end of conversion event.
 
int32_t init_interrupt (void)
 Initialize the IRQ contoller.
 

Variables

struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_gpio_desc * cnv_gpio_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_pwm_desc * tx_trigger_desc
 
struct no_os_pwm_desc * spi_burst_pwm_desc
 
struct no_os_pwm_init_param pwm_spi_burst_init
 
struct no_os_irq_init_param trigger_gpio_irq_params
 

Detailed Description

Configuration file for AD4692 device applications.

Copyright (c) 2024, 2026 Analog Devices, Inc.

All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad4692"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ AD4692_AS_SLOT_REG

#define AD4692_AS_SLOT_REG (   n)    (0x100 + (n))

◆ AD4692_SHIFT_N

#define AD4692_SHIFT_N   3

◆ AD4692_VREF

#define AD4692_VREF   4096000

◆ ADC_RESOLUTION

#define ADC_RESOLUTION   16

◆ BYTES_PER_SAMPLE

#define BYTES_PER_SAMPLE   sizeof(uint16_t)

◆ CHN_STORAGE_BITS

#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)

◆ CNV_ON_TIME

#define CNV_ON_TIME   50

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONV_TRIGGER_DUTY_CYCLE_NSEC

#define CONV_TRIGGER_DUTY_CYCLE_NSEC (   x)    (CONV_TRIGGER_PERIOD_NSEC(x) / 10)

◆ CONV_TRIGGER_PERIOD_NSEC

#define CONV_TRIGGER_PERIOD_NSEC (   x)    (((float)(1.0 / x) * 1000000) * 1000)

◆ DEV_AD4692

#define DEV_AD4692

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad4692_iio"

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD4692-ARDZ"

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ N_CYCLE_OFFSET

#define N_CYCLE_OFFSET   2

◆ NO_OF_CHANNELS

#define NO_OF_CHANNELS   16

◆ NUM_OF_IIO_DEVICES

#define NUM_OF_IIO_DEVICES   2

◆ STR

#define STR (   s)    XSTR(s)

◆ USE_SDRAM

#define USE_SDRAM

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ ad4692_data_capture_callback()

void ad4692_data_capture_callback ( void *  ctx)

Interrupt Service Routine to monitor end of conversion event.

Parameters
ctx[in]- Callback context (unused)
Returns
none
Note
Callback registered for the the DRDY interrupt to indicate end of conversion in case of burst data capturing with SPI operation.

◆ init_gpio()

int init_gpio ( void  )

Initialize the GPIO peripheral.

Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ init_interrupt()

int32_t init_interrupt ( void  )

Initialize the IRQ contoller.

Returns
0 in case of success, negative error code otherwise

Initialize the IRQ contoller.

Returns
0 in case of success, negative error code otherwise.

This function initialize the interrupts for system peripherals.

Returns
0 in case of success, negative error code otherwise

This function initialize the interrupts for system peripherals

Here is the caller graph for this function:

◆ init_pwm()

int init_pwm ( void  )

Initialize the PWM interface.

Returns
0 in case of success, negative error code otherwise.

Initialize the PWM interface.

Returns
0 in case of success, negative error code otherwise

Initialize the PWM interface.

Returns
0 in case of success, negative error code otherwise.

◆ init_system()

int32_t init_system ( void  )

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise.

This function initializes system peripherals for the application

Returns
- 0 in case of success, negative error code otherwise

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise.

Variable Documentation

◆ cnv_gpio_desc

struct no_os_gpio_desc* cnv_gpio_desc
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ pwm_spi_burst_init

struct no_os_pwm_init_param pwm_spi_burst_init
extern

◆ spi_burst_pwm_desc

struct no_os_pwm_desc* spi_burst_pwm_desc
extern

◆ trigger_gpio_irq_params

struct no_os_irq_init_param trigger_gpio_irq_params
extern

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ tx_trigger_desc

struct no_os_pwm_desc* tx_trigger_desc
extern

◆ uart_console_stdio_desc

struct no_os_uart_desc* uart_console_stdio_desc
extern

◆ uart_iio_com_desc

struct no_os_uart_desc* uart_iio_com_desc
extern