I use only SPI registers to read/write flash and experience strange problem.
64 bytes write works fine, but 64 bytes read hangs.
There're 16 SPI data registers, each register is 32 bit. (W0-W15)
So, it seems like I should be able to read/write 64 bytes blocks of data.
For writing it is the case. I can write up to 64 byte block at a time. And can verify that operation is successful.
But reading works up to 63 bytes block. If attempt to read 64 bytes block system hangs.
Code: Select all
int i;
uint32_t buf[16];
SPI(0).ADDR = TEST_ADDR | (64 << 24);
SPI(0).CMD = SPI_CMD_READ;
while (SPI(0).CMD) {}; // operation never ends, loop forever
for (i = 0; i < 16; i++) {
buf[i] = SPI(0).W[i];
}
There's a sample project that demonstrates this problem https://github.com/sheinz/esp-spi-flash-test
It doesn't use any SDK libraries.
Thanks.