CCU80_CC81 Event 1 is detected erroneously when calling XMC_CCU8_EnableClock( )

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

cross mob
Not applicable
Hi all,

Have any of you come across the following problem? I am setting up the external stop functionality on a timer slice CCU80_CC81 on XMC4400 evaluation board. The input event is connected to a Gpio pin 0.8 (I've tried 0.7 as well and it doesn't seem to affect anything). It is set up to be active on a rising edge. The pin is connected to a function generator that I am using to generate a square wave.

The problem is, however, that when I call the function XMC_CCU8_EnableClock( ), the moment it clears the idle bit by writing to GIDLC register, the event is detected. Interestingly enough, it does not seem to affect the timer which I start with SCU command XMC_SCU_SetCcuTriggerHigh( ) later on - it works fine until a rising edge on the square wave occurs and then the timer stops as it should. The only problem is that the event detection flag gets set whereas no actual event has occurred.

Right now I am left puzzled. It doesn't seem to matter whether I choose a different Gpio, or map the input to either Event 1 or Event 2 or whatever. What could be the cause of it? Thank you in advance.

Best regards,
Andrey
0 Likes
1 Reply
Not applicable
Was the level of your pin the second time around already high?
Do you have the passive/active level set properly and when you stop the ccu80_CC81 slice, did you remember to to set the pin back to it's passive level?
I just got bit by the same thing.. different problem but really feels like this could be your problem.

-stv
0 Likes