IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Change the "Select" type for pins in PSoC Designer firmware

Not applicable

Change the "Select" type for pins in PSoC Designer firmware

Question: How can I switch between "StdCPU" to "Global In" or "Global Out" bus within firmware?



The Global Select Register be changed for the above purpose. The PRTxGS register decides if a GPIO pin is under the control of the CPU or is connected to the Global In or Global Out bus.

1. When the bit in PRTxGS register is cleared, the pin is under the CPU control (i.e. "StdCPU") and hence the pin state is modified by writing to the PRTxDR register.

2. When the bit in PRTxGS register is set, the pin is connected to the Global bus and connects to the internal hardware blocks."Global output or Global input" is decided by the drive mode of this pin. If GPIO drive mode is set to digital High Z state (DM[2:0] = 010b), then it is selected for Global Input and in non-High Z modes, the block is selected for global output

For example, following are the steps for changing the "Select" option for Pin0_4 from "StdCPU" to "GlobalOutEven_4":

1. Set the port global select bit high

PRT0GS |= 0x10

2. Set the drive state to any of the non-High Z states as per your requirements. Modify the PRT0DMx registers for the same.

For more details on PRTxGS and PRTxDMx registers, please refer to the technical reference manual.

Version history
Revision #:
1 of 1
Last update:
‎Jun 12, 2011 11:15 AM
Updated by: