Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

AURIX™ MCU: General Purpose Timer Unit (GPT12) reload value calculation – KBA237958

AURIX™ MCU: General Purpose Timer Unit (GPT12) reload value calculation – KBA237958

50 replies posted 25 likes received 25 replies posted

Community Translated: AURIX™ MCU:汎用タイマユニット(GPT12)リロード値の計算 – KBA237958

Question: How do I calculate the reload value using AURIX™ General Purpose Timer Unit (GPT12) as a timer?


To use GPT12 as a timer, a detailed look at the module is necessary.

The GPT12 module consists of two blocks (GPT1 and GPT2) that contain several timers/counters:

  • GPT1: one core timer (T3) and two auxiliary timers (T2, T4)
  • GPT2: one core timer (T6) and one auxiliary timer (T5)

Each timer can count either up or down and operate in different modes, for example, Timer Mode.

For the realization of a timer, one block of GPT12 is used:

  • The core timer operates in Timer Mode counting down
  • Each time an underflow occurs, the value of the auxiliary timer is transferred to the core timer; therefore, this value is called the “reload value”

To calculate the reload value, consider the following parameters:

  • the base frequency of the GPT12 module
  • the prescaler of the used block
  • the prescaler of the timer input of the used block

The reload value is calculated using the formula:



desired frequency:

5 Hz (T = 200 ms)

base frequency:

100 MHz

block Prescaler:

4 / 8 / 16 / 32

timer Prescaler:

1 / 2 / 4 / 8 / 16 / 32 / 64 / 128

reload value: 16 Bit (0 … 65535)


Note: This KBA applies to the following series of AURIX™ MCUs:

  • AURIX™ TC2xx series
  • AURIX™ TC3xx series