3 Replies Latest reply on Jul 19, 2017 3:21 AM by ThomasAlphaIdiot

    Spurious characters: TTL over UART1  (C/C++)

    ThomasAlphaIdiot

      Hi

       

      I'm using mraa for 2-wire serial communication over UART1 on the Intel Edison (breakout pins J19-8 and J18-13) with a LinkSprite JPEG Color Camera. (https://communities.intel.com/message/313323#313323)

       

      I have a 1.8V <=> 5V level shifter between the Edison and the device.

       

      Everything is working fine. I can send instructions to the device and I get the expected comprehensible replies from the device. Except that every reply I receive is postfixed with a certain (variable) amount of garbage.

       

      E.g. I'll send a command, do a mraa_uart_read(..) and get:

      0xff 0xff 0xfd 0xff ..... 0xff 0xff [valid response]

       

      Because the response is in fact valid, the communication parameters (baud rate, data bits, stop bits, parity, flow control...) must be set up correctly. I just need to get rid of the garbage preceding the responses. At the moment I'm just skipping over it until I come to the valid stuff, but that is, of course, a dreadful solution.

       

      (I was wondering if the Edison does not have something else connected to UART1  which I don't know about, or if there are some default control mechanisms for UART1 which I must disable. I'm pretty clueless with Linux).

       

      ANY ideas, please?