AnsweredAssumed Answered

MQX4.2: FlexCan, Bug in fsl_flexcan_hal.c when set MCR.MAXMB?

Question asked by arnogir on Jan 5, 2016
Latest reply on Jan 5, 2016 by David E Seymour

Currently in fsl_flexcan_hal.c, flexcan_hal_init MAXMB field is set by:

// Set maximum number of message buffers 
flexcan_reg_ptr->MCR |= CAN_MCR_MAXMB((data->max_num_mb -1));

 

But initial value is not 0!! but 0x0F..
Then MCR must be clear before

Do following, are you ok with this problem or are tehy a thing that I not seen!?

// Set maximum number of message buffers 
flexcan_reg_ptr->MCR &= ~CAN_MCR_MAXMB_MASK;
flexcan_reg_ptr->MCR |= CAN_MCR_MAXMB((data->max_num_mb -1));

Outcomes