Example program for EVAL-AD4130

Dependencies:   tempsensors sdp_k1_sdram

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ad4130_power_test_config.c Source File

ad4130_power_test_config.c

Go to the documentation of this file.
00001 /*************************************************************************//**
00002  *   @file   ad4130_power_test_config.c
00003  *   @brief  Power test user configurations file for AD4130 device
00004 ******************************************************************************
00005 * Copyright (c) 2022 Analog Devices, Inc.
00006 * All rights reserved.
00007 *
00008 * This software is proprietary to Analog Devices, Inc. and its licensors.
00009 * By using this software you agree to the terms of the associated
00010 * Analog Devices Software License Agreement.
00011 *****************************************************************************/
00012 
00013 /******************************************************************************/
00014 /***************************** Include Files **********************************/
00015 /******************************************************************************/
00016 
00017 #include "app_config.h"
00018 
00019 /******************************************************************************/
00020 /********************** Macros and Constants Definition ***********************/
00021 /******************************************************************************/
00022 
00023 /******************************************************************************/
00024 /********************** Variables and User Defined Data Types *****************/
00025 /******************************************************************************/
00026 
00027 /* AD4130 device initialization parameters */
00028 struct ad413x_init_param ad4130_power_test_config_params = {
00029     .spi_init = &spi_init_params,
00030 
00031     /* Setup (Preset) Configurations */
00032     .preset = {
00033         // Setup 0
00034         {
00035             .ref_buf = {
00036                 .ref_buf_p_en = true,
00037                 .ref_buf_m_en = true,
00038             },
00039             .ref_sel = AD413X_AVDD_AVSS,
00040             .gain = AD413X_GAIN_1,
00041             .filter = AD4130_FILTER_TYPE,
00042             .s_time = AD413X_32_MCLK
00043         },
00044     },
00045 
00046     /* Chnnel Configurations */
00047     .ch = {
00048         // Chn0 (V_AVDD)
00049         {
00050             .preset = AD413X_PRESET_0,
00051             .enable = 1,
00052             .ain_p = AD413X_AVDD_AVSS_6P,
00053             .ain_m = AD413X_AVDD_AVSS_6M
00054         },
00055         // Chn1 (V_IOVDD)
00056         {
00057             .preset = AD413X_PRESET_0,
00058             .enable = 1,
00059             .ain_p = AD413X_IOVDD_DGND_6P,
00060             .ain_m = AD413X_IOVDD_DGND_6M
00061         },
00062         // Chn2 (I_AVDD)
00063         {
00064             .preset = AD413X_PRESET_0,
00065             .enable = 1,
00066             .ain_p = AD413X_AIN12,
00067             .ain_m = AD413X_AIN13
00068         },
00069         // Chn3 (I_IOVDD)
00070         {
00071             .preset = AD413X_PRESET_0,
00072             .enable = 1,
00073             .ain_p = AD413X_AIN10,
00074             .ain_m = AD413X_AIN11
00075         },
00076         // Chn4 (V_AVSS-DGND)
00077         {
00078             .preset = AD413X_PRESET_0,
00079             .enable = 1,
00080             .ain_p = AD413X_AVSS,
00081             .ain_m = AD413X_DGND
00082         },
00083         // Chn5 (V_REF)
00084         {
00085             .preset = AD413X_PRESET_0,
00086             .enable = 1,
00087             .ain_p = AD413X_AIN14,
00088             .ain_m = AD413X_AIN15
00089         },
00090     },
00091 
00092     .chip_id = AD4130_8,
00093     .mclk = AD413X_INT_76_8_KHZ_OUT_OFF,
00094     .bipolar = true,
00095     .int_ref = AD413X_INTREF_DISABLED,
00096     .v_bias = 0,
00097     .data_stat = 0,
00098     .spi_crc_en = 0
00099 };