1 of 1 people found this helpful
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
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.
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.