keaz64 CAN RX Question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

keaz64 CAN RX Question

979 次查看
james032903
Contributor I

I used the CAN function.

But the RX code just run one time.

How to fix the question.

标签 (1)
0 项奖励
回复
1 回复

889 次查看
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 项奖励
回复