lpc11c24 CAN communication, bit rate 1Mbit/s

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc11c24 CAN communication, bit rate 1Mbit/s

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kaje on Mon Dec 08 09:55:15 MST 2014
Hi all,

I have two boards (my own hardware) with lpc11c24 and I want use CAN communication with bit rate 1 Mbit/s. I was using communication with 100 Kbit/s and 125 Kbit/s and I was receiving message, but when I set bit rate on 1 Mbit/s (250 k, 500 k) I cannot receive message. I am use this defines:

#define BITRATE100K8MHZ           0x00000113
#define BITRATE125K8MHZ           0x0000010F

#define BITRATE1000K8MHZ          0x00000101


#define BITRATE100K24MHZ          0x00007E09
#define BITRATE125K24MHZ          0x0000450F

#define BITRATE1000K24MHZ         0x00004501

I know how I can set

Bit rate = CAN_CLK/((BRP + 1) x (TSEG1+2+TSEG2+1)) and
Sample point = (TSEG1+2) / (TSEG1+2+TSEG2+1) x 100

on the different ways but I don`t have perfect combination. What is my problem ?
Labels (1)
0 Kudos
4 Replies

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kaje on Tue Dec 09 06:14:35 MST 2014
Hi R2D2,

Thanks for the your replies! I will check hardware.
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Dec 09 05:51:28 MST 2014

#1 Although these setups should all generate 1Mbit/s I prefer to use a fast CAN clock. So my favourite is setup 1  :)

#2 I'm not sure what's not working in detail and how you check your CAN signals, but obviously that's a hardware problem  :((

So it's time to check your hardware, especially clock setup and termination...


0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kaje on Tue Dec 09 02:20:12 MST 2014
Main clock is 48 MHz:

1.
0x00000000UL, //CANCLCLKDIV
0x00002BC2UL, //CAN_BTR

or
2.
0x00000003UL, // CANCLKDIV
0x1201UL         // CAN_BTR

or
3.
0x00000005UL, // CANCLKDIV
0x00000101UL // CAN_BTR
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Dec 08 11:04:25 MST 2014

Quote: kaje
What is my problem ?



What is your main clock and CANCLKDIV  :quest:
0 Kudos