Date:2012-06-22 02:12:20 (7 years 7 months ago)
Author:Werner Almesberger
Commit:e2f228907b07219e673e1c02468e657999e853fd
Message:fw/accel.c (adcsra): let ADC run at 125 kHz (instead of 67.5 kHz)

Files: fw/accel.c (1 diff)

Change Details

fw/accel.c
3838
3939static inline void adcsra(bool start)
4040{
41    /*
42     * The ADC needs to run at clkADC <= 200 kHz for full resolution.
43     * At clkADC = 125 kHz, a conversion takes about 110 us.
44     */
4145    ADCSRA =
4246        1 << ADEN | /* enable ADC */
4347        (start ? 1 << ADSC : 0) |
4448        1 << ADIE | /* enable ADC interrupts */
45        7; /* clkADC = clk/128 -> 62.5 kHz */
49        6; /* clkADC = clk/64 -> 126 kHz */
4650}
4751
4852

Archive Download the corresponding diff file

Branches:
master
tornado-v1



interactive