How to enable rs485 on BBB

40 views
Skip to first unread message

xxlangi...@gmail.com

unread,
Jun 28, 2017, 9:33:19 AM6/28/17
to BeagleBoard
hi

The BBB has a kernel 4.4 and has a overlay 'universaln' loaded by default. I can see there is ttyO[0-4] unuder /dev/. Then I did 'sudo config-pin P9.13 uart && sudo config-pin P9.11 uart  ' and the uart function works well.

I wonder how do I enable the RS485 ? I only see there is a overlay 'BB-UART4-RS485' but when I tried to load it, it said 'file exist'. I read at the source dtbo and there is a pin P9.27, what is that?

I want to connect to a device which has rx, tx and gnd, using MODBUS (half-duplex).

Thanks 
/Peilang

Neilh

unread,
Sep 7, 2017, 12:24:20 PM9/7/17
to BeagleBoard
Hi Peilang

I've had some of the same questions, and based on previous postings on this list RS485 isn't enabled in the regular build - though I understand it is being integrated into the 4.4 release. The issue being the serial port is so overloaded with historical functionality.
For RS485 there is a separate 
\KERNEL\drivers\tty\serial\omap-serial.c  

I rebuilt the kernel using RobertCNelson's yakbuild (amazing..) to enable the RS485 capability.

The details of what I did are at 
I've got messages flowing out  where P9.22 is the DirectionEnable


I am building some hardware, and planning on using a MAX13487EESA+  which auto manages the Tx output driver.
Reply all
Reply to author
Forward
0 new messages