Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > To reset the PSoC3 device through code

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



To reset the PSoC3 device through code
Moderator:
RKRM

Post Reply
Follow this topic



To reset the PSoC3 device through code

neha posted on 10 Sep 2012 11:12 PM PST
Top Contributor
85 Forum Posts

Hi!

I've burnt a simple program for counting pulses per second at input pin on a CY8C001 kit. The problem is that it picks up random counts sometimes even if the ground is secured at input (when i expect counts to be seen as '0'). The counter is back to its accuratekeep hitting the 'reset' switch time to time.   can i schedule this 'reset' action in my firmware, maybe once after every 10 seconds ? is there any API call for this?

 




Re: To reset the PSoC3 device through code

srim posted on 10 Sep 2012 12:54 AM PST
Cypress Employee
121 Forum Posts

 Hi Neha,

There is a API for doing a software reset. You can schedule CySoftwareReset() API based on your requirement.

Thanks,

srim

 



Re: To reset the PSoC3 device through code

danaaknight posted on 10 Sep 2012 02:41 AM PST
Top Contributor
1773 Forum Posts

Seems to me there is a more important issue here, where are
the counts coming from when the input is  grounded to the
counter ? You should not have to reset a part like this to
get its counter reset.

You might use a DSO and set it up for normal mode triggering,
and set the trigger voltage to Vdd/2 for starters, to see if
you get a trigger on a "grounded" input. Or Vdd or Vss rails.

The input pin is configued properly, not "HiZ Analog" ? If you
are trying to count an analog like signal, use a comparator with
hysterisis to eliminate spurious noise triggers to your counter.

Regards, Dana.



Re: To reset the PSoC3 device through code

Gautam Das posted on 11 Sep 2012 10:41 PM PST
Cypress Employee
742 Forum Posts

Hi neha,

 

As Dana has already said, resetting the device periodically is not the right solution to the problem.

If you are using Timer / Counter for counting, make sure that the analog front end of the input to Timer doesn't pass the noise resulting in spurious counts when grounded.



Re: To reset the PSoC3 device through code

neha posted on 17 Sep 2012 10:58 PM PST
Top Contributor
85 Forum Posts

Thnx Srim, Danaa and Gautam!

am using CY8C001 kit's prototyping area to give the input from fixed pulse generator.In absence of input it picks up random counts .In presence of input also sometimes redundant counts are picked up. Already have a comparator with hysteresis enabled at the input. How to have a permanet solution to this if not reset? alternatively, how to set up a DSO? never used it..



Re: To reset the PSoC3 device through code

Gautam Das posted on 17 Sep 2012 03:33 AM PST
Cypress Employee
742 Forum Posts

Hi Neha,

 

If the analog front end consists of a comparator whose threshold is close to midpoint of the input signal, the possibility of the noise affecting the readings is lesser.

It will be easier for us to help you to get to the root cause of the issue if you can upload your project here.



Re: To reset the PSoC3 device through code

danaaknight posted on 17 Sep 2012 04:49 AM PST
Top Contributor
1773 Forum Posts

A schematic of the input signal path might help as well.

 

Regards, Dana.



Re: To reset the PSoC3 device through code

neha posted on 18 Sep 2012 03:34 AM PST
Top Contributor
85 Forum Posts

here it is..



Re: To reset the PSoC3 device through code

Bob Marlowe posted on 18 Sep 2012 06:58 AM PST
Top Contributor
1768 Forum Posts

Neha,

when doing a Clean and Build I get two warnings about not synchronous clocks.

You should uswe a synchronizer component to sync the divided 32kHz clock to busclock and then route it to your counters. See attached example, but untested.

 

Bob



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:17 AM PST
Top Contributor
85 Forum Posts

Thnx Bob!

Those warnings are not found nw.

Late feedback is regretted.. :(

Neha



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:29 AM PST
Top Contributor
85 Forum Posts

 Sadly...the pickup has not reduced after synchronisation as well. Am uploading another project.It duplicates the previous project in another schematic page . So we have 2 independent channels for counting. If someone can check counts in absence of input on CY8C001 kit , it'll be great help.. 

Thnx in advance

neha



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:36 AM PST
Top Contributor
85 Forum Posts


Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:37 AM PST
Top Contributor
85 Forum Posts


Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:39 AM PST
Top Contributor
85 Forum Posts

 hope its attached dis time..



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:42 AM PST
Top Contributor
85 Forum Posts

 



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:50 AM PST
Top Contributor
85 Forum Posts

 pictures of 2 schematic pages

 



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:51 AM PST
Top Contributor
85 Forum Posts

 pictures of 2 schematic pages

 



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 01:52 AM PST
Top Contributor
85 Forum Posts


Re: To reset the PSoC3 device through code

Gautam Das posted on 16 Jan 2013 03:05 AM PST
Cypress Employee
742 Forum Posts

1) Are you using extrenal 32kHz (crystal) oscillator?

 

2) Is the frequency of the analog input signal to the comparator greater than 32kHz? If not, then you'll end up capturing the same  Counter value multiple times before it is incremented by the Comparator's output.



Re: To reset the PSoC3 device through code

neha posted on 16 Jan 2013 07:16 AM PST
Top Contributor
85 Forum Posts

 Hi Gautam!

Yes 32 KHz external crystal was used keeping accuracy in view. But when used as a capture input, i've divided the frequency by 1000 so that count rate in CPS is measured directly. Interrupt in counter is raised only on CAPTURE. 

The input pulses can be below 32 KHz in frequency ...



Re: To reset the PSoC3 device through code

Bob Marlowe posted on 16 Jan 2013 09:55 AM PST
Top Contributor
1768 Forum Posts

Neha, when you have troubles uploading a project file here, try to switch to ms internet explorer, some guys reported having problems with chrome.

 

Bob






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