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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

3,242 次查看
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 项奖励
回复
5 回复数

1,434 次查看
ykp3036
Contributor I

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

0 项奖励
回复

2,437 次查看
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 项奖励
回复

2,938 次查看
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 项奖励
回复

2,938 次查看
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 项奖励
回复

2,938 次查看
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 项奖励
回复