From e5dba171913f74b131841101953dae9100b6b579 Mon Sep 17 00:00:00 2001 From: Sebastian Holzapfel Date: Sat, 23 Sep 2023 09:23:18 +0200 Subject: [PATCH] fills perfectly for some reason --- firmware/litex-fw/src/log.rs | 20 +++++++++++++++++++- firmware/litex-fw/src/main.rs | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/firmware/litex-fw/src/log.rs b/firmware/litex-fw/src/log.rs index 58cdd1c..8661ed3 100644 --- a/firmware/litex-fw/src/log.rs +++ b/firmware/litex-fw/src/log.rs @@ -34,7 +34,7 @@ fn exception_handler(_trap_frame: &riscv_rt::TrapFrame) -> ! { #[export_name = "DefaultHandler"] fn default_handler() { - _logger_write(b"irq\n"); + //_logger_write(b"irq\n"); let mut pending: u32 = 0; unsafe { @@ -53,6 +53,24 @@ fn default_handler() { unsafe { peripherals.DMA_WRITER0.ev_pending.write(|w| w.bits(pending_type)); } + if 0x10 == offset { + let base = peripherals.DMA_WRITER0.base0.read().bits(); + let buf = base as *const u32; + for i in 0..0x10 { + unsafe { + info!("{:x}@{:x}", i, *buf.add(i)); + } + } + } + if offset == 0x1f { + let base = peripherals.DMA_WRITER0.base0.read().bits(); + let buf = base as *const u32; + for i in 0x10..0x1f { + unsafe { + info!("{:x}@{:x}", i, *buf.add(i)); + } + } + } } else if (pending & (1u32 << pac::Interrupt::DMA_READER0 as u32)) != 0 { let pending_type = peripherals.DMA_READER0.ev_pending.read().bits(); let offset = peripherals.DMA_READER0.offset.read().bits(); diff --git a/firmware/litex-fw/src/main.rs b/firmware/litex-fw/src/main.rs index 969bd8d..161d841 100644 --- a/firmware/litex-fw/src/main.rs +++ b/firmware/litex-fw/src/main.rs @@ -82,6 +82,7 @@ fn main() -> ! { } loop { + /* log::info!("READ"); unsafe { fence(Ordering::Release); @@ -93,6 +94,7 @@ fn main() -> ! { } } + */ /* log::info!("jack_detect {:x}", peripherals.EURORACK_PMOD0.csr_jack.read().bits() as u8); log::info!("input0 {}", peripherals.EURORACK_PMOD0.csr_cal_in0.read().bits() as i16);