This application note provides an example of communication using the SPI peripheral of the ST7. It shows an easy way of communicating between a ST7 microcontroller and a M95xxx SPI EEPROM. The purpose is to perform, through SPI, a write in the memory, followed by a read of the written data.
The document presents a practical example of using the SPI peripheral on the ST7 microcontroller to communicate with an M95xxx series SPI EEPROM. It details the interface setup, including the use of the SS pin for slave selection and the configuration of baud rates and clock polarity/phase.
The guide covers the management of the M95040 EEPROM, explaining its status register, instruction set (such as Write Enable Latch and Read Data), and the specific protocol required for writing and reading data. It also provides a software example in assembly code that initializes the hardware, performs write cycles, reads back the data, and includes flowcharts for the process.
| Memory Capacity | 4K memory composed of two pages of 2K bytes |
|---|---|
| Data Shift Direction | All instructions, addresses and data are shifted in and out of the chip MSB first. |
| Microcontroller Model | ST72264 MCU |
| EEPROM Model | M95040 EEPROM |
The goal is to present a practical example of communication using the SPI peripheral of the ST7 microcontroller with an M95xxx SPI EEPROM.
It is possible to communicate with several EEPROMs by reserving one I/O pin for each device to select it in turn.