diff options
| author | Per Rosengren <[email protected]> | 2025-09-16 19:14:00 +0200 |
|---|---|---|
| committer | Per Rosengren <[email protected]> | 2025-09-16 19:14:00 +0200 |
| commit | 4e1e4249556e20907839f09a65ae9283a8490cac (patch) | |
| tree | 0bee26be4e20853971a6bfe221695c54fdb44c0f /examples/stm32g0 | |
| parent | 07e86b23f1149440d022614b04916edeafeccfa5 (diff) | |
Cleanup
Diffstat (limited to 'examples/stm32g0')
| -rw-r--r-- | examples/stm32g0/src/bin/adc_oversampling.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/examples/stm32g0/src/bin/adc_oversampling.rs b/examples/stm32g0/src/bin/adc_oversampling.rs index d27e6f582..834d1cd4a 100644 --- a/examples/stm32g0/src/bin/adc_oversampling.rs +++ b/examples/stm32g0/src/bin/adc_oversampling.rs | |||
| @@ -20,17 +20,6 @@ async fn main(_spawner: Spawner) { | |||
| 20 | adc.set_sample_time(SampleTime::CYCLES1_5); | 20 | adc.set_sample_time(SampleTime::CYCLES1_5); |
| 21 | let mut pin = p.PA1; | 21 | let mut pin = p.PA1; |
| 22 | 22 | ||
| 23 | // From https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf | ||
| 24 | // page373 15.8 Oversampler | ||
| 25 | // Table 76. Maximum output results vs N and M. Grayed values indicates truncation | ||
| 26 | // 0x00 oversampling ratio X2 | ||
| 27 | // 0x01 oversampling ratio X4 | ||
| 28 | // 0x02 oversampling ratio X8 | ||
| 29 | // 0x03 oversampling ratio X16 | ||
| 30 | // 0x04 oversampling ratio X32 | ||
| 31 | // 0x05 oversampling ratio X64 | ||
| 32 | // 0x06 oversampling ratio X128 | ||
| 33 | // 0x07 oversampling ratio X256 | ||
| 34 | adc.set_oversampling_ratio(Ovsr::MUL16); | 23 | adc.set_oversampling_ratio(Ovsr::MUL16); |
| 35 | adc.set_oversampling_shift(Ovss::NO_SHIFT); | 24 | adc.set_oversampling_shift(Ovss::NO_SHIFT); |
| 36 | adc.oversampling_enable(true); | 25 | adc.oversampling_enable(true); |
