Skip to content

Commit

Permalink
Add RP.Timer.Set_Debug_Pause. Ref raspberrypi/debugprobe#45
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGrosser committed Jun 28, 2023
1 parent 599d832 commit fc02c50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/drivers/rp-timer.adb
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,11 @@ package body RP.Timer is
return Time
is ((Ticks_Per_Second / 1_000) * Time (T));

procedure Set_Debug_Pause
(Core_0, Core_1 : Boolean)
is
begin
TIMER_Periph.DBGPAUSE.DBG := (As_Array => True, Arr => (0 => Core_0, 1 => Core_1));
end Set_Debug_Pause;

end RP.Timer;
5 changes: 5 additions & 0 deletions src/drivers/rp-timer.ads
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ is
(T : Natural)
return Time;

-- By default, the timer pauses when a debugger is attached to both CPU
-- cores. Set to False to disable this behavior.
procedure Set_Debug_Pause
(Core_0, Core_1 : Boolean);

end RP.Timer;

0 comments on commit fc02c50

Please sign in to comment.