If you put a UART component named as "UART" a pin named as "rx" is contained in the "UART" component. The pin name is "UART_rx"
The function UART_rx_SetDriveMode() is declared and defined in the UART_rx.c and UART_rx.h files.
Please note that some series of PSoC 4 may not support this function. Which PSoC 4 are you going to use?
1. If the UART RX pin is configured to be controlled by firmware, does this mean that standard full duplex does not work until the SCB UART has been reconfigured with its default functionality?
Yes. CY_SET_REG32 (CYREG_HSIOM_PORT_SEL0, temp); statement loads the default functionality (by connecting it to the SCB block). After this, the UART block can be used for full duplex transmission.
Thanks and regards
Hi, Does this mean that if the UART pins are first configured with pullup resistors and afterwards the default functionality of the SCB UART block is restored, then the UART will work as expected and the internal pullups will be used?
Ok. I have found this function for my PSOC. However, what I want to achieve is full duplex operation with the UART with the internal pullups.
If you require the UART pins to be controlled firmware (like a regular GPIO), then CY_SET_REG32 (CYREG_HSIOM_PORT_SEL0, temp); API must be called afterwards to restore the normal operation. If you require the UART pins to be configured as resistive pull up, then UART_pin_SetDriveMode(UART_pin_DM_RES_UP); API must be called and this will configure the pins. In this case, CY_SET_REG32 (CYREG_HSIOM_PORT_SEL0, CY_GET_REG32 (CYREG_HSIOM_PORT_SEL0) & 0xFFFFFFF0); API need not be called. The UART will still function in duplex mode.
Therefore, if you require only the drive mode to be changed,
// Set the drive mode of UART Rx pin
is the only statement that needs to be called and this will change it without affecting UART operation.
Thanks and regards