From 1e073b20b6e9830f082d7c0b42198fb3bdb073d8 Mon Sep 17 00:00:00 2001 From: feelfree69 <43138983+feelfree69@users.noreply.github.com> Date: Tue, 20 Jan 2026 08:13:22 +0100 Subject: [PATCH] do flash_init() earlier As suggested in review comment --- rtlplayground.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rtlplayground.c b/rtlplayground.c index 1866e73..5031f0e 100644 --- a/rtlplayground.c +++ b/rtlplayground.c @@ -1791,6 +1791,11 @@ void bootloader(void) EA = 1; // Enable global interrupt + // Flash controller should be initialized before any code in other banks is being fetched + // See this issue: https://github.com/logicog/RTLPlayground/issues/70 + print_string("\nInitializing Flash controller\n"); + flash_init(1); + // Set default for SFP pins so we can start up a module already inserted sfp_pins_last = 0x33; // signal LOS and no module inserted (for both slots, even if only 1 present) // We have not detected any link @@ -1809,10 +1814,6 @@ void bootloader(void) print_string("INCORRECT MACHINE!"); } - print_string("\nStarting up...\n"); - print_string(" Flash controller\n"); - flash_init(1); - // Print SW version print_sw_version();