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.

UART2

Other Parts Discussed in Thread: AM1808

Hey,

        I am using DM6446, I want to transfer data using serial port, I wrote simple code for it , used the appropriate register addresses,

but the binary of C code is not working on the environment of DM6446, it is showing error : segmentation fault..

Is it because of  the inactivation of the uart2 ? The uart0 of the board is being used for other purpose. 

What am I supposed to do ? I am a novice, please guide me.

 

 

Thank You in advance.

 

 

 

 

  • Hi,

    You cannot access registers from application/user space directly. Instead you can open /dev/mem and mmap it in user space.

    Regards,

    Prakash

  • Use device /dev/ttyS1 and all the normal open/write/read/close api calls.

    John A

  • Hey,

           Thanks for replying.

                  On executing dmesg ,

       root@10.42.43.10:/dev# dmesg | grep tty

     

       we get same as below :

       ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A

     Is this mean the UART2  is not connected to the IC 16550 ? I tried to open it, but its not working....Please suggest how to open it ? 

          2.  We  tried

        less -f /dev/ttyS0 > testing_file

        echo "i am testing" > /dev/ttyS0

        cat testing_file

     

      It works for both ttyS0 and ttyS1. It shows the the message written using echo on terminal.

    Does this mean the UART is activated ?

     

     

  • Based on your dmesg grep, it appears to me that your linux kernel thinks it only has one serial port.

    I think you need to check your davinci_uart_config parameter in your board file in the kernel.  It will have a .enabled_uarts parameter that is a bit mask.  So two uarts would be a 3.  This is based on my experience with the DM368.

    John A

  • Hey,

         we activated UART2 on DM6446, with the use of following link...

     

    http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg02308.html

    We also did corresponding changes in board_evm.c, hardware.c and irq.h 

    Thanks.

     

    Regards,

    Swapnil Ashtekar

  • i want to comunicate over uart2 on beagleboard xm, have you any idea?

    i have gone through link. but i have't get sucesses.

  • Hi,

    I am using AM1808 processor. UART0, UART1 already used in my application. there is only choice UART2 which i need to interface this to our EXTENAL thermal serial printer.

     

    I can see all the kernel log in PC console, The same UART2 i want to connect to drive my printer. I will disconnect the DB9 and connect the cable to my Printer(TX, RX, GND), all the logs are printing what ever shows in the console, the same logs it printing on the paper.

    I have written a sample application and tried it is not printing, even When i am issuing these scripts in application like: echo " hello" > /dev/ttyS2 it is not printing.

    How the UART2 function will works??. Cna we acess UART2 In user-space??. Please give anybody's suggestions.

    Thanks,

    Francis