CAN register settings

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

CAN register settings

493 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by v8dave on Mon Jan 28 01:51:43 MST 2013
Hi all,

I have an Atmel AT90CAN128 sending data at 125Kbps with settings for sampling point at 75%.

I can get this to talk to an SJA1000 so I know it works.

With the LPC11C14 I can't get any receive. I get a FORM error each time. I have searched the forum and found a few things on settings but nothing I do works.

This is the settings. It should be correct for 12Mhz clock??

uint32_t ClkInitTable[2] = {
    0x00000000UL,
    0x00002707UL
};


TSEG1 = 8
TSEG2 = 3

TQ = 12

Appreciate any pointers to where I have gone wrong?

Dave...
0 Kudos
Reply
3 Replies

477 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by v8dave on Mon Jan 28 04:14:48 MST 2013
Thank you.

That worked.:)

The error I was making was in the calculation of the sampling point. I had to add 1 to the TSEG1 and then divide by the TQ and I now have a working system.

Cheers.
Dave...
0 Kudos
Reply

477 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Jan 28 03:10:35 MST 2013

Quote: v8dave
Appreciate any pointers to where I have gone wrong?



What about #5 of http://knowledgebase.nxp.com/showthread.php?t=2829 ;)

Also in http://knowledgebase.nxp.com/showthread.php?p=8960 there's a description of LOOPBACK :)
0 Kudos
Reply

477 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by v8dave on Mon Jan 28 02:12:33 MST 2013
Oops. I forgot that the freq is from the PLL and not what the crystal shows!!

Freq = 48Mhz

In that case it should be 0x271F but that still does not work.
0 Kudos
Reply