[riot-notifications] [RIOT-OS/RIOT] cpu/stm32_common: add watchdog for stm32 (#11252)

Alexandre Abadie notifications at github.com
Fri Sep 13 08:56:39 CEST 2019


aabadie commented on this pull request.



> +# more than 50% from theoretical values (e.g STM32 board CLOCK_LSI)
+error_margin = 0.5
+
+
+def get_reset_time(child):
+    reset_time = 0
+    try:
+        start = time.time()
+        timeout = 10  # seconds
+        while time.time() < start + timeout:
+            child.expect(u"reset time: (\d+) us", timeout=1)
+            reset_time = int(child.match.group(1))
+        else:
+            # timeout
+            return reset_time
+            child.expect(u"reset time: (\d+) us", timeout=1)

Those 2 lines (under the return) are useless

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11252#pullrequestreview-287839244
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190912/bf45ec35/attachment.htm>


More information about the notifications mailing list