Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rp2_common/hardware_powman/powman.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void powman_timer_set_1khz_tick_source_xosc_with_hz(uint32_t xosc_freq_hz) {
bool was_running = powman_timer_is_running();
if (was_running) powman_timer_stop();
uint32_t xosc_freq_khz = xosc_freq_hz / 1000;
uint32_t xosc_freq_khz_frac16 = (xosc_freq_khz % 1000) * 65536 / 1000;
uint32_t xosc_freq_khz_frac16 = (xosc_freq_hz % 1000) * 65536 / 1000;
powman_write(&powman_hw->xosc_freq_khz_int, xosc_freq_khz);
powman_write(&powman_hw->xosc_freq_khz_frac, xosc_freq_khz_frac16);
powman_set_bits(&powman_hw->timer, POWMAN_TIMER_USE_XOSC_BITS);
Expand Down
Loading