DMA & Watermark Feature in FlexCAN on S32K344 Hello, I am working with the S32K344 FlexCAN module and DMA. I want to clarify the support for the following items: DMA support: Is DMA supported for individual Message Buffers (MBs) in reception? Or is DMA only supported when using Legacy RX FIFO / Enhanced RX FIFO? Watermark feature: Is the “watermark” threshold feature available only in Enhanced RX FIFO (ER‑FIFO) mode? Or is it also supported in Legacy RX FIFO mode and/or for individual Message Buffers? Legacy RX FIFO mechanism / storage: The reference manual states that in Legacy RX FIFO mode, MB0 to MB5 are reserved for the RX FIFO. MB0 is used for RX FIFO output and MB1–MB5 are reserved for internal use. Does that mean there is only one message buffer (MB0) that the FIFO writes into (and the CPU reads from)? If multiple frames are received but the CPU has not yet read MB0: Is there any internal queue/buffer behind the scenes? Where are the incoming frames stored, and what happens when the storage overflows or “wraps”? S32K344-WB S32K3 Re: DMA & Watermark Feature in FlexCAN on S32K344 Hi @kapidlitap,
DMA support
No. DMA is only supported to RX FIFOs, so MCR[RFEN] or ERFCR[ERFEN] must be 1. When DMA and RFEN are 1, IFLAG1[BUF5I] generates the DMA request, and no RX FIFO interrupt is generated.
Watermark feature
Yes. Watermark is only available in Enhanced RX FIFO mode.
Legacy RX FIFO mechanism / storage
Effectively, yes. The CPU can read the received frames sequentially, in the order they were received, by repeatedly accessing the MB0 structure.
There is a hidden auxiliary MB (RX SMB). The move-in process is described in chapter 73.3.6.1 from the S32K3XX reference manual. If the message buffer remains locked (full) and another new message with the same ID arrives, the new message overwrites the one in the RX SMB.
Using multiple CAN MBs to receive the same CAN ID message is normal operation, not considered a workaround. Customers may use a group of MBs to receive a group of CAN IDs so that there is less chance of losing data on CAN bus, something like a software created RX FIFO.
Best regards, Julián
記事全体を表示