diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf/src/bin/pwm_sequence.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/nrf/src/bin/pwm_sequence.rs b/examples/nrf/src/bin/pwm_sequence.rs index d02b0c9c5..6014c8994 100644 --- a/examples/nrf/src/bin/pwm_sequence.rs +++ b/examples/nrf/src/bin/pwm_sequence.rs | |||
| @@ -91,7 +91,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 91 | let mut config = SequenceConfig::default(); | 91 | let mut config = SequenceConfig::default(); |
| 92 | config.prescaler = Prescaler::Div1; | 92 | config.prescaler = Prescaler::Div1; |
| 93 | // 1 period is 32767 * 1/16mhz = 0.002047938 = 2.047938ms | 93 | // 1 period is 32767 * 1/16mhz = 0.002047938 = 2.047938ms |
| 94 | config.top = 32767; | 94 | config.max_duty = 32767; |
| 95 | // pwm example is delaying >~3ms before updating duty cycle, our refreshes | 95 | // pwm example is delaying >~3ms before updating duty cycle, our refreshes |
| 96 | // happen exactly at 2.047938ms so we need a delay after each value of >~1ms | 96 | // happen exactly at 2.047938ms so we need a delay after each value of >~1ms |
| 97 | // which for us is ~1-2 periods | 97 | // which for us is ~1-2 periods |
