From a922fd1b2fefff3e85df526b3f2a268459d2343f Mon Sep 17 00:00:00 2001 From: Piotr Mienkowski Date: Wed, 26 Jan 2022 22:54:42 +0100 Subject: [PATCH] drivers: qdec_sam: disable index signal `qdec_sam` driver supports currently only position measurement and does not support reading of the index signal. Unfortunately, the index signal was internally enabled in the driver. If the pin to which the index signal was connected was used by another driver it could lead to a false detection of the signal change. Detection of the index signal change resets the position measurement. Signed-off-by: Piotr Mienkowski --- drivers/sensor/qdec_sam/qdec_sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sensor/qdec_sam/qdec_sam.c b/drivers/sensor/qdec_sam/qdec_sam.c index 4588f34857e..5ae8402a81d 100644 --- a/drivers/sensor/qdec_sam/qdec_sam.c +++ b/drivers/sensor/qdec_sam/qdec_sam.c @@ -81,7 +81,7 @@ static void qdec_sam_configure(const struct device *dev) /* Clock, Trigger Edge, Trigger and Mode Selection */ tc_ch0->TC_CMR = TC_CMR_TCCLKS_XC0 - | TC_CMR_ETRGEDG_RISING + | TC_CMR_ETRGEDG_NONE | TC_CMR_ABETRG; /* Enable QDEC in Position Mode*/