ST AN1070handbook

The goal of this application note is to present a software technique for determining if data and program in FLASH have been corrupted and if so not to run the user program. The program described in this application note has been written for the ST72F26x family (ST72260G1, ST72262G1, ST72262G2, ST72264G1, ST72264G2) but can be extended to all other ST7 MCUs. In this application, we chose to use a ST72264G2.


ST AN1070handbook - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
10
File format
PDF
File size
52 KB
Published
07 August, 2012
Updated
29 September, 2023
Model
ST7
MD5 checksum
7D20A1C55151B26EF6DA1F32DE83B216

About this manual

This document presents a software technique for determining if data and programs in FLASH memory have been corrupted. The goal is to prevent the user program from running if corruption is detected. The described program was written for the ST72F26x family but can be extended to other ST7 MCUs.

The note details the calculation of a checksum by adding the content of the FLASH memory. It explains how to integrate a 'Safe' routine into the application, modify the reset vector, and use the emulator to calculate and store the checksum. The document also describes the operation of the Safe routine, which halts the microcontroller if the checksum comparison fails, and provides flowcharts for the process.

What's inside

  • Introduction
  • Checksum Calculation
  • Using the Same Routine with a User's Application
  • Description of Safe Routine Operation
  • Flowcharts
  • Software
  • Legal Disclaimer

Specifications

Supported Device FamilyST72F26x family
Specific DevicesST72260G1, ST72262G1, ST72262G2, ST72264G1, ST72264G2
Checksum Calculation Time (4k device)13.7 ms
CPU Frequency for Timing8MHz

Frequently asked questions

What is the goal of the checksum self-checking capability?

The goal is to determine if data and program in FLASH have been corrupted and, if so, not to run the user program.

How is the checksum calculated?

The checksum is calculated by a simple addition of the content of the FLASH.

What happens if the checksum comparison is not OK?

The microcontroller is halted, and the user application won't be run.

Download PDF (52 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →