adc_timer_dma_oneshot.ino outputs only once after startup
I have probably misunderstood the expected behaviour of adc_timer_dma_oneshot.ino example.
After moving some defines below the includes, as suggested many times,
#include <ADC.h>
#include <DMAChannel.h>
#include <AnalogBufferDMA.h>
#if defined(ADC_USE_DMA) && defined(ADC_USE_TIMER)
the sketch is compiling without warnings or errors and is also running. Unfortunately, I get only one line of processed data
Setup both ADCs
before enableDMA
After enableDMA
End Setup
0 - 1(532): 0 <= 1113 <= 1652 953 1 - 1(533): 0 <= 3 <= 10 2044
This is not changing no matter what I enter into the Serial Monitor. I know from a simple Serial.println that the code enters
if (Serial.available()) {
...
}
Nothing is connected to the teensy 3.6 pins, and the LED is blinking. I use Teensyduino (Arduino 1.8.15) and have replaced the ADC library with the git version 9.1 (commit 6e9a359a8efbe47e71a60a89a30caeaf620ceaa6).
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/ADC$ git describe
9.1
In AnalogBufferDMA.cpp I found that abdma1.clearCompletion(); would probably also need a abdma1.stopOnCompletion(true) somewhere. I don't know.
This is all very new to me, and I don't know how to get this running. Hints are very welcome!