Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] CAN bit timming vs RS232

2006-01-03 by Martin Steppuhn

Hello Rui,

I 'am using the LPC2129 an there ist the same "problem".

You can fix it with the CAN setup by chosing a time quanta
with a low error in the CANBTR.

For 14,7456 MHz and 125k CAN Buadrate my settings for CANBTR are:

#define   CALC_BRP_43      0x0000002A
#define   CALC_SJW_1        0x00000000
#define   CALC_TSEG1_8    0x00070000
#define   CALC_TSEG2_2    0x00100000

#define   CANBitrate125k      CALC_BRP_43 | CALC_SJW_1 | CALC_TSEG1_8 | 
CALC_TSEG2_2

Error:  -0,24%

You can find additional infos in: 
http://www.hitex.co.uk/arm/lpc2000book/index.html

Best regards,
Martin









> I'm using an Olimex LPC-E2294 board with a cristal of 14.746.000Hz.
> This gives perfect baud rate for RS232 but I can find a CAN bit timing
> with no error for some usual bit timings like 125K, 250K, etc.
> If I go to a 15MHz cristal I have perfect bit timimings in CAN but I
> have a RS232 error of about 1.67%.
>
> Is there a way to have no error in both RS232 and CAN baud rates?
> If not what's the best choice for the cristal value?
> I want to have both RS232 and CAN.
>
>
> Thank you.
> Rui
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

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.