How to use interrupt to receive data from RX FIFO for MPC5746C LINFLEXD

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

How to use interrupt to receive data from RX FIFO for MPC5746C LINFLEXD

3,240 Views
wesleyxie
Contributor III

Hello, NXP support

we are using the MPC5746C LINFLEXD in our project, the LIN8 is configured to UART mode.

we now try to use the FIFO for Uart RX, and read the FIFO in ISR.

But seems like the "Data Reception Complete" interrupt didn't trigger if I the RX FIFO mode enabled. please check below screenshot for my debugging.

could you please help me to firgure out how to use interrupt to read data from RX FIFO. 

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

pastedImage_1.png

0 Kudos
Reply
5 Replies

1,432 Views
ykp3036
Contributor I

大佬,可否加个微信,讨论下LINFlexd

0 Kudos
Reply

2,435 Views
gtronic
Contributor I

Hi,

is there any update on this topic? We have the same problem. Did anybody find a proper solution? What is the recommendation from NXP?

Polling is no option for us either. We use baud rates from 512.000 and higher.

Best regards

    Robert

0 Kudos
Reply

2,936 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi,

RxFIFO and TxFIFO interrupts of LinFlex in UART mode works in the opposite way than one would expect -
DRFRFE is set when the Rx FIFO is EMPTY and
DTFTFF is set when the Tx FIFO is FULL.

The operation that would be expected is an interrupt when the Rx FIFO is NOT EMPTY and when the Rx FIFO is EMPTY. I would recommend to use either polling mode or interrupts with buffer mode.

Also DMA transfers sources use different conditions (here Tx/Rx FIFO is mandatory) what's propably fits your needs:
!TFF & DMA_TEN = TxFIFO is not full
!RFE & DMA_REN = RxFIFO is not empty

0 Kudos
Reply

2,936 Views
wesleyxie
Contributor III

Hello David, 

so, if I enable RX FIFO mode, then I have to use either polling mode or DMA transfer ? (Is there any possible way to work with interrupt ?)

PS: It is hard to use polling mode in my code. the polling interval should little than 1ms (4 bytes timing in 38400bps), which is not acceptable for my task (a 5ms periodic task).

0 Kudos
Reply

2,936 Views
maciej_cebula
Contributor II

Hi,

 we have the same problem, did you find any solution?

davidtosenovjan‌ so there is any possible way to work with fifo and interrupt in MPC5746C and only UART channel 0 and 1 can be used with DMA?

0 Kudos
Reply