X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/0fb417d5329b49aefd3d4359a745a593993b7e86..6252114a802a8d828124bd82a9b2bf3af8959098:/lincan/src/i82527.c diff --git a/lincan/src/i82527.c b/lincan/src/i82527.c index 00dd885..66bdc55 100644 --- a/lincan/src/i82527.c +++ b/lincan/src/i82527.c @@ -131,7 +131,8 @@ int i82527_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw, if (i82527_enable_configuration(chip)) return -ENODEV; - clock /=2; + if(chip->int_cpu_reg & iCPU_DSC) + clock /=2; /* tseg even = round down, odd = round up */ for (tseg=(0+0+2)*2; tseg<=(MAX_TSEG2+MAX_TSEG1+2)*2+1; tseg++) {