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 with auto flow for omapl138evm

Other Parts Discussed in Thread: OMAPL138

Hi,

I am enabling flow control for UART2 of omapl138evm and on other side I am using window application TeraTerm but I am not able to transmit any thing to tera term.Things work fine with out flow control.

Can any one help,?

I am using my own application and tools.

Thanks in advance.

Jam

  • Hi Jam,

    Thanks for your post.

    In general, on the host PC, to run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) kindly configure the UART settings for 115200 baudrate, no parity, 1 stop bit and no flow control. Even for custom board modifications, please note that flow control will not be used for UART settings, so only the RX and TX lines need to be connected for boot and flashing purposes.

    kindly check the below wiki article to enabling flowcontrol on UART1

    http://processors.wiki.ti.com/index.php/Enabling_UART1_on_AM18X/DA850/OMAP-L138_running_Linux#Enabling_flow_control_on_UART1

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------

  • Thanks for Sivaraj for reply.

    1. I have read this page.This is written for uart1 and on evm board,there is uart2, I am wondering if there is a switch that needs to be on for uart2 also.

    2. I am setting the same settings as you mentioned on TeraTerm and I am also enabling hardware flow control on TeraTerm side as I think it is also required.

    3. If I set AFE and RTS bits in MCR register as written in reference manual,I receive the bytes but I can not transmit.

    3.If I set RTS only(though it is not according to doc) both transmit and receive will work fine apparently..I means I am able sending and receiving the data..:)

    but Even if  continuously  data is coming then UART receive FIFO will over run.So the purpose of auto flow is void.

    4. These are few iterations that I have performed,So thinking how to proceed.........

    Thanks&Regards

    Jam

  • Hi Jam,

    Have you configured the UART2 RTS & CTS pinmux properly?

    3.If I set RTS only(though it is not according to doc) both transmit and receive will work fine apparently..I means I am able sending and receiving the data..:)

    If it behave like this then I'm suspecting that the same pin might be configured as "DEEPSLEEP" or GPIO0[8]

  • Hi,

    I am configured pin-muxing correctly.I have done verified it from pin-mux utility and documentation.

    Can you please refer to me serial driver of omal138 in Linux.Actually I was not able to find that...? So that I have a quick look of that also...

    Thanks

    Jam

  • Hi,

    Can you please refer to me serial driver of omal138 in Linux.Actually I was not able to find that...? So that I have a quick look of that also...

    linux-davinci/drivers/tty/serial/8250/8250.c


    linux-davinci/arch/arm/mach-davinci/serial.c

  • Here in8250.c code is very messy.:) and serial.c is simple,Could not find any helpful information.What I can find that it sems flow control is not implemented here for omapl138.

    any further help?

    Thanks

    Jam

  • Hi,

    Where did you implement the pinmux code?

    Could you please attach your board file that you are using currently?

    arch/arm/mach-davinci/board-da850-evm.c

    arch/arm/mach-davinci/da850.c

  • Hi,

    I am setting

    PINMUX0 = 0x44000000;  //Selects Function UART2_RTS and UART2_CTS
    PINMUX4 = 0x00220000; //Selects Function UART2_TXD and  UART2_RXD

    I am not changing PUPD_SEL,PUPD_ENA are using default values.

    I am not using that board files.I am using my proprietary source.

    Thanks

    Jam

  • Hi,

    PINMUX0 = 0x44000000;  //Selects Function UART2_RTS and UART2_CTS
    PINMUX4 = 0x00220000; //Selects Function UART2_TXD and  UART2_RXD

    I am not changing PUPD_SEL,PUPD_ENA are using default values.

    As per the code, You are writing '0' value to the PINMUX registers.

    Try to change like this,

    PINMUX0 &= 0x00FFFFFF;  //Selects Function UART2_RTS and UART2_CTS

    PINMUX0 |=  0x44000000;

    PINMUX4 &= 0xFF00FFFF; //Selects Function UART2_TXD and  UART2_RXD

    PINMUX4 |= 0x00220000;

  • Hi,

    Thanks but I have implemented in the same way as you mentioned.I just gave an idea  in the above mail by writing

    PINMUX0 = 0x44000000;  //Selects Function UART2_RTS and UART2_CTS
    PINMUX4 = 0x00220000; //Selects Function UART2_TXD and  UART2_RXD

    Thanks

    Jam

  • Hi Any help?


    Thanks&Regards

    Jam

  • Hi Jam,

    Sorry for the delayed responses and follow ups.

    UART2 is configured to console in OMAPL138 EVM board right !

    If you don't mind, Could you please tell the purpose of auto flow implementation.

  • Hi Stalin,

    Yes UART2 is configured to console in Omapl138 EVM

    I want to use the auto flow as,I want to avoid UART FIFO to over run if data is coming at 3mbps and I  am not reading that data  from UART FIFO so rapidly .UART  FIFO is 16 bytes.

    More detail: If Iover run error occurs then my DMA stops working as mentioned in OmapL138 TRM 32.2.9Note that:
    the receive event is not asserted if the data at the top of the receiver FIFO is erroneous even if the
    trigger level has been reached.

    But the main point is I want to avoid the over run error of my FIFO.FIFO must not receive any data when it has filled. So auto flow can do this.

    Thanks&Regards

    Jam

  • Hi Jam,

    What is your kernel & TI Linux SDK (PSP) version?

    Could you please share your board file that you are using currently?

    arch/arm/mach-davinci/board-da850-evm.c

    arch/arm/mach-davinci/da850.c


  • HI,

    Have you enabled the audio support in linux?

    If yes, Please disable it and test because UART2_RTS pin muxed with AMUTE (audio mcasp)

    Please share your board file & da850.c, or send to my email ID (x0213399@ti.com) .

  • Hi,

    I want to use the auto flow as,I want to avoid UART FIFO to over run if data is coming at 3mbps and I  am not reading that data  from UART FIFO so rapidly .UART  FIFO is 16 bytes.

    I'm able to enable UART2 RTS & CTS functionality with hw & sw flow control options in minicom settings,
    but I'm not facing any problem, also don't how to test the functionality with your case.

  • Hi,

    I am able to enable flow control using UART1 extracted pins from J30 of OMAPL138EVM board. It seems there is problem whit UART2.It may be related to RS232 transceiver or any thing else. TI  may figure it out. Thanks for involvement.

    Thanks

    Jam