AnsweredAssumed Answered

How to Receive Multiple CAN Frames

Question asked by gbrowne on Nov 18, 2017
Latest reply on Jan 6, 2018 by gbrowne

Hello.

 

I seem to be missing one piece to our FLEXCAN puzzle...

 

When I transmit a request, my expectation is that there will be multiple response frames (which could all have the same Message ID or different Message IDs).  The tool I am using will respond 3 times to each request.  However, I only seem to be able to read the first frame received.


What is the best technique to get all response frames?  This is where I have started and have tried a number of different tactics from here:

 

if (STATUS_SUCCESS == FLEXCAN_DRV_Send(INST_HSCAN, 0, &tx_info, msg_id, mb_data)) {
  if (STATUS_SUCCESS == FLEXCAN_DRV_ReceiveBlocking(INST_HSCAN, 1, &data, 100)) {
    // Now how do I get the other 2 frames?  Or should I use a different method altogether?
  }
}

 

Any suggestions and/or sample code would be greatly appreciated.

 

Thanks!

 

-Greg

Outcomes