Question on CAN, eDMA, and mailbox

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

Question on CAN, eDMA, and mailbox

626 Views
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?

Labels (1)
0 Kudos
1 Reply

593 Views
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 Kudos