LPC1756 DMA timeout for UART RX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1756 DMA timeout for UART RX

1,848 Views
prashantnirmal
Contributor I

Hi,

   We are using LPC1756 DMA interface on UART1 module. We are able to get DMA interrupt for transmit packets. Also we are getting the RX DMA interrupt for number of bytes same for RX FIFO level.

   However, whenever we send less bytes than RX FIFO level we are not receiving DMA timeout interrupt.

Please suggest if you have any solution.#lpc175x

Labels (1)
Tags (1)
0 Kudos
7 Replies

1,287 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Prashant Nirmal

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
I was wondering if you can share the build-able demo, then I could replicate the issue.
Have a great day.

TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,287 Views
prashantnirmal
Contributor I

Hi jeremyzhou,

Thanks for your reply.

Please find attached source code.

In the source code, we are transmitting & receiving some data over the UART1.

We get DMA interrupt when DMA max. buffer length (MAX_PACKET_LEN) reaches, when other device sends data. But other device sends less than MAX_PACKET_LEN, we are not getting DMA timeout (UART1 CTI) interrupt.

Please let me know, if you need any more details.

Thanks,

Prashant

0 Kudos

1,287 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Prashant Nirmal,

After going over the RM, I don't think it's a issue.

The DMA interrupt is generated when terminal count or an error occurring.

Before the terminal counter exhausting, definitely, the interrupt wouldn't be triggered.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,287 Views
prashantnirmal
Contributor I

Hijeremyzhou,

Thanks for your response.

We are also assuming that DMA should generate interrupt on terminal count or on error condition.

We observed interrupt on terminal count.

However we are not getting interrupt on DMA timeout.

Did you verify DMA timeout interrupt generation?

Thanks,

Prashant

0 Kudos

1,287 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Prashant,

According to your code, the following code is used to setup up the DMA to receive the data from the RXD, the DMA won't enter the DMA interrupt handler if the received data doesn't reach the MAX_PACKET_LEN.

It behaves meet up with the expectation.

 //enable receive setup before transmit here
 setDMA_ReceiveData(rxBuffer, MAX_PACKET_LEN);‍‍

Regrading to UART time-out interrupt, I don't find some functions to enable or setup up interrupt, moreover you already set the UART1 works in DMA mode.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,287 Views
prashantnirmal
Contributor I

Hijeremyzhou,

We have tried setting UART timeout without DMA. We observed that Uart timeout interrupt generates in UART mode.

But when we use DMA mode, it does not generate timeout interrupt for DMA. But during that we have observed that the data received is available in RX buffer. What we think that as DMA reads all the data from FIFO which does not allow 3.5 to 4.5 character space timeout measurement. Hence it does not generate DMA timeout interrupt.

0 Kudos

1,287 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Prashant Nirmal,

Thanks for your reply, I'm working on it now, and I will share the update when I work it out.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos