Skip to content

Commit 2b7bd5b

Browse files
authored
Merge pull request #231 from keestux/use-hclk-in-delayus
Use HCLK instead of SYSCLK in DelayUs
2 parents 5fce562 + c13e5c9 commit 2b7bd5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl DelayUs<u32> for Delay {
5353
// The SysTick Reload Value register supports values between 1 and 0x00FFFFFF.
5454
const MAX_RVR: u32 = 0x00FF_FFFF;
5555

56-
let mut total_rvr = us * (self.clocks.sysclk().0 / 1_000_000);
56+
let mut total_rvr = us * (self.clocks.hclk().0 / 1_000_000);
5757

5858
while total_rvr != 0 {
5959
let current_rvr = if total_rvr <= MAX_RVR {

0 commit comments

Comments
 (0)