Implementation
Period calculation example
›
Part 1: 64534 increments before the first overflow: 65534 - 1000 = 64534
(Maximum value of T12 - counter value at rising edge = total increments)
›
Part 2: 262136 increments between the first and last overflow:
4 * 65534 = 262136 (4 overflows * maximum value of T12 = total increments)
›
Part 3: 63955 increments after the last overflow: 63955 (counter value at rising edge)
›
Total increments between two rising edges: 64534 + 63955 = 390625
T12 count
(between 0 and 65534)
PWM signal (2 Hz)
Period of PWM signal 0.5 s
t
t
Interrupt on previous rising edge
T12 counter value: 1000
T12 counter value: 63955
Interrupt on current rising edge
5 overflows of timer T12 during one
PWM period
Part 1
Part 2
Part 3
12
2020-01-17
Copyright © Infineon Technologies AG 2020. All rights reserved.