psram: fixed esp32 2t mode fail issue

This commit is contained in:
Armando 2023-03-29 14:59:35 +08:00
parent 61ef154a60
commit 9d6809bc99
3 changed files with 6 additions and 1 deletions

View File

@ -363,7 +363,7 @@ static int psram_cmd_config(psram_spi_num_t spi_num, psram_cmd_t* pInData)
int len = (pInData->txDataBitLen + 31) / 32; int len = (pInData->txDataBitLen + 31) / 32;
if (p_tx_val != NULL) { if (p_tx_val != NULL) {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
WRITE_PERI_REG(SPI_W0_REG(spi_num), p_tx_val[i]); WRITE_PERI_REG(SPI_W0_REG(spi_num) + i * 4, p_tx_val[i]);
} }
} }
// Set data send buffer length.Max data length 64 bytes. // Set data send buffer length.Max data length 64 bytes.

View File

@ -11,6 +11,7 @@ from pytest_embedded import Dut
'config', 'config',
[ [
'esp32_release', 'esp32_release',
'esp32_2t',
], ],
indirect=True, indirect=True,
) )

View File

@ -0,0 +1,4 @@
CONFIG_IDF_TARGET="esp32"
CONFIG_SPIRAM=y
CONFIG_SPIRAM_2T_MODE=y
CONFIG_SPIRAM_BANKSWITCH_ENABLE=n