STMicroelectronics AN2159 SPI Protocol Application Note

The STPM01 and STPM10 devices are energy meter ASSPs (Application Specific Standard Products) designed to address a wide range of electricity metering requirements thanks to their built-in functionalities as signal conditioning, signal processing, data conversion, input/output signals and voltage reference. STPM10 is dedicated for peripheral use only in microcontroller based applications, while STPM01 is able to work as a peripheral but also as a standalone device, since it can permanently store configuration and calibration data. Both the devices have an SPI port to write configuration parameters and read all the information on the line energy from their internal registers. Measured data (like active, reactive and apparent energy, VRMS, IRMS, instantaneous voltage and current, line frequency, device status etc.) should be read by the microcontroller at a fixed time interval to be further processed. This application note describes the SPI protocol to read measured data from STPM01 and STPM10 in a single-phase energy meter and how these readings should be processed by the application.


STMicroelectronics AN2159 SPI Protocol Application Note - cover page
Brand
STMicroelectronics
Category
Other Electronics
Document type
Application Note
Language
English
Pages
23
File format
PDF
File size
668 KB
Published
06 August, 2012
Updated
28 September, 2023
MD5 checksum
41ACA565B9CDCCF8B64A36B6A0DE68E4

About this manual

The document details the SPI interface for STPM01 and STPM10 Application Specific Standard Products (ASSPs) used in single-phase energy metering. It explains how to connect the devices to a microcontroller and defines the specific pin functions (SCS, SYN, SCL, SDA) required for communication.

The guide covers SPI operations including remote reset requests, writing configuration data to registers, and reading internal data registers containing energy and voltage/current measurements. It also provides instructions on data processing, parity checks, and converting raw register values into actual measured quantities.

What's inside

  • Devices overview
  • SPI module description
  • Connection to microcontroller
  • SPI interface timings
  • Remote reset request
  • Data registers writing
  • Reading data registers
  • Data processing
  • Converting readings into measured values

Specifications

Data read speed32 MHz
Data write speed100 kHz

Frequently asked questions

How is the STPMxx SPI interface connected to a microcontroller?

Connect MISO to SDA, SCLK to SCL, SS to SCS, and use a general purpose I/O pin for SYN.

Do STPM01 and STPM10 have a dedicated reset pin?

No, they are automatically reset by the power on reset (POR) circuit when Vcc crosses 2.5 V.

Download PDF (668 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →