Open Defragster opened 7 years ago
I got the sketch working output of a DAC value wired to ADC and read on a DMA with callback to access the collected data and restart the sampling. Works well. Moved to TIM6,
My version is here: https://github.com/Defragster/STM32L4_tests/tree/master/adcdma updated url
I found this ADC with DMA example and did mods to get it working on current sources and running on LadyBug. adcdma.ino.txt
The only thing that didn't map was: armv7m_clock_spin(20000); I assumed this was a delay? so I added delayMicroseconds( 20000 );
I use the onboard PIN_BUTTON to trigger an isr() that updates the value put out on A1/DAC1. Then wired A1 to A2 to have it reported when the button changes its count value.
On my Ladybug I cut the underside LED trace and wired the HIGH side pad ( away from USB ) to pin A3. When A3 is LOW the green LED lights, when HIGH it is OFF. That shows on A3 write with qBlinkg() in attached sketch.