GPT12 iLLD for TC37x issue

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

cross mob
chadpham75
Level 1
Level 1
10 sign-ins 5 questions asked 5 replies posted

I am using GPT12_PWM_Generation_1_KIT_TC375_LK as the base firmware and test the example on my TC37X eval board.

Everything works perfectly.

I then tried to test the incremental encoder feature and I follow the document 

iLLD User Documentation  Device:TC37A Version: 1.0.1.14.0

 

The example snippet code seems like it carried from version TC2.7.X

gpt12Config.zeroIsrPriority = ISR_PRIORITY(INTERRUPT_INCRINC_ZERO);
gpt12Config.zeroIsrProvider = ISR_PROVIDER(INTERRUPT_INCRINC_ZERO);
 
gpt12Config.base.speedFilerCutOffFrequency = config.base.maxSpeed / 2 * IFX_PI * 2;
 
And I don't know if this is typo or actual "config.base.maxSpeed", I guest it should be gpt12Config, is that correct?
I also couldn't find where is INTERRUPT_INCRINC_ZERO defined.
 
Continue on
Ifx_TickTime tickRefresh = gpt12.updatePeriod * TimeConst_1s;
I found from the iLLD links the TimeConst_1s and I found it defined at

◆ TimeConst_1s

#define TimeConst_1s   (TimeConst[TIMER_INDEX_1S])

time constant equal to 1s

Definition at line 71 of file Ifx_DateTime.c.

Referenced by DateTime_get(), and DateTime_set().

It is clearly has nothing to do with GPT12 module.

May I ask the proper way to get GPT12 module to work, we have to include all the needed defines in different projects?

Does the snippet code in the iLLD document only there as the references or we can use it as closely as possible?

Thank you so much for all of your time and helps.

0 Likes
9 Replies
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi,

please go to https://www.infineon.com/cms/en/product/microcontroller/32-bit-tricore-microcontroller/32-bit-tricor... . There you can find a whole bunch of GPT2 training presentations in the expert area. Inside those presentations you have a link to the related projects on GitHub. Hence, everything you need to get started with GPT12 module programming.

Have fun!

Best regards,

TBencher

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

Hi TBencher,

Thank you for your pointer.  I actually went thru all the GPT12 examples in the AURIX™ TC3xx Expert Trainings before I actually post the question.  I went further to explore the example instructions from iLLD document. I tried to find more information to confirm if the instructions from iLLD driver as above information is correct or not.  But there is limited info of how to use GPT12 to generate the 2 pwm quadrature signals using what is called incremental encoder.

If you came across any information of the how-to and can confirm my finding is the issues in the iLLD document, please let me know so at least we have a record for everyone to share the information.

Thank you so much for your time

0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi,

ok it was late yesterday 😉 So you've successfully played with the example code so far, but you are unable to produce the two output signals as demanded.? Just for my understanding. You just wanna produce the signals with a certain duty cycle to act as an incremental encoder?

Best regards,

TBencher 

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

My goal for GPT12 exercise is using the Timer T3's GPT12 in Incremental Interface Mode for the 2 quadrature signals with 90 degree phase shift to determent the speed and position of the source.  This is one of the feature that GPT12  is offering.

In order to test the decoder, I need the reliable encoder, and I went to iLLD User Documentation  Device:TC37A Version: 1.0.1.14.0, and I found the typo ( I hope it is a typo) in the instructions and missing information.

My hope is using GPT12's incremental encoder to generate 2 quadrature signals with phase shifting and feed them back the GPT12's incremental interface to test decoder which is the goal to use the GPT12's but I stuck at the generate the incremental encoder.

So the blocker now is how to generate the incremental encoders signals with desired frequency and duty cycle.

Thank you so much for your helps.

0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi,

as for my understanding you just have the incremental interface mode to actually interface to an external encoder. You don't have it to act as an encoder. It is just for decoding incoming square waves. There are several ways to produce PWMs. You can use of course the GPT12, the CCU6 or even the GTM to do it. By the way, a programmable signal generator with at least two channels would also do it, if this is just about testing.  

 

Best regards,

TBencher

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

TBencher,

You are correct.  At this point I am familiar how to use GTM to generate the PWM with the frequency and duty cycle for the signal generator.  However, you are correct that we need 2 channels or double works to generate the signal.

That is why I would like to take advantage of the GPT12's feature to generate the signals without multiple channels implementation.

0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

You're welcome.

Best regards,

TBencher

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

So anyone has the info how to  implement the incremental encoder using GPT12?

0 Likes
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

There is no direct example available for this use-case.

Thanks.

0 Likes