Skip to content

Commit

Permalink
pico: unbreak pwm harder
Browse files Browse the repository at this point in the history
Only worked if it we were using PIO1 (not the default) and happened to choose SM1.
  • Loading branch information
Daft-Freak authored Sep 6, 2024
1 parent 691a2e5 commit dc4ddf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 32blit-pico/audio/pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void init_audio() {
}

// PWM PIO program assumes 48MHz
pio_sm_set_clkdiv(pio1, 1, clock_get_hz(clk_sys) / 48000000.0f);
pio_sm_set_clkdiv(audio_pio, pio_sm, clock_get_hz(clk_sys) / 48000000.0f);

[[maybe_unused]] bool ok = audio_pwm_default_connect(producer_pool, false);
assert(ok);
Expand Down

0 comments on commit dc4ddf3

Please sign in to comment.