AnsweredAssumed Answered

CAN 250kbps device returns bad

Question asked by nishantsood on Mar 12, 2018
Latest reply on Mar 13, 2018 by nishantsood

Hi Guys,

I have this S32k developer EVB evaluation kit using which I'm trying to talk to a 250Kbps bit rate CAN device on the CAN bus.

 

Connection:

There are only 2 devices on the whole CANbus 1) The s32k EVB and, 2) The other CAN device which Im trying to read.

 

I'm skeptical on 2 things:

1) My bitrate calculation:

 

.bitrate = { // 80 /( [(1 + (4+1) + (1+1) + (7)] x (1+1)) = 80 / ([15] x 2) = 80/30 = 2.6Mhz
.propSeg = 126, // Fcanclk /( [(1 + (15+1) + (15+1) + (127)] x (1+1)) = 80/ [( 40+50+70) x 2]] = 80/320 = 
.phaseSeg1 = 15,
.phaseSeg2 = 15,
.preDivider = 1,
.rJumpwidth = 1
},

 

and,

 

2) The mailbox addresses:

 

#if defined(MASTER)
#define TX_MAILBOX (1UL)
#define TX_MSG_ID (0x01de0800UL)
#define RX_MAILBOX (2UL)
#define RX_MSG_ID (0x01df0900UL)

 

I'm reading, but I'm not getting the correct replys. As I have tested it before with an Arduino , on it I get all data correctly (extended identifier based call backs)

Outcomes