[XMC4500 Relax Lite Evaluation Kits] Push Button as External Trigger

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

cross mob
Not applicable
Can anyone help me with the following problem?

What APP to use & how to set in order for Push button to be external trigger for the following 2 APP ADC001 & DACWG001?

Simplest that I want is the when push the button, ADC001 & DACWG001 run & when I release the button, these 2 APP stop.
0 Likes
5 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Let me check this for you.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi Holy_dem,

The XMC4500 relax kit buttons is linked to P1.14 and P1.15. However only P1.15 is tied to the ERU1.1A0 which will trigger the start /stop of ADC or generate a service request to turn ON/OFF the ADC + DAC using software.

You can refer to example "ERU001_ERU002_Example2".

Good Luck !!!
0 Likes
Not applicable
Thanks Travis,

Sorry I'm noob in Dave & micro controller programming.

So I don't understand this part of C programming of "ERU001_ERU002_Example2"

void ERU_Event_Handler(void)
{
uint32_t status;

//Reads Status Flag
status = RD_REG(ERU001_Handle0.ERURegs->EXICON[ERU001_Handle0.InputChannel],ERU_EXICON_FL_Msk , ERU_EXICON_FL_Pos);
<- This is where I don't understand

if(status)
{
IO004_ResetPin(IO004_Handle1); // ERU event received, turn on LED
ERU001_ClearFlag(ERU001_Handle0); // Clears the Status Flag
}


And how does "Handle" work?

Thanks again for the info
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
It is bascially reading the status of ERU0_EXICONx (x=0-3).FL. Do a search on "Status Flag for ETLx".

This bit represents the status flag that becomes set or cleared by the edge detection.
0 Likes