|
precision-converters-firmware
|
Source file for for AD4134 IIO Application. More...
#include "ad4134_support.h"#include "no_os_error.h"#include "no_os_delay.h"#include "app_config.h"#include "stm32_tdm_support.h"
Macros | |
| #define | GPIO_MIN_DBNCE_CNT (2U) |
| #define | ODR_TRIGGER_WAIT_DBNCE_CNT (20000U) |
| #define | DUAL_CHN_MODE_OFFSET (2) |
| #define | LT6373_GPIO_DIR_CTRL_VAL 0xFF |
| #define | LT6373_GPIO_DATA_VAL 0x84 |
| #define | DCLK_FREQ_SELECT 5 |
| #define | MCLK_FREQ (48000000) |
| #define | MCLK_DIVISOR (2) |
| #define | ODR_INT_VAL (uint32_t)(MCLK_FREQ / MCLK_DIVISOR / SAMPLING_RATE) |
| #define | ODR_VAL_INT_LSB (uint8_t)(ODR_INT_VAL) |
| #define | ODR_VAL_INT_MID (uint8_t)(ODR_INT_VAL >> 8) |
| #define | ODR_VAL_INT_MSB (uint8_t)(ODR_INT_VAL >> 16) |
| #define | ODR_VAL_FLT_LSB 0x00 |
| #define | ODR_VAL_FLT_MID0 0x00 |
| #define | ODR_VAL_FLT_MID1 0x00 |
| #define | ODR_VAL_FLT_MSB 0x00 |
Functions | |
| enum ad4134_interface_modes | ad4134_get_interface_mode (void) |
| Get the interface mode. | |
| enum ad4134_data_capture_modes | ad4134_get_data_capture_mode (void) |
| Get the data capture mode. | |
| enum ad4134_asrc_modes | ad4134_get_asrc_mode (void) |
| Get the ASRC mode. | |
| int32_t | ad7134_data_capture_init (struct ad713x_dev *dev) |
| Perform the data capture initialization. | |
| int32_t | ad7134_read_all_channels_bit_banging (uint16_t *chn_data, bool check_odr_state) |
| Read ADC data over DOUT0 and DOUT1 pins using bit-banging method for all channels. | |
| int32_t | ad7134_perform_conv_and_read_sample (uint16_t *adc_data, uint8_t ch) |
| Read ADC single sample data. | |
Source file for for AD4134 IIO Application.
Copyright (c) 2023,2025 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.
| #define DCLK_FREQ_SELECT 5 |
| #define DUAL_CHN_MODE_OFFSET (2) |
| #define GPIO_MIN_DBNCE_CNT (2U) |
| #define LT6373_GPIO_DATA_VAL 0x84 |
| #define LT6373_GPIO_DIR_CTRL_VAL 0xFF |
| #define MCLK_DIVISOR (2) |
| #define MCLK_FREQ (48000000) |
| #define ODR_INT_VAL (uint32_t)(MCLK_FREQ / MCLK_DIVISOR / SAMPLING_RATE) |
| #define ODR_TRIGGER_WAIT_DBNCE_CNT (20000U) |
| #define ODR_VAL_FLT_LSB 0x00 |
| #define ODR_VAL_FLT_MID0 0x00 |
| #define ODR_VAL_FLT_MID1 0x00 |
| #define ODR_VAL_FLT_MSB 0x00 |
| #define ODR_VAL_INT_LSB (uint8_t)(ODR_INT_VAL) |
| #define ODR_VAL_INT_MID (uint8_t)(ODR_INT_VAL >> 8) |
| #define ODR_VAL_INT_MSB (uint8_t)(ODR_INT_VAL >> 16) |
|
inline |
Get the ASRC mode.

|
inline |
Get the data capture mode.

|
inline |
Get the interface mode.

| int32_t ad7134_data_capture_init | ( | struct ad713x_dev * | dev | ) |
Perform the data capture initialization.
| dev[in] | - AD7134 Device descriptor. |
This function configures the AD7134 registers to capture the data

| int32_t ad7134_perform_conv_and_read_sample | ( | uint16_t * | adc_data, |
| uint8_t | ch | ||
| ) |
Read ADC single sample data.
| adc_data[in,out] | - Pointer to adc data read variable |
| ch[in] | - Channel for which data is to read |
| int32_t ad7134_read_all_channels_bit_banging | ( | uint16_t * | chn_data, |
| bool | check_odr_state | ||
| ) |
Read ADC data over DOUT0 and DOUT1 pins using bit-banging method for all channels.
| chn_data[in,out] | - Pointer to array for adc data for all channels |
| check_odr_state[in] | - Whether to check for ODR state change |
