use div-ceil for QSPI clock calc
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
ci / Check build (pull_request) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled

This commit is contained in:
2026-02-19 13:20:48 +01:00
parent a58d398d82
commit 4590dfbc88
+1 -1
View File
@@ -261,7 +261,7 @@ impl ClockConfig {
if qspi_ref_clk < clocks.arm_clocks().cpu_1x_clk() {
return Err(ClockCalculationError::RefClockSmallerThanCpu1xClock);
}
let qspi_baud_rate_div = qspi_ref_clk / target_qspi_interface_clock;
let qspi_baud_rate_div = qspi_ref_clk.raw().div_ceil(target_qspi_interface_clock.raw());
let baud_rate_div = match qspi_baud_rate_div {
0..=2 => BaudRateDivisor::_2,
3..=4 => BaudRateDivisor::_4,