Maximum amount of pwm in psoc4

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

cross mob
pamac_1655886
Level 2
Level 2
First like received

I am testing my code in a CY8C4247LQI-BL483 device (pioneer ble board) but I have in mind to develop a board to the end device.

   

 

   

Now we have a project in which we control 6 pwm outputs with no problem. But now we have been asked to control 18 pwm outputs. I read that it was possible (http://www.cypress.com/blog/psoc-sensei-blog/how-many-pwm-outputs-can-psoc-3-or-5-generate says that 48 can be possible). I tried adding 18 pwm and I received an error. Then, I realize that pwm blocks can be configured with 2 outputs so at least I got 12 outputs right now: 4 pwm and 4 tcpwm.

   

 

   

I can't add more tcpwm blocks. I get: Resource limit: Maximum number of Timer/Counter/PWM exceeded (max=4, needed=10)

   

I also have an adc with 2 inputs, one button to generate interrupts, ble unit and 3-4 input pins to measure battery level or that kind of stuff. I tried removing adc sar req but I get the same response. What can I do? Is there a bigger psoc proccesor which can handle 18 pwm and all the stuff I get? On the contrary, what could we do to solve this? 2 psoc talking by uart? 

   

 

   

I can't upload the project since it is not mine but my company. Sorry for that. But I could upload a couple of images in case you need them to see how we added pwm or something like that.

0 Likes
1 Solution
8 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
0 Likes
pamac_1655886
Level 2
Level 2
First like received

Thank you, odissey1. I think this is what I need to get 18 pwm. I just tested it with some leds and it seems to work. I will try with some motors in a couple of days.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

just wonder, are you making a 6-leg spider?

0 Likes
pamac_1655886
Level 2
Level 2
First like received

It is some kind of small towel for the back. Not sure what it purpose is yet. I guess something related to massages. I just receive orders and make no questions 😉

0 Likes
pamac_1655886
Level 2
Level 2
First like received

I have tried that project and I found a problem (for my use, I guess). I have to change the duty cycle each X milliseconds to get pwm to work. It doesn't work as psoc pwm module: You use WriteCompare function and it start the pwm with that value. In this case, that doesn't work. So I can't have my code doing other stuff while pwm is working.

   

 

   

Any idea about how to solve this? If you don't understand what I mean, I will try to explain myself better. English is not my language.

0 Likes

I would suggest to post a question about this issue on the 4xPWM component page.  

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

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

pmartinez,

   

I have 24 8-bit PWM to fit PSoC4M KIT-044: 4x QuadPWM located in UDB and 8x fixed function TCPWM. Total 4x4+8=24 PWM outputs. I don't see problems so far, but, of coarse, UDB is 100% used.