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.

FDC2214: Sensor Controller Studio output always returns high

Part Number: FDC2214
Other Parts Discussed in Thread: CC2640R2F, LAUNCHXL-CC2640R2

I am having this problem with interfacing the FD2214 with the CC2640R2F using the sensor controller studio. Initially I used the launchpad with the FDC2214 EVM to verify that the data is being read from the sensor. And that works just fine. However I have now produced a small run of pcb's with the CC2640R2F launchpad schematics as a reference to the design. I have fully tested that the chip interfaces just fine with the FDC2214 as the device ID is read. However as I use the old code which was used with the EVM module the output remained fully high.

I did have 4 of these boards produced and they all seem to behave in the same way. So I believe the way I am trying to setup the sensor is the issue.

I attached my code below for the initialization and the for the reading bit. I would greatly appreciate any obvious problems if spotted.

Initialization Code:

// Sensor SD pin is tied to one of the SSC output pins and initialized to 0
gpioClearOutput(AUXIO_O_CONTROL_FDC2214);

// Setup Config

// Init Channel 0
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_SETTLECOUNT_CH0,0x0400);

//rcount maximized for highest accuracy
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_RCOUNT_CH0,0xFFFF);

//no offset
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_OFFSET_CH0,0x0000);

//Set clock dividers
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_CLOCK_DIVIDERS_CH0, 0x4001);

//set drive register
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_DRIVE_CH0, 0x8C40);

//Set MUX
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_MUX_CONFIG, 0x820D);

// Config and Start Sensor
i2cDeviceWriteReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_CONFIG,0x1481);

U16 devId = 0;
i2cDeviceReadReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_DEVICE_ID;devId);

if (devId == 0x3055){
    state.capReady = 1;
    if(devId == 0x3054){
        state.capReady = 1;
    }
}

Execution Code:

i2cDeviceReadReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_STATUS;state.capStatus);

// Status 000C == unreadconv ready for ch0 and ch1
if (state.capStatus == 0x000C){
    i2cDeviceReadReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_DATA_CH0_MSB; output.capacitance[1]);
    i2cDeviceReadReg16MsbFirst(FDC2214_I2C_ADDR,FDC2214_DATA_CH0_LSB; output.capacitance[0]);
}

  • Hi Mahdi,

    Thank you for posting to the Sensing forum.

    I do not see any obvious issues with the code that you have provided. Could you perform a read of the Status register and let me know what the result is?

    Thank you.

    Best regards,

    Nicole

  • The code reads the status register and always returns 0x000C when unread and when reading ch0 the register goes to 0x0004 which matches what the datasheet says. I did try to desolder one of the boards and resolder a new spare FDC2214 IC but still the same result. The schematic was basically off of the evm but I attached it incase its a hardware issue which is highly unlikely.

  • Hi Mahdi,

    Can you provide logic analyzer captures of the I2C communication? This will help us further debug what may be the issue.

    Best regards,

    Nicole

  • Hi Nicole,

    I hooked up the i2c lines to my logic anaylzer and was able to capture the i2c lines and they all look fine. I attached them below for the Initialization and the reading of the data registers.

    Initialization:

    Execution Bit:

    All the data looks fine as well as the read does get acknowledged by the FDC2214.

    Regards,

    Mahdi

  • Hi Mahdi,

    Since you had a working solution with the LAUNCHXL-CC2640R2, please use the logic analyzer to compare the differences in I2C lines against the defunct setup.  Also, can you please provide the full schematic including the CC2640R2F device?  And what changes have you made to the CC2640R2F software to account for any differences in pin assignments?

    Regards,
    Ryan

  • Hi, I believe I found the culprit to the problem. I miscalculated my custom sensor plates and they had an extremely low capacitance change which is within the range of the sensor, however the problem is that I did not add the recommended LC circuit for single ended operation mode (i.e I did not connect the outputs together and connected the ground of my sensor to the other input in the sensor) Rookie Mistake. I did solder a 33pf capacitor without the inductor in series to both the A and B inputs. And this helped to show that there is a change in the values and the sensor was reading the values just fine. Which means the internal OC is working and the fact that the rest of the code is working fine. After adjusting the circuit to have the ends connected without the recommended circuit I was able to get the same behavior I was expecting.

    I will mark this as resolved.