Reply by 42Bastian July 29, 20092009-07-29
Michael Anton schrieb:

> the character receive timeout has expired. On the LPC2368 the
> character receive timeout is 3.5 to 4.5 character times.
> If the SC16IS752 UART behaves in a similar manner,

It has a timeout of 4 characters. Given 90us to transfer/reveice a byte
a 115200Bd its (4+1)*90 = 450us (90us to send the byte + timeout).

--
42Bastian
------------------
Parts of this email are written with invisible ink.

Note: SPAM-only account, direct mail to bs42@...

An Engineer's Guide to the LPC2100 Series

Reply by Michael Anton July 29, 20092009-07-29
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of junointegration
> Sent: Tuesday, July 28, 2009 10:34 PM
> To: l...
> Subject: [lpc2000] Slow SPI UART Interrupt?
> I have an MCB2300(LPC2368)eval board and an SPI Dual Uart
> (SC16IS752) demo board hooked up with the SPI pins from the MCU.
> The SPI Dual UART irq is connected to one of the MCU's GPIO
> for interrupt. The Dual UART is just in a loopback running in 115200.
>
> Xmit is working fine.
> However, receive interrupts are oddly slow!
>
> It takes 400us-600us from the time the byte is sent to SPI
> bus to the time the UART interrupt handler is triggered.
>
> Anyone can explain why is it slow?
> And how to fix this (don't want to resort to polling the SPI bus)?
>
> Thanks.
>
> I've tested the MCU's built-in UARTs and I haven't seen this lagtime.
>

Is there a receive FIFO on the UART? If so, what is the trigger level
set to? If you can, set it to one, and the response may be better,
but the interrupt rate will be higher.

In the case of the LPC2368 UART, if there are not enough bytes in the FIFO
to cause a receive interrupt, then an interrupt will be triggered once
the character receive timeout has expired. On the LPC2368 the
character receive timeout is 3.5 to 4.5 character times.
If the SC16IS752 UART behaves in a similar manner, this could be why
you are seeing a delay.

Mike
Reply by junointegration July 29, 20092009-07-29
I have an MCB2300(LPC2368)eval board and an SPI Dual Uart (SC16IS752) demo board hooked up with the SPI pins from the MCU.
The SPI Dual UART irq is connected to one of the MCU's GPIO for interrupt. The Dual UART is just in a loopback running in 115200.

Xmit is working fine.
However, receive interrupts are oddly slow!

It takes 400us-600us from the time the byte is sent to SPI bus to the time the UART interrupt handler is triggered.

Anyone can explain why is it slow?
And how to fix this (don't want to resort to polling the SPI bus)?

Thanks.

I've tested the MCU's built-in UARTs and I haven't seen this lagtime.