8 Replies Latest reply on Mar 12, 2016 1:59 AM by user_1377889

    cy8ckit-043 setup UART

    r.knowles_1565556

      Just received my CY8CKIT-043 board and have begun trying different things with it.  I'm wanting to do some debugging with RS-232 however most of the references I find are focused on different products.  Can anyone point me at a reference?

        • 1. Re: cy8ckit-043 setup UART
          user_1377889

          Welcome in the forum!

             

          Debugging without RS232 is quite easy: there is a debugger already integrated into Cypress Creator.

             

          When you want to print data from PSoC to PC screen, just use a terminal program as PuTTY. Within the PSoC board is an UART-USB bridge that uses an emulated com port on your PC.

             

          Place an UART on your topdesign and configure it (baud rate, parity etc) Set the UART pins to p7_0 and p7_1 resp.

             

           

             

          Bob

          • 2. Re: cy8ckit-043 setup UART
            r.knowles_1565556

            Thanks Bob,

               

            I'll give it a whirl and get back if I have any problems.

            • 3. Re: cy8ckit-043 setup UART
              r.knowles_1565556

              Hi Bob, I'm back again with a follow-up question -

                 

              I have done as you suggested.  Putty found a port at COM3.  Initially this port was running wide open (noise) until I put in "UART_1_Start()" into the main.c file.  That stopped the idle line chatter.  Baud rates match up between the UART (SCB 3.10) and what I am using with putty and teraterm.

                 

              Proceeding on, I invoked the STDIO library #include <stdio.h> into the main.c file.  I then have a little "hello world" for loop that repeats itself.  Here is where I'm stuck now,  nothing is happening over in putty.  Have I skipped a step with initializing the UART?

              • 4. Re: cy8ckit-043 setup UART
                user_1377889

                I suggest you to use

                   

                sprintf(buffer,....);

                   

                and UART_1_PutString(buffer);

                   

                There is no OS, how should the compiler know where you want to send your data to when using only printf()

                   

                 

                   

                Bob.

                • 5. Re: cy8ckit-043 setup UART
                  r.knowles_1565556

                  Thanks Bob,

                     

                  I've used this method before with the PIC processor so I get it.  Thanks for the pointer.

                     

                  Unfortunately, there doesn't seem to be a UART_1_PutString(); function available with the kit package, unless I've left out a #include of one sort or another.  Sorry to be so thick...

                     

                  Rich

                  • 6. Re: cy8ckit-043 setup UART
                    r.knowles_1565556

                    Thinking this might be a C99 artifact I changed the compiler argument to permit C99 syntax and that didn't help.

                       

                    Rich

                    • 7. Re: cy8ckit-043 setup UART
                      r.knowles_1565556

                      Hello again,

                         

                      Just so I don't look completely helpless :).  It turns out for the CY8CKIT-043 board, using PSoC Creator 3.3, the function to use is named a little different.

                         

                      instead of UART_1_PutString(), it really is UART_1_UartPutString() which works just fine.

                         

                      Since the UART_1 Handle can be changed on the UART module, I guess that for a UART module named "FOOBAR" then the invocation would be FOOBAR_UartPutChar().  Just in case anyone innocently stumbles across this thread.

                         

                      Cheers!

                         

                      Rich

                      • 8. Re: cy8ckit-043 setup UART
                        user_1377889

                        Yes, mis-spelled or mis-taken. I always advise to look at the datasheet of the components, which is just a mouse click far away when configuring. The "API" chapter shows all the functions.

                           

                        BTW: I just recall that in the PSoC4-M are two different UARTs and for one of them there is a FOOBAR_PutString() and for the other a FOOBAR_UartPutString().

                           

                         

                           

                        Bob