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

Configuration file for AD4080 IIO firmware application. More...

#include <stdint.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 STM32_PLATFORM   1
 
#define BUSRT_DATA_CAPTURE   0
 
#define CONTINUOUS_DATA_CAPTURE   1
 
#define OSC_40M   0
 
#define OSC_20M   1
 
#define OSC_10M   2
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_DEVICE_NAME   "ad4080"
 
#define FIRMWARE_NAME   "ad4080_iio"
 
#define DEVICE_NAME   "DEV_AD4080"
 
#define HW_MEZZANINE_NAME   "EVAL-AD4080ARDZ"
 
#define NUMBER_OF_CHANNELS   1
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define ACTIVE_OSC   OSC_40M
 
#define OSC_40M_DEFAULT_STATE   NO_OS_GPIO_HIGH
 
#define OSC_20M_DEFAULT_STATE   NO_OS_GPIO_LOW
 
#define OSC_10M_DEFAULT_STATE   NO_OS_GPIO_LOW
 
#define config_spi_extra_init_params   stm32_config_spi_extra_init_params
 
#define data_spi_extra_init_params   stm32_data_spi_extra_init_params
 
#define data_qspi_extra_init_params   stm32_data_qspi_extra_init_params
 
#define uart_extra_init_params   stm32_uart_extra_init_params
 
#define vcom_extra_init_params   stm32_vcom_extra_init_params
 
#define gpio_xtal_osc_en_extra_init_params   stm32_gpio_xtal_osc_en_init_params
 
#define gpio_gp1_extra_init_params   stm32_gpio_gp1_init_params
 
#define gpio_gp2_extra_init_params   stm32_gpio_gp2_init_params
 
#define gpio_gp3_extra_init_params   stm32_gpio_gp3_init_params
 
#define gpio_40m_osc_extra_init_params   stm32_gpio_40m_osc_init_params
 
#define gpio_20m_osc_extra_init_params   stm32_gpio_20m_osc_init_params
 
#define gpio_10m_osc_extra_init_params   stm32_gpio_10m_osc_init_params
 
#define gpio_afe_ctrl_extra_init_params   stm32_gpio_afe_ctrl_init_params
 
#define i2c_extra_init_params   stm32_i2c_extra_init_params
 
#define gpio_ops   stm32_gpio_ops
 
#define spi_ops   stm32_spi_ops
 
#define xspi_ops   stm32_xspi_ops
 
#define uart_ops   stm32_uart_ops
 
#define vcom_ops   stm32_usb_uart_ops
 
#define i2c_ops   stm32_i2c_ops
 
#define DATA_CAPTURE_MODE   BURST_DATA_CAPTURE
 
#define USE_VIRTUAL_COM_PORT
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#define AD4080_CNV_CLK_FREQ_HZ   (40000000/(NO_OS_BIT(ACTIVE_OSC)))
 
#define AD4080_ADC_RESOLUTION_BITS   20
 
#define AD4080_SIGN_EXTENDED_RESOLUTION_BITS    (AD4080_ADC_RESOLUTION_BITS + 4)
 
#define AD4080_SIGN_EXTENDED_RESOLUTION_BYTES    (AD4080_SIGN_EXTENDED_RESOLUTION_BITS / 8)
 
#define ADC_REF_VOLTAGE   3
 
#define AD4080_SIGN_EXT_BITS   4
 
#define ADC_MAX_COUNT   (uint32_t)(1 << (AD4080_ADC_RESOLUTION_BITS - 1))
 
#define IIO_UART_BAUD_RATE   (230400)
 
#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))
 

Functions

int32_t init_system (void)
 Initialize the system peripherals.
 

Variables

struct no_os_gpio_desc * gpio_afe_ctrl_desc
 
struct no_os_gpio_desc * gpio_gp1_desc
 
struct no_os_gpio_desc * gpio_gp2_desc
 
struct no_os_gpio_desc * gpio_gp3_desc
 
struct no_os_gpio_desc * gpio_xtal_osc_en_desc
 
struct no_os_gpio_desc * gpio_osc_en_40m_desc
 
struct no_os_gpio_desc * gpio_osc_en_20m_desc
 
struct no_os_gpio_desc * gpio_osc_en_10m_desc
 
struct no_os_spi_init_param config_spi_init_params
 
struct no_os_spi_init_param data_spi_init_params
 
struct no_os_uart_desc * uart_iio_comm_desc
 
struct no_os_eeprom_desc * eeprom_desc
 

Detailed Description

Configuration file for AD4080 IIO firmware application.

Copyright (c) 2023-25 Analog Devices, Inc.

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   "ad4080"

◆ ACTIVE_OSC

#define ACTIVE_OSC   OSC_40M

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ AD4080_ADC_RESOLUTION_BITS

#define AD4080_ADC_RESOLUTION_BITS   20

◆ AD4080_CNV_CLK_FREQ_HZ

#define AD4080_CNV_CLK_FREQ_HZ   (40000000/(NO_OS_BIT(ACTIVE_OSC)))

◆ AD4080_SIGN_EXT_BITS

#define AD4080_SIGN_EXT_BITS   4

◆ AD4080_SIGN_EXTENDED_RESOLUTION_BITS

#define AD4080_SIGN_EXTENDED_RESOLUTION_BITS    (AD4080_ADC_RESOLUTION_BITS + 4)

◆ AD4080_SIGN_EXTENDED_RESOLUTION_BYTES

#define AD4080_SIGN_EXTENDED_RESOLUTION_BYTES    (AD4080_SIGN_EXTENDED_RESOLUTION_BITS / 8)

◆ ADC_MAX_COUNT

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

◆ ADC_REF_VOLTAGE

#define ADC_REF_VOLTAGE   3

◆ BUSRT_DATA_CAPTURE

#define BUSRT_DATA_CAPTURE   0

◆ config_spi_extra_init_params

#define config_spi_extra_init_params   stm32_config_spi_extra_init_params

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   1

◆ DATA_CAPTURE_MODE

#define DATA_CAPTURE_MODE   BURST_DATA_CAPTURE

◆ data_qspi_extra_init_params

#define data_qspi_extra_init_params   stm32_data_qspi_extra_init_params

◆ data_spi_extra_init_params

#define data_spi_extra_init_params   stm32_data_spi_extra_init_params

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD4080"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad4080_iio"

◆ gpio_10m_osc_extra_init_params

#define gpio_10m_osc_extra_init_params   stm32_gpio_10m_osc_init_params

◆ gpio_20m_osc_extra_init_params

#define gpio_20m_osc_extra_init_params   stm32_gpio_20m_osc_init_params

◆ gpio_40m_osc_extra_init_params

#define gpio_40m_osc_extra_init_params   stm32_gpio_40m_osc_init_params

◆ gpio_afe_ctrl_extra_init_params

#define gpio_afe_ctrl_extra_init_params   stm32_gpio_afe_ctrl_init_params

◆ gpio_gp1_extra_init_params

#define gpio_gp1_extra_init_params   stm32_gpio_gp1_init_params

◆ gpio_gp2_extra_init_params

#define gpio_gp2_extra_init_params   stm32_gpio_gp2_init_params

◆ gpio_gp3_extra_init_params

#define gpio_gp3_extra_init_params   stm32_gpio_gp3_init_params

◆ gpio_ops

#define gpio_ops   stm32_gpio_ops

◆ gpio_xtal_osc_en_extra_init_params

#define gpio_xtal_osc_en_extra_init_params   stm32_gpio_xtal_osc_en_init_params

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD4080ARDZ"

◆ i2c_extra_init_params

#define i2c_extra_init_params   stm32_i2c_extra_init_params

◆ i2c_ops

#define i2c_ops   stm32_i2c_ops

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ NUMBER_OF_CHANNELS

#define NUMBER_OF_CHANNELS   1

◆ OSC_10M

#define OSC_10M   2

◆ OSC_10M_DEFAULT_STATE

#define OSC_10M_DEFAULT_STATE   NO_OS_GPIO_LOW

◆ OSC_20M

#define OSC_20M   1

◆ OSC_20M_DEFAULT_STATE

#define OSC_20M_DEFAULT_STATE   NO_OS_GPIO_LOW

◆ OSC_40M

#define OSC_40M   0

◆ OSC_40M_DEFAULT_STATE

#define OSC_40M_DEFAULT_STATE   NO_OS_GPIO_HIGH

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ spi_ops

#define spi_ops   stm32_spi_ops

◆ STM32_PLATFORM

#define STM32_PLATFORM   1

◆ STR

#define STR (   s)    XSTR(s)

◆ uart_extra_init_params

#define uart_extra_init_params   stm32_uart_extra_init_params

◆ uart_ops

#define uart_ops   stm32_uart_ops

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ vcom_extra_init_params

#define vcom_extra_init_params   stm32_vcom_extra_init_params

◆ vcom_ops

#define vcom_ops   stm32_usb_uart_ops

◆ 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))

◆ xspi_ops

#define xspi_ops   stm32_xspi_ops

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ 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

◆ config_spi_init_params

struct no_os_spi_init_param config_spi_init_params
extern

◆ data_spi_init_params

struct no_os_spi_init_param data_spi_init_params
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
extern

◆ gpio_afe_ctrl_desc

struct no_os_gpio_desc* gpio_afe_ctrl_desc
extern

◆ gpio_gp1_desc

struct no_os_gpio_desc* gpio_gp1_desc
extern

◆ gpio_gp2_desc

struct no_os_gpio_desc* gpio_gp2_desc
extern

◆ gpio_gp3_desc

struct no_os_gpio_desc* gpio_gp3_desc
extern

◆ gpio_osc_en_10m_desc

struct no_os_gpio_desc* gpio_osc_en_10m_desc
extern

◆ gpio_osc_en_20m_desc

struct no_os_gpio_desc* gpio_osc_en_20m_desc
extern

◆ gpio_osc_en_40m_desc

struct no_os_gpio_desc* gpio_osc_en_40m_desc
extern

◆ gpio_xtal_osc_en_desc

struct no_os_gpio_desc* gpio_xtal_osc_en_desc
extern

◆ uart_iio_comm_desc

struct no_os_uart_desc* uart_iio_comm_desc
extern