CCU8 PWM synchronous : Start, Stop and Restart

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

cross mob
Not applicable
Hi All,

I have successfully started CCU8 PWM for slice_0 and slice_2 in synchronous mode.

After initializing CCU8 global and slice registers. I am using the following command to start the PWM synchronously.


XMC_SCU_SetCcuTriggerHigh(XMC_SCU_CCU_TRIGGER_CCU80);


I am stopping the PWM with following code :


CCU80_CC80->TCCLR = ((uint32_t)CCU8_CC8_TCCLR_TRBC_Msk);
CCU80_CC80->TCCLR = ((uint32_t)CCU8_CC8_TCCLR_TCC_Msk);
CCU80->GIDLS = 1 << 0;

CCU80_CC82->TCCLR = ((uint32_t)CCU8_CC8_TCCLR_TRBC_Msk);
CCU80_CC82->TCCLR = ((uint32_t)CCU8_CC8_TCCLR_TCC_Msk);
CCU80->GIDLS = 1 << 2;


The problem I am facing is :


  • After stoping PWM, depending on condition, I have to again restart the PWM in synchronous mode but its not starting.
  • I have even tried to call the previous CCU8 initialization routine and using XMC_SCU_SetCcuTriggerHigh(XMC_SCU_CCU_TRIGGER_CCU80); tried to restart the PWM, but it is not at all restarting


I need help to restart the PWM in synchronous mode after stop condition.

Guide me in this regard.

Thanks.

Tinchu
0 Likes
3 Replies
Not applicable
Does any one has any reply for my querry?

Can anyone help and guide me?
0 Likes
User16298
Level 1
Level 1
I had the same problem with the CCU4 timer on an XMC1100. For me, the solution was to call
GLOBAL_CCU4_SyncStartTriggerLow(GLOBAL_CCU4_CCUCON_Msk);
PWM_CCU4_Start(&xxx);
before calling
GLOBAL_CCU4_SyncStartTriggerHigh(GLOBAL_CCU4_CCUCON_Msk);
once again.

I realise that this answer is about 2 years too late for the original poster, but this thread was the first result i found when searching for my problem on google, so i hope this helps the next guy to have this problem.
0 Likes
Kris_Ke
Level 1
Level 1
Distributor - WPG(GC)
5 replies posted 25 sign-ins 5 questions asked

If you use PWM_CCU4_Start it will become out of sync, it better use 

CCU80_CC80->TCSET = CCU8_CC8_TCSET_TRBS_Msk;
CCU80_CC82->TCSET = CCU8_CC8_TCSET_TRBS_Msk;

 

0 Likes