iMX8MP FlexCAN DMA Example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8MP FlexCAN DMA Example

1,274 Views
nickager
Contributor II

Hi,

Is there an example of using DMA with FlexCAN on the CortexM7 in the iMX8MP. I have found a post about how to setup RX FIFO but the FIFO appears to be fixed at 6 messages whereas I am receiving 8 CAN messages every 15ms and am seeing sporadic FIFO buffer overruns.

Relevant links:

but unfortunately none of the above posts has enabled me to piece together working FlexCAN DMA code. An example would be really helpful.

Many thanks

Nick

 

0 Kudos
Reply
2 Replies

633 Views
radhak4x
Contributor II

How can I enable DMA capabilities for the CAN driver on the IMX8MPlus EVK board (Cortex-A53) running Linux? Could you please provide suggestions?

I am based on i.MX8QMPlus(i.MX8MPlus)- Target - EVK - based on Linux with CAN driver Enabled ( I am compiling the same with yocto build environment).

Now, i have to enable the DMA capabilities for CAN driver.

Could you please provide suggestions and what modifications are needed? 

 

we are based on kernel 6.6.54 and we are using the file: https://elixir.bootlin.com/linux/v6.6.54/source/drivers/net/can/flexcan/flexcan-core.c and https://elixir.bootlin.com/linux/v6.6.54/source/drivers/net/can/flexcan/flexcan.h

 

0 Kudos
Reply

1,241 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @nickager,

 
I hope you are doing well
 
Is there an example of using DMA with FlexCAN on the CortexM7 in the iMX8MP
=> Please refer to the drivers/fsl_flexcan.c file from the SDK of IMX8M Plus.
The void FLEXCAN_EnableRxFifoDMA() function Enables or disables the FlexCAN Legacy/Enhanced Rx FIFO DMA request. 
 
Please refer to the MCUXpresso SDK Builder to download the latest version of the SDK.
 
Thanks & Regards,
Sanket Parekh
0 Kudos
Reply