Hi Alexander,

The link you provided does not work:

 http://inspire.logicsupply.com/2014/09/beaglebone-rs-485-communication.html
 

Do you mind sending me the tutorial? I am currently designing my own cape 
which will support two RS485 half duplex channels and your tutorial would 
be very helpful to get me started. My questions are:

1) Am I limited to UART4 or can I use any of the available UARTs on the 
Beaglebone Black?

2) Just to be 100% sure, I can use any of the GPIO pins for controlling DE 
& /RE pins on the RS485 transceiver (I'm using TI's ISO15MDW)?

Thank you,

Bolek

On Wednesday, September 3, 2014 at 10:07:26 AM UTC-7, Alexander Hiam wrote:
>
> I actually just put up a tutorial for doing this in Python: 
> http://inspire.logicsupply.com/2014/09/beaglebone-rs-485-communication.html
>  
> It uses GPIO1_16, but of course you can use any GPIO pin, including the 
> one that's shared with UART4 RTS.
>  
>
>> When I tried to use:
>> struct serial_rs485 rs485conf;
>> rs485conf.flags |= SER_RS485_USE_GPIO;
>> rs485conf.gpio_pin = GPIO0_9;
>>
>> I got error from gcc that it does not know those macros:
>> ‘SER_RS485_USE_GPIO’ was not declared in this scope
>>  rs485conf.flags |= SER_RS485_USE_GPIO;
>> ‘struct serial_rs485’ has no member named ‘gpio_pin’
>>   rs485conf.gpio_pin = GPIO0_9;
>> ‘GPIO0_9’ was not declared in this scope
>>   rs485conf.gpio_pin = GPIO0_9;
>>
>>  
> That's because you're compiling with the standard libc headers, which 
> don't include the modified serial_rs485 struct that uses the GPIO pin. The 
> tutorial I linked above uses Python and just defines the same values 
> locally, which you could do in C as well. You could also grab the Kernel 
> source and include 'include/uapi/linux/serial.h', which has the patched 
> serial_rs485 struct (
> https://github.com/RobertCNelson/bb-kernel/blob/am33x-v3.8/patches/fixes/0007-omap-RS485-support-by-Michael-Musset.patch#L201
> ). 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/50b1a526-2ca1-4f20-92b8-0b497da1c975%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to