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

cross mob
Not applicable
Hello,

what is the best way to add more ADC channels while maintaining same start time by on event as set up in the ADC002 Exam 1.?
I need four inputs and like to use all four ADC's of XMC 4500?

Regards
Kurt
0 Likes
6 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
You can use synchronous conversion.
0 Likes
Not applicable
Thanks Travis,

I'll give this a try and come back to you
0 Likes
User8487
Level 2
Level 2
First like received
Hi,
i need also 4 analog inputs, synchronous conversation (XMC4500 144-pin). Therefor i used the ADCSYNC001_Example1 (3 synch. channels) with periodic Sampling like in ADC002_Example1.

With 3 channels no problems. Do you have any news/hint how to use 4 synchronous ADC-channels?

br, Matthias
0 Likes
User8734
Level 4
Level 4
Good day,

You can do it using Background Source, taking ADC001_Example2.
I add 3 more VADC groups in this example and IO001's and activate them.
After DAVE code generation, I search ADC001.c file for "TBS" and change its value from
1 -> 0 to redirect storing VADC results from (only one) GLOBRES to VADC_Gx_RES[xy] registers.
Here x=0..3 for different VADC groups, and xy depends on IO001's configurations.

After that run Debug, saving canges in ADC001.c.

689.attach 690.attach

So, we have 4 results in VADC_Gx_RES registers taking simultaneuosly:)

BR
K
0 Likes
User8487
Level 2
Level 2
First like received
XmCfAn2014 wrote:

After DAVE code generation, I search ADC001.c file for "TBS" and change its value from
1 -> 0 to redirect storing VADC results from (only one) GLOBRES to VADC_Gx_RES[xy] registers.


Hi,
i've tried your hint. With "1" :
      WR_REG( VADCGroupPtr[GroupNo]->CHCTR[ChNo],
VADC_G_CHCTR_RESTBS_Msk,
VADC_G_CHCTR_RESTBS_Pos,
(uint32_t)1
);

the sampling is asynchronous.

On the other hand, "0" has no effect, no conversation (Breakpoint set in GlobalResultEvent).


I think, to convert 4 ADC-channels synchronous (1 Master, 3 Slaves) the ADCSYNC001 is necessary. Any ideas?

br, Matthias
0 Likes
lock attach
Attachments are accessible only for community members.
User8734
Level 4
Level 4
Good day,

Please reffer to PDF attached, section
1.6.1 Synchronous Conversion
on page 16.

BR
K
0 Likes