https://github.com/mupq/pqm4
Revision f5198cb4cc94cc1620ddbaf2f66f99aab1ed742a authored by Ko- on 09 September 2019, 08:16:08 UTC, committed by Ko- on 10 September 2019, 08:42:46 UTC
hal_get_time() gave wrong values if the SysTick counter reached 0
between reading overflowcnt and calling systick_get_value(). This
behavior is now addressed by retrying if that happens. Thanks to djb for
pointing that out to us.

The reset value is also increased to the maximum of 2^24-1, such that
there is less overhead from the interrupt handler, and overflowcnt is
marked volatile.
1 parent 60e418f
Raw File
Tip revision: f5198cb4cc94cc1620ddbaf2f66f99aab1ed742a authored by Ko- on 09 September 2019, 08:16:08 UTC
Fix hal_get_time()
Tip revision: f5198cb
host_unidirectional.py
#!/usr/bin/env python3
import serial
import sys

dev = serial.Serial("/dev/ttyUSB0", 115200)

print("> Returned data:", file=sys.stderr)

while True:
    x = dev.read()
    sys.stdout.buffer.write(x)
    sys.stdout.flush()
back to top