Hi,
I am working in CANFD communication between 2 CANFD EVB. The code is based on S32K144_Demo_CANFD project. I find tx procedure alway faster than rx procedure even I have added 300ms delay after every transmiting packet. I want to use DMA to replace interrupt mode to make rx process faster, but It seems nowhere to change interrupt mode to DMA mode in PE. Can you tell me how to modify code to use DMA mode for CANFD communication? Thanks.
已解决! 转到解答。
Hi,
try to refer to below example
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-RXFIFO-DMA-S32DS-ARM-2018-R...
But it is using FlexCAN driver, CAN_Pal driver does not support DMA, as far as I know.
BR, Petr
Hi,
The receive-only FIFO can support DMA, this feature is enabled by asserting both the
CAN_MCR[RFEN] and CAN_MCR[DMA] bits. But Rx FIFO must not be enabled when CAN FD feature is enabled.. So DMA and CAN FD cannot be used both on S32K1 devices.
See more in FlexCAN chapter of the device RM.
Enhanced RXFIFO allows that, but this is available on S32K3 devices.
BR, Petr
Hi,
try to refer to below example
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-RXFIFO-DMA-S32DS-ARM-2018-R...
But it is using FlexCAN driver, CAN_Pal driver does not support DMA, as far as I know.
BR, Petr