Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit f03093332bd910a05af31838d06fa7f1c1e5040c 1 parent e745ed9
@cmaglie cmaglie authored
View
4 build/shared/revisions.txt
@@ -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]
View
2  hardware/arduino/sam/variants/arduino_due_x/variant.cpp
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.