AnsweredAssumed Answered

MPC5777C: MCAN Rx message buffer: Accepts only message of one ID.

Question asked by hemadri payam on Apr 11, 2019
Latest reply on Apr 14, 2019 by Petr Stancik

Problem statement: MCAN Rx message buffer: Accepts only message of one ID.

 

Configurations that I am using:

  1. Receive Message buffers are configured (Not FIFO)
  2. No. of RX buffer 1
  3. No. of Tx Buffer 6
  4. 1 MBPS
  5. Buffer 0 is configured for receive
  6. Filter configurations: Range filter, Filter config RX Buffer, FD Enabled, ID 1 = 10, ID 2 = 100
  7. Only one buffer and only one filter table

 

Message Buffer zero is configured for receive.

When receiving any data through MCAN, it receives only one ID of 10. All other messages from 11 to 100 are filtered by MCAN.

 

I am working with the latest driver and here are the few observations:

  1. Fn: MCAN_DRV_ConfigRxMb

  if ( ( rx_info->msg_id_type == CAN_MSG_ID_EXT ) &&

       ( status == STATUS_SUCCESS ) ) {

    if ( mb_idx >= MCAN_GetExtIDFilterSize ( base ) ) {

      status = STATUS_CAN_BUFF_OUT_OF_RANGE;

    } else {

      mcan_id_table_t filterID;

      filterID.filterConfig = FILTER_CONF_RX_BUFF;

      filterID.filterType   = FILTER_TYPE_RANGE_ID;

      filterID.id1          = msg_id;

      /* Stored in the MB offset from MB 0 */

      filterID.id2             = mb_idx;

      filterID.isExtendedFrame = true;

      MCAN_SetEXT_IdFilter ( base, &filterID, mb_idx );

    }

  }

Filter ID 2 is set to buffer index, but it should be configured to the ID specified (which is 100).

 

  1. The filter address that it is mapped to while updating the filter configurations: when MCAN_DRV_Init is called, the filter address for the filter table configuration is 0xFFE34008

 

  1. When the MCAN_DRV_ConfigRxMB, the filter address: 0xFFE3400A

 

Note:

The example provided uses RX FIFO. But I am interested in using the HW Message buffers.

Outcomes