UART not transmitting

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
amsmc_1734101
Level 1
Level 1

Following the UART example project, I have been trying to get the UART working on the PSOC 6, after migrating a project from the PSOC 5lp. Below is the code I have to initialize and start the UART:

    cy_en_scb_uart_status_t init_status;

       

    /* Start UART operation. */

    init_status = Cy_SCB_UART_Init(UART_HW, &UART_config, &UART_context);

    if(init_status!=CY_SCB_UART_SUCCESS)

    {

        handle_error();

    }

    Cy_SCB_UART_Enable(UART_HW);

    UART_Start();

    // Send message to verify COM port is connected properly

    Cy_SCB_UART_PutString(UART_HW, "COM Port Open\r\n");

    Cy_SCB_UART_PutString(UART_HW, "Press H or h for help\r\n");

Is there something wrong within my initialization statement? When I program the device and have the port connected to a terminal, it does not print out "COM Port Open" or "Press H or h for help".

0 Likes
1 Solution

Have you assigned the pins to the correct port?

If you are using the PSoC 6 Pionner kit, you should use the TX at P5[1].

View solution in original post

0 Likes
6 Replies
ToddD_41
Employee
Employee
First like received

Apparently I don't know how to add links to this forum it cut off the rest of my message.

You don't need the UART_Start as you are already initializing and enabling the block.

Also how are your pins and clocks configured?

0 Likes

Thank you, but I have looked at the attached link, it's where I obtained the initialization code. I do not have the UART terminals showing, and I am using the 100MHz clock as my Clk_HF0 on the CM4 processor.  I just checked my clocks and UART settings against the example project, from what I can tell they are the same.

0 Likes

Have you assigned the pins to the correct port?

If you are using the PSoC 6 Pionner kit, you should use the TX at P5[1].

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

I tried this program on my PSOC 6 Pioneer kit and it works.  I don't think your code is correct for the PSOC 6. Try my program and then change yours to make it work. Don't forget to unzip this program in a directory before you try it.

0 Likes

What terminal program are you using? What Comm port does device manager say your board is connected too?

0 Likes