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

cross mob
robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Hi, I would like to ask you which of these two types of converter is faster?
Also, I would like to ask you how I can put the result of the conversion in a pin to see it in the scope? Thanks in advance.

1 Solution
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

In general, EVADCs have a faster speed and lower power consumption, making them suitable for time-sensitive applications. On the other hand, DSADCs are more accurate and are better suited for high-precision applications. Since Aurix does not have a built-in DAC, it is not possible to directly output the conversion result to a pin in the scope. However, you do have the option to use an external DAC or a debugger such as Miniwiggler, Lauterbach Trace32, or PLS to monitor the ADC result value in the Watch Window.

View solution in original post

0 Likes
11 Replies
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

In general, EVADCs have a faster speed and lower power consumption, making them suitable for time-sensitive applications. On the other hand, DSADCs are more accurate and are better suited for high-precision applications. Since Aurix does not have a built-in DAC, it is not possible to directly output the conversion result to a pin in the scope. However, you do have the option to use an external DAC or a debugger such as Miniwiggler, Lauterbach Trace32, or PLS to monitor the ADC result value in the Watch Window.

0 Likes
robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Thank you for your reply. I would like to ask you another question. When I do a conversion, in the AURIX v1.9.4 workspace, how can I see the real conversion time and sampling rate? Thanks in advance.

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples

Please refer to the GitHub repository for the source code. Within each project's cpu0_main.c comments, you can find a link to the related PDF document that describes the demo project.

i.e.

 *********************************************************************************************************************/
 /*\title ADC background scan source
 * \abstract The Versatile Analog-to-Digital Converter (VADC) is configured to measure multiple analog signals in a sequence using background scan request.
 * \description The Background Scan mode of the Analog-to-Digital Converter (ADC) module is configured to measure the
 *              analog signals applied to the channels 0 to 3 of the group 0.
 *
 * \name ADC_Background_Scan_1_KIT_TC297_TFT
 * \version V1.0.1
 * \board APPLICATION KIT TC2X7 V1.1, KIT_AURIX_TC297_TFT_BC-Step, TC29xTA/TX_B-Step
 * \keywords ADC, background scan, conversion, VADC, ADC_Background_Scan_1, AURIX
 * \documents https://www.infineon.com/aurix-expert-training/Infineon-AURIX_ADC_Background_Scan_1_KIT_TC297_TFT-TR-v01_00_01-EN.pdf
 * \documents https://www.infineon.com/aurix-expert-training/TC29B_iLLD_UM_1_0_1_12_0.chm
 * \lastUpdated 2020-12-18
 *********************************************************************************************************************/
robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Thank you. I have seen the example, but I need to check the real conversion time and sample time. How can I look inside the tool?

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

@robs1 I have two suggestions for you. Firstly, you can refer to the datasheet of the specified Aurix MCU to gain more insights. Secondly, you can measure one conversion start and end using a scope. For instance, you can set a GPIO to high and low to measure the duration. Alternatively, if the CPU has a tick clock, you can also measure it using that, but it's important to check the user manual to confirm if this is possible.

0 Likes
robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Thanks very much for your advice!

 

0 Likes
robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Hi, with your advice in mind, could you tell me a solution on how to set the pin high when the conversion starts and low when the single sample conversion finishes? I have no idea how to do this.

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received
    for(int i=0; i<3*10; ++i)
    {
        unsigned chnIx = i % 3;

        // wait for valid result
        Ifx_EVADC_G_RES conversionResult;
        do {
            conversionResult = IfxEvadc_Adc_getResult(&adcChannel[chnIx]);
        } while( !conversionResult.B.VF );

        // store result
        resultTrace[i] = conversionResult;
    }

 

Here is a code snippet that reads an ADC by checking the B.VF bit. Once the flag becomes true, it reads one result and saves it to the array resultTrace. The snippet continues to read the B.VF flag until it becomes true again. You can use this snippet as a reference to set a GPIO high or low. I hope it helps you.

robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Thank you very much, I will try this way. Please, can you tell me how to set the pin? Because my idea was to connect that pin to the scope and calculate the conversion time

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

@robs1 wrote:

Thank you very much, I will try this way. Please, can you tell me how to set the pin? Because my idea was to connect that pin to the scope and calculate the conversion time


Kindly utilize the GPIO settings demo code available at https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples/GPIO_LED_Button_1_KIT_TC39....

robs1
Level 4
Level 4
100 sign-ins 50 replies posted First solution authored

Perfect, thanks

0 Likes