EDSADC to GTM-TIM connection

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

cross mob
JackaryZhang
Level 2
Level 2
10 sign-ins 5 sign-ins First solution authored

Hi Infineon Experts:

I want to use GTM-TIM feature to capture the DSADC SRM timestamp

EDSADC-TIM.PNG

I configure  GTM_TIMnINSEL register  to select the correct TIM input source

GTM_TIMnINSEL.PNG

And GTM_DSADCINSELi register to choose the correct input signal

GTM_DSADCINSELi.PNG

Except this, I also configure GTM-TIM feature as well as EDSADC feature.

Now the GTM TIM to capture other source(e.g. internal connection to ATOM,ATOM configured to output PWM) is available, The EDSADC itself is also work and the SRM interrupt can be triggered correctly.

But when I want to use TIM to capture the timestamp when the DSADC SRM event occures, It is not worked as expected and the correspond TIM GPRO0 register has no value.

From the datasheet I see that when TIM is used to capture timestamp, edge trigger (raising edge/faling edge) is needed,

So Can the DSADC SRM interrupt result in edge change on TIM channel? How can I understand the GTM-TIM to EDSADC connection and how to use this feature?

Can you help me to analyze is there GTM-TIM connections not configured correctly or where my understanding is wrong?

 

Thanks a lot

 

0 Likes
1 Solution

Hi Jeremy,

Thanks for your reply, I solved my problem after some debug and re-read the user manual.

The configuration from EDSADC->TIM is not wrong,  Just like I described in my problem, these 2 configuration in below picture for the DSADC to TIM connection is enough.

Code_Snip.PNG

There is some bug inside my code about interrupt setting, So the notification function always not called.

Anyway, Thanks for your kindly help😁

View solution in original post

6 Replies
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @JackaryZhang ,

Thank you for your interest in Infineon's products and for the opportunity to serve you.
It seems a bit weird, I hope you share the sample demo, then I can replicate the phenomenon you mentioned above, and figure the issue out.

Looking forward to your reply.

BR,

Jeremy

0 Likes

Hi Jeremy,

Thanks for your reply, I solved my problem after some debug and re-read the user manual.

The configuration from EDSADC->TIM is not wrong,  Just like I described in my problem, these 2 configuration in below picture for the DSADC to TIM connection is enough.

Code_Snip.PNG

There is some bug inside my code about interrupt setting, So the notification function always not called.

Anyway, Thanks for your kindly help😁

SivakumarG
Level 1
Level 1
50 sign-ins 25 sign-ins 5 replies posted

Hello all, 

I am doing the same configuration, EDSADC result event to GTM TIM. 

I can see input selection options in GTM with SRMx inputs from DSADC. 

But i couldn't understand how SRM service request Can be configured? 

My assumption is 

1.SRPN =SRCGTMTIM/4

2.TOS = CPUx

3.SRE = Enable 

 

Will work, could you confirm my configurarion? 

0 Likes
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @SivakumarG ,

Yes, it needs to set the SRC_DSADCRMx to form the service request.

BR,

Jeremy

0 Likes
SivakumarG
Level 1
Level 1
50 sign-ins 25 sign-ins 5 replies posted

Hello @Jeremy_Z 

Thanks for the response.

 

I have configured GTM_DSADCINSEL = SRM2 and TIMCHSEL with DSADC.

My configuration still not working.

I have configured like below for DSADC result event service request

SRC_DSADCSRM.SRPN = 1;

SRC_DSADCSRM.SRE = 1;

SRC_DSADCSRM.CLRR = 1;

SRC_DSADCSRM.TOS = TOS_CPU2

 

Kindly provide your suggestion

0 Likes
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @SivakumarG ,

Thanks for your reply.
Please check whether the result event flag arises, next, I'd like to suggest you confirm the correct SRC_DSADCSRMx register to be set, as the 'x' can be 0~13.

2023-03-02_11h00_06.png

BR,

Jeremy

0 Likes