A9 UART6 and Udoobuntu

Discussion in 'UDOO NEO' started by 1chi, Dec 22, 2015.

  1. jc_hex

    jc_hex New Member

    Joined:
    Jun 17, 2016
    Messages:
    4
    Likes Received:
    0
    Dear Andrea, in fact I have not tried it with RC2. With RC1 the uart was not working and when I applied the patch it was working perfectly. I am a little busy at the moment, but as soon as I can I will try with RC2.
    Cheers,
    J
     
  2. 1chi

    1chi New Member

    Joined:
    Dec 22, 2015
    Messages:
    12
    Likes Received:
    2
    I tested RC2 today.

    /dev/ttymxc5 is exposed to user space after device tree configuration.
    Device Tree default provides UART with flow control CTS and RTS.
    UDOO NEO successfully transmits, however it still does not receive.
    Doesn't matter whether flow control is used or not.

    On A9 Debug port you can still observe this:
    Code:
    [ 1927.078992] imx-uart 22a0000.serial: Rx FIFO overrun
    [ 1927.110463] imx-uart 22a0000.serial: Rx FIFO overrun
    [ 1927.139036] imx-uart 22a0000.serial: Rx FIFO overrun
    [ 1927.169728] imx-uart 22a0000.serial: Rx FIFO overrun
    
    BR,
    1chi
     
  3. jc_hex

    jc_hex New Member

    Joined:
    Jun 17, 2016
    Messages:
    4
    Likes Received:
    0
    After this result, did you try the patch to see if it works on RC2?
     
  4. 1chi

    1chi New Member

    Joined:
    Dec 22, 2015
    Messages:
    12
    Likes Received:
    2
    No, I did not apply the patch.
    Still, I'm quiet sure that it works, since the patch is effectively deactivating the DMA.

    This is not an option for me, since I have a huge amount of data to be transferred at low baudrate.
    For now, I'm using UART5 from the A9 and UART6 from the M4 (requires to modify MQX).
    UART1 and UART2 are in default configuration.
     
  5. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    Is there a way to apply this patch without compile of the kernel?
     
    Last edited: Jun 29, 2016
    pgarcia likes this.
  6. pgarcia

    pgarcia New Member

    Joined:
    Jul 2, 2016
    Messages:
    15
    Likes Received:
    2
  7. 1chi

    1chi New Member

    Joined:
    Dec 22, 2015
    Messages:
    12
    Likes Received:
    2
    As far as I know, applying the patch and recompiling the kernel is the only way to get it working.
    @Andrea Rovai I think somebody from the UDOO Team should communicate the problem to NXP, since it is bug in their kernel implementation...
     
    pgarcia likes this.
  8. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    How about a request from us the Users to the Udoo team to release a minor update to RC2 to correct this annoying little serial port problem. Does anyone else out there agree?
     
    pgarcia and waltervl like this.
  9. pgarcia

    pgarcia New Member

    Joined:
    Jul 2, 2016
    Messages:
    15
    Likes Received:
    2
    Hello,

    I have detected 2 problems in the Ubuntu since I have applied the patch to enable the second serial port:
    1. The keyboard and the mouse are not recognised for the Ubuntu.
    2. The rc scripts are executed two times.
    To compile the kernel I have followed the instructions of the page 'Compile Linux Kernel' ( http://www.udoo.org/docs-neo/Advanced_Topics/Compile_Linux_Kernel.html )

    Do somebody have the same problems?
     
    Last edited: Jul 6, 2016
  10. montella

    montella New Member

    Joined:
    Sep 6, 2014
    Messages:
    15
    Likes Received:
    4
    I just tried to assign uart6 to A9 pins 33,32,31,30 using the device three utility.
    Apparently I can see the device in /dev/ttymxc5 nevertheless connecting a GPS receiver to pins 31 and 30 and using minicom -D /dev/ttymxc5 -b 4800 nothing I can't read data. The GPS works perfectly if connected to the Serial0 of the M4 side.
    Any suggestion? I don't like to use a usbserial on Udoo-neo having a uart available or lock the M4 to a simple read from Serial0 and write to Serial task.
    Cheers.
    -- Raffaele
     
  11. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    You can try testing the correct working of the Serial 6 by matching physically the pins between Arduino M4 and A9 .

    UART 6 <-----> Serial0
     
  12. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    UART 6 is not working in Udoobuntu 2 RC2, you still have to patch it:
     
  13. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    We have retested the functioning in this specific case:
    • UART 6 connected to Serial0 Arduino. We manage with minicom to read and write data. Are you sure you didn't spoil UART 6 by attaching something strange to it?
     
  14. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Well I tried it but I cannot read anything coming out of the Serial0 with UART6. I did not try to get data in. I tried to read Serial0 with TTL to USB and that works. I cannot read Serial0 with UART6.

    My steps:

    Activated UART6 through Device Tree Editor web.
    Full reboot of Neo
    Connected pin UART6_TX_DATA (pin 31) with UART5_RX (pin 0)
    Connected pin UART_RX_DATA (pin 30) with UART5_TX (pin 1)
    Made a Arduino sketch sending data to Serial0 and blink led 13 (see code)
    Did a reboot to be sure.
    I get a blinking led 13
    In Linux did dmesg | grep ttym
    got as result:
    Code:
    [    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw ${mmcrootfstype} uart_from_osc clk_ignore_unused cpuidle.off=1 consoleblank=0
    [    0.419599] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58, base_baud = 1500000) is a IMX
    [    1.215871] console [ttymxc0] enabled
    [    1.220276] 22a0000.serial: ttymxc5 at MMIO 0x22a0000 (irq = 49, base_baud = 1500000) is a IMX
    minicom -D /dev/ttymxc5
    No output :-(
    Code:
    Welcome to minicom 2.7
    OPTIONS: I18n
    Compiled on Jan  1 2014, 17:08:55.
    Port /dev/ttymxc5, 20:39:27
    
    Press CTRL-A Z for help on special keys
    
    
    
    What am I doing wrong? I switched the wires but that didn't help too (as expected). started minicom with sudo also did not help.
    Next step is to read the data with TTL to USB converter, see if that is working.
    EDIT:
    When I connect Serial0 to a TTL to USB I get valid output so Serial0 is working UART6 is not.
    Accel X: 2121 Y: 2122 Z: 2123
    Mag X: 2124 Y: 2125 Z: 2126
    Accel X: 2121 Y: 2122 Z: 2123
    Mag X: 2124 Y: 2125 Z: 2126




    Code:
    void setup() {
      Serial0.begin(115200);
      delay(100);
      pinMode(13, OUTPUT);
    }
    
    void loop() {
      // Print out the data
      // Accelerometer
      Serial0.print("Accel ");
      Serial0.print("X: ");
      Serial0.print("2121");
      Serial0.print(" Y: ");
      Serial0.print("2122");
      Serial0.print(" Z: ");
      Serial0.println("2123");
       digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
      delay(1000);
      // Magnometer
      Serial0.print("Mag ");
      Serial0.print("X: ");
      Serial0.print("2124");
      Serial0.print(" Y: ");
      Serial0.print("2125");
      Serial0.print(" Z: ");
      Serial0.println("2126");
      digitalWrite(13, LOW);
      delay(1000);
    }
     
    Last edited: Jul 22, 2016
  15. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    waltervl - I get the same situation Uart6 does NOT receive data. It does transmit data but the receive is definitely not functional.

    Andrea Rovai - Please post instructions on how you were able to get Uart 6 to receive data.
     
    waltervl likes this.
  16. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    Original post about this problem back in March.
    http://www.udoo.org/forum/threads/uart6-configuration-for-a9-access.3773/#post-17954
    A patch to correct this problem was to be included in the next OS release. Unfortunately it hasn't been included in Version 2. Just finished image of new SD card with the just released Version 2 software and Uart6 still does NOT receive data.
    The new release is great but ... how about a minor update of Version 2 to correct Uart6 Receive.
     
  17. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    We're sorry guys that UART6 still has problem. We're focused on solving them. You'll be the first to know as soon as we have news.
     
    waltervl likes this.
  18. Mikeee

    Mikeee Member

    Joined:
    Nov 1, 2013
    Messages:
    55
    Likes Received:
    17
    Thanks Andrea. I really appreciate the work of you and the Udoo team.
     
    Andrea Rovai likes this.
  19. montella

    montella New Member

    Joined:
    Sep 6, 2014
    Messages:
    15
    Likes Received:
    4
    Thanks Andrea! I'll wait for update. Great UDOO Team!
     
    Andrea Rovai likes this.
  20. JiteshD

    JiteshD New Member

    Joined:
    Nov 18, 2016
    Messages:
    1
    Likes Received:
    0
    Andrea ! Pls provide updates on the patch, Is it available in new Release of Nov 17, 2016 ?
     

Share This Page