On my IMX23 EVK board, I can run a test (basic serial port stuff) to talk from the IMX23 EVK to a "remote" system in my development environment. It's a simple serial comm layer with a basic packet format. Nothing special.
The problem is that each data byte sent via the IMX23 EVK debug UART is delayed from the previous byte by 20ms (as measured with a logic analyzer). This, of course, is killing the transmit speed.
0037727789 (19702 us): TXd 0x5A
0037747818 (20029 us): TXd 0x5A
0037767874 (20056 us): TXd 0x5A
0037787780 (19906 us): TXd 0x5A
0037807775 (19995 us): TXd 0x02
0037827776 (20001 us): TXd 0x08
0037847804 (20028 us): TXd 0x64
When I run this exact same test program to talk over an attached FTDI USB cable instead (using the serial port interface), I see much more reasonable inter-byte delays of about 3.5ms.
0006399679 (3590 us): TXd 0x5A
0006403261 (3582 us): TXd 0x5A
0006407229 (3968 us): TXd 0x5A
0006410877 (3648 us): TXd 0x5A
0006414275 (3398 us): TXd 0x06
0006417928 (3653 us): TXd 0x02
0006421259 (3331 us): TXd 0x00
Due to design limitations in the "remote" system, the normal inter-byte delay should be about 2ms. The code is specifically written to delay for this time. So I can live with the 3.5ms, but 20ms is far too long and I can't figure out why the debug UART is so slow.
I had a similar problem when I originally tried to use the application UART, but that was resolved by disabling DMA mode on that driver. I do not know why that seemed to improve things, but it absolutely did. The debug UART driver, of course, is not using DMA mode. It's not even an option. It's using a basic Rx/Tx interrupt and as far as I can tell, it *should* be working fine. But yet I'm seeing these 20ms delays between transmit bytes.
What am I missing? Is there an additional coalescence delay somewhere that I'm missing?