What are the functions of the SPI flash component?

What are the functions of the SPI flash component?

The spi_flash component contains API functions related to reading, writing, erasing, memory mapping for data in the external flash. The spi_flash component also has higher-level API functions which work with partitions defined in the partition table.

What happens when you send a read command to SPI flash memory?

If the Receive buffer overflow, data is usually just spilled and lost. So, when one sends a read command, which is a one byte op code and three address bytes, one will first receive four bytes of “garbage” in the SPI Master Receive buffer. These four bytes of garbage correspond to the op code and three address bytes.

Is it possible to encrypt the contents of SPI flash?

It is possible to encrypt the contents of SPI flash and have it transparently decrypted by hardware. Refer to the Flash Encryption documentation for more details. ESP32 features memory hardware which allows regions of flash memory to be mapped into instruction and data address spaces. This mapping works only for read operations.

How does a SPI master receive a byte?

Also, one cannot receive any bytes, unless one transmits a byte. Typically, the SPI Master that the user is commanding, has a Transmit Buffer, which sends bytes out on the MOSI line of the SPI bus and a Receive Buffer, which receives bytes in from the MISO line of the SPI bus.

Can a SPI1 flash chip read through cache?

As such, encrypted flash operations are only supported with the main flash chip (and not with other flash chips, that is on SPI1 with different CS, or on other SPI buses). Reading through cache is only supported on the main flash, which is determined by the HW.

Is the ESP Flash API the same as the SPI flash API?

The spi_flash component also has higher-level API functions which work with partitions defined in the partition table. Different from the API before IDF v4.0, the functionality of esp_flash_* APIs is not limited to the “main” SPI flash chip (the same SPI flash chip from which program runs).

What are functions of Partition Table API in SPI?

Partition table API functions do bounds checking and calculate correct offsets in flash, based on data stored in a partition table. It is possible to encrypt the contents of SPI flash and have it transparently decrypted by hardware. Refer to the Flash Encryption documentation for more details.