Skip to content

Commit

Permalink
Initialize the tick source for timer0
Browse files Browse the repository at this point in the history
  • Loading branch information
cibomahto committed Dec 1, 2024
1 parent bccfdf7 commit f2327dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/machine/machine_rp2.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ func machineInit() {

// Peripheral clocks should now all be running
unresetBlockWait(RESETS_RESET_Msk)

// RP2350 only
// Configure tick generator source for TIMER0
rp.TICKS.SetTIMER0_CTRL_ENABLE(0)
rp.TICKS.SetTIMER0_CYCLES(12)
rp.TICKS.SetTIMER0_CTRL_ENABLE(1)
}

//go:linkname ticks runtime.machineTicks
Expand Down

0 comments on commit f2327dc

Please sign in to comment.