Hello Nordic Team,
I am currently working with the NRF54L15-DK. I have successfully configured the simple ADC on AIN4 (P1.11) and am able to read the raw sensor values.
Overlay :
&adc {
#address-cells = <1>;
#size-cells = <0>;
channel@4 {
reg = <4>;
zephyr,gain = "ADC_GAIN_1"; //"ADC_GAIN_1_4"
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_AIN4>; /* P1.11 */
zephyr,resolution = <12>;
//zephyr,oversampling = <2>;
};
};However, I would like to understand how to configure and set an ADC threshold using the ANADETECT feature. Specifically, I want to know how to detect when the ADC value crosses a defined threshold, either up , down or cross and how to receive an event when this occurs. Additionally, I would like guidance on configuring the LPCOMP for this purpose.
Please provide the necessary prj.conf settings, .overlay configuration, and a sample example to help me implement this functionality.
Thanks & Regards,
Pratik Panchal