You are here

SW UART Question | Cypress Semiconductor

SW UART Question

Summary: 2 Replies, Latest post by dbarry on 06 Aug 2014 11:00 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
dbarry's picture
6 posts

For the SW_Tx_UART component, does anyone know the state of the pin (res pull-up, strong drive, etc) when the UART's pin is dynamically set?  Second question, can the pin be dynamically reset (for the same block)?


I have read the datasheet and searched the cite, but either due to lack of understanding or missing it completely, I have not found an answer to these questions.


Thanks for the help in advance!

user_14586677's picture
7646 posts

If you compile a project, and use SW_Tx_UART_StartEx(uint8 port, uint8 pin).

then search entire workspace you can find the actual code executed by function.


It is -


            #if (!CY_PSOC4)
                portConfigAddr = SWUART_PORT_CNF_BASE;
                portConfigAddr += ((uint32)port * (SWUART_MAX_PIN_NUMBER + 1u)) + pin;
                CyPins_SetPinDriveMode(portConfigAddr, CY_PINS_DM_STRONG);
                SWUART_pinDrAdress = portConfigAddr;
                portConfigAddr = SWUART_PORT_CNF_BASE + (SWUART_PORT_CNF_SIZE * port) +
                CY_SYS_PINS_SET_DRIVE_MODE(portConfigAddr, pin, CY_SYS_PINS_DM_STRONG);
                portDataRegAddr = SWUART_PORT_CNF_BASE + (SWUART_PORT_CNF_SIZE * port) +
                CY_SYS_PINS_SET_PIN(portDataRegAddr, pin);
                SWUART_pinDrAdress = portDataRegAddr;
            #endif /* (!CY_PSOC4) */
            SWUART_pinNumber = pin;
            SWUART_pinPortNumber = port;


So pin is set to strong drive.


Regards, Dana.

dbarry's picture
6 posts

 Thanks for the reply! I'll remember to look into the generated code next time.

Log in to post new comments.