I have tried running some benchmarks for flash read performance on my esp32-s3, and noticed that
Code: Select all
esp_flash_read
Code: Select all
esp_flash_read_encrypted
Code: Select all
esp_partition_read
Reference code below, used the same setup for esp_flash_read:
Code: Select all
#define NUM_BLOCKS 64
void test_flash_read_plaintext(size_t block_size) {
uint8_t *flash_buffer = (uint8_t *)malloc(block_size);
const esp_partition_t *partition = get_partition_to_test();
start_time = esp_timer_get_time();
for (int i = 0; i < NUM_BLOCKS; i++) {
esp_flash_read_encrypted(NULL,partition->address + i * block_size, flash_buffer, block_size);
}
end_time = esp_timer_get_time();
printf("esp_flash_read: %llu microseconds", (end_time - start_time)/NUM_BLOCKS;
}