diff --git a/software/firmware/pru1-shepherd-fw/main.c b/software/firmware/pru1-shepherd-fw/main.c index 52bc0004..a643d562 100644 --- a/software/firmware/pru1-shepherd-fw/main.c +++ b/software/firmware/pru1-shepherd-fw/main.c @@ -338,7 +338,7 @@ int32_t event_loop(volatile struct SharedMem *const shared_mem) continue; // for more regular gpio-sampling } - /* [Event 2] Timer compare 0 handle -> trigger for buffer swap on pru0 */ + /* [Event 2] Timer compare 0 handle -> buffer swap on pru0 */ if (shared_mem->cmp0_trigger_for_pru1) { DEBUG_EVENT_STATE_2; @@ -365,6 +365,7 @@ int32_t event_loop(volatile struct SharedMem *const shared_mem) pru0_sum_ticks_for_buffer = 0; pru0_max_ticks_per_sample = 0; } + // TODO: add warning for when sync not idle? /* more maintenance */ last_analog_sample_ticks = 0; @@ -373,7 +374,7 @@ int32_t event_loop(volatile struct SharedMem *const shared_mem) continue; // for more regular gpio-sampling } - /* [Event 3] Timer compare 1 handle -> trigger for analog sample on pru0 */ + /* [Event 3] Timer compare 1 handle -> analog sampling on pru0 */ if (shared_mem->cmp1_trigger_for_pru1) { /* prevent a race condition (cmp0_event has to happen before cmp1_event!) */ diff --git a/software/kernel-module/src/pru_msg_sys.c b/software/kernel-module/src/pru_msg_sys.c index c085b8c3..6dbd1225 100644 --- a/software/kernel-module/src/pru_msg_sys.c +++ b/software/kernel-module/src/pru_msg_sys.c @@ -232,6 +232,9 @@ static enum hrtimer_restart coordinator_callback(struct hrtimer *timer_for_resta "-> backpressure (val=%u)", had_work & 1u, pru_msg.value[0]); break; + case MSG_ERR_INCMPLT: + case MSG_ERR_INVLDCMD: + case MSG_ERR_NOFREEBUF: break; case MSG_ERR_TIMESTAMP: printk(KERN_ERR "shprd.pru%u: received timestamp is faulty (val=%u)", had_work & 1u, pru_msg.value[0]); @@ -255,7 +258,7 @@ static enum hrtimer_restart coordinator_callback(struct hrtimer *timer_for_resta break; default: /* these are all handled in userspace and will be passed by sys-fs */ - printk(KERN_ERR "shprd.k: received invalid command / msg-type (%02X) " + printk(KERN_ERR "shprd.k: received invalid command / msg-type (0x%02X) " "from pru%u", pru_msg.type, had_work & 1u); } diff --git a/software/python-package/shepherd_sheep/shepherd_emulator.py b/software/python-package/shepherd_sheep/shepherd_emulator.py index f74b1ca6..6682f005 100644 --- a/software/python-package/shepherd_sheep/shepherd_emulator.py +++ b/software/python-package/shepherd_sheep/shepherd_emulator.py @@ -236,7 +236,7 @@ def run(self) -> None: idx, emu_buf = self.get_buffer(verbose=self.verbose_extra) if emu_buf.timestamp_ns / 1e9 >= ts_end: - log.warning("UNEXPECTED! Out of bound timestamp collected -> begin to exit now") + log.debug("FINISHED! Out of bound timestamp collected -> begin to exit now") break if self.writer is not None: @@ -257,7 +257,7 @@ def run(self) -> None: while True: idx, emu_buf = self.get_buffer(verbose=self.verbose_extra) if emu_buf.timestamp_ns / 1e9 >= ts_end: - log.warning("UNEXPECTED! Out of bound timestamp collected -> begin to exit now") + log.debug("FINISHED! Out of bound timestamp collected -> begin to exit now") return if self.writer is not None: self.writer.write_buffer(emu_buf)