- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Solved! Go to Solution.
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!