Can OE for a GPIO in the P4100S or P4100S Plus?

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

cross mob
MiRo_263836
Level 5
Level 5
100 replies posted 50 likes received 50 replies posted

I want to modulate all the LEDs in my CY8C-149 dev board using a PWM.  I notice that the pins can be placed with an output enable control but it appears that it's not legal for me to do that. In other words, I want to use the output enable control of all my LED-driving GPIOs to vary LED output while still controlling each of those GPIOs in software.  Is that possible?   Can Smart I/O be used?

Best Regards,

Mike Roberts

Arrow Infineon Specialist

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi Mike,

I believe the OE selection requires "port adapter" and DSI which are not present in the PSoC4100S-plus devices.

In devices such as PSoC4100/4200 which do have port adapter, the architecture TRM shows the Port Adapter Output Enable logic - reference PSoC 4100/4200 TRM ( https://www.cypress.com/file/126171/download ) page 158

And the app note AN86439 PSoC 4 – Using GPIO Pins ( https://www.cypress.com/file/127101/download ) in page 11 mentions that:

Port Adapter and DSI are "not applicable to PSoC 4000, PSoC 4000S, PSoC 4100S, PSoC 4100S Plus, PSoC 4100PS"

SmartIO can be considered for your requirement of sending a PWM signal to multiple LEDs, but there are some limitations:

- SmartIOs can only interconnect signals within the 8 pins of one port and not to pins of other ports. To connect to pins of other ports, external wiring and extra pins would be required to interconnect the ports.

- SmartIO blocks are only available in Port 1, Port 2 and Port 3 in PSoC4100S plus, where as the 9 LEDs in the CY8CKIT-159 are spread over Port 1, Port 2 and Port 5. Port 5 does not have SmartIO block.

With these limitations, I tried creating a PSoC Creator schematic which requires 3 PWMs for the 9 LEDs.

Attached is the project(It is not complete with firmware and not tested as I don't have the -159 kit. It is only to show the schematic connections and SmartIO configuration).

In the project, PWM line_n outputs have been inverted.

The pin connections to the PWM blocks have been chosen based on the "Alternate Pin Functions" in the PSoC4100S-plus datasheet ( https://www.cypress.com/file/396611/download ) which shows the multiple pins that each TCPWM hardware block can route to.

Below is the schematic screenshot:

PWM_SmartIO_LED_connections_screenshot.jpg

If external pin wirings are allowed with some extra pins, it should be possible to use a single PWM for all the LEDs.

Or on a custom board with all LEDs placed on the SmartIO ports which also share a TCPWM hardware block output(for example Port2 and Port3 combination), it should be possible to modulate all LEDs using a single PWM without external connections or extra pins

Best Regards,

Prem Sai

View solution in original post

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

MiRo,

There are only 4 Output Enable lines available per  each port, so only 4 Pins per port can be modulated using OE hardware terminal. Please check if this is the case.

On the other hand, why not directly connect individual PWM to each Pin's hardware terminal? This way no OE terminals are necessary.

/odissey1

0 Likes

I just tried 1 in Creator and it gave me an error saying that it couldn't find it. So I just need to select the correct GPIO pin cydwr?  Is that documented in the TRM?

pastedImage_1.png

pastedImage_3.png

0 Likes

Here is the pin configuration.  I want to control the Pin state in FW, but the OE in with a PWM Output

0 Likes

0 Likes

MiRo,

I understand. I suggest to connect PWM to each pin permanently, and just switch pin driving mode in firmware from e.g. strong drive (LED ON) to Open Drain Drive Low (LED OFF).

/odissey1 

0 Likes

I can only connect 1 PWM to 2 LEDs.  What if I want to drive more than two?

0 Likes

MiRo,

Try this community component QuadPWM, which allows 4 independent PWM outputs per single UDB

8-bit Quad PWM Component - Hackster.io

/odissey1

pastedImage_0.png

0 Likes

No UDBs in the P4100S or S-Plus

0 Likes

MiRo,

I lost the track what was the goal. It would be useful if you describe what is needed to achieve. Maybe this will attract more attention to the thread.

/odissey1 

0 Likes

I want to modulate all the LEDs in my CY8C-149 (P4100S Plus) dev board using a PWM. There are 9 LEDs.  My first though was to control the OE with a PWM.  I can't connect anything to the OE pin when I enable it in the pin configuration.  I figured out a way to send 1 PWM to 4 LEDs and use FW to change the Pin Drive.  That was the best that I achieve.  Do you have any other suggestions?

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Mike,

I believe the OE selection requires "port adapter" and DSI which are not present in the PSoC4100S-plus devices.

In devices such as PSoC4100/4200 which do have port adapter, the architecture TRM shows the Port Adapter Output Enable logic - reference PSoC 4100/4200 TRM ( https://www.cypress.com/file/126171/download ) page 158

And the app note AN86439 PSoC 4 – Using GPIO Pins ( https://www.cypress.com/file/127101/download ) in page 11 mentions that:

Port Adapter and DSI are "not applicable to PSoC 4000, PSoC 4000S, PSoC 4100S, PSoC 4100S Plus, PSoC 4100PS"

SmartIO can be considered for your requirement of sending a PWM signal to multiple LEDs, but there are some limitations:

- SmartIOs can only interconnect signals within the 8 pins of one port and not to pins of other ports. To connect to pins of other ports, external wiring and extra pins would be required to interconnect the ports.

- SmartIO blocks are only available in Port 1, Port 2 and Port 3 in PSoC4100S plus, where as the 9 LEDs in the CY8CKIT-159 are spread over Port 1, Port 2 and Port 5. Port 5 does not have SmartIO block.

With these limitations, I tried creating a PSoC Creator schematic which requires 3 PWMs for the 9 LEDs.

Attached is the project(It is not complete with firmware and not tested as I don't have the -159 kit. It is only to show the schematic connections and SmartIO configuration).

In the project, PWM line_n outputs have been inverted.

The pin connections to the PWM blocks have been chosen based on the "Alternate Pin Functions" in the PSoC4100S-plus datasheet ( https://www.cypress.com/file/396611/download ) which shows the multiple pins that each TCPWM hardware block can route to.

Below is the schematic screenshot:

PWM_SmartIO_LED_connections_screenshot.jpg

If external pin wirings are allowed with some extra pins, it should be possible to use a single PWM for all the LEDs.

Or on a custom board with all LEDs placed on the SmartIO ports which also share a TCPWM hardware block output(for example Port2 and Port3 combination), it should be possible to modulate all LEDs using a single PWM without external connections or extra pins

Best Regards,

Prem Sai

0 Likes

That is the best that I could do as well.  Thank you.

0 Likes
MiRo_263836
Level 5
Level 5
100 replies posted 50 likes received 50 replies posted

pastedImage_0.png

Here is the pin config

0 Likes