AnsweredAssumed Answered

Help with FRDM-KE06Z CAN bus communication using Process Expert

Question asked by Antonio Estupinan on Aug 26, 2019
Latest reply on Aug 28, 2019 by Felipe García

Hello All,

 

I hope somebody can help me find a solution for this problem.

 

I built up a CAN bus made of 6 nodes using PIC's micro controllers (Microchip ones), they're repeatedly talking to each node, everything seems to be working fine and now I intend to add an extra Node to monitor messages to see whats going on in the bus, I tried to connect the board FRDM-KE06Z since it has a built-in CAN controller (MSCAN) as well as a CAN transceiver, i set up the CAN component as shown below.

Interrupt service : Disabled

• Global Acceptance Mask : yes

• Acceptance mask for buffer 0..n : 1FFFFFFF

• Message buffers : 1, Buffer0 - Buffer type: Receive

• Accept frames : Standard

• Message ID : 7FF

• Bit rate : 100kbit/s

• Loop mode : no

• Enabled in init. code : yes

• Methods to enable : ReadFrame,SetRxBufferID

• Events to enable : OnFullRxBuffer

 

I generated my code by means of Process Expert, this part of the code waits for a frame to be received in one the buffers but it never gets out of that loop, meaning that a message is never received in spite of properly having configured the CAN component, my CAN bus is running at 100 kbs so is the CAN configuration of the FRDM-KE06Z

 

 while (!DataFrameRxFlg) {                                       /* Wait until data frame is received */    CAN2_Main(MyCANPtr);   

Frame.Data = InpData;  

}    

 

I have already tried to solve it using two different IDE's (MCUxpresso and Code Warrior) and the same issue occurred, the flag DataFrameRxFlg never changes from FALSE to TRUE, I also tried to set the module to listen only mode but did not work either.

 

Thank you.

 

 

 

Outcomes