STMicroelectronics AN3140 SPEAr3xx General Purpose Timers Configuration Application Note

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


STMicroelectronics AN3140 SPEAr3xx General Purpose Timers Configuration Application Note - cover page
Brand
STMicroelectronics
Category
Other Electronics
Document type
Application Note
Language
English
Pages
14
File format
PDF
File size
267 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
F3B52E6D0CF0970604B89D0715C1A8AD

About this manual

This document provides instructions on configuring the general purpose timers (GPTs) integrated into the SPEAr3xx embedded microprocessor unit (MPU) family. It details how to read free-running timer counters and configure various clock sources for these timers.

The note also addresses specific technical issues, such as unpredictable counter values when clocks are asynchronous and a software workaround involving three consecutive reads. Additionally, it describes and proposes a solution for the status register interrupt bit clear issue reported during the Puppy Linux project.

What's inside

  • General purpose timers in SPEAr3xx
  • Reading a free-running timer counter
  • Scenario with slow CNT_Clk and fast READ_Clk
  • Configuring synchronous clocks
  • 3-read software workaround
  • Status register interrupt bit clear issue

Specifications

Counter width per channel16-bit counter register
GPT clock sourcesPLL3 (48MHz) or PLL1/OSCI/HCLK/PCLK prescaler
System tick generation intervalusually every 10 ms

Frequently asked questions

What is a valid workaround for reading free-running timer counters with asynchronous clocks?

Reading the counter three times and checking if the difference between consecutive reads is within an expected maximum value.

How do you configure CNT_Clk and READ_Clk to be synchronous?

Select PLL1 as the CNT_Clk source using the PRPH_CLK_CFG register.

Download PDF (267 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →