This commit is contained in:
eightycc 2025-03-29 02:43:50 +00:00 committed by GitHub
commit a353ae5ae5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -403,14 +403,25 @@ static void __no_inline_not_in_flash_func(setup_psram)(void) {
} }
// RESETEN, RESET and quad enable // 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; qmi_hw->direct_csr |= QMI_DIRECT_CSR_ASSERT_CS1N_BITS;
if (i == 0) { switch (i) {
qmi_hw->direct_tx = 0x66; case 0:
} else if (i == 1) { // RESETEN
qmi_hw->direct_tx = 0x99; qmi_hw->direct_tx = 0x66;
} else { break;
qmi_hw->direct_tx = 0x35; case 1:
// RESET
qmi_hw->direct_tx = 0x99;
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) { while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0) {
} }