Attachments are accessible only for community members.
Aug 08, 2017
03:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2017
03:18 AM
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
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
- Tags:
- IFX
3 Replies
Aug 11, 2017
02:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 11, 2017
02:03 AM
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);
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);
Attachments are accessible only for community members.
Oct 10, 2017
04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2017
04:37 AM
Oct 10, 2017
08:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2017
08:59 AM
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
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