Other Parts Discussed in Thread: FDC1004
Hello,
We are measuring a liquid level using the FDC1004 and notice that eventually, while in repeated measurements mode the sensor sometimes stops conversions, and our application just repeatedly reads a stale value.
I have only been able to produce this error once on the bench, but it appears to be happening to units in the field fairly frequently.
Here is my setup:
On power up, the following registers are written:
CONF_MEAS1 = 0x10E0 (CIN1, CAPDAC, Offset = 7 (21.875pf))
FDC_CONF = 0x580 (100S/s, REPEAT, MEAS_1)
The firmware has a task that then reads the value of MEAS1_MSB, then MEAS1_LSB 10 times a second (10Hz), averages it over 4 seconds, and exports the result.
Every four seconds after exporting the averaged sensor reading, the firmware reads the FDC_CONF and CONF_MEAS1 registers to ensure that they match the expected values. If they don't match, the expected values are re-written (this check was added to fix an issue that was caused when the circuit voltage fell below the FDC1004 operating voltage, but the microcontroller kept running).
The 10Hz firmware sample reading was never checking the DONE_1 bit in FDC_CONF because since it was reading the value much slower than it was being sampled on the FDC1004 (100Hz), it assumed there would always be a new value ready.
I was able to hook a logic analyzer to the system the one time I reproduced the problem, and saw that the DONE_1 was never being set, FDC_CONF always read 0x580. Re-writing the configuration, or even changing the measurement from CIN1 to CIN2 did not make any difference. The only thing that eventually fixed it was to do a software RST command and re-write the configuration. (Note: I didn't have the ability to turn off the REPEAT bit on the fly, so I couldn't test toggling that bit).
Has this behavior ever been noted before?
I've modified the firmware to check for DONE_1 to be set, and if it isn't to do a software reset and reconfigure, but I am hesitant to deploy this firmware to several hundred units in the field because I haven't determined the root cause of why the FDC1004 stops taking measurements.
Any help or suggestions, or even just confirmation that sometimes the FDC1004 stops measurements would be appreciated!