Allow PSRAM overclocking by enabling burst wrap mode.

This commit is contained in:
eightycc 2025-03-28 06:25:15 -07:00
parent e98a74b69c
commit 873994107f

View file

@ -395,14 +395,25 @@ static void __no_inline_not_in_flash_func(setup_psram)(void) {
}
// RESETEN, RESET and quad enable
for (uint8_t i = 0; i < 3; i++) {
for (uint8_t i = 0; i < 4; i++) {
qmi_hw->direct_csr |= QMI_DIRECT_CSR_ASSERT_CS1N_BITS;
if (i == 0) {
switch (i) {
case 0:
// RESETEN
qmi_hw->direct_tx = 0x66;
} else if (i == 1) {
break;
case 1:
// RESET
qmi_hw->direct_tx = 0x99;
} else {
break;
case 2:
// Quad enable
qmi_hw->direct_tx = 0x35;
break;
case 3:
// Toggle wrap boundary mode
qmi_hw->direct_tx = 0xc0;
break;
}
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0) {
}