STMicroelectronics AN2737 STM8 I2C and SPI In-Application Programming Example

Application note provides examples of how to use various blocks of the STM8 microcontroller family and the STM8A and STM8S firmware libraries. It intends to provide two practical application examples of how to perform basic in application programming (IAP) using either the STM8 I2C or SPI peripherals


STMicroelectronics AN2737 STM8 I2C and SPI In-Application Programming Example - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
16
File format
PDF
File size
186 KB
Published
07 August, 2012
Updated
30 September, 2023
Model
STM8
MD5 checksum
206B5CCDF4586CD3C771195FAC3B13C7

About this manual

This application note provides practical examples of performing basic in-application programming (IAP) using the STM8 microcontroller's I2C and SPI peripherals. It demonstrates how the device behaves like an EEPROM accessible via standard protocols using a PC-based Aardvark host adapter.

The document details two specific examples: one using the I2C peripheral in 7-bit addressing mode with interrupts, and another using the SPI peripheral in polling mode. It includes hardware connection descriptions, firmware details, and step-by-step instructions for read and write commands.

What's inside

  • IAP example with I2C
  • IAP example with SPI
  • Hardware description
  • Firmware description
  • Read and write command examples
  • Packet description
  • Current read command
  • Random read command
  • Current write command
  • Random write command

Frequently asked questions

What peripherals does this application note cover?

The document covers the STM8 I2C and SPI peripherals for in-application programming.

Which host adapter is used in the examples?

The examples use the PC-based Aardvark host adapter to communicate with the STM8.

What addressing mode is used for the I2C example?

The I2C example uses 7-bit addressing mode.

Download PDF (186 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →