RS232 buffer size on 8 serial port card?

Gavin

New member
I'm having trouble with receiving RS232 data with the 8 serial port card connected to a rpi 5.

I have a device that sends data packets via RS232 and I can reliably receive short packets of data from it, but for any packets over 9 bytes long, I only receive the first 8 or 9 bytes. There is no flow control available on the device (or at least turning xon/xoff on makes no difference and it doesn't provide hardware flow control signals). It is sending at 115200 baud. I upgraded the serial card firmware to the latest. I'm using pyserial in Python to read from the port.

This problem feels like a receive buffer overflow - are there any receive buffers in the RS232 ports on the 8 port serial card? (or are the buffers in the rpi itself?)

Thanks

Edit: My testing has been with a 28 byte packet and with an oscilloscope I see that all 28 bytes are being sent by the device and they are reaching the RX pin on the 8 serial port card.
 
Last edited:

alexburcea

Moderator
Staff member
Hi,

The card emulates more sc16is752 chips into the card processor. There is a 64 bytes FIFO for TX and one for RX.
If I remember correctly, we tested the FIFO with packets of 64 bytes, but let me retest it and I will get back to you.

Alex.
 

Gavin

New member
Thanks.

I've done some more testing to try to find the problem:
- on receiving >9 bytes in a packet the receive part of the serial port stops receiving additional bytes
- subsequent reads from the serial port all timeout and return zero bytes (or block if no timeout is set)
- closing and reopening the port resolves the issue until the next packet with >9 bytes
- transmit works fine regardless of the state of the receive side
- the problem also occurs if I reduce the baud rate (I tried 38400)
- if I use a usb/serial adapter instead of the 8 port serial card the problem doesn't occur

Gavin
 
Top