Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > Using capture from an external clock to wake-up device

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



Using capture from an external clock to wake-up device
Moderator:
ARVI

Post Reply
Follow this topic



Using capture from an external clock to wake-up device

dsandru posted on 30 Aug 2010 1:53 PM PST
Member
4 Forum Posts

Using the CY8C24423A I am trying to use the falling edge of a pulse to wake-up the device, do some ADC, then go back to sleep... wake up on the next falling edge etc and repeat....

I read in the Cypress Datasheet for my part that the system can only wake up from: GPIO Ints, supply mon. int., analog column int, and timer clocked EXTERNALLY or from 32KHz clock.

My timer that I am using is clocked from the incoming pulse train (variable)... I have a hardware reset that causes a GPIO interrupt and I have seen that work by toggling an LED (sleep and non-sleep), but whenever I put the device to sleep and expect to see the LED go high on the falling edges of the incomming pulse it's not there. When I don't put the system to sleep I can see my LED go high as expected...

Is what I am doing possible? I'm not sure if there is some assembly I might have to change to make this work... has anyone else had to do something similar?

I haven’t been real specific in my application, except that I need to do ADC on the low portion of a pulse and then go back to sleep. Maybe there is a better way to do this…

Any help will be appreciated.




Re: Using capture from an external clock to wake-up device

Terrence posted on 30 Aug 2010 02:29 PM PST
Top Contributor
43 Forum Posts

If you are using the timer to wake from sleep, and you say its clock is external, then it will work, but you have to set the "ClockSync" parameter of the timer to Unsynchronised, and the digital interconnect on the row the clock comes in, has to be set to Async.

If they are not,then the input clock would be synchronious to, for example the system clock, which is not running, therefore no clock for you timer.



Re: Using capture from an external clock to wake-up device

dsandru posted on 31 Aug 2010 06:36 AM PST
Member
4 Forum Posts

Thanks for the reply.

I have my Timer unsynchronized and the digital row input is set to asyncrhronous. Still I cannot get my clock to interrupt on the falling edge and wake up from sleep mode.

I am using an 8bit timer to count the first six pulses after a reset pulse is seen. Then I change that timer settings to interrupt on capture, invertcapture, and the input to be the same as the clock for timer 1, and the timer clock to 32KHz...

So at this point I should beable to wake up on each falling edge. I have an LED to toggle when I enter the interrupt routine, but I do not see this happen. Maybe there is something still that I am missing.



Re: Using capture from an external clock to wake-up device

Terrence posted on 31 Aug 2010 10:35 AM PST
Top Contributor
43 Forum Posts

I would suggest trying to get the code working without using sleep first, to ensure that your logic and implementation are correct.




Re: Using capture from an external clock to wake-up device

dsandru posted on 31 Aug 2010 01:48 PM PST
Member
4 Forum Posts

Yes, that is all fine, the code while awake works, its only when I put it to sleep. I have abandoned the idea that I will be able to wake up on this incoming falling edge... I have decided to just use the I/O interrupt instead of a clock to do this... Thanks for the effort though.






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