A9 - M4 Serial Communications Not Reliable

Discussion in 'UDOO NEO' started by Kirk Bierach, Apr 25, 2020.

  1. Kirk Bierach

    Kirk Bierach UDOOer

    Joined:
    Apr 25, 2020
    Messages:
    2
    Likes Received:
    0
    Hi,

    I am having difficulty to start a project because the A9 and M4 ttyMCC serial communications are not working properly.

    Using the A9 - c code to Arduino serial example, works fine with 1 message, as written, try putting it into a while loop, and repeat endlessly. Does not work properly! Tried unidirectional and bidirectional examples. Spent a lot of time fiddling with the code.

    There must be a proper example of M4 to A9 serial comm to leverage.

    Anyone else have this issue?

    How to fix?

    I am really blown away. It seems to me that better example programs should be available.
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,195
    Likes Received:
    558
    For examples see the how to topics in my signature.
    The trick is that there is a small buffer which can overload easily stopping the A9 part. So first send something to the Arduino and after confirmed receipt by Arduino send something to the A9. There is also only 1 serial viewer possible so don't use Arduino IDE serial monitor and another Linux serial monitor on the same time.
     
  3. Kirk Bierach

    Kirk Bierach UDOOer

    Joined:
    Apr 25, 2020
    Messages:
    2
    Likes Received:
    0
    Hi,

    Thanks for the quick reply.

    I am using UDOObuntu 2.3.0 (Ubuntu 14.04 LTS)

    Compiling with the built in Arduino IDE.

    Serial.print is not stable, unless I reboot, then run the LXTerminal shell only. If the Arduino IDE is active, then the Serial.print("Hello World") loop I am using as an example is slow as stops.

    Not that fun, I would like to be able to upload a sketch, test, make changes, upload another sketch. Not possible. Must reboot after every upload.
    Looks like others are having this problem, but I have not seen a fix.
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,195
    Likes Received:
    558
    Hello Kirk, Your reply just got visible for me so now I can reply.....
    As mentioned there is an issue with Serial.Print but it can be handled. I never had the issue that the data slowed down. I can only imagine that you send het "Hello World" string to fast so it cannot be read and the small buffer fills up.
    See for more information https://www.udoo.org/docs-neo/Debug...g/USB_stops_working_after_programming_M4.html
     

Share This Page