Hello.
I have configured an UART peripheral to receive data through DMA, on a Sitara MCU (AM2634-CC evaluation board).
The DMA is configured to receive data from the UART and write it into a circular buffer. The size of the data is not known beforehand, so I would like to use the idle-line interrupt to generate an UART interrupt once there is silence on the line (A full message has been received and it's ready to be processed).
I have not found any Idle-line interrupt in AM263_RA manual. I have looked at MSS_UARTn_IER and MSS_UARTn_IER2.
Something close to the idle-line interrupt seemed to me the RHR RX timeout, but it seems it cannot be used in my case (I think it's usage is when UART FIFO is used, and there is some data staled in the RX_FIFO).
Update: I tried to set the UARTn_TIMEOUT register, enabled the RHR_IT. (I'm using DMA mode 1, RX FIFO granularity 1, UARTx_TLR->RX_FIFO_TRIG_DMA = 0)
- The expected behaviour would be: I send a frame of 4 bytes to the UART, the DMA copies that and then the UART issues an RX Timeout interrupt (UART_IIR_UART IT_TYPE value 6) after the bytes are received
- What I actually get is that DMA copies the 4 bytes, but UART generates an interrupt for every byte sent (4 interrupts) and during those interrupts the IT_TYPE is 0, so no interrupt pending.
Eventually I tried to do the same test, also setting the UART_IER2->RHR_IT_DIS (From RA it says it "disables the RHR interrupt") and UART_IER->RHR_IT = 1 (From RA it says it "enables RHR interrupt and timeout interrupt") So such condition would lead only the RX Interrupt to remain enabled. But I just do not get any interrupt in that situation.
Does UART support Idle-line interrupt ? How can I enable/configure it ?