Permalink
Browse files

[sam] Fixed initialization of ADC timings (improves analogRead speed …

  • Loading branch information...
1 parent e745ed9 commit f03093332bd910a05af31838d06fa7f1c1e5040c @cmaglie cmaglie committed Sep 25, 2013
Showing with 5 additions and 1 deletion.
  1. +4 −0 build/shared/revisions.txt
  2. +1 −1 hardware/arduino/sam/variants/arduino_due_x/variant.cpp
@@ -7,6 +7,10 @@ ARDUINO 1.5.5 BETA
* sam: Fixed SPI initialization (when using extended API and multiple CS)
* avr: Fixed behavior of EthernetClient::flush()
+[core]
+* sam: Fixed wrong initialization for ADC timings (analogRead speed Arduino DUE improved by a factor x10)
+ (http://www.djerickson.com/arduino/)
+
ARDUINO 1.5.4 BETA 2013.09.10
[ide]
@@ -433,7 +433,7 @@ void init( void )
// Initialize Analog Controller
pmc_enable_periph_clk(ID_ADC);
- adc_init(ADC, SystemCoreClock, ADC_FREQ_MAX, ADC_STARTUP_FAST);
+ adc_init(ADC, SystemCoreClock, ADC_FREQ_MAX, /*ADC_STARTUP_FAST*/ 3);
adc_configure_timing(ADC, 0, ADC_SETTLING_TIME_3, 1);
adc_configure_trigger(ADC, ADC_TRIG_SW, 0); // Disable hardware trigger.
adc_disable_interrupt(ADC, 0xFFFFFFFF); // Disable all ADC interrupts.

0 comments on commit f030933

Please sign in to comment.