6 Replies Latest reply on Nov 9, 2016 12:41 PM by Intel Corporation

    UART unexpected behaviour on Intel Edison

    TonyMontes

      Hello everyone,

       

      I have two Intel Edisons communicating perfectly trough UART when wired to each other using the Arduino breakout kit and a application using the Java mraa libraries.

      Sending/Receiving data with the echo/cat commands from Linux console on ttyMFD1 works fine as well.

       

      The problem comes when placing the Edison compute module on a custom-made PCB, on which it communicates with a microcontroller at the other side of the UART. What happens is that the Edison can receive and send data from the Linux console BUT NOT from the application. So there is actually data seen by Linux but not by the application built on the mraa library. The measured electrical signals using an oscilloscope have no significant difference.

       

      What happens when the application is running, is that the Edison detects the incoming data trough the UART, but it is not able to read it: The Java callback set on the Rx pin is triggered, but the read function inside the ISR does not return any data. The UART settings are both the same on both ends. I

       

       

      I am wondering whether this problem may come from, from this thread https://communities.intel.com/thread/86951 I am wondering ir the mraa libraries may have something to do, however the my application is Java, is there any solution to try thermios library?

        • 1. Re: UART unexpected behaviour on Intel Edison
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello TonyMontes,

          I'll try to help you in making Edison receive the UART signals correctly. I have seen behaviors similar to the one you mention before. In those cases I noticed that Edison did not handle the UART signal appropriately if the carriage return and newline signals were not sent to the Edison. Could you please verify that the microcontroller is indeed sending those signals to Edison?

          Let me know if this helps.
          -Peter.

          1 of 1 people found this helpful
          • 2. Re: UART unexpected behaviour on Intel Edison
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello TonyMontes,

            Do you have any updates about this?

            -Peter.

            • 3. Re: UART unexpected behaviour on Intel Edison
              TonyMontes

              Hello Peter,

              I tried your suggestions and unfortunately I could not make the Edison read the UART from the application.

               

              These are the behaviors of the UART I could observed so far:

               

              Edison breakout - UART - Edison breakout : Data is received both by Application using mraa and on the console reading /dev/ttyMFD1. No line feeds are seen on the console output.

               

              Edison Module on PCB - UART - uController : Data seen on Edison console but not by application. Sent data by Edison is seen by microcontroller.

               

              Edison Module on PCB - UART - USBFTDI - PC : Data received on Teraterm prints a line feed. Which was not seen from Edison-Edison.

              The other way around, sending line feeds from the PC to the Edison, actually prints them on the Edison console, pretty strange.

              Trying the same above with carriage returns, and LF and CR combined, did not work either.

               

              Since the GPIO pins are multiplexed. Is is possible that there exists some component on the Arduino breakout board which may actually be responsible for a different UART behavior from the "standalone" compute module?

              • 4. Re: UART unexpected behaviour on Intel Edison
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                So, the issue only happens on a custom board, right? This behavior is not replicable on the official expansion boards? 

                Or, am I getting confused? If that’s not the case, is it possible for you to share your custom PCB schematics?

                I will be waiting for your response.
                -Peter.

                • 5. Re: UART unexpected behaviour on Intel Edison
                  TonyMontes

                  Hello Peter and sorry for the late response!

                   

                  Yes, this issue is only happening on a custom board and is not replicable on the official expansion boards. Actually UART communication between the Intel Edison Ardiuno expansion boards works perfectly fine.

                  Unfortunately, the PCB schematic is not my design and I cannot share it.

                  I have rewritten the code not using the read and write fuctions from the mraa.uart library, however this library is still needed to set the UART baud rate, parity and stop bit and the ISR java callback on the gpio. I will test it on the weekend however, I have doubts it may not work, I will update it here the results.

                   

                  Back on your previous comment "I noticed that Edison did not handle the UART signal appropriately if the carriage return and newline signals were not sent to the Edison. ".. I will check again for the CR and LF signals in order to find any differences from the breakout boards and the custom PCB. Do you have any more specific details about when you observed this problem, if for example were the CR and LF signals sent after each message by the Edison?

                  • 6. Re: UART unexpected behaviour on Intel Edison
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi TonyMontes,

                     

                    Thank you for updating us, please proceed with your tests and keep us informed, we'll try to help you in any way we can, however, please note that not having access to the schematics will make things a little bit harder when trying to find the root of the issue.

                     

                    What I meant on my previous post is that when you send UART messages to Edison, if you don't include the carriage return and new line signals, Edison's UART bus will be filled, but mraa will not detect it.

                     

                    Keep us updated.
                    -Peter.