This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to use all 8 analog inputs with Capacitive Sensor Library Example using the nRF52 DK

Hello,

I am developing a capacitive sensing application with the nRF52 DK and Segger Embedded Studio. So far I have integrated the Capacitive Sensor Library Example into the HID Mouse Application from the SDK so that I have 6 out of 8 analog inputs initialized as csense buttons and responding correctly to touch.

When I add the final 2 csense button definitions via NRF_CSENSE_BUTTON_DEF for AIN0 (P0.02) and AIN3 (P0.05), the application is no longer responsive. If I add AIN0 alone, the other pads are still responsive, but I am unable to get a response for the AIN0 pad. If I add AIN3 alone (or both together), the application will not work at all and none of the pads are responsive. I have tried changing the thresholds to a variety of values. I have also cut the solder bridge 13 so that the P0.05 pin is no longer tied to UART HWFC. This has not changed the result.

I am using the COMP module for csense, despite Errata 84 ('COMP: ISOURCE not functional'). In my COMP configuration, the ISOURCE is kept at the default value and is not used   (#define COMP_CONFIG_ISOURCE 0) and I am wondering if this is why it still functions correctly with 6 buttons initialized?

Could the error be related to using the S132 softdevice with the csense example (since Csense was imported into HID Mouse Application)?

Or could the COMP configuration be the cause of this error. Is using the ISOURCE required to be enabled for all pads to be initialized?

I have also tried to change the COMP config input from AIN0 to AIN7   (#define COMP_CONFIG_INPUT 7). This did not help either, but the application will still function with six of the analog inputs. I do not quite understand what the COMP config input is used for... what does changing this value do to the csense application? In the SDK documentation, there appears to be another input option (NRF_COMP_VDD_DIV2) however this is not listed in the sdk_config file as an option. And when I try to set the COMP input pin using nrf_drv_comp_pin_select(NRF_COMP_VDD_DIV2) in the main loop, I receive the following error: 'NRF_COMP_VDD_DIV2' undeclared (first use in this function).

Should I be changing other aspects of the COMP configuration (hysteresis, speed mode, interrupt priority, etc.)?

Any assistance or information about using all analog pins, using csense and COMP, and the various COMP configuration parameters would be greatly appreciated. Thank you!

Parents Reply Children
No Data
Related