This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE49I30: Problem on communicating with I2C interface.

Part Number: AFE49I30
Other Parts Discussed in Thread: ADS1292R

I have written a code for initializing and controlling AFE49I30. I have carefully read the datasheet. The simple driver file (.c file) is already completed. However, MCU starts the connection with AFE49I30, but the connection is unsuccessful. I use nrf52840 as MCU. Since writing the driver for this chip can be complex, can you look at my code for any possible mistakes? The main file belongs to a previous project that uses ADS1292R. However, the possible problems may be found in driver files (AFE49I30.c and AFE49I30.h) that can be found in the attachment. the relevant function calls in the main file are:
twi_init();
init_AFE49I30();
AFE49I30_read_all_regs();
AFE49I30_read_data((uint32_t *)&AFE_raw_data);

Please keep this inquiry private as this chip has NDA restrictions.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/************************************************************************
include libraries
************************************************************************/
#include <string.h>
#include "nrf_drv_twi.h"
#include "nrf_delay.h"
#include "boards.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "AFE49I30.h"
//#include "nrf_drv_gpiote.h"
//#include "app_error.h"
//#include "app_util_platform.h"
//#include "nrf_gpio.h"
//#include "nrf_drv_spi.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef AFE49I30_H_
#define AFE49I30_H_
/******************************************************************************
AFE49I30 global definitions
******************************************************************************/
#define Num_Phase 6
/******************************************************************************
AFE49I30 pins definition
******************************************************************************/
#define AFE49I30_reset_pin 16
#define AFE49I30_DRDY_pin 25
/******************************************************************************
AFE49I30 global functions
******************************************************************************/
void twi_init (void);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX