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.

AM3359 ICE UARTecho example (UART5 --> UART1)

Other Parts Discussed in Thread: SYSBIOS, AM3359, MAX232

Hi,

I am learning how to use AM3359 ICE ver 1.0B. I have imported UARTecho example from am335x_sysbios_ind_sdk_1.0.0.9 and I can successfully compile it and debug it using ccs5. I realized that the serial console via the FTDI chip is connected to UART5.

My question is:

How can I change the setting of the UARTecho from using UART5 to using UART1?

I notices that there is a .c file "sys_uart.c" included. And it seems like it is for UART5 and UART3. Can I just change the number in this file for using UART1? What other changes should I make in order to use UART1?

Ex: 

switch(instance)
{
case 3:
baseAddr = SOC_UART_3_REGS;
break;
// case 5:
// baseAddr = SOC_UART_5_REGS;

case 1:
baseAddr = SOC_UART_1_REGS;

break;
default:
return;
}

Thank you for the helps!

Chung-Ti

  • Hi,

    If you want to use any UART other than 3 or 5 in IA-SDK, you will have to modify sys_uart.c and am335x_indcomm_uart.c to have corresponding cases. 

     P S - I think you can only use UART5 on ICE board.

    Regards,

    Shahid

  • Hi Shahid,

    Thanks for your suggestion.

    Do you know why only UART5 can be used?

    Today I decided to test UART4 based on our suggestion, because pins 39&40 at J12 are already connected to UART4.

    My logic is if I can successfully switch to UART4, I will be able to switch to UART1.

    I modified (see attached files 6076.UART4.zip)

    1) uartecho.c

    2) sys_uart.c

    3) am335x_indcomm_uart.c
     

    In 1), I made the following change.

    if(AM335X_BOARD_TYPE_ICE  == boardType)

        {

    //    uartInstance = 5;

        uartInstance = 4;

        }

     

    In 2), I added case 4 for all functions.

    In 3), I added case 4 for all functions and reconfigure pinmux for UART4 according to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/199974.aspx

    Then I put a MAX232 between UART4 and my PC.

    But I still can not communicate with UART4.

    Any suggestions?

    Thank you.

  • Hey Chung-Ti,

    did you solved the problem?

    im want to work with uart4 too.

    kind regards, hendrik