keaz64 CAN RX Question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

keaz64 CAN RX Question

971 Views
james032903
Contributor I

I used the CAN function.

But the RX code just run one time.

How to fix the question.

Labels (1)
0 Kudos
Reply
1 Reply

881 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I can not build your project in KDS or CodeWarrior.
Would you please try to test the receive function descripted in "Receiving data frame without interrupt service (polling)" example?

  MyCANPtr = CAN1_Init(NULL);                                     /* Initialization of CAN1 component */  

  while (!DataFrameRxFlg) {                                       /* Wait until data frame is received */
    CAN1_Main(MyCANPtr);  
  }
  Frame.Data = InpData;                                           /* Set pointer to InpData buffer */
  Error = CAN1_ReadFrame(MyCANPtr, 0U, &Frame);

Receiving data frame without interrupt service (polling).png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply