sleep timer interval

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

cross mob
Anonymous
Not applicable

Hello all,

   

I am  using CY8c3244PVI-133 controller for one of my project.

   

I want to generate a signal of 40msec on one of the port pin.

   

I designed in such a way that it will generate a signal and again go back to sleep. and wakeup generate a pulse and again back to sleep.

   

i.e. sleep->wakeup->high pulse->sleep->wakeup->low pulse->sleep and so on

   

I am using sleeptimer and in the isr of sleeptimer I am toggling one port pin.

   

If I set sleeptimer interval = 4sec, port pin is high for 2sec and low for 2sec

   

If I set sleep timer interval = 2sec then port pin is high for 1sec and low for 1sec

   

oscillator for sleep timer is ILO i.e 1KHZ

   

Please guide.

   

Thank you all 

0 Likes
8 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Why not use a PWM? It can run while the rest of the chip is in sleep, too. And it can be configured easily to get the wave form / pulse width you need.

0 Likes
Anonymous
Not applicable

Hello,

   

thanks for reply.

   

can PWM module run while controller is in sleep mode? How?

   

can you tell me why my sleep timer period has become half?

   

Please guide.

   

thanks

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Sleep timer uses ILO whose accuracy is -50 to +100% (have a look at the "Clock"-tab in .cydwr-file. This is within the limits you watched.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Yes, PWM can operate during sleep, as long as its clocked by 32 Khz

   

clock source.

   

 

   

See         http://www.psocdeveloper.com/uploads/tx_piapappnote/an2221_01.pdf    AN2221   

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Scratch prior post, thought PSOC 1 was being discussed.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Looks like PWM is not operational in sleep, from the TRM -

   

 

   

0 Likes
Anonymous
Not applicable

Hello all,

   

thank you for reply.

   

Please tell me why period is reduced in sleep timer interrupt?

   

i.e controller should wakeup after  4sec interval set in the sleep timer but it wakes up after 2sec?

   

Please guide.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Dang, I thought this would work. Unfortunately, even doing the PWM in UDBs won't work, as they are also disabled during sleep 😞

0 Likes