3 Replies Latest reply on Jun 10, 2019 6:36 AM by LePo_1062026

    uart in psoc5lp (cy8ckit-059)

    rash_3782726

      HI all,

       

      In 059 kit have only one uart?

      12.6 and 12.7 ?

      Is there any another pin is assigned for Rx Tx ?

        • 1. Re: uart in psoc5lp (cy8ckit-059)
          BoTa_264741

          Multiple UARTs may be enabled at same time, but pins 12[6] and 12[7] are the only ones, which are physically connected by PCB traces to the USB-UART convertor located on the KitProg. So, once the KitProg connected to a computer, it appears as extra COM port, available for communication with UART on KIT-059.

           

          See this discussion also:

          https://www.cypress.com/comment/295321

           

          • 2. Re: uart in psoc5lp (cy8ckit-059)
            MoTa_728816

            Hi,

             

            Just for fun, I tried with my CY8CKIT-059 with 4 UARTs.

             

            schematic

            schematic.JPG

             

            pin list

            Note: We can select other pins, so this is just a sample of 1 combination.

            Pin_List.JPG

             

            main.c

            ========================

            #include "project.h"

             

            int main(void)

            {

                CyGlobalIntEnable; /* Enable global interrupts. */

              

                UART_1_Start() ;

                UART_2_Start() ;

                UART_3_Start() ;

                UART_4_Start() ;

             

                for(;;)

                {

                    UART_1_PutString("This is UART_1\n\r") ;

                    UART_2_PutString("This is UART_2\n\r") ;

                    UART_3_PutString("This is UART_3\n\r") ;

                    UART_4_PutString("This is UART_4\n\r") ;

                    CyDelay(1000) ;

                }

            }

            ========================

             

            As Odissey1-san suggested, I used KitProg's USB-UART for UART_1,

            and for other UARTs, I used my discrete USB-SERIAL to probe their output one by one.

             

            UART_1

            UART_1.JPG

             

            UART_2

            UART_2.JPG

             

            UART_3

            UART_3.JPG

             

            UART_4

            UART_4.JPG

             

            moto

            • 3. Re: uart in psoc5lp (cy8ckit-059)
              LePo_1062026

              RathangShah,

               

              Moto and \odissey1 are correct.  With the PSoC you can have multiple UARTs assigned internally to the IC.  The trick as Moto pointed out is that on the 059 kit the UART used with the KitProg USB-UART use dedicated pins 12.7 [Tx] and 12.6 [Rx] on the target PSoC.  Any other use of UARTs need physical interface circuits external to the PSoC and assigned pins once these circuits are hooked up.  Moto's example of multiple UART ports is a good starting point.

               

              On the 059 kit, there is one exception.  You can configure the USBUART component to provide another serial comm port without having to rewire the 059 kit.  I have included a modification of Moto's program to add the USBUART component.  Therefore the modified application now has UART_1 and USBUART as native serial comm ports using USB as the physical interface.  No rewiring necessary!

               

              Note:  Once you compile the modified project I've attached, you will need to use "USBUART_cdc.inf" included in the root directory to allow the USBUART device to be seen by your PC.  This file loads the correct drivers for the VID and PID of the USBUART device.

               

              Len

               

              Added Note:  Using the USBUART component has some additional advantages over the Kitprog USB-UART.

              1. If you breakaway the KitProg portion of the 059-Kit, the USBUART can act as your comm interface to the PC.  The KitProg board can still be used to program the Target portion of the 059-Kit.  You'll notice a 5-pin connector on both the Target and Kitprog portions of the board (SWDIO, SWCLK, RST, GND, VTrag).  Placing 5-pin interface connectors on both boards will allow you to reconnect the programming capability of the 059-Kit.  Sadly, breaking off KitProg disables the use of USB-UART since the pins 12.7 and 12.6 are extra traces routed between the PCB portions but has no connector points in the 5-pins.
              2. The implementation run-time speed of the USBUART is not limited by the baudrate selected as the UART communication.  For example, if 115Kbps is the UART comm speed, it takes 8.7ms to transfer 100 bytes using the UART component on the PSoC.  However, using the USBUART component, the transfer speed can easily be 10 times faster.  This is because the USBUART uses the USB CDC interface that transfers data to and from the PSoC at the maximum speed allowed by the USB interface.  The UART comm baudrate is buffered on the PC-side where there is a spooling function implemented in the USB-serial drivers.
              1 of 1 people found this helpful