Skip to content

Commit

Permalink
Skip /32 AHB prescaler
Browse files Browse the repository at this point in the history
  • Loading branch information
knoellle committed Mar 30, 2023
1 parent e6031a3 commit 3bf06dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ impl RccExt for RCC {

let ahb_freq = match cfgr.ahb_pre {
AHBPrescaler::NotDivided => sys_clk,
// skip /32
pre if pre as u8 & 0b0100 > 0 => sys_clk / (1 << (pre as u8 - 6)),
pre => sys_clk / (1 << (pre as u8 - 7)),
};

Expand Down

0 comments on commit 3bf06dc

Please sign in to comment.