possible XMC bug : CCU4 unable to re-start

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

cross mob
Not applicable
Hi All,

I can stop a PWM_CCU4 peripheral from the input of a GPIO input pin, but starting it by calling "PWM_CCU4_Start(&PWM_CCU4_0)" in the while loop in the main function when "PWM_CCU4_GetTimerStatus(&PWM_CCU4_0)" is false, simply does not work. Is there a work around for this bug?

Regards,
Enigma
0 Likes
5 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Well I don't think there is a bug on this. Can you check the status of the run bit (CC4yTCST.TRB)?
1706.attach
0 Likes
Not applicable
Hi Travis,

I got this to work now, but I had to create a signal from within the software to trigger the external start with switching between
GLOBAL_CCU4_SyncStartTriggerHigh(GLOBAL_CCU4_CCUCON_Msk);
GLOBAL_CCU4_SyncStartTriggerLow(GLOBAL_CCU4_CCUCON_Msk);

Is there any way to make it start again without making use of this hacky method? Can you provide a code snippet for toggling CC4yTC.STRM? I can not seem to get this to work.

Regards
Enigma
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

Are you using DAVE4? As I cannot find the function which you had just mentioned.

To start the CCU4 timer, I am using the below function which will set the timer run bit.


__STATIC_INLINE void XMC_CCU4_SLICE_StartTimer(XMC_CCU4_SLICE_t *const slice)
{
XMC_ASSERT("XMC_CCU4_SLICE_StartTimer:Invalid Slice Pointer", XMC_CCU4_IsValidSlice(slice));
slice->TCSET = CCU4_CC4_TCSET_TRBS_Msk;
}

0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Which device are you using?
0 Likes
Not applicable
Hi Travis,

Sorry for the late replies, just got back.

Setup:
1) XMC1300 boot kit.
2) DAVE 4.1.4

It still does not seem to work for me. Is there a basic project for showing this, it is not obvious to me how to get this working. Currently only my hacky method seems to work.

Regards
Ludwig
0 Likes