Hello,
I have gotten the Zephyr FDC2X1X sample code running with a single FDC2214 I2C capacitive sensor sampling two out of the four channels. The device tree for this configuration is such:
&i2c2 { clock-frequency = <I2C_BITRATE_FAST>; fdc2x1x@2A { compatible = "ti,fdc2x1x"; reg = <0x2A>; sd-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; intb-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; autoscan; deglitch = <5>; fref = <43360>; channel_0 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = < 18 >; }; channel_1 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = <18>; }; }; };
I would like to read the other two channels of the sensor aka channel 2 & 3. The sample documentation says that this is controlled via the device tree. So I updated the device tree as such:
&i2c2 { clock-frequency = <I2C_BITRATE_FAST>; fdc2x1x@2A { compatible = "ti,fdc2x1x"; reg = <0x2A>; sd-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; intb-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; autoscan; deglitch = <5>; fref = <43360>; channel_0 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = < 18 >; }; channel_1 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = <18>; }; channel_2 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = <18>; }; channel_3 { rcount = <7499>; settlecount = <48>; fref-divider = <1>; idrive = <10>; fin-sel = <2>; inductance = <18>; }; fdc2x14; }; };
to include the additional two channels, and added the fdc2x14; identifier to signify that the FDC2214 4-channel device is connected. When I recompile the sample I see four channel outputs on the serial console, but the second and third channel display fixed out of range values, like those channels are not configured properly.
Any ideas on how to get this working?
Cheers,
Parker