AnsweredAssumed Answered

MPC5744P FlexCAN example

Question asked by Hyuntae Choi on May 23, 2017

Hello,

 

I am using  MPC5744P-144DS daughter board and  MPC57xxx mother board to test FlexCAN module.

As there is no FlexCAN example for S32DS, I have refereed to  "MCP5744P FlexCAN simple TXRX" example for GHS compiler and "MPC5748G-FlexCAN_with_interrupts-S32DS"

I modify the main code to Transmit a message (CAN_0 MB0) with ETimer interrupt every 1 second, and receive the message with interrupt (CAN_1 MB0).  

I also configured the mother board (P4 and P5) by connecting CAN0_CANH to CAN1_CANH and CAN0_CANL to CAN0_CANL. Also terminate the CAN bus with 60 ohm resistor.

 

When I run the program, it always suspending in the following line

 

while ( CAN_0.IFLAG1.B.BUF0I == 0) { Counter_W++;} // wait until the tx is completed.

 

Can you please look into my code and help me with this problem.

 

Thanks in advance for your kind support.

 

Hyuntae Choi

Original Attachment has been moved to: main.c.zip

Outcomes