Closed thejpster closed 1 year ago
There seems to be a bug - sometimes on reboot, you get a weird, shifted image.
I think I can reliably cause it by running FAULT.ELF
having booted with probe-run
. A reboot fixes it.
Edit: Actually, disconnecting probe-run with Ctrl+C is enough to trigger it.
It's like it starts up and an interrupt fires before we are ready for it and then everything is just out of sync. Maybe we should reset the PIO and disable all the interrupts on start-up, because apparently rebooting from the HardFault handler with a probe connected doesn't do that.
currently running with commit
tingo@kg-core1:~/personal/projects/2023/rust/embedded/neotron/Neotron-Pico-BIOS $ git log | head -5
commit 9e2d0840f19ffc4bd97a46c05d5d28494389f09f
Author: Jonathan 'theJPster' Pallant <github@thejpster.org.uk>
Date: Sat Jul 8 21:52:24 2023 +0100
Moved a bunch of stuff around.
I'm unable to replicate the weird shifted image
DEBUG Idle...
└─ neotron_pico_bios::power_idle @ src/main.rs:2104
^Cthread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/tingo/.cargo/registry/src/github.com-1ecc6299db9ec823/probe-rs-0.18.0/src/probe/cmsisdap/mod.rs:690:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
How strange.
I'm using a Raspberry Pi official SWD Debug Probe. Maybe I'll try an ST-Link or something and see if that changes things.
Seems OK on my other computer?!
Now the Timing PIO State Machine (Timing SM) triggers a CPU IRQ for the line currently being played out.
The DMA IRQ has been removed - we don't care when DMA has finished loading the FIFO - we just assume it happens in good time.
Closes #70