ADC Measurement App and 10-bit fast conversion

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

cross mob
User11041
Level 1
Level 1
Hi everyone,

on my XMC4400, I have added an instance of the ADC_MEASUREMENT (v 4.1.20) app with 10 measurements. I selected the 10 bit fast conversion mode with 67ns sample time, I enabled continuous conversion and I chose to start the conversions after initialization.

The app initializes fine, returning success, but when I try to ask for a result (here for a DC current) by either calling

uint32_t result = ADC_MEASUREMENT_GetDetailedResult(&ADC_MEASUREMENT_I_DC_handle) & VADC_G_RES_RESULT_Msk;

or by calling

uint32_t result = (uint32_t)ADC_MEASUREMENT_GetResult(&ADC_MEASUREMENT_I_DC_handle);

both routines will give me just a zero. For every of my 10 channels. Of course the actual voltage to be measured is NOT zero and of course I have assigned the right pins to the 10 channels.

When I change the app configuration parameter to 10-bit normal conversion mode instead, everything works just fine!!! Is there a bug in the app in the fast 10-bit mode, maybe something with the continuous conversion or the start after initialization?

It would be great to get some help! Thank you and kind regards
Niklas
0 Likes
2 Replies
User11041
Level 1
Level 1
I really need some help regarding this issue... 😉
0 Likes
Not applicable
Hi Niklas,

Fast conversion mode is only going to provide you with a flag in the result register - FCR. FCR stands for Fast Compare Result, and all it tells you is whether the sampled signal is above or below some selected bound. You can find more on how to choose a bound and how to define the hysteresis range in the reference manual. The bottom line of this is that Fast Compare mode does not provide a conversion result - instead it provides a comparison between the signal that the ADC pin sees and some reference value. The only way to get the conversion results is to enable normal conversion mode.

Hope that helps,

Andrey
0 Likes