ADC measurement for XMC1302 when rising edge detection occurs

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

cross mob
lock attach
Attachments are accessible only for community members.
Bandarikarthik
Level 3
Level 3
25 replies posted 100 sign-ins First like given

Dear experts!!!

I am using xmc 1302 MCU please find a file having a wave form I want to measure adc value when rising edge is detected 

yellow color  signal to me measure the ADC value 

blue color is the another PWM signal (it is coming from external IC not generated from MCU )

As these are separate pins 

please guide me procedure to start ADC conversion when Rising edge occurs  on PWM signal i want to hold the adc value when rising edge detects 

Should i use ERU or CCU4 for Detection of rising edges 

I need the guidance for this issue 

can we go through the interupts method 

please guide me 

 

regards,

karthik.

Bandari Karthik Kumar
0 Likes
1 Solution

Dear @ncbs ,

thank you for your response .

please note this  as per my hardware  the Blue signal which is in the scope is coming from external IC to the MCU P2.11 GPIO 

and I have to measure the peak value of yellow signal(adc to P2.8) when rising edge occur in the blue signal.

with the ERU unit  I cant detect and event i.e rising or falling at GPIO, so  i want to use this ERU  as  interupt at p2.11  and i can start the ADC conversion in ERU interupt handler  below i have shared the data sheet of xmc1300MCU 

 

https://www.infineon.com/dgdl/Infineon-xmc1300_AB-DS-v02_00-EN.pdf?fileId=5546d4624a0bf290014a4bdb07...

 

The Above Idea i got it from Modus tool box i have seen the one example on xmc1404 boot kit 

where  ERU handler is trigger in rising edge and led glows in the ERU interupt handler 

in my case i would like to start the conversion of the adc 

i have founded the external trigger interupt by your link which u have shared 

thank you.

regards 

@Bandarikarthik 

 

 

 

Bandari Karthik Kumar

View solution in original post

3 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @Bandarikarthik,

You may use the ADC_MEASUREMENT APP. As I understand, the blue colour PWM signal should act as the trigger input. ADC_MEASUREMENT APP has a "trigger_input". In the general settings, "trigger edge selection" can be selected too.

ncbs_0-1643868291875.png

 

You may take a look at "ADC_MEASUREMENT_EXAMPLE_XMC45" code example from the Download of Example Projects for DAVE™ Apps page.

 

Thanks and regards,
Nikhil

0 Likes

Dear @ncbs ,

thank you for your response .

please note this  as per my hardware  the Blue signal which is in the scope is coming from external IC to the MCU P2.11 GPIO 

and I have to measure the peak value of yellow signal(adc to P2.8) when rising edge occur in the blue signal.

with the ERU unit  I cant detect and event i.e rising or falling at GPIO, so  i want to use this ERU  as  interupt at p2.11  and i can start the ADC conversion in ERU interupt handler  below i have shared the data sheet of xmc1300MCU 

 

https://www.infineon.com/dgdl/Infineon-xmc1300_AB-DS-v02_00-EN.pdf?fileId=5546d4624a0bf290014a4bdb07...

 

The Above Idea i got it from Modus tool box i have seen the one example on xmc1404 boot kit 

where  ERU handler is trigger in rising edge and led glows in the ERU interupt handler 

in my case i would like to start the conversion of the adc 

i have founded the external trigger interupt by your link which u have shared 

thank you.

regards 

@Bandarikarthik 

 

 

 

Bandari Karthik Kumar
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @Bandarikarthik,

Yes, you may follow the same pattern, and then use ADC_MEASUREMENT_StartConversion() API in the ERU interrupt handler to start the ADC conversion.

Best regards,
Nikhil

0 Likes