Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > Interrupts from ADC halts all other processes

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



Interrupts from ADC halts all other processes
Moderator:
JFMD

Post Reply
Follow this topic



Interrupts from ADC halts all other processes

Hayden posted on 06 May 2011 10:48 PM PST
Member
4 Forum Posts

Hello,

I'm trying to use an ADC to  sample audio from a mic (50 ksps) and store it in an array. The issue I'm having is that the interrupt I have connected to eoc seems to get called so often that the while(1) loop in main.c seems to halt altogether. I feel like the PSoC 5's processor should be fast enough to not have this issue, but am not sure what I'm doing wrong. 

Any suggestions on what could be wrong or what could be a better approach to recording audio?

thanks,

-Hayden




Re: Interrupts from ADC halts all other processes

Hayden posted on 06 May 2011 10:53 AM PST
Member
4 Forum Posts

 I guess I'm okay with it since within the interrupt I can stop converting once I've reached my target number of samples. Now I'm just confused about how fast it reaches that point.

I've configured the ADC to 10,000 SPS and it's set to halt once it's taken 50,000 samples, or what I'd assume would be 5 seconds worth. But for some reason it finishes after half a second. Am I missinterpreting what SPS stands for or does the ADC call EOC at a faster rate than the SPS it is set to?



Re: Interrupts from ADC halts all other processes

me2 posted on 06 May 2011 12:30 PM PST
Senior Member
16 Forum Posts

Hayden,

Did you ever consider to use the DMA? That would be a lot faster than interrupts.

Which memory are you using to store your samples? If you use a 10-bit ADC and try to store 50000 samples you will definitely run out of internal memory and that can result in unexpected behavior.

If you store the data to external memory, that write operation could be your bottleneck from your first question.

Just some thoughts, Rob



Re: Interrupts from ADC halts all other processes

Hayden posted on 09 May 2011 02:49 PM PST
Member
4 Forum Posts

Yeah you're probably right that a DMA makes more sense. I will try using that instead. 

As for how much audio I'm storing, it would be nice if I could keep something like 5-10 seconds of low quality audio. Besides keeping the sampling rate as low as possible do you have any other suggestions for how to store this much 8-bit audio?

Thanks!






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: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20