Skip to content

hackdino/XMC4500-PWM-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

XMC4500 PWM Example

This is an simple XMC4500 Barebone PWM Example which use the CCU4 in Edge Aligned Mode
The PWM duty cycle can change over the Compare Value.
=> DC = 1 - Compare-Value / (Period-Value +1)
The PWM Frequency can change over the Period Value.
=> T = Period-Value + 1

The following example show a pwm with a duty-cycle from 20% and a pwm Frequency from 1kHz.

Calculating the Period-Value:
Period-Value = (10E-3/16,666ns) - 1

Calculating the Compare-Value:
Compare-value = Period-value - (Period-value * 0,20)

The following picture shows the Output on P1.3

alt text

About

An XMC4500 Barebone Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages