the mechanism of using CAN+DMA

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

the mechanism of using CAN+DMA

427 Views
yin_qiu
Contributor III

dear NXP experts:

I am trying to take use the DMA and enhance FIFO in FLEXCAN by EB and it seems ok but it was not totally OK.

1. I config the Enhanced FIFO cause CANFD is used

98074746-dbb1-4093-b63b-4044517325eb.png

 2. I enable both DMA and CAN0 interrupt

86581989-ccb2-4faa-967d-cb437941a25b.png

 3. I list all the CAN message to be received and the CanId is assembled in the name of frame.

FIFO_cfg.png

 I tested the config and I find that DMA_ISR can be called only if 0x102 is sent by CANOE and DMA seems not work if 0x104 is sent because CAN interrupt routine is called.

I have some questions:

1. I wonder whether only item0 (0x102) can use enhanced FIFO and the following canid  can only take use of message buffer(MB).

2. if the answer of "1"  is no, any config error in my EB project? I tried to set several Filters in the 0x102 frame like 0x7f0 in the mask. yes, I the DMA_ISR can be called if 0x104 is sent. but because CANIF has some relationship with CAN like the snapshot below:

 

224c7457-5561-4248-b7b8-d9a791b25dc3.png

 I can not do correct parse in function "Unpack_ABS_102h_20ms" if 0x104 also trigger the same  callback function with 0x102.

so I have the question : only the first item of CANhardware Object can take use of FIFO?

thank you very much.

Tags (1)
0 Kudos
Reply
0 Replies