STMicroelectronics AN3202 SPEAr600 General Purpose Timers Configuration Guide

This application note provides information about how to configure the general purpose timers (GPTs) integrated in the SPEAr600 embedded MPU family.


STMicroelectronics AN3202 SPEAr600 General Purpose Timers Configuration Guide - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
11
File format
PDF
File size
162 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
D61FBC8AE8636DA7900673E28AAE9092

About this manual

The document details the architecture of the five GPT blocks within the SPEAr600 subsystem, describing their independent 16-bit counter channels and selectable clock sources. It explains how to configure the READ_Clk (APB clock) and CNT_Clk inputs using specific register addresses.

A significant portion of the guide addresses timing issues when reading free-running counters with asynchronous or non-phase-aligned clocks. It provides workarounds for scenarios where the counter clock is much slower than the read clock, such as generating system ticks in an operating system.

What's inside

  • General purpose timers (GPTs) in SPEAr600
  • Reading a free-running timer counter
  • Scenario with slow CNT_Clk and fast READ_CIk
  • How to configure CNT_Clk and READ_Clik to be synchronous
  • Revision history

Specifications

Counter width per channel16-bit counter register
Number of GPT blocksFive different GPT blocks

Frequently asked questions

How do I configure GPT4 and GPT5 to use PLL1 as the clock source?

Set bit 11 of the PRPH_CLK_CFG register (0xFCA8_0028) for GPT4, or bit 12 for GPT5.

What is the recommended workaround if CNT_Clk is much slower than READ_Clk?

Read the counter three times consecutively and discard the unstable value to ensure accuracy.

Download PDF (162 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →