4 Replies Latest reply on Dec 26, 2015 3:19 AM by maverikgoos

    Intel Galileo Gen 2 RS485

    maverikgoos

      Hello  all,

       

      I'm trying to communicate an Intel Galileo with an Arduino Leonardo through two RS485 modules.

      To turn the transceiver on Arduino Leonardo I expect the Control status register the microprocessor free bit.

       

       

        while (! (UCSR0A & (1 << UDRE0))) // Wait for empty transmit buffer
            UCSR0A | = 1 << TXC0; // Mark transmission not complete
        while (! (UCSR0A & (1 << TXC0))); // Wait for the transmission to complete
      

       

      How do I do the same control board Galileo?

      How do I access the Status Register plot IDE Arduino?

       

       

      Thank you.

        • 1. Re: Intel Galileo Gen 2 RS485
          BenKissBox

          Hello Maverickgoos,

           

          you can not do that on the Galileo or Galileo Gen 2.

          First, the Quark does not have the same physical UART model than the AVR (it's a 8250 UART, so the registers are completely different)

          Second, all the ports (I2C, UART, SPI, etc...) are not direct access on the Galileo, because of the Linux kernel. On other Arduinos, since there is no operating system, you can access directly to registers and peripherals without any conflict risk (two or more programs trying to access the same resource). But with Linux in the game, you can not talk directly to the UART hardware. On Galileo, the Serial object is a complete driver (technically speaking, you send data to a "file" - because with Linux, everything is a file - through a system call). This driver runs on its own thread and manages the physical registers.

          In many RS485 applications, the SEND signal is controlled by the CTS line, and here this line is controlled by Linux, not by your sketch.

          So, to answer you, the only way to do the same thing as on AVR microcontrollers would be to modify and recompile the Linux kernel to support the line, which is an heavy task.

          Another (and easier) possibility is to use an external RS232/RS485 with automatic CTS handling. I would recommend you that for the Galileo

           

          Benoit

          1 of 1 people found this helpful
          • 2. Re: Intel Galileo Gen 2 RS485
            PabloM_Intel

            Hi maverikgoos,

             

            Which RS485 module are you using? Have you checked the Intel® Galileo Shield Testing Report? A RS-485 shield was already tested with the board (LinkSprite RS-485 Shield) and the report can be found in the Shield Testing document. There’s a simple example that you might find useful.

            There’s also some information in this website https://www.cooking-hacks.com/documentation/tutorials/rs-485-module-shield-tutorial-for-arduino-raspberry-pi-intel-galileo, they even provide a specific library than can be used with the Galileo board, I would suggest you to give it a look, and maybe you can edit it to your own needs.

             

            Regards,

            PabloM_Intel

            • 3. Re: Intel Galileo Gen 2 RS485
              BenKissBox

              The module describedby PabloM is a good solution, but take care of thing : this shield does not use the internal UART of the Arduino, it uses a dedicated UART connected via SPI.

              I confirm it will work with the Galileo since it does not require low level to the UART CTS signal

               

              Benoit

              • 4. Re: Intel Galileo Gen 2 RS485
                maverikgoos

                Thanks everyone for the help.

                Especially in BenKissBox. Unfortunately I need to check a RS485 BUS and I cannot afford delay due to the operating system. I entered another Arduino Board to handle communication on the BUS and control the RS485 driver. By connecting the Galileo only to query out real time cycle.

                 

                Tanks!

                Merry Christmas!!!