On Mon, 25 Apr 2016 04:31:43 -0700 (PDT), you wrote:
>Hey all,
I can't tell you Beaglebone specifics, but to stop after a certain
number of characters and set DE/!RE high (I'm guessing this is a full
indication?), sounds like you've hit the limits on a buffer of some 50
bytes, so it may be that you're running up against this limit.
Normally, when you read data from a hardware UART within a chip, the
internal FIFO in the hardware is cleared of that byte, data flags are
reset.
It sounds as if something's not being done.
If there is a software FIFO involved, and you're reading the data
directly from the chip (not sure how), then the FIFO is loaded, but
never read. When it's full, the serial interface should tell the
transmitter to stop sending.
These, of course, are just guesses.
Harvey
>
>I did some further tests.
>Actually none of the screens from my scope looks like I would expect it...
>
>Picture 1 shows the result, if I try to read something on the bus with a
>14s timeout (nothing was sended on the bus...)
>Pic1 <
http://www.ep1.rub.de/~florian/rs485_test_reading_timeout.png>
>Picture 2 shows the same, but this time there were messages send over the
>bus. After 49 bytes, the beagle bone toggles the DE/!RE gpio to high for
>unknown reasons (the test program is still reading from the UART interface)
>Pic2 <
http://www.ep1.rub.de/~florian/rs485_test_reading.png>
>Picture 3 shows the test, where the BeagleBone is sending
>Pic3 <
http://www.ep1.rub.de/~florian/rs485_test_sending.png>
>and finally picture 4 shows a test, where the BeagleBone should read
>(timeout 3s) on the bus, then send something and again reading (with 3s
>timeout)...
>Pic4 <
http://www.ep1.rub.de/~florian/rs485_test_3sRead-send-3sRead.png>
>As you see, DE/!RS stays high after sending, although it should be low...
>
>In addition I would expect this line to be low when the port is not used,
>but it's high..
>
>I checked if there is any other process (or driver) accessing GPIO3_19 but
>I could not find any...
>
>Any help is very much appreciated!
>Florian
>
>
>
>Am Freitag, 22. April 2016 15:22:48 UTC+2 schrieb
>
florian.f...@googlemail.com:
>>
>> Hey all,
>>
>> I'm using the Debian Jessie image with kernel version 4.4.6-ti-r15 on my
>> BeagleBone Black.
>>
>> To monitor our vacuum system in the lab, we need a RS485 interface, so I
>> simply connected an ADM2682 RS422/485 line driver
>> to UART4 of the BeagleBone using this Device Tree Overlay
>> BB-UART4-RS485-00A0.dts
>> <
https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/BB-UART4-RS485-00A0.dts> (commit
>> 16f76f7 on master branch)
>>
>> P9.27 is connected to the DE and !RE inputs of the chip.
>>
>> Using this for sending works just fine, but I have problems receiving
>> messages over the bus.
>>
>> For testing I wrote a small C-program which should read on the bus until
>> it gets two times a timeout.
>> The reading is done via select-call with a 5 second timeout.
>> The device on the other end of the bus is contentiously sending data over
>> the bus.
>> After receiving 49 bytes at most, the DE/!RE line goes up and my
>> BeagleBone stops receiving any data...
>>
>> I've uploaded a screenshot of the scope showing the three signals from the
>> UART interface
>> Scope <
http://www.ep1.rub.de/~florian/rs485.png>