5LP PWM Trigger Not Working

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.
BrLe_4753896
Level 1
Level 1
5 sign-ins First like received First reply posted

PSOC Newbie trying to use the PWM as a 1 shot pulse under software control on the CY8CKIT-059.  It works once in a while!  Have tried putting in sync blocks with no success, among many other things to get this to work.  Couldn't find any working examples for PWM in this configuration.  Red scope trace is trigger, blue scope trace is PWM output.  Project is attached.

Untitled.jpg

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

You are setting the period of PWM_1 to 65535 = 6.554 sec,

so it takes more than 6 seconds for the one-shot pulse to appear after the trigger.

001-PWM_org.JPG

So I changed it to 50ms

002-50ms.JPG

And I also shorten the delay to 100 ms in the main loop

===================

int main(void)

{

    PWM_1_Start();

    for(;;)

    {

        Control_Reg_Trigger_Write(1); //send trigger to start pulse

        CyDelay(100);

    }

}

===================

Now I can see the pulse after every trigger, as far as the interval of the trigger is longer than 50ms.

IMG_4546.JPG

moto

View solution in original post

0 Likes
3 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

You are setting the period of PWM_1 to 65535 = 6.554 sec,

so it takes more than 6 seconds for the one-shot pulse to appear after the trigger.

001-PWM_org.JPG

So I changed it to 50ms

002-50ms.JPG

And I also shorten the delay to 100 ms in the main loop

===================

int main(void)

{

    PWM_1_Start();

    for(;;)

    {

        Control_Reg_Trigger_Write(1); //send trigger to start pulse

        CyDelay(100);

    }

}

===================

Now I can see the pulse after every trigger, as far as the interval of the trigger is longer than 50ms.

IMG_4546.JPG

moto

0 Likes

Thanks, that makes sense, so in summary the PWM one shot with multi trigger can not be re-triggered until the full period of the one shot if finished.

MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

> Thanks, that makes sense, so in summary the PWM one shot with multi trigger can not be re-triggered until the full period of the one shot if finished.

I think so.

Otherwise you should not have seen any pulse(s) in the original waveform.

moto

0 Likes