Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Custom Component ADC ISR

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



Custom Component ADC ISR
Moderator:
ANCY

Post Reply
Follow this topic



Custom Component ADC ISR

kingneb posted on 13 Feb 2013 11:30 AM PST
Member
7 Forum Posts

I have a custom components I am writing that have two analog to digital converters in them. They require that I use their ISR's. What C file do I need to generate so the ISR code is created when I place the component into my main design?




Re: Custom Component ADC ISR

Bob Marlowe posted on 13 Feb 2013 02:24 PM PST
Top Contributor
1768 Forum Posts

Select Components tab and left-click on the Component. Select "Add Component Item" and choose from API the C-file.

That will do the job

 

Happy designing

Bob



Re: Custom Component ADC ISR

kingneb posted on 13 Feb 2013 02:45 PM PST
Member
7 Forum Posts

Is it possible to move an A to D value to some kind of buffer without intervention from the CPU.

What should I use as the buffer if I were to write a verilog component to operate on the buffer?



Re: Custom Component ADC ISR

danaaknight posted on 13 Feb 2013 05:03 PM PST
Top Contributor
1773 Forum Posts

Answer is yes, you would use DMA to write SRAM.

 

There is a specific example here - http://www.cypress.com/?docID=41742

 

Regards, Dana.



Re: Custom Component ADC ISR

kingneb posted on 14 Feb 2013 12:44 PM PST
Member
7 Forum Posts

I plan on creating a buffer that can hold a thousand samples. Where in the memory do you you recommend I place it so nothing is in danger of being overwritten? At the back from addresses 0x20007C17  to 0x20007FFF?

Also, is each memory entry 32 bits wide?



Re: Custom Component ADC ISR

danaaknight posted on 14 Feb 2013 01:45 PM PST
Top Contributor
1773 Forum Posts

Re: Custom Component ADC ISR

danaaknight posted on 14 Feb 2013 01:46 PM PST
Top Contributor
1773 Forum Posts

Memory Map



Re: Custom Component ADC ISR

kingneb posted on 14 Feb 2013 06:46 PM PST
Member
7 Forum Posts

OK, I think I am getting somewhere now.

The joe array in my code in the text file to my knowledge is supposed to serve as a buffer whose values are continually overwritten for the ADC V_SAMPLER. I largly borrowed the code from the ADC DMA example. The only difference is I did not include the interrupt so the ADC keeps on cycling and updating the rolling buffer.

It seems to be doing something but is not returning the proper DC values on the voltage divider I constructed. The physical setup is OK, I verified it with the ADC API calls in a continuous C loop.

I think something else is going on. What I want is the rolling buffer. I included in the text file the setup code.

 

 

 






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