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

AURIX™ Forum Discussions

FD_aurix
Level 5
100 replies posted 5 solutions authored 10 likes given
Level 5

Hi

I'd like to kwow what is the proper solution to start syncronously the conversion  of two ADC channels queue. Lets suppose I've on G8 and G9 two queue of 10 elements (from CH0 to CH9 to make it simple).  And I want to start the conversion of these two chains syncronously.. how can I do?

If I set the two queue and combine the two CH0 and master/slave I see that only G8 (the master) continue the conversion to the other channels  but G9 convert only the CH0.

Another solution is to use the same trigger signal for both the group and this seems to work... but what is the difference between the two approach?

Thanks in advance

0 Likes
1 Solution
LG
Employee
First solution authored First reply posted Welcome!
Employee

In the case of the master/slave VADC issue, it is possible the SYNC bit is not set in the CHCTR register for the subsequent channels.
With the iLLD this can be configured with the IfxEvadc_Adc_ChannelConfig "synchronize" structure member.

Regarding the difference between using master/slave mode and setting up two request sources with the same hardware trigger:
If the same HW trigger goes to G8 and G9, but G9 was busy with another conversion, then G8 would start immediately, but G9 would not start until it finishes or cancels the previous pending conversion.
However, if G8 and G9 have the same number of configured channels AND there are no differences in the EXTR settings (i.e. both queues are waiting for a HW trigger at the same time), then the delay should be very minimal between the two converter groups (approximately 3 fADC clocks), so the conversions will be nearly synchronized.
That said, Master/Slave mode is the best way to guarantee the highest level of channel synchronization under all conditions.

View solution in original post

0 Likes
6 Replies
LG
Employee
First solution authored First reply posted Welcome!
Employee

In the case of the master/slave VADC issue, it is possible the SYNC bit is not set in the CHCTR register for the subsequent channels.
With the iLLD this can be configured with the IfxEvadc_Adc_ChannelConfig "synchronize" structure member.

Regarding the difference between using master/slave mode and setting up two request sources with the same hardware trigger:
If the same HW trigger goes to G8 and G9, but G9 was busy with another conversion, then G8 would start immediately, but G9 would not start until it finishes or cancels the previous pending conversion.
However, if G8 and G9 have the same number of configured channels AND there are no differences in the EXTR settings (i.e. both queues are waiting for a HW trigger at the same time), then the delay should be very minimal between the two converter groups (approximately 3 fADC clocks), so the conversions will be nearly synchronized.
That said, Master/Slave mode is the best way to guarantee the highest level of channel synchronization under all conditions.

0 Likes
FD_aurix
Level 5
100 replies posted 5 solutions authored 10 likes given
Level 5

HI LG

thanks for the fast reply. 

I can't understand your reference to SYNC. As far as Iv'e understood this should be set to 1 only in master channels, not on the slave nore on the subsequential channels. I'm wrong?

0 Likes
LG
Employee
First solution authored First reply posted Welcome!
Employee

You're correct in your understanding for the GxCHCTRy.SYNC bit.
In your case, it should only be set for G8CHCTR0-G8CHCTR9.

If your post your VADC initialization code here, we should be able to provide some further assistance.

0 Likes
FD_aurix
Level 5
100 replies posted 5 solutions authored 10 likes given
Level 5

ok thanks, I'll try to make it readeable 😄 and then I'll post here

I was thinking to set the first two oq the queue in master/slave so G8CH0 as master and G9CH0 as slave and keep the other as a standard queued.

If I well understood your suggestion is to set all the channel on the Group 8 as master and all the one on Group 9 as slave of the corresponding  master channel...Maybe it works but we are sure that the G9CHn channel are not suspended before the end of conversion if the G8CHn+1 get triggered ?

0 Likes
LG
Employee
First solution authored First reply posted Welcome!
Employee

OK, perhaps I misunderstood your intention. Sorry.

If G9CH0 should only be converted when G8CH0 is converting, then G9CH0 should not be placed in the G9 queue.
Also, no need to set G8CHCTR1.SYNC-G8CHCTR9.SYNC if you do not desire synchronous conversions on these channels.

We'll lookout for your code.

0 Likes
Curious
Level 2
25 sign-ins First like received 5 replies posted
Level 2

Hi FD_aurix,

could you solve the problem?

I've got an quite similiar problem.

That's why I would appreciate it, if you could share your code :D.

0 Likes