Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: CAN Timing and BTR

2004-11-11 by peterburdine

What you described looks very similar to the UART equation.  CAN is
much more complex than that.  First you need the baud rate prescaler
to get the can clock, then you need to define SJW (syn jump width),
then TSEG1 and TSEG2 to get the correct baud rate (see pg 197 in um).
 I've tired using some to values that Xanalyser gave me, but none of
them seem to work.  It was much easier to get it to work on the atmel
8051 can uc.

--Peter

--- In lpc2000@yahoogroups.com, "zarozaro" <zarozaro@y...> wrote:
> 
> I think the equation is:
> 
>    CANBaudRate=pclk/(16*(BTR+1))
> or
>    BTR=pclk/(16*CANBaudRate) -1
> 
> where BTR are bits 0-9 in CANBTR register.
> 
> Zaro
> 
> --- In lpc2000@yahoogroups.com, "peterburdine" <lordofdawn@h...> 
> wrote:
> > 
> > Does anyone have a good way to generate the timings for the CAN 
> bus? 
> > I've tried to do some of the math by hand, but I can't seem to ever
> > get it right.
> > 
> > What I'm looking for is 125k/s @ 60MHZ, 125k/s @ 48MHz and 1M/s @ 
> 60 MHz.
> > 
> > Thanks for any help you can give.
> > 
> > --Peter

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.