Skip to content

Commit fd1a730

Browse files
committed
Fix PSRAM so readback test passes
1 parent 4a55e96 commit fd1a730

File tree

1 file changed

+3
-3
lines changed
  • ports/raspberrypi/supervisor

1 file changed

+3
-3
lines changed

ports/raspberrypi/supervisor/port.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ static void __no_inline_not_in_flash_func(setup_psram)(void) {
225225
_psram_size *= 4;
226226
}
227227

228+
// Mark that we can write to PSRAM.
229+
xip_ctrl_hw->ctrl |= XIP_CTRL_WRITABLE_M1_BITS;
230+
228231
// Test write to the PSRAM.
229232
volatile uint32_t *psram_nocache = (volatile uint32_t *)0x15000000;
230233
psram_nocache[0] = 0x12345678;
@@ -233,9 +236,6 @@ static void __no_inline_not_in_flash_func(setup_psram)(void) {
233236
_psram_size = 0;
234237
return;
235238
}
236-
237-
// Mark that we can write to PSRAM.
238-
xip_ctrl_hw->ctrl |= XIP_CTRL_WRITABLE_M1_BITS;
239239
}
240240

241241
void port_heap_init(void) {

0 commit comments

Comments
 (0)