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.CS.B.IDE = 0;CAN_0.BUF.ID.B.STD_ID = 555;CAN_0.BUF.CS.B.CODE = 0x4; // MB 4 set to RX EMPTYCAN_0.RXIMR.R=0x0; // Acceptance match// Setup and send MBCAN_0.BUF.ID.B.STD_ID = 555; // Transmit ID is 555CAN_0.BUF.DATA.B = 42; // Data to be transmittedCAN_0.BUF.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...