precision-converters-firmware
Macros | Functions | Variables
app_config.h File Reference

Application configurations module for AD405X. More...

#include <stdint.h>
#include "no_os_gpio.h"
#include "no_os_uart.h"
#include "no_os_irq.h"
#include "no_os_pwm.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 MBED_PLATFORM   1
 
#define STM32_PLATFORM   2
 
#define CONTINUOUS_DATA_CAPTURE   0
 
#define WINDOWED_DATA_CAPTURE   1
 
#define SAMPLE_MODE   0
 
#define BURST_AVERAGING_MODE   1
 
#define AVERAGING_MODE   2
 
#define STRAIGHT_BINARY   0
 
#define TWOS_COMPLEMENT   1
 
#define SPI_DMA   0
 
#define SPI_INTERRUPT   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define USE_VIRTUAL_COM_PORT
 
#define APP_CAPTURE_MODE   WINDOWED_DATA_CAPTURE
 
#define ADC_CAPTURE_MODE   SAMPLE_MODE
 
#define ADC_DATA_FORMAT   TWOS_COMPLEMENT
 
#define INTERFACE_MODE   SPI_DMA
 
#define ACTIVE_DEVICE_NAME   "ad4052"
 
#define DEVICE_NAME   "DEV_AD4052"
 
#define ACTIVE_DEVICE_ID   ID_AD4052
 
#define HW_MEZZANINE_NAME   "EVAL-AD4052-ARDZ"
 
#define ADC_SAMPLE_MODE_RESOLUTION   16
 
#define ADC_AVERAGING_MODE_RESOLUTION   20
 
#define ADC_BURST_AVG_MODE_RESOLUTION   20
 
#define HW_CARRIER_NAME   TARGET_NAME
 
#define trigger_gpio_handle   STM32_DMA_CONT_HANDLE
 
#define TRIGGER_INT_ID   STM32_DMA_CONT_TRIGGER
 
#define DEFAULT_BURST_SAMPLE_RATE   2000000
 
#define ADC_REF_VOLTAGE   2.5
 
#define ADC_MAX_COUNT   (uint32_t)(1 << (ADC_SAMPLE_MODE_RESOLUTION - 1))
 
#define MIN_DATA_CAPTURE_TIME_NS   8000
 
#define MIN_INTERRUPT_OVER_HEAD   3000
 
#define IIO_UART_BAUD_RATE   (230400)
 
#define FIRMWARE_NAME   "ad405x_iio"
 
#define PLATFORM_NAME   HW_CARRIER_NAME
 
#define VIRTUAL_COM_PORT_VID   0x0456
 
#define VIRTUAL_COM_PORT_PID   0xb66c
 
#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 

Functions

int32_t init_pwm (void)
 Initialize the PWM interface. More...
 
int32_t ad405x_gpio_reset (void)
 
int32_t init_system (void)
 Initialize the system peripherals. More...
 

Variables

struct no_os_pwm_desc * pwm_desc
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_uart_desc * uart_console_stdio_desc
 
struct no_os_gpio_desc * trigger_gpio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_gpio_init_param cs_pwm_gpio_params
 
struct no_os_gpio_init_param pwm_gpio_params
 
struct no_os_dma_xfer_desc dma_tx_desc
 
struct no_os_dma_ch dma_chan
 
struct no_os_pwm_init_param cs_init_params
 
struct no_os_pwm_init_param pwm_init_params
 
struct no_os_dma_init_param ad405x_dma_init_param
 
volatile uint32_t * buff_start_addr
 
volatile struct iio_device_data * iio_dev_data_g
 
uint32_t nb_of_samples_g
 
int32_t data_read
 
struct no_os_pwm_desc * tx_trigger_desc
 

Detailed Description

Application configurations module for AD405X.

Copyright (c) 2022-2024 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_ID

#define ACTIVE_DEVICE_ID   ID_AD4052

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad4052"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ ADC_AVERAGING_MODE_RESOLUTION

#define ADC_AVERAGING_MODE_RESOLUTION   20

◆ ADC_BURST_AVG_MODE_RESOLUTION

#define ADC_BURST_AVG_MODE_RESOLUTION   20

◆ ADC_CAPTURE_MODE

#define ADC_CAPTURE_MODE   SAMPLE_MODE

◆ ADC_DATA_FORMAT

#define ADC_DATA_FORMAT   TWOS_COMPLEMENT

◆ ADC_MAX_COUNT

#define ADC_MAX_COUNT   (uint32_t)(1 << (ADC_SAMPLE_MODE_RESOLUTION - 1))

◆ ADC_REF_VOLTAGE

#define ADC_REF_VOLTAGE   2.5

◆ ADC_SAMPLE_MODE_RESOLUTION

#define ADC_SAMPLE_MODE_RESOLUTION   16

◆ APP_CAPTURE_MODE

#define APP_CAPTURE_MODE   WINDOWED_DATA_CAPTURE

◆ AVERAGING_MODE

#define AVERAGING_MODE   2

◆ BURST_AVERAGING_MODE

#define BURST_AVERAGING_MODE   1

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   0

◆ DEFAULT_BURST_SAMPLE_RATE

#define DEFAULT_BURST_SAMPLE_RATE   2000000

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD4052"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad405x_iio"

◆ HW_CARRIER_NAME

#define HW_CARRIER_NAME   TARGET_NAME

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD4052-ARDZ"

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ INTERFACE_MODE

#define INTERFACE_MODE   SPI_DMA

◆ MBED_PLATFORM

#define MBED_PLATFORM   1

◆ MIN_DATA_CAPTURE_TIME_NS

#define MIN_DATA_CAPTURE_TIME_NS   8000

◆ MIN_INTERRUPT_OVER_HEAD

#define MIN_INTERRUPT_OVER_HEAD   3000

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ SAMPLE_MODE

#define SAMPLE_MODE   0

◆ SPI_DMA

#define SPI_DMA   0

◆ SPI_INTERRUPT

#define SPI_INTERRUPT   1

◆ STM32_PLATFORM

#define STM32_PLATFORM   2

◆ STR

#define STR (   s)    XSTR(s)

◆ STRAIGHT_BINARY

#define STRAIGHT_BINARY   0

◆ trigger_gpio_handle

#define trigger_gpio_handle   STM32_DMA_CONT_HANDLE

◆ TRIGGER_INT_ID

#define TRIGGER_INT_ID   STM32_DMA_CONT_TRIGGER

◆ TWOS_COMPLEMENT

#define TWOS_COMPLEMENT   1

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ VIRTUAL_COM_PORT_PID

#define VIRTUAL_COM_PORT_PID   0xb66c

◆ VIRTUAL_COM_PORT_VID

#define VIRTUAL_COM_PORT_VID   0x0456

◆ VIRTUAL_COM_SERIAL_NUM

#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))

◆ WINDOWED_DATA_CAPTURE

#define WINDOWED_DATA_CAPTURE   1

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ ad405x_gpio_reset()

int32_t ad405x_gpio_reset ( void  )

◆ init_pwm()

int32_t 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

◆ 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

Variable Documentation

◆ ad405x_dma_init_param

struct no_os_dma_init_param ad405x_dma_init_param
extern

◆ buff_start_addr

volatile uint32_t* buff_start_addr
extern

◆ cs_init_params

struct no_os_pwm_init_param cs_init_params
extern

◆ cs_pwm_gpio_params

struct no_os_gpio_init_param cs_pwm_gpio_params
extern

◆ data_read

int32_t data_read
extern

◆ dma_chan

struct no_os_dma_ch dma_chan
extern

◆ dma_tx_desc

struct no_os_dma_xfer_desc dma_tx_desc
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ iio_dev_data_g

volatile struct iio_device_data* iio_dev_data_g
extern

◆ nb_of_samples_g

uint32_t nb_of_samples_g
extern

◆ pwm_desc

struct no_os_pwm_desc* pwm_desc
extern

◆ pwm_gpio_params

struct no_os_gpio_init_param pwm_gpio_params
extern

◆ pwm_init_params

struct no_os_pwm_init_param pwm_init_params
extern

◆ trigger_gpio_desc

struct no_os_gpio_desc* trigger_gpio_desc
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