XMC4500 Relax Kit ADC Converter

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

cross mob
Not applicable
Hi all,

I just acquired a XMC4500 Relax Kit and am learning to program with DAVE Apps. I tried first with the ADC apps but I couldn't find any option to choose the Vref+ source for the ADC. It seems the default Vref+ source is from Varef which is about 3.3V. Is there anyway to increase this value, or to change to another source (CH0) with higher value (5V for example) ?

Thank you in advance.
0 Likes
13 Replies
Not applicable
Hi Idkv,

If you look at the datasheet, the max. Varef is Vdda+0.05 where Vdda = max. 3.6V.
Hence, it is no possible for increase the Varef voltage to a higher value.
0 Likes
Not applicable
Hi,

I'm interested in how I can program the Varef in DAVE 3, too. Is there an example project, where the Varef is set to a different value than the regular 3.3V?

Thank you very much!

Best regards,
MTR
0 Likes
Not applicable
Thank you Jackson. However, according to the datasheet, we can change the Vref+ to an alternate source CH0, how can we do this in DAVE ? And how can we supply this CH0 source please ?
0 Likes
Not applicable
Hi MTR and Idkv,

Unfortunately we don't have example on setting alternate Vref on CH0.
All you need to do is set the GxCHCTRy.REFSEL register and the ADC will reference to the CH0 input.
However, even using CH0 as Vref, the max. input voltage is still 3.6V.
0 Likes
Not applicable
Hi Jackson,

Thank you again for your reply, in this case I have to make do with 3.6V then.

I have another question concerning the communication between the XMC4500 and a PC. For instance, I would like to sample a signal from a generator by the XMC4500, then send the digital results to the PC to store. What kind of connection (Ethernet, USB, UART etc.) should I choose for maximum speed and how can I configure my PC to receive the data sent by the XMC ?

I have tried with Ethernet but I couldn't establish a connection.
0 Likes
Not applicable
Hi Idkv,

I would not recommended you use 3.6V. Try to use 3.3V if possible.
3.6V is the max. value, that's the value the device can tolerate.
So unless your reference voltage is very stable and no fluctuation at all, if not I think is a bit risky.

For transferring data, if you are looking for maximum speed, perhaps USB would be your choice.
In the latest DAVE App update, there is a USBD_VCOM App where the app provide latest lightweight driver for USB virtual COM port application.
With this implemented into your project, your XMC4500 will become a virtual COM port when connected to your PC.
Please refers to the App documentation for more information.
0 Likes
Not applicable
Hi Jackson,

in my case I want to set the reference voltage to 1.5V or something in that region. The reference voltage should be provided by the DAC. Can I connect the DAC and the Vref internally? Or do I have to connect the pins physically.
Where can I set the registers, you mentioned? Isn't it enough to change the reference input in the ADCCH001-App from VAREF to CH0? I checked the documentation but just to be sure: Which one is the right input pin for CH0, do I have to set an IO-App and direct it to the ADC?

Thank you very much for your help.
Best regards,
MTR
0 Likes
AndreasG
Employee
Employee
10 replies posted 5 replies posted Welcome!
If you want to use the internal DAC to generate the 1.5V reference for all ADC channels, you will have to connect the DAC output to the VAREF pin.
If you need the 1.5V reference for just a few pins, you can use P14.8 as DAC output, and configure the VADC.G1CH0 as alternate reference. In that configuration, all other VADC.G1CHx (P14.[2, 3, 9, 12..15]) use this alternate reference generated by the DAC, while all other ADC channels still use the normal reference (or the alternate reference from their respective VADC.GyCH0, depending on the configuration).

I can't help you with the details how this is setup in software/DAVE; somebody else will have to step in at that point 😉
0 Likes
Not applicable
Oh wow, thank you very much for your answer. That should work for me! That's exactly what I was looking for. I couldn't try it yet, but I give it a try as soon as possible!


Maybe there is a solution for my other ADC Problem:

I use that code for getting results from a synchonized ADC, but the conversion is much slower (about 6 µs) than the value displayed in the DAVE App (550 ns).

for(count=1; count<2001; ++count)
{
ADCSYNC001_GetResult(&ADCSYNC001_Handle0, &ADCSYNC001_MSYNCA_Handle0, &Result[0]);

ADCSYNC001_GetResult(&ADCSYNC001_Handle0, &ADCSYNC001_MSYNCA_SA_Handle0, &Result[1]);

ADCSYNC001_GetResult(&ADCSYNC001_Handle0, &ADCSYNC001_MSYNCA_SB_Handle0, &Result[2]);

ADCSYNC001_ClearResultEvtFlag(&ADCSYNC001_Handle0, &ADCSYNC001_MSYNCA_Handle0);

Array[count][0]=count;
Array[count][1]=Result[1]; //R
Array[count][2]=Result[2]; //G

}

How can I speed up the conversion?

I posted more details on this thread: http://www.infineonforums.com/threads/1478-Synchronous-ADC
I hope it's fine, that I ask for some help in that old thread...


Thank you again!
Best regards,
MTR
0 Likes
Not applicable
Jackson wrote:
Hi Idkv,

I would not recommended you use 3.6V. Try to use 3.3V if possible.
3.6V is the max. value, that's the value the device can tolerate.
So unless your reference voltage is very stable and no fluctuation at all, if not I think is a bit risky.

For transferring data, if you are looking for maximum speed, perhaps USB would be your choice.
In the latest DAVE App update, there is a USBD_VCOM App where the app provide latest lightweight driver for USB virtual COM port application.
With this implemented into your project, your XMC4500 will become a virtual COM port when connected to your PC.
Please refers to the App documentation for more information.


Hi Jackson,

Thank you a lot for your reply. So now I has been able to configure the ADC and the USB module to work using the ADC001_Example and USBVC001_VCOMSerial_Example1 separately. But when I tried to combine these 2 modules (ADC and USB) by integrate the ADC001 into the USBVC001_VCOMSerial_Example1, I couldn't get the USB to work properly.

It can still connect to the PC but I couldn't send any data by using USBVC001_SendByte(). It could only work when I disable the function ADC001_GenerateLoadEvent(&ADC001_Handle0) of the ADC. I figure there is a conflict between the config of the ADC and the USB which make it unable to work together, but I don't know how to solve it. Could you give me some advice please ?


@ MTR: no problem for me, but I think that may confuse Jackson a little, too many problems to handle at a time 😛
0 Likes
Not applicable
Hello,

I am sorry for digging my old thread again, but I am really in need of your help. I am trying to configure my ADC to continuously sample a sinus signal at a fixed sampling rate, which I can choose on my own. I used the example code from the home page : Device Guide - XMC4000 - Analog-to-Digital Converter (ADC), and the project I chose was VADC_Trigger_from_Peripheral.

If I understand correctly, the project should update the variable result continuously, but when I checked this variable, it changed from 0 to another value then stayed at this value constantly over time, as if only 1 conversion was done then the ADC stopped (no more trigger).

My question is how I can trigger the ADC to run continuously by the Timer ?
0 Likes
User13476
Level 1
Level 1
Hi Jackson,

I am working on, XMC4700 evaluation KIT. I am working on ADC Module.

How to drive the VAREF to 2.5 volts?

As of now, I am trying to connect external voltage measuring 2.5 volts to VAREF, so that I can use 2.5 volts as standard reference voltage.
Its not taking voltage I am supplying to VAREF, instead 3.3 v default voltage is considering.

Need guidence.

Regards,
ADCG
0 Likes
User16343
Level 1
Level 1
Bringing this thread back because I was stumped and encountered the same issue. I figured it out and Infineon should really update the XMC Relax Kit user guide to clearly state that R109 is DNP and removes X304 pin 8 VAREF from the actual XMC VAREF pin on the IC and R110 when populated will set the on-board 3.3V reference to VAREF.

3398.attach

I confirmed this by moving the jumper from R110 to R109 and my ADC coversion now uses my external voltage reference.
0 Likes