FORUM TOPIC · READ ONLY

CAN configuration bug

CAN configuration bug

Forum : bug reports

1 message(s) · archive en lecture seule

Bernard Leak
See also my changes to

http://www.kerhuel.eu/wiki/Block/CAN_Configuration

These include suggestions for better prompts in the block's masked parameter

dialogue.

In particular, note

'Progagation' should be 'Propagation'

(and 'bits' should be 'quanta').



'Baud Rate' should be 'Baud Rate Prescaler - 1'

I was thoroughly confused by 'Baud Rate'!

Note the - 1! N in this field is the value

written to the register, when the oscillator

rate is reduced by a scale factor of (N + 1).



If you don't mind breaking backward compatibility,

it would be best to let this parameter be like the

segment lengths, set to match the actual

ratio used rather than the register setting



Now the important bit:

The CAN frequency is wrong (on all

CAN modules I know about, including

the PIC30f6014a). You've added

together the propagation and phase buffer

segment lengths and added 2: but you

should only add 1. Perhaps you counted

the synchronisation quantum at both

ends of the bit? It is 'between

bits' and should only be counted once

for each bit in determining the baud

rate.