timer APP is seems useless

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

cross mob
Not applicable
Hi All,

Is there a better timer app than "timer"? I find it very lacking in features.

For example: I would like to start a timer from a GPIO input or from the comparator signal and have the timer control the state of another GPIO pin, whether it is low or high and then later on readout the timer value and restart it, essentially a timer + counter. This is very simple to do in the STM micro-controllers, so I feel there must be a way to do it with the XMC micro-controllers, but I can not find an example nor help in the documentation.

Any help would be appreciated, since if I can not get this basic feature to work I will have to move back to using STM micro-controllers.

Regards
Enigma
0 Likes
3 Replies
User10215
Level 4
Level 4
First like received
Hi Enigma,

the Apps don't solve everything, especially since it seems not to be a full release yet. If you really want to use full peripheral features I suggest to use the XMCLib. I assume you use Dave4.1.2...in a project of Dave you can find the source code of the XMCLib in the folder "Libraries/XMCLib". Just include the header of the peripheral you need into a source file of your project, e.g. "xmc_ccu4.h".
The XMCLib is similar to the old Standard Peripheral Library from ST so you might get yourself used to the layout of the headers pretty fast.
Also I suggest to you to read the Application Note No. AP32287 which you can find when you follow this link:

http://www.infineon.com/cms/de/product/microcontroller/32-bit-industrial-microcontroller-based-on-ar...

With 54 pages the document is pretty long, but it explains pretty well what the CCU4 is capable of and it is even packed with code examples using the aforementioned XMCLib. Good luck!

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

You can make use of the ERU to trigger the CCU4 or CCU8.

Best regards
Travis
0 Likes
Not applicable
Hi Niclas,

Thanks for the link that was helpful. Now I am having lots of fun with the micro controller.

Regards
Enigma
0 Likes