S32K312 CAN MB vs RxFIFO

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

S32K312 CAN MB vs RxFIFO

50件の閲覧回数
lua40927
Contributor III

Hello,

I would like to ask a few questions regarding the CAN reception mechanism on the S32K312, specifically the differences between Message Buffers (MBs) and Rx FIFO.

  1. If I configure MB0 to MB30 as receive message buffers and set them to accept all CAN messages, what happens when a new message arrives while MB0 already contains an unread message? Will the new message be automatically stored in MB1 (or the next available MB), or will it overwrite MB0 / be discarded?
  2. Is there any performance difference between using Message Buffers (MBs) and Rx FIFO for CAN reception? For example, is one method faster than the other in terms of receiving back-to-back CAN frames, or is the difference negligible?

I am trying to determine which approach is more suitable for handling a high volume of CAN traffic on the S32K312.

Thank you for your help.

0 件の賞賛
返信
1 返信

33件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@lua40927

1.Yes — if you configure multiple RX message buffers with the same acceptance criteria, FlexCAN does not simply overwrite MB0 immediately. With the normal matching behavior, it scans RX MBs from low number to high number, and if the first matching MB is not “free-to-receive,” it keeps looking for another matching MB that is free. So if MB0 already contains an unread matching frame, the next matching frame can be stored in MB1, then MB2, and so on, as long as those MBs are also matching and free. If no matching/free MB remains, FlexCAN overwrites the last matched MB and sets its CODE to OVERRUN 

2.No such info available.

I can give you some experience summaries and comparisons.

  • If your priority is strict receive order + simpler draining logic , FIFO is better aligned to that use case because it is a true ordered queue with internal pointer handling.,
  • If your priority is maximum buffering depth using many RX slots for Classic CAN traffic, dedicating many MBs to reception can give you much more room than the six-deep legacy FIFO, at the cost of more software management and possible reordering by timestamp.,,
  • If you want DMA-based reception , the available S32K material says DMA is supported for RX FIFO, not MBs. Specifically, an S32K support answer states “DMA is supported only over RXFIFOs (legacy or enhanced) no over MBs.”
  • On S32K312,  Enhanced Rx FIFO is available only on FlexCAN0 and that legacy and enhanced FIFO cannot be enabled at the same time.

 

Note:
We recommend using your company email to register your NXP account, as general email addresses offer limited technical support.

0 件の賞賛
返信