To fill a buffer of 100KB stored in internal RAM it takes only 6 ms which is really fast using sdmmc_read_sectors()
But with the same buffer size stored in PSRAM it takes 136 ms ? Why so slow ? I'm using QSPI at 80 MHz for the flash and PSRAM.
Code: Select all
uint16_t *buf;
uint16_t *buf2;
buf = malloc(50000*sizeof(uint16_t));
buf2 = heap_caps_malloc(50000*sizeof(uint16_t), MALLOC_CAP_SPIRAM);
sdmmc_read_sectors(card, buf, offset, SECTOR_NB)
sdmmc_read_sectors(card, buf2, offset, SECTOR_NB)
Code: Select all
memcpy(buf2, buf,50000*sizeof(uint16_t));