- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using PSOC4100S MCU CY8C4147AZI-S445 with PSOC Creator 4.2.
I want to switch Pins(P3.0(RX) and P3.1(TX)) from UART SCB to Input pins.
I followed this link.
In this Uart port is stopped, but In Uart tx pin, it reads value 0, but on the it is 3.3V (tested with multimeter). I used following code:
temp = CY_GET_REG32 (CYREG_HSIOM_PORT_SEL3);
// Configure UART_Rx pin to be controlled in firmware
CY_SET_REG32 (CYREG_HSIOM_PORT_SEL3, CY_GET_REG32 (CYREG_HSIOM_PORT_SEL3) & 0xFFFFFF00);
// Set the drive mode of UART Rx pin
UART_1_tx_SetDriveMode(UART_1_tx_DM_RES_UP);
//CY_SET_REG32 (CYREG_HSIOM_PORT_SEL3, temp);
Please help me for this issue.
Thank You
Solved! Go to Solution.
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @BiBr_4596811 , You need to enable the Digital input driver to read the external digital input of the pin. Please check the GPIO_PRTx_PC2 register (where x is the port number) to enable or disable the input enable register. For the RX pin this should have been already enabled. Tx is an output pin, therefore the Digital input driver will be disabled in the start up code. You need to set this bit to 0 to enable the input driver for the TX pin. Please refer register TRM for details on how to use this register.
https://www.cypress.com/file/280661/download
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @BiBr_4596811 , You need to enable the Digital input driver to read the external digital input of the pin. Please check the GPIO_PRTx_PC2 register (where x is the port number) to enable or disable the input enable register. For the RX pin this should have been already enabled. Tx is an output pin, therefore the Digital input driver will be disabled in the start up code. You need to set this bit to 0 to enable the input driver for the TX pin. Please refer register TRM for details on how to use this register.
https://www.cypress.com/file/280661/download
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
The link you found is for PSoC 4 (like CY8C4245) with HSIOM and DSI inter-connection. Similar discussion found at this link:
Solved: How to share IO between SPI module and I/O Pin fun... - Cypress Developer Community
However, CY8C4147 device is HSIOM and SMART I/O. So, only some information from above web links is applicable.
I do not have a good answer for you as I am not familiar with SMART I/O.
I would suggest you read the register description:
PSoC(R) 4100S Plus PSoC 4 Registers Technical Reference Manual (TRM) (cypress.com)
And go through the architecture description:
PSoC 4100S and PSoC 4100S Plus: PSoC 4 Architecture Technical Reference Manual (TRM) (cypress.com)
to get a better understanding of how GPIO pins are connected/disconnected from internal functions, such as SCB UART.
There is also this web link with discussion about SMART I/O and GPIO connections you might find interesting. It doesn't answer your question, but it has good descriptions.
Solved: PSoC 4100S Plus Digital Inputs and Digital Outputs... - Cypress Developer Community
You could also build a simple project that only configures the GPIO the way you want them. Then, look at the register initialization in the configuration files generated by Creator. This will give you the binary info for the writing to the registers.
Good luck with your project.