From 509f08daa9a07bbebe270a071eb8bfbe2ed82573 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 27 Oct 2013 09:35:30 -0600 Subject: [PATCH] SAMA5 ADC: Correct setup of time compare registers --- arch/arm/src/sama5/sam_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c index c0df1a1b1a..46c24732aa 100644 --- a/arch/arm/src/sama5/sam_adc.c +++ b/arch/arm/src/sama5/sam_adc.c @@ -1163,7 +1163,7 @@ static int sam_adc_settimer(struct sam_adc_s *priv, uint32_t frequency, /* Set up TC_RA and TC_RC */ - sam_tc_setregister(priv->tc, TC_REGA, div / 2); + sam_tc_setregister(priv->tc, TC_REGA, div << 1); sam_tc_setregister(priv->tc, TC_REGC, div); /* And start the timer */