- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Community Members !!! Any thoughts ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yuva,
Are there any example project for reference ? This will be really helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Community Members !!!
Can anyone provide example projects if you have for reference for motor control ? Or where to look for this information ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using GTM ATOM module for PWM generation from TC377 MCU. I want to trigger ADC measurement on the center aligned pulse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Gecmar,
Can you provide some example for reference ? The configurations are complex and hard to follow. Any reference would be of great help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Community Members,
Is there any example for reference for TC3xx ? It will be of great help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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