Using capture from an external clock to wake-up device

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
4 Replies
TeHe_281121
Level 3
Level 3

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.

0 Likes
Anonymous
Not applicable

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.

0 Likes
TeHe_281121
Level 3
Level 3

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

   
0 Likes
Anonymous
Not applicable

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.

0 Likes