From 4ca5b4e87a31b947009200070dec8ebeb17e2449 Mon Sep 17 00:00:00 2001 From: feelfree69 Date: Mon, 1 Jun 2026 15:07:37 +0200 Subject: [PATCH] Don't disable flash DIO operation before flashing - it works fine with DIO --- httpd/httpd.c | 1 - installer/installer.c | 3 --- rtlplayground.c | 1 - 3 files changed, 5 deletions(-) diff --git a/httpd/httpd.c b/httpd/httpd.c index c05a7e1..004ff0f 100644 --- a/httpd/httpd.c +++ b/httpd/httpd.c @@ -521,7 +521,6 @@ void handle_post(void) dbg_string("Have content octets\n"); p += 4; // Skip \r\n\r\n sequence at end of preamble of part - flash_init(0); // Re-initialize flash for non-DIO operation, otherwise flashing fails set_sys_led_state(SYS_LED_FAST); crc_value = 0; diff --git a/installer/installer.c b/installer/installer.c index 675a142..0320562 100644 --- a/installer/installer.c +++ b/installer/installer.c @@ -361,9 +361,6 @@ void installer(void) setup_serial_timer1(); print_string("\nRTLPlayground installer starting...\n"); - // Initialize flash functions with disable DIO because writing does not work otherwise - flash_init(0); - __xdata uint32_t dest = 0x0; __xdata uint32_t source = UPDATE_CODE_LOC; // A 512kByte = 4MBit Flash has 128 sectors, we copy only 120 diff --git a/rtlplayground.c b/rtlplayground.c index 0f79a69..f2ab1af 100644 --- a/rtlplayground.c +++ b/rtlplayground.c @@ -1884,7 +1884,6 @@ void check_and_flash_update_image(void) __xdata uint16_t j = 0; __xdata uint8_t * __xdata bptr; print_string("found update image!\nChecking integrity"); - flash_init(0); // Re-initialize flash for non-DIO operation, otherwise flashing will fail set_sys_led_state(SYS_LED_FAST); crc_value = 0x0000; for (i = 0; i < 1024; i++) {