aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/stm32l4/src/bin/dac_dma.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/stm32l4/src/bin/dac_dma.rs b/examples/stm32l4/src/bin/dac_dma.rs
index 81e6a58e4..aefc8412f 100644
--- a/examples/stm32l4/src/bin/dac_dma.rs
+++ b/examples/stm32l4/src/bin/dac_dma.rs
@@ -52,6 +52,8 @@ async fn dac_task1(dac: &'static mut Dac1Type<'static>) {
52 52
53 info!("TIM6 frequency is {}", TIM6::frequency()); 53 info!("TIM6 frequency is {}", TIM6::frequency());
54 const FREQUENCY: Hertz = Hertz::hz(200); 54 const FREQUENCY: Hertz = Hertz::hz(200);
55
56 // Compute the reload value such that we obtain the FREQUENCY for the sine
55 let reload: u32 = (TIM6::frequency().0 / FREQUENCY.0) / data.len() as u32; 57 let reload: u32 = (TIM6::frequency().0 / FREQUENCY.0) / data.len() as u32;
56 58
57 // Depends on your clock and on the specific chip used, you may need higher or lower values here 59 // Depends on your clock and on the specific chip used, you may need higher or lower values here