From 26a4d7b261e1025a3c560891c36af508dc101354 Mon Sep 17 00:00:00 2001
From: jdonszelmann <jonabent@gmail.com>
Date: Fri, 12 Jan 2024 13:16:56 +0100
Subject: [PATCH] more delay in set tick freq

---
 Cargo.toml  | 2 +-
 src/time.rs | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 51faec7..987979e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "tudelft-quadrupel"
-version = "3.0.0"
+version = "3.0.1"
 edition = "2021"
 authors = [
     "Anne Stijns <anstijns@gmail.com>",
diff --git a/src/time.rs b/src/time.rs
index 5a5dc12..dd0fbd6 100644
--- a/src/time.rs
+++ b/src/time.rs
@@ -202,6 +202,7 @@ pub fn wait_for_next_tick() {
 /// Set this timer to interrupt at the given frequency.
 /// The next interrupt will be after 1/hz seconds.
 ///
+/// Call this before using any other time-related functions.
 #[allow(clippy::missing_panics_doc)]
 pub fn set_tick_frequency(hz: u64) {
     RTC.modify(|rtc| {
@@ -218,7 +219,7 @@ pub fn set_tick_frequency(hz: u64) {
     });
 
     // Give the counter time to clear (Section 19.1.8 of the NRF51 reference manual V3)
-    delay_us_assembly(100);
+    delay_us_assembly(500);
 }
 
 /// Delay the program for a time using assembly instructions.
-- 
GitLab