Example program for EVAL-AD4130

Dependencies:   tempsensors sdp_k1_sdram

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ad4130_ecg_config.c Source File

ad4130_ecg_config.c

Go to the documentation of this file.
00001 /*************************************************************************//**
00002  *   @file   ad4130_ecg_config.c
00003  *   @brief  ECG 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_ecg_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_REFOUT_AVSS,
00040             .gain = AD413X_GAIN_8,
00041             .filter = AD4130_FILTER_TYPE,
00042             .s_time = AD413X_32_MCLK
00043         },
00044     },
00045 
00046     /* Chnnel Configurations */
00047     .ch = {
00048         // Chn0
00049         {
00050             .preset = AD413X_PRESET_0,
00051             .enable = 1,
00052             .ain_p = AD413X_AIN11,
00053             .ain_m = AD413X_AIN14
00054         },
00055     },
00056 
00057     .chip_id = AD4130_8,
00058     .mclk = AD413X_INT_76_8_KHZ_OUT_OFF,
00059     .bipolar = true,
00060     .int_ref = AD413X_INTREF_1_25V,
00061     .standby_ctrl = {
00062         .standby_int_ref_en = true,
00063         .standby_vbias_en = true
00064     },
00065     .v_bias = NO_OS_BIT(15),    // V_Bias on AIN15
00066     .data_stat = 0,
00067     .spi_crc_en = 0
00068 };