Question on ADC measurement - TC377

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

cross mob
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Hello,

I am using TC377 MCU and working on motor control application. For my application, I want to start ADC measurement after triggering one of the PWM outputs from MCU.
I want to align/trigger my ADC measurement half-way through the PWM Outputs "ON" time.

Can you please provide some guidance/examples of how to accomplish this ?

Thanks

 

nsyed_0-1648271382086.png

 

0 Likes
1 Solution
gecmar
Employee
Employee
25 sign-ins 5 solutions authored 10 replies posted

Reference:

https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc387_motorctr/

In this example, the Field oriented control (FOC) algorithm using 3-phase current sensing (EVADC) to control the torque of the motor, encoder as position sensor (GPT12) and AURIX™ GTM as PWM generator is implemented.

Software and related documentation to AURIX™ TC3xx Motor Control Application Kit are access controlled and can be downloaded through Infineon toolbox. To have access to the content please follow the instructions in the following link

In this example, exactly the same procedure, as described above, for configuration of GTM is used.

BR

Gecmar

View solution in original post

0 Likes
10 Replies
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Dear Community Members !!! Any thoughts ? 

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

Hello,

You can try the feasibility using the pause before conversion using the request timer feature available for the EVADC by referring to section '32.5.2 Triggers and Gate Signals' of the user manual part2.

Thanks.

0 Likes
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Hello Yuva,

Are there any example project for reference ? This will be really helpful.

0 Likes
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Dear Community Members !!!

Can anyone provide example projects if you have for reference for motor control ? Or where to look for this information ?

 

 

0 Likes
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Hi nsyed

Some information are missing, how are you doing the PWM? GTM TOM/ATOM? CCU6? External devices?

 

if GTM or CCU6 please describe your actual setting (center aligned, edge aligned etc)

0 Likes
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Hi,

I am using GTM ATOM module for PWM generation from TC377 MCU. I want to trigger ADC measurement on the center aligned pulse

0 Likes
gecmar
Employee
Employee
25 sign-ins 5 solutions authored 10 replies posted

Hi nsyed,

To configure GTM ATOM to generate six PWM signals for inverter application and trigger EVADC you can use following iLLD functions:

  • IFX_INLINE boolean IfxCpu_disableInterrupts(void)
  • void IfxGtm_enable(Ifx_GTM *gtm)
  • void IfxGtm_Cmu_setGclkFrequency(Ifx_GTM *gtm, float32 frequency)
  • void IfxGtm_Cmu_setClkFrequency(Ifx_GTM *gtm, IfxGtm_Cmu_Clk clkIndex, float32 frequency)
  • void IfxGtm_Cmu_enableClocks(Ifx_GTM *gtm, uint32 clkMask)
  • void IfxGtm_Atom_Timer_initConfig(IfxGtm_Atom_Timer_Config *config, Ifx_GTM *gtm)
  • boolean IfxGtm_Atom_Timer_init(IfxGtm_Atom_Timer *driver, const IfxGtm_Atom_Timer_Config *config)
  • boolean IfxGtm_Trig_toEVadc(Ifx_GTM *gtm, IfxGtm_Trig_AdcGroup adcGroup, IfxGtm_Trig_AdcTrig adcTrig, IfxGtm_Trig_AdcTrigSource source, IfxGtm_Trig_AdcTrigChannel channel)
  • void IfxGtm_Atom_PwmHl_initConfig(IfxGtm_Atom_PwmHl_Config *config)
  • boolean IfxGtm_Atom_PwmHl_init(IfxGtm_Atom_PwmHl *driver, const IfxGtm_Atom_PwmHl_Config *config)
  • boolean IfxGtm_Atom_PwmHl_setMode(IfxGtm_Atom_PwmHl *driver, Ifx_Pwm_Mode mode)
  • void IfxGtm_Atom_Timer_updateInputFrequency(IfxGtm_Atom_Timer *driver)
  • void IfxGtm_Atom_Timer_run(IfxGtm_Atom_Timer *driver)
  • IFX_INLINE void IfxCpu_restoreInterrupts(boolean enabled)

Check in User Manual which GTM (A)TOM channels are able to trigger EVADC groups. It can be found in following GTM subchapter: GTM to EVADC Connections

 Based on the EVADC groups you want to trigger with GTM (A)TOM, the iLLD function IfxGtm_Trig_toEVadc can be used to configure registers:

  • GTM_ADCTRIGiOUT0 (i=0)
  • GTM_ADCTRIGiOUT0 (i=1)
  • GTM_ADCTRIGiOUT0 (i=2)
  • GTM_ADCTRIGiOUT0 (i=3)
  • GTM_ADCTRIGiOUT0 (i=4)
  • GTM_ADCTRIGiOUT1 (i=0)
  • GTM_ADCTRIGiOUT1 (i=1)
  • GTM_ADCTRIGiOUT1 (i=2)
  • GTM_ADCTRIGiOUT1 (i=3)
  • GTM_ADCTRIGiOUT1 (i=4)

Best regards

gecmar

0 Likes
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Hello Gecmar, 

Can you provide some example for reference ? The configurations are complex and hard to follow. Any reference would be of great help. 

 

0 Likes
nsyed
Level 5
Level 5
5 likes given 100 sign-ins 50 sign-ins

Dear Community Members, 

 

Is there any example for reference for TC3xx ? It will be of great help.

 

 

0 Likes
gecmar
Employee
Employee
25 sign-ins 5 solutions authored 10 replies posted

Reference:

https://www.infineon.com/cms/en/product/evaluation-boards/kit_a2g_tc387_motorctr/

In this example, the Field oriented control (FOC) algorithm using 3-phase current sensing (EVADC) to control the torque of the motor, encoder as position sensor (GPT12) and AURIX™ GTM as PWM generator is implemented.

Software and related documentation to AURIX™ TC3xx Motor Control Application Kit are access controlled and can be downloaded through Infineon toolbox. To have access to the content please follow the instructions in the following link

In this example, exactly the same procedure, as described above, for configuration of GTM is used.

BR

Gecmar

0 Likes