From 7a78e5ae7c89077efdc6d4e18b55c8ea52b3d30c Mon Sep 17 00:00:00 2001 From: Dryw Wade Date: Mon, 5 Aug 2024 13:47:25 -0600 Subject: [PATCH] rp2/machine_bitstream: Set SysTick reset value. In case it doesn't have the correct value. Signed-off-by: Damien George --- ports/rp2/machine_bitstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/rp2/machine_bitstream.c b/ports/rp2/machine_bitstream.c index b65ec0214..8240fdad6 100644 --- a/ports/rp2/machine_bitstream.c +++ b/ports/rp2/machine_bitstream.c @@ -48,6 +48,10 @@ void __time_critical_func(machine_bitstream_high_low)(mp_hal_pin_obj_t pin, uint } } mp_hal_pin_output(pin); + + // Set systick reset value. + systick_hw->rvr = 0x00FFFFFF; + // Enable the systick counter, source CPU clock. systick_hw->csr = 5;