CAN code

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

CAN code

486 次查看
kdn
Contributor III

MY CAN code is not working , anyone have any idea

 

CAN1TIER = 0x07;

 

 

//CAN1TFLG =CAN1TFLG_TXE0_MASK;

  

    CAN1TFLG = 0x01;

 

 

      CAN1TXTBPR = 0x01;

 

      CAN1TXDLR = 0x08;

  

      CAN1TXIDR3 = 0x00;

      CAN1TXIDR2 = 0x00;

      CAN1TXIDR1 = 0x00;

      CAN1TXIDR0 = 0xFF;    //SID

 

 

      CAN1TXDSR0 = 0xFF;     //DATA  

      CAN1TXDSR1 = 0xFF;

      CAN1TXDSR2 = 0xFF;

      CAN1TXDSR3 = 0x00;

   

      CAN1TXDSR4 = 0x00;

      CAN1TXDSR5 = 0x00;

      CAN1TXDSR6 = 0x00;

      CAN1TXDSR7 = 0x00;

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

332 次查看
iggi
NXP Employee
NXP Employee

Well, from that portion of code it is not possible to find out why it's not working.

The most probably CAN initializtion is not correctly done, or maybe (Tx/Rx) interrupts have no definition.

From the link below you can download S12X pack of example in which two are for the CAN. You can use that as a reference:

S12X Examples Pack

Regards,

iggi

0 项奖励
回复