STMicroelectronics AN1602 Application Note 16-Bit Timing Operations ST7262/ST7263B MCUs

This Application Note describes how to use the ST7262 or ST7263B for 16-bit timing operations. The intention of this document is to show how to perform pulse measurement and PWM generation using the different timers available on each microcontroller type.


STMicroelectronics AN1602 Application Note 16-Bit Timing Operations ST7262/ST7263B MCUs - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
21
File format
PDF
File size
228 KB
Published
07 August, 2012
Updated
30 September, 2023
MD5 checksum
940FC92EA547D5BC215760057BFFFEF6

About this manual

This document explains how to use the ST7262 or ST7263B microcontrollers for 16-bit timing operations. It details methods for performing accurate pulse measurements and generating Pulse Width Modulation (PWM) signals using the available timers on these devices.

The guide covers two main approaches: cascading the 8-bit Auto Reload Timer (ART) with the 8-bit Time Base Unit (TBU) on the ST7262 to achieve 16-bit accuracy, and utilizing native 16-bit registers on the ST7263B. It provides specific algorithms for delay compensation during interrupt routines and includes assembly language examples for input capture and PWM generation.

What's inside

  • Introduction
  • 16-Bit Timing Measurements
  • Using ST7262
  • Delay Compensation Method
  • Pulse Length Measurement
  • Frequency Measurement
  • Using ST7263B
  • PWM Generation

Frequently asked questions

How is 16-bit accuracy achieved on the ST7262?

By cascading the 8-bit Auto Reload Timer (ART) with the 8-bit Time Base Unit (TBU), where the ART carry bit acts as the clock for the TBU.

What registers are used to hold the 16-bit timer value on the ST7263B?

The TIC1HR, TIC1LR, TIC2HR, and TIC2LR registers are associated with ICAP1 and ICAP2 pins.

How is the delay compensation method implemented in software?

The system transfers TBU and ART values into temporary variables and compares them to determine if the ART counter rolled over from FFh to 00h, adjusting the TBU value accordingly.

Download PDF (228 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →