cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox PSoC 6 SDK

Contributor

I really wanted to use a PWM block running in one-shot mode and using an overflow interrupt from that block so that I can retrigger it in software. But I am having problems making it work.

If I flip the mode to continuous, I get the output I expect on the output pin (and the interrupts). But if I JUST flip the mode to one-shot, the PWM output from the block appears to be disabled. The interrupt still seems to be working and hitting at the expected time, and I can retrigger the block after each interrupt to keep the system running, but no PWM-like output appears on the output pin.

Can anybody confirm or deny that the outputs from the PWM block should still be generated in one-shot mode?

Thanks,

Ed H.

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello EdHa_4455331

For PWM with One shot configuration, you need to connect an external trigger component or toggle the reset pin of the PWM component. You cannot use an API to drive the PWM again. I have attached an example showing a PWM in one shot configuration in CY8CKIT-042. Please have a look.

Thanks,
Hari

View solution in original post

0 Likes
Reply
3 Replies
Moderator
Moderator

Hello EdHa_4455331

For PWM with One shot configuration, you need to connect an external trigger component or toggle the reset pin of the PWM component. You cannot use an API to drive the PWM again. I have attached an example showing a PWM in one shot configuration in CY8CKIT-042. Please have a look.

Thanks,
Hari

View solution in original post

0 Likes
Reply
Contributor

Thanks, AH+96. That did the trick.

But one follow up question - This restriction is not immediately obvious in any of the PMW documentation that I read through. Is this mentioned in the documentation and I just missed it?

Thanks,

Ed H.

0 Likes
Reply
Moderator
Moderator

Hi EdHa_4455331

This is mentioned in the component datasheet.

pastedImage_0.png

Thanks,
Hari

0 Likes
Reply