I have been working with an Connection Wi-EM device for sometime. My application is a specialized serial - wireless - bridge. I have the code working. But when I stress the serial channel everything comes to a halt.
Specifically. I receive a packet of serial information at 115.2K baud and I package and send the packet using the zero copy buffer UDP socket interface to another WI-EM board running the same firmware with a different address. The target board receives the UDP packet using zero copy UDP buffering and does a serial write of the whole buffer out at 115.2K baud. What is happening is the outbound serial buffer is growing at an astronomical rate. I have set the BSP_SERIAL_FAST_INTERRUPT TRUE and still the tx buffer with any significant data is grows full very quickly. For example from 0 to 2050 bytes. If the data stream is 10 bytes every 25ms the serial output is fine.
I have tried several things. In opening the serial port with O_DMA mode the read on the port never returns any bytes. The return is -1 and errno EINVAL (22). If I open the serial port without O_DMA mode the read function returns data.
I have included an attachment with the init and main loop code snippets. Has anyone had these type of problems with the serial driver?
Thanks in advance,