Skip to content

Commit 1fb09db

Browse files
cwespressifxiaoxiang781216
authored andcommitted
xtensa/esp32s3: Fix wrong dummy length in mode register reading
1. Corresponding link: espressif/esp-idf@54a9386
1 parent 4fa7ab8 commit 1fb09db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/xtensa/src/esp32s3/esp32s3_psram_octal.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define OCT_PSRAM_WR_CMD_BITLEN 16
5353
#define OCT_PSRAM_ADDR_BITLEN 32
5454
#define OCT_PSRAM_RD_DUMMY_BITLEN (2 * (10 - 1))
55+
#define OCT_PSRAM_RD_REG_DUMMY_BITLEN (2 * (5 - 1))
5556
#define OCT_PSRAM_WR_DUMMY_BITLEN (2 * (5 - 1))
5657

5758
#define OCT_PSRAM_CS_SETUP_TIME 3
@@ -189,7 +190,7 @@ static void IRAM_ATTR set_psram_reg(int spi_num,
189190
int cmd_len = 16;
190191
uint32_t addr = 0x0;
191192
int addr_bit_len = 32;
192-
int dummy = OCT_PSRAM_RD_DUMMY_BITLEN;
193+
int dummy = OCT_PSRAM_RD_REG_DUMMY_BITLEN;
193194
int data_bit_len = 16;
194195
struct opi_psram_reg psram_reg =
195196
{
@@ -277,7 +278,7 @@ static void IRAM_ATTR get_psram_reg(int spi_num,
277278
esp_rom_spiflash_read_mode_t mode = ESP_ROM_SPIFLASH_OPI_DTR_MODE;
278279
int cmd_len = 16;
279280
int addr_bit_len = 32;
280-
int dummy = OCT_PSRAM_RD_DUMMY_BITLEN;
281+
int dummy = OCT_PSRAM_RD_REG_DUMMY_BITLEN;
281282
int data_bit_len = 16;
282283

283284
/* Read MR0~1 register */

0 commit comments

Comments
 (0)