how to config tc275 adc ?

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

cross mob
User14274
Level 1
Level 1
Welcome! 5 questions asked First question asked
I want to use vadc for Motor control,how to config it for phase current sample?Pwm trigger adc
0 Likes
7 Replies
User14675
Level 1
Level 1
Have a look at ILLD sample programs, there's plenty regarding motor drive and CCU6 and VADC.
0 Likes
User14274
Level 1
Level 1
Welcome! 5 questions asked First question asked
tomazpercic wrote:
Have a look at ILLD sample programs, there's plenty regarding motor drive and CCU6 and VADC.

PWM triggers adc, how long does it take from the trigger to the sample result interrupt?
Now,my time is 3.5us,I don't know why so long.
According to user manual,Tc275 sample time should be 1us.
0 Likes
User14675
Level 1
Level 1
Are you using ILLD drivers?

There is an error in the ADC sample time calculation, function IfxVadc_calculateSampleTime(), the calculated sample time is much too long.
Have a look at user manual 2.2 page 28-79 and in your ADC init manually set the STCS value in register GLOBICLASS.

3.5 us sounds good if you've set the sample time 1.0 us with ILLD (the actual sample time is 2.5 us or more).

When I set STCS to 16 (sample time = 0.9 us), I get around 2.0 us from trigger to ISR. It should be around 1.5 us, the rest is probably ADC arbitration + interrupt latency.

Regards
0 Likes
User14274
Level 1
Level 1
Welcome! 5 questions asked First question asked
tomazpercic wrote:
Are you using ILLD drivers?

There is an error in the ADC sample time calculation, function IfxVadc_calculateSampleTime(), the calculated sample time is much too long.
Have a look at user manual 2.2 page 28-79 and in your ADC init manually set the STCS value in register GLOBICLASS.

3.5 us sounds good if you've set the sample time 1.0 us with ILLD (the actual sample time is 2.5 us or more).

When I set STCS to 16 (sample time = 0.9 us), I get around 2.0 us from trigger to ISR. It should be around 1.5 us, the rest is probably ADC arbitration + interrupt latency.

Regards

Thank you.I know why.

tCN = (2 + STC + N + PC) × tADCI + 2 × tVADC

I set the STC = 0.It's total about 1.2us.
0 Likes
User14274
Level 1
Level 1
Welcome! 5 questions asked First question asked
tomazpercic wrote:
Are you using ILLD drivers?

There is an error in the ADC sample time calculation, function IfxVadc_calculateSampleTime(), the calculated sample time is much too long.
Have a look at user manual 2.2 page 28-79 and in your ADC init manually set the STCS value in register GLOBICLASS.

3.5 us sounds good if you've set the sample time 1.0 us with ILLD (the actual sample time is 2.5 us or more).

When I set STCS to 16 (sample time = 0.9 us), I get around 2.0 us from trigger to ISR. It should be around 1.5 us, the rest is probably ADC arbitration + interrupt latency.

Regards

I have another question.
My ADC result always jump 15 AD,I try many ways,but without effect.
Have you met?
0 Likes
User14675
Level 1
Level 1
What hardware/board are you using?
0 Likes
User14274
Level 1
Level 1
Welcome! 5 questions asked First question asked
tomazpercic wrote:
What hardware/board are you using?

I I tried several boards, TriBoard and my own board.The AD results also have jumps when I use the VADC demo.
0 Likes