This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UART test in ITBOK on craneboard

i'm using craneboard rev B and want to test UARTs in ITBOK/ i write my own test

void test_uart(void)
{
    u32 test = 14;
    char input[10];
    char strIn[10], strOut[10];
    int i;

#if defined(CONFIG_PERIPHERAL_BOOT_IMAGE)
    int port = 0;
#else
    int port = 2;
#endif
    u8 size = 10;
    static char str[10];

    printf("\nStarting UART Test...\n");
    printf("\nEnter UART Port Number:");
    port = get_number(diag_port, (S8 *) input, 3) - 1;

    printf("\n");

/*    if ((port < 1) || (port > 4)) {
        printf("Invalid Input %d, Enter Options from 1 to 4\n",    test);
        return;
    }*/
    printf("Start UART%d testing ...\n",port+1);
    printf("\n");
    /* Initialize the UART. */
//    uart_init(port, UART_PARITY_NONE);
    for(i=0;i<10;i++)
    {
        strOut[i] = '0'+i;
    }
    strOut[size] = '\0';

    {
//        printf("sending -> %s",strOut);
        printf("\n");
        if(openPort(port, UART_PARITY_NONE)==SUCCESS)
        {
            printf("port %d opened\n",port+1);
            diag_uart_write_ext(port, strOut);
            //uart_write(port, (U8 *)strOut, strlen(strOut));//
            /* Read from UART port. */
            printf("received <-");
            //uart_read(port, (U8 *)strIn, strlen(strIn));//(U8 *)
            diag_uart_read_ext(port, size);
            closePort(port);

            printf("%s ",    strIn);
            printf("\n");

            for(i=0;i<10;i++)
            {
                if(strIn[i] == strOut[i])
                    printf("test ok\n");
                else
                    printf("test fault\n");
            }
        }else
        {
            printf("FAULT to open %d port", port +1);
        }

    }
    /* Deinitialize the UART. */
//    uart_deinit(port);


}
and it work in UART 3 (debug UART), but when i start testing UART 1 & 2 my test stopped on port initialization

and cant go through void mux_setup_uart2(void) initialization
i setup mux params UART2 as

 /* UART2 */\
    MUX_VAL(CP(UART2_CTS),        (M4)) \
    MUX_VAL(CP(UART2_RTS),        (M4)) \
    MUX_VAL(CP(UART2_TX),        (IDIS | PTD | DIS | M1)) \
    MUX_VAL(CP(UART2_RX),        (IEN  | PTD | DIS | M1)) \

can you halp me