AURIX TC233L About Adc_GetGroupStatus

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

cross mob
Not applicable
Hi. I am developing Inverter to control motor using TC233L.

However I have problems.. about ADC.

I want to read ADC Value.. but i Can't

Result_ADC_Status is 1 (ADC_BUSY)

what should i check?? plz help me..

Adc_SetupResultBuffer(AdcConf_AdcGroup_AdcGroup_Voltage, &Adc_Voltage[0]);

while(1){
Adc_StartGroupConversion(AdcConf_AdcGroup_AdcGroup_Voltage);
Result_ADC_Status = Adc_GetGroupStatus(AdcConf_AdcGroup_AdcGroup_Voltage);
}
0 Likes
1 Solution
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi KKV,

In the TC2X, according to the user manual it supports polling mode, but there are some limits of using it. IFX_likunqiao_0-1695634486203.png

refer to this function: Adc_17_GetChannelStatus

IFX_likunqiao_1-1695634646050.png

 

While in the TC3X, ADC polling mode is not supported in MCAL. The ADC group status is updated in ADC interrupt routines. Adc_ReadGroup checks for the group status and assumes that there are no ADC results available, due to missing update in interrupt routines . Therefore ADC interrupt is required - then polling for ADC_COMPLETED status is supported.

Thanks

View solution in original post

0 Likes
5 Replies
Not applicable
Did you check with the debugger the other ADC registers? Maybe some clock is missing? Did you double/triple-check the initialization?
0 Likes
piyush
Level 1
Level 1
First like given First like received First question asked

Hi, I too have the same problem. I intend to read ADC without interrupt service, one-shot, SW triggered.

Clock and other configurations look ok.

As I debugged, the Adc_GetGroupStatus API is checking for conversion status through a flag which is set only by "Adc_lSetResBuffEndStatusAtomic". This function, in turn, is called only within the interrupt services. Therefore, I am never getting a completion status.

However, the ADC group result registers are showing the updated values correctly, incl the completion flag (VR). 

Can anyone help on this?

To summarize, I intent to read the ADC without interrupt service, just by polling. How do I get rid of the perpetual Busy status?

0 Likes
KKV
Level 1
Level 1
5 sign-ins First question asked First reply posted

I am facing similar issues, can any one provide some pointers.. 

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

Hi KKV,

In the TC2X, according to the user manual it supports polling mode, but there are some limits of using it. IFX_likunqiao_0-1695634486203.png

refer to this function: Adc_17_GetChannelStatus

IFX_likunqiao_1-1695634646050.png

 

While in the TC3X, ADC polling mode is not supported in MCAL. The ADC group status is updated in ADC interrupt routines. Adc_ReadGroup checks for the group status and assumes that there are no ADC results available, due to missing update in interrupt routines . Therefore ADC interrupt is required - then polling for ADC_COMPLETED status is supported.

Thanks

0 Likes