Question on CAN, eDMA, and mailbox

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Question on CAN, eDMA, and mailbox

1,607 次查看
Keith4DSmith
Contributor V

The 2.7 SDK has a FlexCAN eDMA example. The tx uses 'standard' output. The rx uses eDMA.

Path to project file:

SDK_2.7.0_EVK-MIMXRT1064\boards\evkmimxrt1064\driver_examples\flexcan\loopback_edma_transfer

The example has two tx mailboxes and 1 rx mailbox.

If there was more than one possible mailbox, it is not clear from the example how one would determine which mailbox triggered the rx eDMA interrupt.

To determine which mailbox triggered the rx eDMA interrupt, would one loop through the mailboxes checking the status flag, similar to the function FLEXCAN_SubHandlerForDataTransfered() in fsl_flexcan.c?

标签 (1)
0 项奖励
回复
1 回复

1,574 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  Keith Smith ,

  Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

   Do you mean, when more than one RX mailbox, you don't know which one is triggered Rx eDMA interrupt, or more than one tx mailbox, then the RX DMA receive the data, you want to know, which detail tx mailbox trigger the RX DMA?

  I checked the loopback_edma_transfer, four messages are using the same mbIdx:

txXfer.mbIdx      = (uint8_t)TX_MESSAGE_BUFFER_NUM;

   Could you tell me, the specific code position where you find it is using two tx mailbox?

  To determine which detail mail box trigger the rx Interrupt, I think we can check the status register, we also can do the detail testing to verify it.

   Please help to confirm my understanding of your question,  then If you need the test help, I can help you do the testing about it.

 

Best Regards,

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

   

0 项奖励
回复