Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Timer cannot reset

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



Timer cannot reset
Moderator:
ANCY

Post Reply
Follow this topic



Timer cannot reset

Hui Xin posted on 07 Feb 2013 12:08 AM PST
Member
9 Forum Posts

Hi.

I am currently doing a project to control PSoC chip through USBUART.

For one of the chips, i use PWM, AD & Timer function. But i encounter a problem that the Timer cannot be reset properly. Could anyone help me to check what is wrong with my way of doing it?

I build 4 Timers inside my code. The reset bit is "Pin_TMR1_RST", and it is connected to "Pin_TMR1_RST_CTRL" through hardware circuit. So that i can toggle "Pin_TMR1_RST_CTRL" to reset the timer.




Re: Timer cannot reset

Bob Marlowe posted on 07 Feb 2013 12:40 AM PST
Top Contributor
1768 Forum Posts

I fell into the same pit, so you are mot allone in the dark (smile).

Reset for timers (and counterrs) are synchron and must endure one clock pulse long. Your sync-components requires (as datasheet tells) "The signal must have a pulse width of at least one clock period  + 2ns"

I would suggest you to use two D-FFs, the first with an async set input which will together generate a pulse long enough to reset your timers.

 

Happy coding

Bob



Re: Timer cannot reset

Hui Xin posted on 14 Feb 2013 07:00 PM PST
Member
9 Forum Posts

Hi Bob,

Thanks! Sorry for late reply, just back from a long holiday...

since my clock used in "capture" is 2KHz, does that mean the Reset pulse will work if it is longer than 0.5ms + 200ns?

The D-ff, would you please give more details? i am still confused...    






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