Example program for EVAL-AD4130

Dependencies:   tempsensors sdp_k1_sdram

Committer:
Mahesh Phalke
Date:
Wed Jul 20 18:12:00 2022 +0530
Revision:
2:7b2b268ea49c
Initial firmware commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Mahesh Phalke 2:7b2b268ea49c 1 /*************************************************************************//**
Mahesh Phalke 2:7b2b268ea49c 2 * @file ad4130_rtd_config.c
Mahesh Phalke 2:7b2b268ea49c 3 * @brief RTD user configurations file for AD4130 device
Mahesh Phalke 2:7b2b268ea49c 4 ******************************************************************************
Mahesh Phalke 2:7b2b268ea49c 5 * Copyright (c) 2022 Analog Devices, Inc.
Mahesh Phalke 2:7b2b268ea49c 6 * All rights reserved.
Mahesh Phalke 2:7b2b268ea49c 7 *
Mahesh Phalke 2:7b2b268ea49c 8 * This software is proprietary to Analog Devices, Inc. and its licensors.
Mahesh Phalke 2:7b2b268ea49c 9 * By using this software you agree to the terms of the associated
Mahesh Phalke 2:7b2b268ea49c 10 * Analog Devices Software License Agreement.
Mahesh Phalke 2:7b2b268ea49c 11 *****************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 12
Mahesh Phalke 2:7b2b268ea49c 13 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 14 /***************************** Include Files **********************************/
Mahesh Phalke 2:7b2b268ea49c 15 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 16
Mahesh Phalke 2:7b2b268ea49c 17 #include "app_config.h"
Mahesh Phalke 2:7b2b268ea49c 18
Mahesh Phalke 2:7b2b268ea49c 19 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 20 /********************** Macros and Constants Definition ***********************/
Mahesh Phalke 2:7b2b268ea49c 21 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 22
Mahesh Phalke 2:7b2b268ea49c 23 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 24 /********************** Variables and User Defined Data Types *****************/
Mahesh Phalke 2:7b2b268ea49c 25 /******************************************************************************/
Mahesh Phalke 2:7b2b268ea49c 26
Mahesh Phalke 2:7b2b268ea49c 27 /* AD4130 device initialization parameters */
Mahesh Phalke 2:7b2b268ea49c 28 struct ad413x_init_param ad4130_rtd_config_params = {
Mahesh Phalke 2:7b2b268ea49c 29 .spi_init = &spi_init_params,
Mahesh Phalke 2:7b2b268ea49c 30
Mahesh Phalke 2:7b2b268ea49c 31 /* Setup (Preset) Configurations */
Mahesh Phalke 2:7b2b268ea49c 32 .preset = {
Mahesh Phalke 2:7b2b268ea49c 33 // Setup 0
Mahesh Phalke 2:7b2b268ea49c 34 {
Mahesh Phalke 2:7b2b268ea49c 35 .ref_buf = {
Mahesh Phalke 2:7b2b268ea49c 36 .ref_buf_p_en = true,
Mahesh Phalke 2:7b2b268ea49c 37 .ref_buf_m_en = true,
Mahesh Phalke 2:7b2b268ea49c 38 },
Mahesh Phalke 2:7b2b268ea49c 39 .ref_sel = AD413X_REFIN1,
Mahesh Phalke 2:7b2b268ea49c 40 .gain = AD413X_GAIN_16,
Mahesh Phalke 2:7b2b268ea49c 41 .filter = AD4130_FILTER_TYPE,
Mahesh Phalke 2:7b2b268ea49c 42 .iout0_exc_current = AD413X_EXC_200UA,
Mahesh Phalke 2:7b2b268ea49c 43 #if (ACTIVE_DEMO_MODE_CONFIG == RTD_3WIRE_CONFIG)
Mahesh Phalke 2:7b2b268ea49c 44 .iout1_exc_current = AD413X_EXC_200UA,
Mahesh Phalke 2:7b2b268ea49c 45 #endif
Mahesh Phalke 2:7b2b268ea49c 46 .s_time = AD413X_32_MCLK
Mahesh Phalke 2:7b2b268ea49c 47 },
Mahesh Phalke 2:7b2b268ea49c 48 },
Mahesh Phalke 2:7b2b268ea49c 49
Mahesh Phalke 2:7b2b268ea49c 50 /* Chnnel Configurations */
Mahesh Phalke 2:7b2b268ea49c 51 .ch = {
Mahesh Phalke 2:7b2b268ea49c 52 // Chn0
Mahesh Phalke 2:7b2b268ea49c 53 {
Mahesh Phalke 2:7b2b268ea49c 54 .preset = AD413X_PRESET_0,
Mahesh Phalke 2:7b2b268ea49c 55 .enable = 1,
Mahesh Phalke 2:7b2b268ea49c 56 .ain_p = AD413X_AIN2,
Mahesh Phalke 2:7b2b268ea49c 57 .ain_m = AD413X_AIN3,
Mahesh Phalke 2:7b2b268ea49c 58 .iout0_exc_input = AD413X_AIN0,
Mahesh Phalke 2:7b2b268ea49c 59 #if (ACTIVE_DEMO_MODE_CONFIG == RTD_3WIRE_CONFIG)
Mahesh Phalke 2:7b2b268ea49c 60 .iout1_exc_input = AD413X_AIN1,
Mahesh Phalke 2:7b2b268ea49c 61 #endif
Mahesh Phalke 2:7b2b268ea49c 62 },
Mahesh Phalke 2:7b2b268ea49c 63 },
Mahesh Phalke 2:7b2b268ea49c 64
Mahesh Phalke 2:7b2b268ea49c 65 .chip_id = AD4130_8,
Mahesh Phalke 2:7b2b268ea49c 66 .mclk = AD413X_INT_76_8_KHZ_OUT_OFF,
Mahesh Phalke 2:7b2b268ea49c 67 .bipolar = true,
Mahesh Phalke 2:7b2b268ea49c 68 .int_ref = AD413X_INTREF_DISABLED,
Mahesh Phalke 2:7b2b268ea49c 69 .standby_ctrl = {
Mahesh Phalke 2:7b2b268ea49c 70 .standby_iexc_en = true
Mahesh Phalke 2:7b2b268ea49c 71 },
Mahesh Phalke 2:7b2b268ea49c 72 .data_stat = 0,
Mahesh Phalke 2:7b2b268ea49c 73 .spi_crc_en = 0
Mahesh Phalke 2:7b2b268ea49c 74 };