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.

Using different UART

Hi,

We are using 8148 on our custom board. We are using DVR_RDK_04_01_00_02. In our custom board, 8148 is interfaced with a FPGA. There is a UART connection between FPGA and 8148. We are using UART2 between FPGA and 8148.

In order to make UART2 functional, I followed the instructions given in 

In the PSP porting guide, it is mentioned that, kernel already has all the drivers enabled for all UARTs, just PIN muxing needs to be changed. I changed the PIN mux settings accordingly. But when I start my UART application (Custom application to send and receive data from FPGA), the application is hanging. I can see that some bytes of data is being transmitted and the application is hanging. I checked the application on my PC. It is working properly. It seems to be no problem.

Have I missed anything ?? Only Pin mux change is enough or should I do anything else ?? All the PLL configurations are taken care in kernel ?? 

Thankyou,

K.Pranay Kumar

  • Pranay,

    Please have a test with the latest dvr rdk linux kernel code base:
    http://arago-project.org/git/projects/?p=linux-dvr-rdk-dm81xx.git;a=shortlog;h=refs/heads/dvrrdk_kernel_int_branch

    Make sure also you are passing ttyO2 in bootargs, see the below wiki pages for more info:
    processors.wiki.ti.com/.../TI81XX_PSP_04.04.00.02_Feature_Performance_Guide
    processors.wiki.ti.com/.../TI81XX_PSP_User_Guide

    BR
    Pavel

  • Hi Pavel,
    Thanks for the answer. I refereed the links provided by you. It seems we should specify ttyO2 in kernel bootargs to use it for sending bootprints and as standard serial out. On our custom board, we have 2 UARTs(UART0 and UART2). One UART (UART0) is connected to External world and one (UART2) is connected to FPGA. We need both UARTs. To the UART connected to external world, serial console is connected and being used as standard out. we need second UART for communication between FPGA and DSP. I have done pin muxing required to use it in kernel. Does it require anything else other than pin mux to make it functional ??

    In the arago file project link provided by you, we are using latest version than those versions only. 

    Regards,
    Pranay

  • Pranay,

    kashetty pranay kumar said:
    I have done pin muxing required to use it in kernel. Does it require anything else other than pin mux to make it functional ??

    You need to verify after your whole system boot up, that pinmux is not overwritten by some software (other code in linux kernel, firmware, scripts, etc). You need to check the pinmux registers have the correct values from user space, using for example devmem2 tool.

    You need also check that clock coming from PRCM is active and UART2 registers have the correct values.

    BR
    Pavel

  • Hi Pavel,

    I checked the register values from the user space using mem_rdwr utility. They are correct. How to check whether clock coming from PRCM is active or not ?? 

  • If you are able to read/write the UART2 registers (base/start address 0x48024000) then the clock is active. Other way of checking this clock is through reading the clock status register CM_ALWON_UART_2_CLKCTRL.

    BR
    Pavel
  • Hi Pavel,
    I am able to read and write UART registers at base/start address 0x48024000. In chipscope, we are able to see some data. Some characters are going on the UART to FPGA. After sending some characters, processor is hanging.
  • Pranay,

    From what I understand, you are passing ttyO0 in bootargs, thus linux kernel is initializing UART0. But you need also use UART2. Beside pinmux, check also UART2 register settings are valid, irq/dma requests are configured correctly. You can compare with the UART0 settings.

    You can also refer to the DM814x TI EVM UART HW diagnostic tests:

    UART0 - This CCS test application validates the UART-0 Port on the board for its connectivity. This test configures the UART-0 for 115200,8,N and verified the transmission & reception functionality in polled mode. This test case requries the external loop-back cable to be connected to the UART-0 port (that is connector P2 - DM814X DB9) on the DM814X EVM Base board.

    UART_0_EchoTest - This CCS test application validates the UART-0 Port on the board for its connectivity. This test configures the UART-0 for 115200,8,N and verified the transmission & reception functionality in polled mode. This test case requires the one end of serial
    cable to be connected to the UART-0 port (that is connector P2 - DM814X DB9) on the DM814X EVM Base board and other end to the pc. This does Uart0 echo test.

    You can try to reuse these two tests for UART2.

    BR
    Pavel