Using FlexCAN with RXFIFO DMA stops TX

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using FlexCAN with RXFIFO DMA stops TX

1,150件の閲覧回数
freddy_ben-zeev
Contributor IV

I run FlexCAN transmit and receive in parallel continuously. If I configure the receive to use FIFO and DMA after some point the transmission stops. It looks like the transmission was started but I get no interrupt from the transmit mailbox. If I configure the receive to use mailbox or FIFO without DMA everything works fine. Is this something that anyone saw before?

Freddy

タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,039件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

is this related to SDK driver, isnt it? if yes, which version, SDK 3.0.2?

Generally for the module, I am not aware of such issues. You can try to inspect CAN registers and TX MB, if this can say more.

BR, Petr

0 件の賞賛
返信

1,039件の閲覧回数
freddy_ben-zeev
Contributor IV

And... I think I've found the problem. The function FLEXCAN_SetMsgBuffIntCmd in flexcan_hw_access.c does read-modify-write on IMASKx registers without protection (same issue may be with some other functions and registers). It is called from program level and also from interrupt which is not safe. It gets worse for me as I'm running multiple threads and this is not thread-safe either.

freddy 

0 件の賞賛
返信

1,039件の閲覧回数
freddy_ben-zeev
Contributor IV

This is with SDK 3.0.2 and with FreeRTOS. What I've found at this point is that when the TX stops working the IMASK bit corresponding to the mailbox is clear while the IFLAG bit is set and the status tells me that transmission has started. I'm not sure as yet how the IMASK bit gets cleared (or not get set).

I'm continuing the bug hunt...

Freddy

0 件の賞賛
返信