diff options
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/pyb.CAN.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/library/pyb.CAN.rst b/docs/library/pyb.CAN.rst index 8078e29e0..649bcda10 100644 --- a/docs/library/pyb.CAN.rst +++ b/docs/library/pyb.CAN.rst @@ -49,7 +49,7 @@ Class Methods Methods ------- -.. method:: CAN.init(mode, extframe=False, prescaler=100, *, sjw=1, bs1=6, bs2=8, auto_restart=False) +.. method:: CAN.init(mode, extframe=False, prescaler=100, *, sjw=1, bs1=6, bs2=8, auto_restart=False, baudrate=0, sample_point=75) Initialise the CAN bus with the given parameters: @@ -67,6 +67,11 @@ Methods - *auto_restart* sets whether the controller will automatically try and restart communications after entering the bus-off state; if this is disabled then :meth:`~CAN.restart()` can be used to leave the bus-off state + - *baudrate* if a baudrate other than 0 is provided, this function will try to automatically + calculate a CAN bit-timing (overriding *prescaler*, *bs1* and *bs2*) that satisfies both + the baudrate and the desired *sample_point*. + - *sample_point* given in a percentage of the bit time, the *sample_point* specifies the position + of the last bit sample with respect to the whole bit time. The default *sample_point* is 75%. The time quanta tq is the basic unit of time for the CAN bus. tq is the CAN prescaler value divided by PCLK1 (the frequency of internal peripheral bus 1); |
