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,405件の閲覧回数
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,597件の閲覧回数
ykp3036
Contributor I

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

0 件の賞賛
返信

2,600件の閲覧回数
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 件の賞賛
返信

3,101件の閲覧回数
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 件の賞賛
返信

3,101件の閲覧回数
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 件の賞賛
返信

3,101件の閲覧回数
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 件の賞賛
返信