Skip to content

Commit

Permalink
fills perfectly for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
vk2seb committed Sep 23, 2023
1 parent 9dc79cc commit e5dba17
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion firmware/litex-fw/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions firmware/litex-fw/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ fn main() -> ! {
}

loop {
/*
log::info!("READ");
unsafe {
fence(Ordering::Release);
Expand All @@ -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);
Expand Down

0 comments on commit e5dba17

Please sign in to comment.