precision-converters-firmware
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
app_config.h File Reference

Application configurations module for AD3530R. More...

#include <stdint.h>
#include "common.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 STM32_PLATFORM   1
 
#define SPI_DMA   0
 
#define SPI_INTERRUPT   1
 
#define CYCLIC_STREAM   0
 
#define ARBITRARY_STREAM   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define ACTIVE_DEVICE_NAME   "ad3530r"
 
#define ACTIVE_PLATFORM   STM32_PLATFORM
 
#define DATA_STREAM_MODE   CYCLIC_STREAM
 
#define USE_VIRTUAL_COM_PORT
 
#define INTERFACE_MODE   SPI_DMA
 
#define HW_MEZZANINE_NAME   "EVAL-AD3530RARDZ"
 
#define DAC_RESOLUTION   16
 
#define DAC_CHANNELS   8
 
#define DAC_REF_VOLTAGE   2.5
 
#define DAC_MAX_COUNT   (uint32_t)((1 << DAC_RESOLUTION) - 1)
 
#define FIRMWARE_NAME   "ad353xr_iio"
 
#define DEVICE_NAME   "DEV_AD3530R"
 
#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 IIO_UART_BAUD_RATE   (230400)
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#define CONV_TRIGGER_PERIOD_NSEC(x)   (((float)(1.0 / x) * 1000000) * 1000)
 
#define CONV_TRIGGER_DUTY_CYCLE_NSEC(x, y)   (((float)y / 100) * CONV_TRIGGER_PERIOD_NSEC(x))
 

Functions

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

Variables

struct no_os_pwm_desc * pwm_desc
 
struct no_os_uart_desc * uart_iio_com_desc
 
struct no_os_gpio_desc * trigger_gpio_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 
struct no_os_spi_init_param spi_init_params
 
struct no_os_eeprom_desc * eeprom_desc
 
struct no_os_pwm_init_param pwm_init_params
 
struct no_os_gpio_desc * csb_gpio_desc
 
struct no_os_pwm_desc * tx_trigger_desc
 
struct no_os_dma_init_param ad3530r_dma_init_param
 
struct no_os_gpio_init_param pwm_gpio_params
 

Detailed Description

Application configurations module for AD3530R.

Copyright (c) 2022-25 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   "ad3530r"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   STM32_PLATFORM

◆ ARBITRARY_STREAM

#define ARBITRARY_STREAM   1

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONV_TRIGGER_DUTY_CYCLE_NSEC

#define CONV_TRIGGER_DUTY_CYCLE_NSEC (   x,
 
)    (((float)y / 100) * CONV_TRIGGER_PERIOD_NSEC(x))

◆ CONV_TRIGGER_PERIOD_NSEC

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

◆ CYCLIC_STREAM

#define CYCLIC_STREAM   0

◆ DAC_CHANNELS

#define DAC_CHANNELS   8

◆ DAC_MAX_COUNT

#define DAC_MAX_COUNT   (uint32_t)((1 << DAC_RESOLUTION) - 1)

◆ DAC_REF_VOLTAGE

#define DAC_REF_VOLTAGE   2.5

◆ DAC_RESOLUTION

#define DAC_RESOLUTION   16

◆ DATA_STREAM_MODE

#define DATA_STREAM_MODE   CYCLIC_STREAM

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD3530R"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad353xr_iio"

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD3530RARDZ"

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ INTERFACE_MODE

#define INTERFACE_MODE   SPI_DMA

◆ SPI_DMA

#define SPI_DMA   0

◆ SPI_INTERRUPT

#define SPI_INTERRUPT   1

◆ STM32_PLATFORM

#define STM32_PLATFORM   1

◆ STR

#define STR (   s)    XSTR(s)

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

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ 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

◆ ad3530r_dma_init_param

struct no_os_dma_init_param ad3530r_dma_init_param
extern

◆ csb_gpio_desc

struct no_os_gpio_desc* csb_gpio_desc
extern

◆ eeprom_desc

struct no_os_eeprom_desc* eeprom_desc
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

◆ spi_init_params

struct no_os_spi_init_param spi_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_iio_com_desc

struct no_os_uart_desc* uart_iio_com_desc
extern