Example program for EVAL-AD4130

Dependencies:   tempsensors sdp_k1_sdram

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ad4130_rtd_config.c Source File

ad4130_rtd_config.c

Go to the documentation of this file.
00001 /*************************************************************************//**
00002  *   @file   ad4130_rtd_config.c
00003  *   @brief  RTD 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_rtd_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_REFIN1,
00040             .gain = AD413X_GAIN_16,
00041             .filter = AD4130_FILTER_TYPE,
00042             .iout0_exc_current = AD413X_EXC_200UA,
00043 #if (ACTIVE_DEMO_MODE_CONFIG == RTD_3WIRE_CONFIG)
00044             .iout1_exc_current = AD413X_EXC_200UA,
00045 #endif
00046             .s_time = AD413X_32_MCLK
00047         },
00048     },
00049 
00050     /* Chnnel Configurations */
00051     .ch = {
00052         // Chn0
00053         {
00054             .preset = AD413X_PRESET_0,
00055             .enable = 1,
00056             .ain_p = AD413X_AIN2,
00057             .ain_m = AD413X_AIN3,
00058             .iout0_exc_input = AD413X_AIN0,
00059 #if (ACTIVE_DEMO_MODE_CONFIG == RTD_3WIRE_CONFIG)
00060             .iout1_exc_input = AD413X_AIN1,
00061 #endif
00062         },
00063     },
00064 
00065     .chip_id = AD4130_8,
00066     .mclk = AD413X_INT_76_8_KHZ_OUT_OFF,
00067     .bipolar = true,
00068     .int_ref = AD413X_INTREF_DISABLED,
00069     .standby_ctrl = {
00070         .standby_iexc_en = true
00071     },
00072     .data_stat = 0,
00073     .spi_crc_en = 0
00074 };