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 Loopback test

Hi,

case 1: If I have one UART interface  in SoC and I want to test UART loopback in my board.I have four UART signals:- TX,RX,CTS and RTS.

For Loopback, i need to connect TX to RX but what should be for CTS and RTS ?

case 2: If I have two UART interface  in SoC and i want to test loopback from one UART to Other UART then what should i need to do ?

Thanks

  • Hi Ashu

    Case 1: When you are working with the loopback mode, is not necessary to connect TX to RX because internally they have a connection between them. You have something like this

    Maybe you have an small confusion with the Autoflow Control.

    Case 2: This case is not really clear to me, I can understand that you have one UART connected to other UART. If so, you can connect channel A to channel B (TxA to RXB and TxB to RxA). If this is the case, this is possible but you won´t need to active the loopback mode (MCR register). If you want to have a loopback in UART A and the output of the TxA connected to RxB is possible as well.

    If this is not the case, please, Can you share more details about it?

    Regards

    Francisco

  • hi Francisco,


    I understood the case 2 but i am not able to understand case 1.

    How we can do loopback in UART ? I read that it require to connect TX line to RX line.let me know if I am not correct ?
    what should be for CTS and RTS pins?

    Thanks
    Ashu
  • Hi Ashu

    You can do this internally or externally. If you want to do externally you just need to connect the TX to RX and that's it. On the other hand if you want to use loopback mode internally you will have to activate this one by MCR register bit 4, when you have this option activated the TX and RX are disabled and these are internally connected between them (like in the diagram above).

    Please, let me know if you have any questions.

    Regards
    Francisco