AnsweredAssumed Answered

MQX FlexCAN

Question asked by finncarlsvi@gmail.com on Oct 20, 2015
Latest reply on Jan 13, 2016 by finncarlsvi@gmail.com

Hello,

 

I'm trying to run the MQX FlexCAN example but the program stops after displaying the Node:

 

*********FLEXCAN TEST PROGRAM.*********

   Message format: Standard (11 bit id)

   Message buffer 9 used for Rx.

   Message buffer 13 used for Tx.

   Interrupt Mode: Enabled

   Operation Mode: TX and RX --> Normal

***************************************

 

NODE is 1

 

I tracked down the issue. The program waits indefinitely at the line:

 

mqx/examples/can/flexcan/fsl_flexcan_test.c

(Line 133) result = flexcan_init(instance, &flexcan1_data, TRUE);

 

which is calling

mqx/source/io/can/flexcan/fsl_flexcan_driver.c

(Line 363) result = flexcan_hal_init(instance, data);

 

which in turn is calling

mqx/source/io/can/flexcan/fsl_flexcan_hal.c

(Line 222) while (!(flexcan_reg_ptr->MCR & CAN_MCR_LPM_ACK_MASK)) {}

 

I have atached the last file (mqx/source/io/can/flexcan/fsl_flexcan_hal.c)

 

Thank you for any help to shed some light on the subject. It's probably a simple fix, but after reading about CAN and FlexCAN, I'm still not understanding what is happening.

 

/ Finn

Outcomes