XMC4800 CCU8 synchronized start does not work

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

cross mob
lock attach
Attachments are accessible only for community members.
User10709
Level 1
Level 1
Hello,
I'm making a three-phase engine control with the xmc4800.
I have problems with synchronized start of pwm.
The same code has already been used with positive results with the xmc4200 and xmc4400.

All the pwm are configured as center alligned and symmetric.
I have verified any errata sheet on it and did not find valid reasons why it might not work.

I attach at this thread a clean project in dave 4 with the CCU8 initialization apps and the code used for synchronized start.

If you have any idea of that
Thanks in advance
regards
Stefano
0 Likes
3 Replies
User10709
Level 1
Level 1
The code that does not work for synchronized start of PWMs is as follows:

XMC_SCU_SetCcuTriggerLow(XMC_SCU_CCU_TRIGGER_CCU80);


XMC_CCU8_SLICE_StartConfig(PWM_CCU8_U.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_0,(XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(PWM_CCU8_V.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_0,(XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(PWM_CCU8_W.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_0,(XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);

PWM_CCU8_Start(&PWM_CCU8_W);
PWM_CCU8_Start(&PWM_CCU8_V);
PWM_CCU8_Start(&PWM_CCU8_U);

XMC_SCU_SetCcuTriggerHigh(XMC_SCU_CCU_TRIGGER_CCU80);


/* disable the Start trigger function*/
XMC_CCU8_SLICE_StartConfig(PWM_CCU8_U.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_NONE, (XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(PWM_CCU8_V.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_NONE, (XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(PWM_CCU8_W.ccu8_slice_ptr, (XMC_CCU8_SLICE_EVENT_t) XMC_CCU8_SLICE_EVENT_NONE, (XMC_CCU8_SLICE_START_MODE_t) XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);

XMC_SCU_SetCcuTriggerLow(XMC_SCU_CCU_TRIGGER_CCU80);
0 Likes
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The attached project Shows how to configure the PWM_CCU8 APP to achieve the synchronous start of the timer slices using the GLOBAL_CCU8_SyncStartTriggerHigh() function (see main.c)

Regards,
Jesus
0 Likes
User10709
Level 1
Level 1
Hi,
I have find the problem. I have used for call the functions XMC_SCU_SetCcuTrigger the parameter XMC_SCU_CCU_TRIGGER_CCU80 instead off XMC_SCU_CCU_TRIGGER_CCU81.

thank you so much for your help
Stefano
0 Likes