From eeef91d46721ccd5fda4cb5177695f42d8e2fe1f Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 14 Feb 2023 00:12:27 +0800 Subject: [PATCH 1/2] increase cache flush margin this seems to help #321. At the very least, on my test unit an image without this crashes fairly reliably, and with this, it can complete a few tries consecutively without fail --- services/spinor/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/spinor/src/main.rs b/services/spinor/src/main.rs index 55e67c4b3..0c92eb616 100644 --- a/services/spinor/src/main.rs +++ b/services/spinor/src/main.rs @@ -392,7 +392,7 @@ mod implementation { #[cfg(feature="extra_flush")] const CACHE_LINE_WIDTH: usize = 32; // in bytes #[cfg(feature="extra_flush")] - const FLUSH_SIZE_BYTES: usize = 16384 * 5; // cache capacity * 4 ways + 1 to force overlap + const FLUSH_SIZE_BYTES: usize = 16384 * 8; // cache capacity * 4 ways x2 to force overlap pub struct Spinor { id: u32, From 3f8d22eb2588c0cbefffb319f63522b44110f14d Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 20 Feb 2023 16:53:24 +0800 Subject: [PATCH 2/2] force backlight off before issuing kill command in test this helps deconvolve the backlight current from the idle current more reliably --- services/shellchat/src/cmds/test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/shellchat/src/cmds/test.rs b/services/shellchat/src/cmds/test.rs index 2d227c4f4..8598b4864 100644 --- a/services/shellchat/src/cmds/test.rs +++ b/services/shellchat/src/cmds/test.rs @@ -328,7 +328,9 @@ impl<'a> ShellCmdApi<'a> for Test { } "kill" => { log::info!("{}|KILL|", SENTINEL); - env.ticktimer.sleep_ms(500).unwrap(); + env.llio.wfi_override(true).unwrap(); + env.com.set_backlight(0, 0).unwrap(); + env.ticktimer.sleep_ms(800).unwrap(); env.llio.self_destruct(0x2718_2818).unwrap(); env.llio.self_destruct(0x3141_5926).unwrap(); env.ticktimer.sleep_ms(100).unwrap();