aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-31 13:25:30 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-03-31 13:37:05 -0400
commit72d0c770d375b5bb728d41c01522c9865becd9f0 (patch)
treeed4163705ff7a342c4c50846d306598aedd5fafe
parent8b48de1be8866db8a99d8d881079fff3e6f2a863 (diff)
downloadkutter-72d0c770d375b5bb728d41c01522c9865becd9f0.tar.gz
kutter-72d0c770d375b5bb728d41c01522c9865becd9f0.tar.xz
kutter-72d0c770d375b5bb728d41c01522c9865becd9f0.zip
pru: Avoid using a timer wake time of exactly zero
It appears the PRU timer will not trigger on a match of exactly zero. If the next timer happened to be set to exactly zero, it could cause software timers to get stuck and result in "move queue empty" errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/pru/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pru/main.c b/src/pru/main.c
index 88e622a6..e91477e1 100644
--- a/src/pru/main.c
+++ b/src/pru/main.c
@@ -56,6 +56,8 @@ irq_wait(void)
static void
timer_set(uint32_t value)
{
+ if (!value)
+ value = 1;
CT_IEP.TMR_CMP0 = value;
}