Target Demo file : esp32_spi_demo.slx
Host Demo file : spi_host_demo.slx
This demo shows how to use the SPI Block and write and read data to an external SPI EEPROM module and send that data to the host PC via UART.
- ESP32 module
- aMG USB Converter-N
- 25AA512 512 Kbit SPI Bus Serial EEPROM
- Host PC with Matlab Simulink
The CS pin (GPIO25), SCLK pin (GPIO14), MISO pin (GPIO12) and MOSI pin (GPIO13) should be correctly connected to the 25AA512 512 Kbit SPI Bus Serial EEPROM module.
The TX (GPIO32) and RX (GPIO33) pins of the ESP32 should be connected to the aMG USB Converter-N and the USB converter should be connected to the host PC.
What should be happening?¶
After the hardware is set up and the host simulink model is run on the host PC the written data to the SPI should be shown as in the following figure.