21#include "no_os_gpio.h"
22#include "no_os_uart.h"
33#define CONTINUOUS_DATA_CAPTURE 0
34#define WINDOWED_DATA_CAPTURE 1
37#define STRAIGHT_BINARY 0
38#define TWOS_COMPLEMENT 1
47#if !defined(ACTIVE_PLATFORM)
48#define ACTIVE_PLATFORM STM32_PLATFORM
54#if !defined(USE_PHY_COM_PORT)
55#define USE_VIRTUAL_COM_PORT
59#if !defined(APP_CAPTURE_MODE)
60#define APP_CAPTURE_MODE WINDOWED_DATA_CAPTURE
64#if !defined(ADC_DATA_FORMAT)
65#define ADC_DATA_FORMAT TWOS_COMPLEMENT
68#define ACTIVE_DEVICE_NAME "ad405x"
69#define DEVICE_NAME "DEV_AD405x"
71#if (ACTIVE_PLATFORM == STM32_PLATFORM)
73#define HW_CARRIER_NAME TARGET_NAME
74#define IIO_TRIGGER_HANDLE_SPI 0
75#define TRIGGER_INT_ID_SPI_INTR GP1_PIN_NUM
76#define IIO_TRIGGER_HANDLE_I3C CNV_TIMER_HANDLE
77#define TRIGGER_INT_ID_I3C_INTR CNV_PWM_TIMER_IRQ_ID
79#error "No/Invalid active platform selected"
82#define DEFAULT_BURST_SAMPLE_RATE 2000000
85#define ADC_REF_VOLTAGE 2.5
89#define MIN_DATA_CAPTURE_TIME_NS 8000
93#if (APP_CAPTURE_MODE == CONTINUOUS_DATA_CAPTURE)
94#define MIN_INTERRUPT_OVER_HEAD 4500
96#define MIN_INTERRUPT_OVER_HEAD 3000
100#define IIO_UART_BAUD_RATE (230400)
104#define FIRMWARE_NAME "ad405x_iio"
106#if !defined(PLATFORM_NAME)
107#define PLATFORM_NAME HW_CARRIER_NAME
113#define VIRTUAL_COM_PORT_VID 0x0456
114#define VIRTUAL_COM_PORT_PID 0xb66c
116#define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
124#ifdef USE_PHY_COM_PORT
125#ifdef CONSOLE_STDIO_PORT_AVAILABLE
126#undef CONSOLE_STDIO_PORT_AVAILABLE
131#if defined(SDRAM_SUPPORT_AVAILABLE)
132#define DATA_BUFFER_SIZE SDRAM_SIZE_BYTES
134#ifdef SPI_SUPPORT_AVAILABLE
135#define DATA_BUFFER_SIZE (131072)
136#define DUMMY_DATA_COUNT 0
138#define DATA_BUFFER_SIZE (524288)
139#define DUMMY_DATA_COUNT 1
142#define DATA_BUFFER_SIZE_CONT 64000
146#define STORAGE_BITS_SAMPLE 16
147#define AD4050_SAMPLE_RES 12
148#define AD4052_SAMPLE_RES 16
149#define AD4060_SAMPLE_RES 12
150#define AD4062_SAMPLE_RES 16
152#define STORAGE_BITS_AVG 32
153#define AD4050_AVG_RES 14
154#define AD4052_AVG_RES 20
155#define AD4060_AVG_RES 14
156#define AD4062_AVG_RES 20
159#define BYTES_PER_SAMPLE(x) (x/8)
162#define PWM_PERIOD_TO_FREQUENCY(x) (1000000000.0 / x)
164#define PWM_FREQUENCY_TO_PERIOD(x) PWM_PERIOD_TO_FREQUENCY(x)
174extern struct no_os_pwm_desc *
pwm_desc;
struct no_os_irq_ctrl_desc * trigger_irq_desc
Definition app_config.c:103
int32_t init_system(void)
Initialize the system peripherals.
Definition app_config.c:185
struct no_os_pwm_desc * tx_trigger_desc
Definition app_config.c:143
struct no_os_pwm_desc * pwm_desc
Definition app_config.c:106
struct no_os_gpio_desc * trigger_gpio_desc
Definition app_config.c:164
struct no_os_uart_desc * uart_iio_com_desc
Definition app_config.c:158
struct no_os_gpio_init_param pwm_gpio_params
Definition app_config.c:86
int32_t init_pwm(void)
Initialize the PWM interface.
Definition app_config.c:259
struct no_os_dma_ch dma_chan
volatile struct iio_device_data * iio_dev_data_g
Definition ad405x_iio.c:281
struct no_os_pwm_init_param spi_dma_pwm_init_params
Definition app_config.c:94
struct no_os_pwm_init_param spi_intr_pwm_init_params
Definition app_config.c:105
uint8_t bytes_per_sample
Definition ad405x_iio.c:293
struct no_os_pwm_init_param i3c_intr_pwm_init_params
Definition app_config.c:127
struct no_os_dma_xfer_desc dma_tx_desc
uint32_t data_read
Definition app_support.c:49
int32_t ad405x_gpio_reset(void)
volatile uint8_t ad405x_i3c_dyn_addr
volatile uint8_t * buff_start_addr
Definition ad405x_iio.c:140
struct no_os_pwm_init_param i3c_dma_pwm_init_params
Definition app_config.c:116
int32_t init_system_post_verification(void)
Initializing system peripherals.
Definition app_config.c:566
struct no_os_dma_xfer_desc i3c_cr_dma_xfer
Definition app_config.c:177
struct no_os_gpio_init_param cs_pwm_gpio_params
Definition app_config.c:189
struct no_os_pwm_init_param cs_init_params
Definition app_config.c:119
struct no_os_irq_ctrl_desc * pwm_irq_desc
Definition app_config.c:230
uint32_t nb_of_bytes_g
Definition app_support.c:45
int32_t deinit_pwm(void)
DeInitialize the PWM interface.
Definition app_config.c:410
struct no_os_dma_desc * ad405x_dma_desc
Definition app_config.c:239
struct no_os_dma_init_param ad405x_dma_init_param
Definition app_config.c:244
struct no_os_gpio_desc * cs_gpio_desc
Definition app_config.c:238
struct no_os_eeprom_init_param eeprom_init_params
Definition app_config.c:218
struct no_os_pwm_desc * cs_pwm_desc
Definition app_config.c:241
uint32_t nb_of_bytes_remaining_g
Definition app_support.c:46
struct no_os_uart_desc * uart_console_stdio_desc
Definition app_config.c:100
The file contain common macros that needs to be followed same across all the projects.
Header file for STM32 platform configurations.