XMC1300 VADC : Understanding Queue Request Source

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

cross mob
User11506
Level 2
Level 2
Hi all,

I am starting to work with the XMC1300 family of Infineon.

I have some troubles to understand how the Queue Request Source of the VADC works according to point 2.4, page 14 of the Application Note AP32304.

1) First, in this page, we can the following figure (Figure 8 in the document):

2058.attach

Could you please explain exactly how do we get from Ta to Tb?

If we have a FIFO, and the sequence is CH1, CH1(with trigger), CH5,CH3, and CH0 (with trigger), where CH0 is the first channel to be converter (First Out),

shouldn´t the new sequence be, after Tb, CH1, CH1(with trigger), CH5,CH3, where CH3 is the first one to be converted when the next trigger occurs?

Could you please explain this to me? I don't undestand why the new sequence is CH5, CH3, CH1, CH1 (with trigger) as shown in Figure 8 and Figure 9.

2) In second place, I can see from the example code that the external trigger for CH1 and CH0 s the same (trigger input A),

what is the sense of this ? .. or to put it in another way.. what would be different in terms of channel sampling order if CH0 wouln't have the Trigger activatated?

this is, if the sequence would be : CH1, CH1(with interrupt), CH5,CH3, CH0(without interrupt), where CH0 is the first channel to be sampled.

Isn't the trigger of CH0 redundant?

and now it comes the third question

3) How can I assigned a different trigger to CH0? so there is one external trigger to CH1, and a different onee to CH0.

Thank you very much for your time.

Regards.
0 Likes
8 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
No worries and this is pretty easy to explain.

First of all, you have to imagine that you are holding a vertical pipe and you put in little ball bearings which are your ADC channels according to your desire sequence. Your finger is at the bottom of the pipe such that the ball bearing will not drop off.
When a trigger happens for channel 0, is as if you are releasing your finger and allow the ball bearings to fall till it reaches channel 1. Those channels which needs to be refilled (yellow) will be put back into the pipe and await for the next trigger to happen which is channel 1.

2051.attach
0 Likes
User11506
Level 2
Level 2
Grate! Thank you a lot!:)

Now it make sense, I was not clear for me that the conversion stops after CH5.
0 Likes
User11506
Level 2
Level 2
I am going to ask also a second opinion about the VACD configuration I have to implement.

As I said I am new with this, and it is nice to hear the opinion of someone experienced.

I need to measure the following: 2 currents (in a synchronous way), 2 voltages, and a temperature.

I thought about using the following configuration:

1 ) Use Queue Source with:
- CH0 and CH0 synchronized for currents measurements,
- CH1 and CH2 for voltage measurements
2) Background Source:
-CH5 for temperature measurement.

If I am not wrong this woul looke somethink like this :

2055.attach

and hence, the conversion sequence along time would something like:

2056.attach

Is this correct ?

Do you think this is an optimal implementation? If not, please give me your opinion about possibles improvements.

Thank you very much again and have a great day! 😄
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Why don't you assign Channel 5 into the queue? Which I think you can have better control of the whole sequence.
0 Likes
User11506
Level 2
Level 2
You are right, I was thinking about maximum triggering frequency,

however if the conversion of one channel takes let´s say 1us (in the Reference Manual is stated that the conversion time it is actually below)

then, by inserting CH5 into the queue, I would have a maximum triggering frequency of 1/4us = 250Khz, which is way higher than the needed one.

and now the following question came to my mind, the "Conversion Time" stated in the Reference Manual, how is it defined?

If it defined as time from when the conversion is triggered by the application, until the value is available for the application to be used? Which I guess, would be the worst case.

Thank you again and please correct me if I am wrong in any statement. 🙂
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
I believe it is from the time of trigger to a valid result in the result register. Anyway you also have to decide which channel to use to trigger an interrupt to read your ADC result. Maybe you can try this example from this link.

https://www.infineonforums.com/threads/3373-XMC4000_HOT-How-to-do-VADC-Queue-source-synchronous-conv...
0 Likes
lock attach
Attachments are accessible only for community members.
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

You can use this project which is created for XMC1300 with the same concept as mention from the previous link.
0 Likes
User11506
Level 2
Level 2
Great! I will!

It is for a motor control application, so I will use CCU8 slice 0 configured into Center Aligned Mode and trigger a conversion at Period Match and One Match.
0 Likes