Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > ADC Filter Flush

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



ADC Filter Flush
Moderator:
RKRM

Post Reply
Follow this topic



ADC Filter Flush

ImperfectSeven posted on 26 Jul 2012 11:54 AM PST
Top Contributor
77 Forum Posts

When an ADC is configured in continuous mode does calling ADC_DelSig_StopConvert() mean that the ADC's filters need to be flushed again when ADC_DelSig_StartConvert() is called?

 

 




Re: ADC Filter Flush

danaaknight posted on 26 Jul 2012 12:08 PM PST
Top Contributor
1773 Forum Posts

The below is in the datasheet, but not really complete in my opinion. Seems to infer internal filter charge,

therefore discharge issue as well. Sw cap filters affected by charge I available and leakage when

stopped ? You might want to file a tech case at www.cypress.com to clarify, then share with the forum.

 

Continuous sample mode operates as a normal delta-sigmaconverter. Use this mode when
measuring a single input signal.There is a latency of three conversion times before the first
conversion result is available.This is the time required to prime the internal filter. After
the first result, a conversion will be available at the selected sample rate.Do not use this mode
when multiple signals are multiplexed and measured with  asingle ADC.

 

You might run a test case as well on your dev board as another verification.

 

Regards, Dana.



Re: ADC Filter Flush

ImperfectSeven posted on 26 Jul 2012 01:17 PM PST
Top Contributor
77 Forum Posts

Okay, filed a case but I also did some tests....


The ADC is configured as seen in the attached image:

When using the following code:

void main()
{
    uint8 result = 0;
    uint8 vdacOut = 1;
   
    /* Place your initialization/startup code here (e.g. MyInst_Start()) */
    VDAC8_Start();
    ADC_Start();

    CyGlobalIntEnable;
    EOC_ISR_StartEx(My_EOC_ISR);
   
    ADC_StartConvert();
   
    for(;;)
    {

    }
}
 

We can see that the EOC of the ADC is triggered every 2.6uS and is high for about 140nS.

According to the configuration with an SPS rate of 384k we should see an EOC every 2.604 uS and the EOC should be high for one ADC clock period according to the data sheet. So with a clock frequency of 6.144 MHz the EOC should be high for 162.76 nS. So far so good.


Now if we leave the ADC configuration as is and change the code to...

void main()
{
    VDAC8_Start();
    ADC_Start();

    CyGlobalIntEnable;
    EOC_ISR_StartEx(My_EOC_ISR);
   
    ADC_StartConvert();
   
    for(;;)
    {
        if(finished == 1){
            finished = 0;
            ADC_StartConvert();
        }
    }
}

CY_ISR(My_EOC_ISR){   
    ADC_StopConvert();
    finished = 1;
}

We now see that the EOC output is very different. Instead of the EOC continuously triggering it now only triggers twice in a 27.9 uS period. There are two EOC triggers about 2.6 uS apart an they each last about 140 nS, same as above. However after the 2nd EOC there is a 25 uS gap between the start of the next two pulses.

If you measure the time it takes to perform the ADC_StartConvert() operation it comes out to be about 4 uS.

If you measure the time it takes to perform the ADC_StopConvert() operation it comes out to be about 5 uS.

For some reason each operation is being run twice, the _StartConvert() before the EOC and the _StopConvert() after the EOC, so this comes out to (2*4 uS + 2*5 uS) = 18 uS which leaves about 7 uS between the 2 conversions (25 uS - 18 uS).

The data sheet says that the ADC requires 3 conversion cycles to flush the filter so, 3*2.6uS = 7.8uS and this accounts for the extra 7uS seen above.

 

So in the end I do believe the filter is flushed when using the ADC_StartConvert() and ADC_StopConvert() API, however I'm not sure why I see multiple triggers at each iteration. Really wish I had my camera so I could give you guys OScope shots =/

 

I'll post the project in the next post so you guys can check it out yourselves.



Re: ADC Filter Flush

ImperfectSeven posted on 26 Jul 2012 01:19 PM PST
Top Contributor
77 Forum Posts

Here is the project. I'll also update when I hear back from my technical case.



Re: ADC Filter Flush

ImperfectSeven posted on 26 Jul 2012 01:27 PM PST
Top Contributor
77 Forum Posts

Wow, they are fast. The official response is that yes upon calling ADC_StartConvert() with the ADC in continuous mode it will require 3 conversion cycles before a conversion can actually take place.

Hope this helps others.



Re: ADC Filter Flush

PSoC Rocks posted on 13 Oct 2012 04:29 AM PST
Top Contributor
128 Forum Posts

Refer to "Table 39-17. ADC Conversion Time" of PSoC3 TRM. It talks about conversion time of different modes of configuration.


Regards,

Kishore.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20