UART6 and UART2 communications

Discussion in 'UDOO NEO' started by ICS, Jan 5, 2017.

  1. ICS

    ICS New Member

    Joined:
    Jan 5, 2017
    Messages:
    3
    Likes Received:
    0
    Hello,

    I'm working on small program that needs to use 2 serial ports on the UDOO Neo. As a first step, I'm trying to communicate between my Windows 10 PC and the Neo by enabling UART6 (ttymxc5) in the device tree and communicating between the two with Realterm/Putty (Windows) and Minicom (Neo). As it stands, I cannot receive anything on the Neo side, which appears to be a known issue according to this thread: http://www.udoo.org/forum/threads/a9-uart6-and-udoobuntu.3196/page-3

    However, when transmitting data from minicom to realterm/putty, the character presses do not match up at all. For instance, if I were to press "j" in minicom, realterm/putty would receive a packet of "%". Is there something I'm missing here or is this just another issue with the serial port?

    Similarly, I need to use two serial ports for the project. I have disabled the M4 control via the web control panel and
    Code:
    sudo udoom4ctl status
    returns false. Running
    Code:
    ls -l /dev/ttymxc*
    yields the following results:
    Code:
    crw-rw---- 1 root tty     207, 16 Jan  5 15:12 /dev/ttymxc0
    crw-rw---- 1 root tty     207, 17 Jan  5 15:12 /dev/ttymxc1
    crw------- 1 root root    207, 18 Jan  5 15:12 /dev/ttymxc2
    crw-rw---- 1 root dialout 207, 21 Jan  5 15:12 /dev/ttymxc5
    
    Connecting the serial port to UART2 (ttymxc1) results in the same invalid conversion of keypresses - and when I go to send data over the port, minicom will then hang and I am no longer able to send data over UART2. Crashing out minicom and restarting it results in a "Device /dev/ttymxc1 is locked." message until I reboot the Neo.

    This has been tested with a fresh copy of UDOObuntu 2.1.1 downloaded from here: http://www.udoo.org/downloads/. Does anyone have any ideas on how to resolve the issues I'm having? If anyone needs more information/screenshots I'd be happy to provide them.
     
    Last edited: Jan 5, 2017
  2. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Have you verified the parity and stops bit are correctly configured on both minicom/putty ?
     
  3. ICS

    ICS New Member

    Joined:
    Jan 5, 2017
    Messages:
    3
    Likes Received:
    0
    Yes, both are set to 8N1
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Uart2 is assigned to serial debug M4. Is switching off M4 enough to have this serial device to be properly assigned to A9?
     
  5. ICS

    ICS New Member

    Joined:
    Jan 5, 2017
    Messages:
    3
    Likes Received:
    0
    I'm not entirely sure, but I followed the thread located here: http://www.udoo.org/forum/threads/using-udoo-neo-with-3-serial-uart-devices.3426/, which seems to indicate that it is possible. If I've read it wrong then so be it - but I would still need a second serial port (UART1 perhaps?) for my application.. I know UART1 is assigned to Serial Debug, so how would I switch it off of that to use it as a standard serial port?
     
  6. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    @Andrea Rovai It is very unclear: In the documentation and forum posts you linked to there is no mention of Device tree editor actions.
    But I suppose you have to enable UART2 by the Device tree editor on pin 44/45 as it seems there that UART2 is not enabled at all (at least not assigned to pin 44/45). The text in the DTE (UART2 (M4-Core debug)) suggests that you have to set it to the pins to enable the debug function (as it is not assigned to pins).

    So better would be to have the text say "UART 2 at /dev/ttymxc1" and in the help popup (?) mention to switch M4 of with "sudo udoom4ctl disable" to have it available in A9.

    And what happens if you assign UART 2 to pins 44/45 and not disable M4?

    @ICS Did you enable UART2 with the Device Tree Editor and rebooted?

    [​IMG]

     

Share This Page