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

AURIX™ Forum Discussions

Baranidharan
Level 1
First like received First reply posted First question asked
Level 1
Hi Aurix Team , I am trying to trigger EVADC channels using GTM Tom Module, Already i did for single ADC channel conversion with TOM module Rising /Falling Edge trigger, Now i m trying to implement the same for 9 ADC channels in a Queue with Single Trigger from TOM module to Start the ADC conversion . To ensure the TOM Trigger based ADC queue conversion complete i am using one of the ADC channel Result priority interrupt to call the read EVADC function and toggle one led inside the function , But after the 9 TOM Trigger only my read EVADC function call is happening .. I want to do all the adc channel in a queue to do the conversion and update the result with one tom trigger ... can some one reply me in this regard.
0 Likes
9 Replies
FD_aurix
Level 5
5 solutions authored 10 likes given 50 sign-ins
Level 5

Hi Baranidharan

I'm working on a similar configuration, please share your ADC setting so I can check where is the issue

0 Likes
Baranidharan
Level 1
First like received First reply posted First question asked
Level 1

Thank You for the Response , 

1 )  i m using Tom1_13 to trigger the Group 2 for testing purpose

st_Gtm->ADCTRIG[1].OUT0.B.SEL2 = 3;

 

2 )  under the init EVADC group function i m selecting  ADCTRIG [1]

adcGroupConfig.arbiter.requestSlotQueue0Enabled = TRUE;

adcGroupConfig.queueRequest[0].triggerConfig.gatingMode = IfxEvadc_GatingMode_always; 

adcGroupConfig.queueRequest[0].triggerConfig.triggerMode = IfxEvadc_TriggerMode_uponRisingEdge;
adcGroupConfig.queueRequest[0].triggerConfig.triggerSource = IfxEvadc_TriggerSource_9; // GTM - ADCTRIG [1]

3 ) Under the initEVADC Channel function i m adding 6 channels using      idx[0:5] in for loop and make one of the channel to trigg interrupt

adcChannelConfig[idx].channelId = (IfxEvadc_ChannelId)(g_grp2channels[idx]);
adcChannelConfig[idx].resultRegister = (IfxEvadc_ChannelResult)(g_grp2channels[idx]);
adcChannelConfig[0].channelPriority = 1;    
//adcChannelConfig[0].resultPriority = 1;
adcChannelConfig[0].channelServProvider =IfxSrc_Tos_cpu0;
adcChannelConfig[0].limitCheck = IfxEvadc_LimitCheck_always;

4 ) AdcIsrHandler function call the ReadEVADC 

IFX_INTERRUPT(AdcIsrHandler, 0, 1);

5 ) inside the ReadEVADC i m toggle one led .. and store the adc values in a varibale 

i m sharing the trigger pulse for your reference 

Green is LED toggle , Red is TOM output.adc_trig_chan6.PNG

 

0 Likes
FD_aurix
Level 5
5 solutions authored 10 likes given 50 sign-ins
Level 5

how do you set the EXTR bit when you set up the queue?

0 Likes
Baranidharan
Level 1
First like received First reply posted First question asked
Level 1

we are calling this in EVADC init 

refill.JPG

0 Likes
FD_aurix
Level 5
5 solutions authored 10 likes given 50 sign-ins
Level 5

I think the problem is here. Try to set EXTR on only on the first element  of the queue.

0 Likes
Baranidharan
Level 1
First like received First reply posted First question asked
Level 1

Thank you for the immediate response  issue solved , ..

 

0 Likes
User90300
Level 1
5 questions asked 10 sign-ins 5 replies posted
Level 1

Hello Baranidharan,

Coud you please Share the whole c code ?

I am trying to do the same but My Adcs are never triggered 😞

thanks in advance

regards

 

0 Likes
FD_aurix
Level 5
5 solutions authored 10 likes given 50 sign-ins
Level 5

No Problem... I'm just in these days doing more or less the same trigger config with a queue (but not using illd), if you want to share with me your config I'll be really glad to compare it with my setting!

0 Likes
Baranidharan
Level 1
First like received First reply posted First question asked
Level 1

GTM _ EVADC trigger _ Register Configuration For your reference ..