- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scratch prior post, thought PSOC 1 was being discussed.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like PWM is not operational in sleep, from the TRM -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dang, I thought this would work. Unfortunately, even doing the PWM in UDBs won't work, as they are also disabled during sleep 😞