Get signal from PWM

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I want 2.4 KHz frequency on PWM out pin with 50% duty cycle. I added a PWM component, Clock - 1MHz, period - 416, compare -208

   

 

   

In the main loop I Start the clock, Start the pwm. and while loop is there.

   

But I am not getting anything on the scope. Can anyone tell what is wrong here ? Project is attached.

   

I think I am missing very small detail.

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

You are using CySysPmDeepSleep(). Entering deep sleep without using PWM_Sleep() and PWM_Wakeup() will not work as expected. There will be no output during deep sleep.

   

 

   

Bob

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Update - I can achieve same using PWM (UDB component) but getting nothing in case of TCPWM component. Hence clock, period and compare value in the question is correct but issue is with TCPWM component.

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

You are using CySysPmDeepSleep(). Entering deep sleep without using PWM_Sleep() and PWM_Wakeup() will not work as expected. There will be no output during deep sleep.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello Bob,

   

It worked for me as of now. I need to read about CySysPmDeepSleep, PWM_Sleep and PWM_Wakeup and try to understand this behavior.

   

Thanks for your immediate response.

0 Likes