STMicroelectronics AN970 SPI Communication Application Note

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.


STMicroelectronics AN970 SPI Communication Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
10
File format
PDF
File size
64 KB
Published
07 August, 2012
Updated
30 September, 2023
MD5 checksum
E8481A7BF3B104A019C220621B1BDEA2

About this manual

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.

What's inside

  • ST7 / EEPROM SPI Interface
  • ST72264 Configuration
  • SPI Peripheral Setup
  • Baud Rates and Timing
  • M95040 EEPROM Management
  • Instruction Set
  • SPI Communication Protocol
  • Software Example

Specifications

Memory Capacity4K memory composed of two pages of 2K bytes
Data Shift DirectionAll instructions, addresses and data are shifted in and out of the chip MSB first.
Microcontroller ModelST72264 MCU
EEPROM ModelM95040 EEPROM

Frequently asked questions

What is the purpose of this application note?

The goal is to present a practical example of communication using the SPI peripheral of the ST7 microcontroller with an M95xxx SPI EEPROM.

How are multiple EEPROMs selected?

It is possible to communicate with several EEPROMs by reserving one I/O pin for each device to select it in turn.

Download PDF (64 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →