2008-10-08 08:23:50 BFIN Serial-driver, half duplex
Thomas Langås (NORWAY)
Message: 63265
What is the "correct way" of getting the bfin serial driver to support rs-485 half duplex? My board has got a PF that needs to be high when sending data and low when not (which sets the RS-485-chip into receive mode). In u-boot I just hacked it in and added a enable-routine at the start of putc and disable-routine at the end of putc, but this isn't "right" with the kernel since it also supports dma. Also, there should be a small delay from when the flag is enabled and before sending, likewise when disabling sends, there should be a delay before disabling to make sure all data is sent.
--
Thomas
QuoteReplyEditDelete
2008-10-08 14:43:06 Re: BFIN Serial-driver, half duplex
Kyle Schlansker (UNITED STATES)
Message: 63286
I am also interested in knowing more about using the serial driver to read and write to an RS485 chip.
We are using the ADM2490 RS485 chip connected to UART2 on the BF548. The output of the ADM2490 will be connected to an RTU and communicate via modbus.
I have a modbus library integrated into our build, but it's at a higher level and simply reads and writes to a character device. Is there anything special that I need to do to setup UART2? Will the serial driver "just work"?
QuoteReplyEditDelete
2008-10-08 15:31:57 Re: BFIN Serial-driver, half duplex
Mike Frysinger (UNITED STATES)
Message: 63288
there is no method for controlling an arbitrary GPIO while also driving the serial. you would have to do it all from userspace. just use the simple GPIO driver to manually drive a GPIO from your application.
QuoteReplyEditDelete
2008-10-09 06:53:42 Re: BFIN Serial-driver, half duplex
Thomas Langås (NORWAY)
Message: 63329
Unless this is integrated into the serial-driver, there's no console either. So, I'm asking for the "correct" way of supported half-duplex in the serial-driver. It's just a matter of setting a gpio-flag resource as input/output-controller (defaulting to input) and maybe a value for delaying the enable/disable of the flag.
QuoteReplyEditDelete
2008-10-09 06:54:59 Re: BFIN Serial-driver, half duplex
Mike Frysinger (UNITED STATES)
Message: 63330
if you cant emulate it with CTS/RTS, then there is no correct way currently