External interrupts in Keil uVision without DAVE Apps

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

cross mob
Not applicable
Hello,

I started to work with the XMC1100 on a XMC2GO. Now I would like to implement a Pin Changing Interrupt in my Software but I do not understand how to do.
I noticed that I have to choose a Pin with ERU0 so I will connect my switch to P2.9 but how do I have to configure the ERU and the NVIC in my program.
There are several refers to DAVE TIP of the day ..., but I don't work with DAVE but with Keil uVision. So DAVE Apps won't help.

Maybe there is a small example code to init a pin as input with interrupt in plain C.

Kind regards
Dominik
0 Likes
4 Replies
chismo
Employee
Employee
First like received
Hi Dominik,

We have a simple non-DAVE app example code with the boot kits, though it is still based on the DAVE platform.
Hopefully this still helps.

http://www.infineon.com/cms/en/product/evaluation-boards/KIT_XMC12_BOOT_001/productType.html?product...

Regards,
Chismo
0 Likes
Not applicable
Hello Chismo,

thank you for your answer. This helps me pretty much. Now I'm able to use a portpin as extern interrupt. But I dont understand how to set another Portpin. Maybe you can help a litte once again.
With
WR_REG(ERU0->EXISEL, ERU_EXISEL_EXS2B_Msk, ERU_EXISEL_EXS2B_Pos, 0);

I take P2.10 for trigger source. No Problem.
but when I want to add another trigger on P2.11 with
WR_REG(ERU0->EXISEL, ERU_EXISEL_EXS2B_Msk, ERU_EXISEL_EXS2B_Pos, 1);
,
it overrides the trigger from 2.10.
Where do I have to declare 2.10 AND 2.11 as trigger?

Kind regards
Dominik
0 Likes
Not applicable
Hi Dominik,

You should select two input from A and B.
Then AND these two signal in EXICONy.SS register.
0 Likes
WilhelmBrezovit
Employee
Employee
First solution authored Welcome! 10 replies posted
Dear Vision,

Use "Advanced Search" in this Forum and search for "DAVE TIP of the day: How can external interrupts created?" - it will help 🙂

Here is the LINK:

http://www.infineonforums.com/threads/1052-DAVE-TIP-of-the-day-How-can-external-interrupts-created?h...


All the best,
Wilhelm
0 Likes