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.

AFE4300: AFE4300-BCM

Part Number: AFE4300

Hi there, 

I've developed a PCB based on EVM schematics to measure the impedance of tissue using AFE4300. I am using an STM32f103c8 microcontroller as the host. The microcontroller is providing the AFE4300 with 1MHz clock through PWM (50% DS) feature of its timers. I can set and read the registers on the AFE4300 as I want but when I try to read the ADC_DATA_RESULT register for the result of impedance measurement using IQ or FWR mode I always get 0!

Here is the code I am using:

********************** AFE4300 init ***************************

AFE4300_writeRegister(ADC_CONTROL_REGISTER1, 0X4140);

AFE4300_writeRegister(MISC_REGISTER1, 0x0000);

AFE4300_writeRegister(MISC_REGISTER2, 0xFFFF);

AFE4300_writeRegister(DEVICE_CONTROL1, 0X6005);

AFE4300_writeRegister(ISW_MUX, 0X0000);

AFE4300_writeRegister(VSENSE_MUX, 0X0000);

AFE4300_writeRegister(IQ_MODE_ENABLE, 0X0000);

AFE4300_writeRegister(WEIGHT_SCALE_CONTROL, 0X0000);

AFE4300_writeRegister(BCM_DAC_FREQ, 0X0000);

AFE4300_writeRegister(DEVICE_CONTROL2, 0X0000);

AFE4300_writeRegister(ADC_CONTROL_REGISTER2, 0X0000);

AFE4300_writeRegister(MISC_REGISTER3, 0x0030);

**************Set Data Acquisition Rate to 32***************

AFE4300_writeRegister(ADC_CONTROL_REGISTER1, 0x4120);

*********************Using FWR mode***********************

AFE4300_writeRegister(DEVICE_CONTROL2, 0x0060);

AFE4300_writeRegister(DEVICE_CONTROL1,0x6006);

AFE4300_writeRegister(IQ_MODE_ENABLE,0x0000);

AFE4300_writeRegister(BCM_DAC_FREQ, 0x0000);

AFE4300_writeRegister(ADC_CONTROL_REGISTER2,0x0063);

*********************Set channels***************************

AFE4300_writeRegister(VSENSE_MUX, 0X0000);

AFE4300_writeRegister(VSENSE_MUX,0x0408);

AFE4300_writeRegister(ISW_MUX,0x0000);

AFE4300_writeRegister(ISW_MUX,0x0408);

*********************After 50ms Delay**********************

AFE4300_readRegister(ADC_DATA_RESULT);

**************************************************************

And the result I get is 0.

Again with the IQ mode:

*********************Using IQ mode************************

AFE4300_writeRegister(ADC_CONTROL_REGISTER2, 0x0060);

AFE4300_writeRegister(DEVICE_CONTROL1,0x6006);

AFE4300_writeRegister(IQ_MODE_ENABLE,0x0800);

AFE4300_writeRegister(DEVICE_CONTROL2, 0x0000);

AFE4300_writeRegister(BCM_DAC_FREQ,0x0000);

AFE4300_writeRegister(BCM_DAC_FREQ,0x0020);

AFE4300_writeRegister(DEVICE_CONTROL2, 0x1800);

**************Set Data Acquisition Rate to 32***************

AFE4300_writeRegister(ADC_CONTROL_REGISTER1, 0x4120);

*********************Set channels***************************

AFE4300_writeRegister(VSENSE_MUX, 0X0000);

AFE4300_writeRegister(VSENSE_MUX,0x0408);

AFE4300_writeRegister(ISW_MUX,0x0000);

AFE4300_writeRegister(ISW_MUX,0x0408);

***********************Read I********************************

AFE4300_writeRegister(ADC_CONTROL_REGISTER2,0x0063);

********************After 10ms Delay***********************

I = AFE4300_readRegister(ADC_DATA_RESULT);

***********************Read Q********************************

AFE4300_writeRegister(ADC_CONTROL_REGISTER2,0x0065);

********************After 10ms Delay***********************

Q = AFE4300_readRegister(ADC_DATA_RESULT);

**************************************************************

And again the result is 0!

This is how I connect the board to a test impedance (a parallel RC):

I connect IOUT0 and VSENSE0 with a simple wire to one of the RC ends and IOUT1 and VSENSE1 to the other end. I understand that there is a circuit to help the electrodes read a more accurate impedance on Fig 12 of the datasheet but I figured that it must not result in reading 0 and it is not a must to connect the probes to this circuit first so for the sake of simplicity I bypassed it. I also tried the direct path from the RC circuit to the chip as well as the path that goes through the Op-Amps but the result didn't change (Jumper on P4 or P6). I also tried the same code this time with the calibration resistors on RN0 and RP0 with the following addresses:

AFE4300_writeRegister(ISW_MUX,0x0101);

AFE4300_writeRegister(VSENSE_MUX,0x0101);

But I couldn't get any result other than 0. I also changed the path to chip from direct to amplified (Jumper on P8 or P9) but it didn't show any result. I attached the board I designed in the following. I know that the design might not be optimal but I don't think that this might cause the problem I am facing. I am clueless right now and I don't know what to test and what to do so any clue you can provide might help.

Thank you for your time, 

Arash.BodyImpedance.rar