aboutsummaryrefslogtreecommitdiffstats
path: root/src/pru
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-09-11 13:07:54 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-11 13:12:18 -0400
commit2a6a9eb52f1a8ef61ee6f354aeee79ab9b0c4a0f (patch)
tree41eeb96d98acf26bfb9458bb35b4ad0860f829f1 /src/pru
parentbf85c61b4874a48929788c2e8030f1e59b71992c (diff)
downloadkutter-2a6a9eb52f1a8ef61ee6f354aeee79ab9b0c4a0f.tar.gz
kutter-2a6a9eb52f1a8ef61ee6f354aeee79ab9b0c4a0f.tar.xz
kutter-2a6a9eb52f1a8ef61ee6f354aeee79ab9b0c4a0f.zip
pru: Avoid calling "slp" instruction on pru0
If pru0 waits in sleep mode then a full beaglebone reboot is needed to reprogram the pru0 firmware. For now, avoid using the "slp" instruction as a workaround. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/pru')
-rw-r--r--src/pru/pru0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pru/pru0.c b/src/pru/pru0.c
index 1239813d..58f15175 100644
--- a/src/pru/pru0.c
+++ b/src/pru/pru0.c
@@ -166,7 +166,9 @@ process_io(void)
int can_sleep = check_can_read();
if (can_sleep) {
flush_messages();
- asm("slp 1");
+ while (!(read_r31() & (1 << (WAKE_PRU0_IRQ + R31_IRQ_OFFSET)))) {
+ //asm("slp 1");
+ }
}
}
}