mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
[sam] Fixed initialization of ADC timings (improves analogRead speed by a factor x10)
Discussion: http://www.djerickson.com/arduino/ http://forum.arduino.cc/index.php?topic=156849 http://forum.arduino.cc/index.php?topic=187693 Fixes #1418
This commit is contained in:
parent
e745ed988f
commit
f03093332b
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user