Hello Petr,
Per your suggestion I tried to implement DMA configuration for multi message transaction but I am having some issues. I have created an example project which is based on Example S32K144 FlexCAN RXFIFO DMA S32DS.ARM.2018.R1. All my implementation is in can_task.c, specifically in the following functions, ucCanEdmaRxFifoEnable, ucCanEdmaRxFifoRead, ucEdmaEnableTransfer. I would be grateful if you could have a look at it, or point to someone/place where I can request for a code review or suggestions.
Things to note:
1. The ucCanEdmaRxFifoEnable code is derived from FLEXCAN_DRV_RxFifo (flexcan_driver.c) and the ucCanEdmaRxFifoRead code is derived from FLEXCAN_CompleteRxFifoDataDMA (flexcan_driver.c)
Following is the workflow I am using (planning to achieve):
a. Initialize Clocks, Pins, CAN, DMA. (as per the example)
b. Configure CAN for Rx Fifo and set filters. (as per the example)
c. Enable DMA based transfer, start channel. (ucEdmaEnableTransfer)
d. Periodically call ucCanEdmaRxFifoEnable to read from the buffer.
2. I am using multi block type transfer for eDMA Receiving. I have a feeling there is something wrong with my configuration, either in the transfer config parameters or the type of transfer I am using. I am able to receive the first message in the buffer but any subsequent messages are not received unless I manually start the channel again. Also, I can see the RxFIFO new frame available interrupt is being set if a second message is sent. This suggests that the channel is being disabled after the first channel request from the FlexCAN0.
I kindly request your assistance in this regard.
Best,
Kedar Patil