AnsweredAssumed Answered

MPC567xK FlexCAN problems

Question asked by Johan Englund on Jul 19, 2011
Latest reply on Jul 21, 2011 by Johan Englund



do any of you have some working CAN code for the MPC567xK? I seem to have problems getting it to work even in loopback mode.


CAN_0.MCR.B.MAXMB=0x1f; // Enable all 32 Message Buffers// Setup receive MBCAN_0.BUF[1].CS.B.IDE = 0;CAN_0.BUF[1].ID.B.STD_ID = 555;CAN_0.BUF[1].CS.B.CODE = 0x4; // MB 4 set to RX EMPTYCAN_0.RXIMR[1].R=0x0; // Acceptance match// Setup and send MBCAN_0.BUF[0].ID.B.STD_ID = 555;   // Transmit ID is 555CAN_0.BUF[0].DATA.B[0] = 42;    // Data to be transmittedCAN_0.BUF[0].CS.R=0x0C010000;


Transmission seems to work fine, not errors in ECR and the CODE in transmit MB returns to 0x8 as it should. However, no data is received no matter how I try to configure IDs and MASKs for the receice MB...