Yahoo Groups archive

Lpc2000

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

Thread

CAN Timing and BTR

CAN Timing and BTR

2004-11-10 by peterburdine

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

Re: CAN Timing and BTR

2004-11-11 by zarozaro

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.
Show quoted textHide quoted text
> 
> Thanks for any help you can give.
> 
> --Peter

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:
Show quoted textHide quoted text
> 
> 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

Re: CAN Timing and BTR

2004-11-11 by Gus

Peter,

Here is a link to a free CAN baud rate calculator. It is made for 
Microchip products but you can use the graphs to figure out what are 
the possible baud rates and all other can-bits parameters.

http://www.intrepidcs.com/mcp2510/


Gus
--- 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.
Show quoted textHide quoted text
> 
> Thanks for any help you can give.
> 
> --Peter

Re: CAN Timing and BTR

2004-11-11 by Gus

Peter,

Here is a link to a free CAN baud rate calculator. It is made for 
Microchip products but you can use the graphs to figure out what are 
the possible baud rates and all other can-bits parameters.

http://www.intrepidcs.com/mcp2510/


Gus
--- 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.
Show quoted textHide quoted text
> 
> Thanks for any help you can give.
> 
> --Peter

RE: [lpc2000] Re: CAN Timing and BTR

2004-11-11 by Hans Dornaus

Hi,

Try this link below. I have just done this myself. I came up with the
following number and was able to communicate on the workbench. I have still
do some more studing about this very important subject.

CANBitrate250k_60MHz          0x001D0007

http://www.esacademy.com/faq/calc/sja1000.htm
Show quoted textHide quoted text
  -----Original Message-----
  From: Gus [mailto:gus_is_working@...]
  Sent: Friday, 12 November 2004 1:05 AM
  To: lpc2000@yahoogroups.com
  Subject: [lpc2000] Re: CAN Timing and BTR



  Peter,

  Here is a link to a free CAN baud rate calculator. It is made for
  Microchip products but you can use the graphs to figure out what are
  the possible baud rates and all other can-bits parameters.

  http://www.intrepidcs.com/mcp2510/


  Gus
  --- 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




        Yahoo! Groups Sponsor

        Get unlimited calls to

        U.S./Canada




----------------------------------------------------------------------------
--
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/lpc2000/

    b.. To unsubscribe from this group, send an email to:
    lpc2000-unsubscribe@yahoogroups.com

    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




[Non-text portions of this message have been removed]

Re: CAN Timing and BTR

2004-11-12 by Gus

Maybe it is fixed now but I tried that SJA1000 calculator last year 
and it gave me wrong results.

Gus
--- In lpc2000@yahoogroups.com, "Hans Dornaus" <hans@c...> wrote:
> Hi,
> 
> Try this link below. I have just done this myself. I came up with 
the
> following number and was able to communicate on the workbench. I 
have still
> do some more studing about this very important subject.
> 
> CANBitrate250k_60MHz          0x001D0007
> 
> http://www.esacademy.com/faq/calc/sja1000.htm
> 
> 
>   -----Original Message-----
>   From: Gus [mailto:gus_is_working@y...]
>   Sent: Friday, 12 November 2004 1:05 AM
>   To: lpc2000@yahoogroups.com
>   Subject: [lpc2000] Re: CAN Timing and BTR
> 
> 
> 
>   Peter,
> 
>   Here is a link to a free CAN baud rate calculator. It is made for
>   Microchip products but you can use the graphs to figure out what 
are
>   the possible baud rates and all other can-bits parameters.
> 
>   http://www.intrepidcs.com/mcp2510/
> 
> 
>   Gus
>   --- 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
> 
> 
> 
> 
>         Yahoo! Groups Sponsor
> 
>         Get unlimited calls to
> 
>         U.S./Canada
> 
> 
> 
> 
> -------------------------------------------------------------------
---------
> --
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/lpc2000/
> 
>     b.. To unsubscribe from this group, send an email to:
>     lpc2000-unsubscribe@yahoogroups.com
> 
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service.
Show quoted textHide quoted text
> 
> 
> 
> 
> [Non-text portions of this message have been removed]

Re: CAN Timing and BTR

2004-11-12 by mahlerweb

Hi,

I've just uploaded the Application Node AN97046 which describes the 
how the bittiming registers are determined for a SJA1000 to the files 
section. 
In the LPC2xxx works the same CAN-core. The main difference is, that 
the clock is derivated from the VPB-clock, not from the crystal-
oscillator.       

For more information see the Bosch CAN 2.0 spec. 
http://www.can.bosch.com/docu/can2spec.pdf



  
 
 
--- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote:
> 
> Maybe it is fixed now but I tried that SJA1000 calculator last year 
> and it gave me wrong results.
> 
> Gus
> --- In lpc2000@yahoogroups.com, "Hans Dornaus" <hans@c...> wrote:
> > Hi,
> > 
> > Try this link below. I have just done this myself. I came up with 
> the
> > following number and was able to communicate on the workbench. I 
> have still
> > do some more studing about this very important subject.
> >
> > CANBitrate250k_60MHz          0x001D0007
> > 
> > http://www.esacademy.com/faq/calc/sja1000.htm
> > 
> > 
> >   -----Original Message-----
> >   From: Gus [mailto:gus_is_working@y...]
> >   Sent: Friday, 12 November 2004 1:05 AM
> >   To: lpc2000@yahoogroups.com
> >   Subject: [lpc2000] Re: CAN Timing and BTR
> > 
> > 
> > 
> >   Peter,
> > 
> >   Here is a link to a free CAN baud rate calculator. It is made 
for
> >   Microchip products but you can use the graphs to figure out 
what 
> are
> >   the possible baud rates and all other can-bits parameters.
> > 
> >   http://www.intrepidcs.com/mcp2510/
> > 
> > 
> >   Gus
> >   --- 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
> > 
> > 
> > 
> > 
> >         Yahoo! Groups Sponsor
> > 
> >         Get unlimited calls to
> > 
> >         U.S./Canada
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------
-
Show quoted textHide quoted text
> ---------
> > --
> >   Yahoo! Groups Links
> > 
> >     a.. To visit your group on the web, go to:
> >     http://groups.yahoo.com/group/lpc2000/
> > 
> >     b.. To unsubscribe from this group, send an email to:
> >     lpc2000-unsubscribe@yahoogroups.com
> > 
> >     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms 
> of Service.
> > 
> > 
> > 
> > 
> > [Non-text portions of this message have been removed]

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.