Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

GiLi
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

Hi there,

I recently evaluated the part CY8C4745AZI-S403 and got most of my needs working.

Unfortunately, I bumped in a limitation that I ran out of PWM pin, so I have to use a GPIO pin P1_4 of the CY8C4745AZI-S403 part but I cannot connect the GPIO pin directly from the PWM component. So I thought of the SmartIO, but it only allows me to user port 2 or 3 only.

Is there any help or suggestion how i can pass this PWM signal to P1_4 with all these limitation?

Please advise.

Thanks!

0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 sign-ins 5 comments on KBA First comment on KBA

Yes, you can use SPI to generate a PWM signal on port 1, but only on pin P1[0] (SPI.MOSI). The idea is to generate the desired pattern on SPI MOSI line. 

Do you need more than 5 PWMs? You would be better off to reassign the pins to drive directly from the TCPWMs. For instance, P1[0] can also be driven by a TCPWM, which should be your preferred option.

View solution in original post

0 Likes
4 Replies
RodolfoGL
Employee
Employee
250 sign-ins 5 comments on KBA First comment on KBA

Unfortunately, you can't use Smart I/O on port 1. 

Note the part you selected has 5 TCPWMs. If you need more than that, there are few suggestions:

1) You could use a Smart I/O to generate a PWM by using the internal Data Unit of the Smart I/O.

2) You can use the SPI block (Master Mode) to generate the PWM signal, though you need to feed the TX FIFO constantly.

3) If your PWM only requires to generate a square wave, you can also use SPI or Smart I/O to generate it without any firmware interaction.

0 Likes
GiLi
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

Hi RodolfoGL,

Thanks for your quick reply.

Refer to your comment, I can't use SmartIO on port 1, which means your recommended option 1 and 3 are out. so I can only use the SPI pin to generate the PWM signal manually.

Am i understand correctly?

Thanks!

0 Likes
RodolfoGL
Employee
Employee
250 sign-ins 5 comments on KBA First comment on KBA

Yes, you can use SPI to generate a PWM signal on port 1, but only on pin P1[0] (SPI.MOSI). The idea is to generate the desired pattern on SPI MOSI line. 

Do you need more than 5 PWMs? You would be better off to reassign the pins to drive directly from the TCPWMs. For instance, P1[0] can also be driven by a TCPWM, which should be your preferred option.

0 Likes
GiLi
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

Hi RodolfoGL,

Thanks for your feedback.

In fact, I am thinking of using this new part as a direct replacement of other project, that's why i have this limitation to use the P1_4 pin with PWM function.  Anyway, i have my clear picture what options i have now.

Thank you!

0 Likes