Which Hardware Peripherals can be used for capturing the PWM period and duty cycle in

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

cross mob
User18151
Level 3
Level 3
First like received First solution authored
Hi,

Which Hardware Peripherals can be used for capturing the PWM period and duty cycle in AURIX?

Best regards,
Christine

#8042000 19481
0 Likes
1 Reply
User18237
Level 5
Level 5
First solution authored First like received
Hi Christine,

1) Timer Input Module (TIM) in General Timer module (GTM):
Several capture mode can be configured in TIM. One of mode is TPWM mode which is commonly used for measuring the period and duty cycle with 24 bits resolutions. GPR0 contains the duty cycle count and GPR1 contains the period count

2) Compare Capture Unit 6 (CCU6x):
Capture Mode 1 has to be selected in CCU6x. At falling edge of input, 16bits T12 value will be captured into Shadow Register CC6xSR. At rising edge, T12 value will be captured into Register CC6xR.
The period shall be based on the subtraction between current and previous CC6xSR (or CC6xR) value. The duty cycle value is the difference between CC6xSR and CC6xR Register. Please take note additional SW overhead is needed if using CCU6x.

Best regards,
Mr. AURIX™
0 Likes