Skip to content

Commit cc23ebc

Browse files
authored
Adc changes (#93)
* Adc changes * ADC adjust external triggers to work with different adc units * Fix issue with adc in release mode, by better following RM0440's conversion procedure * ADC - Add Discountinuous mode * Add methods for setting subgroup length for ADC Discontinuous mode * Add methods for checking for ADC overrun * ADC make compile for all devices * OP follower can be used by ADC
1 parent d96a466 commit cc23ebc

File tree

3 files changed

+481
-103
lines changed

3 files changed

+481
-103
lines changed

examples/adc-continious-dma.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ fn main() -> ! {
6969
loop {
7070
let mut b = [0_u16; 4];
7171
let r = transfer.read_exact(&mut b);
72+
assert!(
73+
!transfer.get_overrun_flag(),
74+
"DMA did not have time to read the ADC value before ADC was done with a new conversion"
75+
);
7276

7377
info!("read: {}", r);
7478
assert!(r == b.len());

0 commit comments

Comments
 (0)