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

cross mob
Jonson
Level 3
Level 3
25 replies posted 25 sign-ins 5 questions asked

各位专家好! 我需要寻找一个适用于TC334芯片的ADC由PWM触发的例程,请英飞凌的工程师给与支持,谢谢!

0 Likes
1 Solution
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi Jonson,

I assume you are talking about EVADC not EDSADC, there are multiple modules could generate PWM to trigger ADC, for example: GTM, CCU6

CCU6_ADC_1_KIT_TC334_LK 

GTM_TOM_ADC_1_KIT_TC275_LK 

For more external signal or interrupt to trigger ADC, please refer to 

appendix of TC3 user manual  

Kunqiao_L_0-1702455920571.png

 

 

View solution in original post

0 Likes
7 Replies
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi Jonson,

I assume you are talking about EVADC not EDSADC, there are multiple modules could generate PWM to trigger ADC, for example: GTM, CCU6

CCU6_ADC_1_KIT_TC334_LK 

GTM_TOM_ADC_1_KIT_TC275_LK 

For more external signal or interrupt to trigger ADC, please refer to 

appendix of TC3 user manual  

Kunqiao_L_0-1702455920571.png

 

 

0 Likes

我所需要的pwm触发ADC采样,主要是用来电机控制使用,上述的“GTM_TOM_ADC_1_KIT_TC275_LK ”应该很类似吧

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi Jonson,

Both CCU6 or GTM could used as trigger signal for ADC, and both could used as motor control with feature dead time as well.

0 Likes
lock attach
Attachments are accessible only for community members.

HI Kunqiao_L,

I appreciate your patient response,I am now debugging the pwm triggered ADC and find that the code is stopped here when debugging:

微信图片_20231214133943.png

Attached is my code, please help to have a look, it is urgent, thank you!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi Jonson,

Which code example are you referring to? GTM_TOM_PWM1_KIT_TC334 or your ADC4 project?  Which original function you are calling that cause this IfxEvadc_setQueueSlotGatingConfig issue, I don't have TC334 board on my site. It is hard for me to duplicate. 

Also, why your code is stopped there? It seems like no breakpoint, no trap, no infinite loop. how could your code stop at that place?   

 

0 Likes

HI Kunqiao_L,

我使用的是TC387的例程,文件名叫做“AP32540_PMSM_FOC_AURIX_TC3xx”。然后我在上面修改所形成的的自己的代码,我起名字叫做ADC4。另外,我还想问一下,在官方例程代码“AP32540_PMSM_FOC_AURIX_TC3xx”中有这样的设置:

微信图片_20231214141920.png

这里的引脚AN16不是属于group2吗,使用这里不该是这样吗:

/* Initialize the channel AN16 (G2.CH0) for Phase Current Sense V (V02) */
IfxEvadc_Adc_initChannelConfig (&adcChConfig, &adcEvadc.adcGroup2);
adcChConfig.channelId = IfxEvadc_ChannelId_0;
adcChConfig.resultRegister = IfxEvadc_ChannelResult_0;

IfxEvadc_Adc_initChannel (
&inverter->phaseCurrentSense.curVO2.adcChannel, &adcChConfig);

还是说我理解错了。

另外:您能提供你的邮箱吗,这样方便我们交流,谢谢,期待您的回信!

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi Jonson,

AN16 is for G2.CH0.  But it might be comment mistake, it might set the AN24 G3.CH0.

Kunqiao_L_0-1702542393820.png

BTW,  for the question or debugging issue we prefer focus on the official code that Infineon provided. Any user specific mass changed code or user specific environment has to be easily duplicated from Infineon engineer's site. Otherwise,  there will be not too much support.

We will not provide Infineon email to customer privately, we will stick on the community platform. Hope you understand. For more detail support, you could also contact local FAE for onsite support and debugging.

 

Thanks

 

 

0 Likes