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_ecg_config.c
Mahesh Phalke 2:7b2b268ea49c 3 * @brief ECG 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_ecg_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_REFOUT_AVSS,
Mahesh Phalke 2:7b2b268ea49c 40 .gain = AD413X_GAIN_8,
Mahesh Phalke 2:7b2b268ea49c 41 .filter = AD4130_FILTER_TYPE,
Mahesh Phalke 2:7b2b268ea49c 42 .s_time = AD413X_32_MCLK
Mahesh Phalke 2:7b2b268ea49c 43 },
Mahesh Phalke 2:7b2b268ea49c 44 },
Mahesh Phalke 2:7b2b268ea49c 45
Mahesh Phalke 2:7b2b268ea49c 46 /* Chnnel Configurations */
Mahesh Phalke 2:7b2b268ea49c 47 .ch = {
Mahesh Phalke 2:7b2b268ea49c 48 // Chn0
Mahesh Phalke 2:7b2b268ea49c 49 {
Mahesh Phalke 2:7b2b268ea49c 50 .preset = AD413X_PRESET_0,
Mahesh Phalke 2:7b2b268ea49c 51 .enable = 1,
Mahesh Phalke 2:7b2b268ea49c 52 .ain_p = AD413X_AIN11,
Mahesh Phalke 2:7b2b268ea49c 53 .ain_m = AD413X_AIN14
Mahesh Phalke 2:7b2b268ea49c 54 },
Mahesh Phalke 2:7b2b268ea49c 55 },
Mahesh Phalke 2:7b2b268ea49c 56
Mahesh Phalke 2:7b2b268ea49c 57 .chip_id = AD4130_8,
Mahesh Phalke 2:7b2b268ea49c 58 .mclk = AD413X_INT_76_8_KHZ_OUT_OFF,
Mahesh Phalke 2:7b2b268ea49c 59 .bipolar = true,
Mahesh Phalke 2:7b2b268ea49c 60 .int_ref = AD413X_INTREF_1_25V,
Mahesh Phalke 2:7b2b268ea49c 61 .standby_ctrl = {
Mahesh Phalke 2:7b2b268ea49c 62 .standby_int_ref_en = true,
Mahesh Phalke 2:7b2b268ea49c 63 .standby_vbias_en = true
Mahesh Phalke 2:7b2b268ea49c 64 },
Mahesh Phalke 2:7b2b268ea49c 65 .v_bias = NO_OS_BIT(15), // V_Bias on AIN15
Mahesh Phalke 2:7b2b268ea49c 66 .data_stat = 0,
Mahesh Phalke 2:7b2b268ea49c 67 .spi_crc_en = 0
Mahesh Phalke 2:7b2b268ea49c 68 };