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!?:smileysilly:
// 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));
Solved! Go to Solution.
Hi Arnaud,
I agree with your analysis and will submit this as an issue for MQX4.2.
Clearing and then setting the MAXMB field seems appropriate.
Regards,
David
Hi Arnaud,
I agree with your analysis and will submit this as an issue for MQX4.2.
Clearing and then setting the MAXMB field seems appropriate.
Regards,
David