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.

FDC1004 not completing measurement

Other Parts Discussed in Thread: FDC1004, FDC1004EVM, MSP430F5528

Hi - I have what is probably a simple problem, but I'm stumped.  I'm trying to get the FDC1004 to do 2 single-ended measurements and everything seems good except it just sits there and never says the measurement is finished.

I start by setting these registers:

0x08 = 0x1000  // CHA = CIN1, CHB = CAPDAC, Offset = 0
0x09 = 0x3000  // CHA = CIN2, CHB = CAPDAC, Offset = 0
0x0D = 0x0000  // CH1 offset = 0
0x0E = 0x0000  // CH2 offset = 0
0x11 = 0x4000  // CH1 gain = 1.0
0x12 = 0x4000  // CH2 gain = 1.0

Then I set the sample register and start polling it to see when it's done

0x0C = 0x0480  // Rate = 100S/s, Measurement 1 enabled

But - the 0x0C register just keeps reading 0x0480 indefinitely and never sets the DONE_1 bit.

I tried setting CHB to both disabled and CAPDAC - didn't make any difference.

I'm failry sure the comms are ok - I can read the MFG and Device ID just fine.  LSB/MSB's are all in the right place.  Everything looks ok on the logic analyzer - I'm getting ACK's from the FDC1004 and responses on all reads.

I'm at a loss - I don't know why it won't trigger.  What am I missing?  Help.

I'm talking to the FDC1004 with an MSP430F5528 on a custom PCB, but I also have an F5529 launchpad and a FDC1004EVM module I can mock up tests with if there's something else I should try.  

  • So today I tried ignoring the completion bit.  I send a trigger, wait 20ms, check the config register once, ignore it and read the result register anyway and it seems to be working.  The result registers seem to change in response to my hand near the senors, etc, but I'm still getting 0's on the completion bits.

    I guess I can just keep doing this, but I'd like to know why the completion bit is not getting set.

  • HI Nathan:

    Your settings look fine. I have not used single-shot configuration because typically you need to average out your data with a few samples to get a more reliable representation of the capacitance. Try and reset the device (in addr 0x0C) before setting up the register, just to make sure that nothing funky is going on, then try single-shot configuration again.

    If that doesn't work, try putting in REPEAT mode. We typically use REPEAT mode, and then use the microcontroller timer to sample the FDC at a specific rate.

    Let me know if that works or helps.

    Thanks
    -David Wang
    Capacitive Sensing Applications
  • Yea - I tried resetting before initializing. Didn't make any difference, but I DO see the reset bit get reset successfully. I also tried NOT setting the offset or gain calibration registers separately and together. No diff there either.

    I'm not sure if this is something I can configure on the MSP430F5528, but I didn't realize the I2C frames are about 20ms apart anyway. So at 100S/s if I read the result register immediately after trigger, the calculated result should already be there.

    I will try Repeat mode, but this is an ultra-low-power datalogger so sampling continuously while awake at each sample interval is not the most power efficient. It would probably be more efficient if we decide we need to average multiple measurements for greater accuracy though.
  • Hello Nathan,

    When you read the register to check the DONE bits are you writing the register address before each read or continuously reading the register?

    Regards,
    Blair