You are here

pSoc4 tccpwm asymmetric pwm | Cypress Semiconductor

pSoc4 tccpwm asymmetric pwm

Summary: 1 Reply, Latest post by bobgoar on 17 Feb 2017 01:29 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
James Littlefield's picture
1 post

Attempting to generate a sequence of variable width pulses using the  PWM component configured for asymmetric align.

Here is the configuration of the module

Prescaler - 1x

PWM Align - Asymmetric Align

PWM mode : PWM

Interrupt on Terminal count

Period Register = 50,  Period Register Buf = 206,  swap is checked

Compare Register = 10, Compare Register Buf = 103 swap is checked

(See Capture.png attached)

According to pSocCreator I should get a waveform that looks like capture2.png attached.

Instead I see continuously a waveform that appears to be based only on the initially configured period and compare values so it looks like the swap is not working.    The module datasheet indicates that the swap event can be generated in software and the swap will occur on the next TC event.    I tried using the void TCPWM_SetPeriodSwap(uint32 swapEnable)  and void TCPWM_SetCompareSwap(uint32 swapEnable)  api's to (re)enable the swapping at each TC interrupt but this does not impact the generated waveform.

Please advise on how to utilize the swapping function of the PWM component....








user_242978793's picture
1419 posts

Please post your code so we can check it.

Log in to post new comments.