EasyManuals Logo
Home>ST>Microcontrollers>STM8S

ST STM8S Reference Manual

ST STM8S
449 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #381 background imageLoading...
Page #381 background image
RM0016 Controller area network (beCAN)
Doc ID 14587 Rev 8 381/449
23.6.6 Bit timing
The bit timing logic monitors the serial bus-line and performs sampling and adjustment of
the sample point by synchronizing on the start-bit edge and resynchronizing on the following
edges. Its operation may be explained simply by splitting nominal bit time into three
segments as follows:
– Synchronization segment (SYNC_SEG): a bit change is expected to occur
within this time segment. It has a fixed length of one time quantum (1 x t
CAN
).
– Bit segment 1 (BS1): defines the location of the sample point. It includes the
PROP_SEG and PHASE_SEG1 of the CAN standard. Its duration is
programmable between 1 and 16 time quanta but may be automatically
lengthened to compensate for positive phase drifts due to differences in the
frequency of the various nodes of the network.
– Bit segment 2 (BS2): defines the location of the transmit point. It represents the
PHASE_SEG2 of the CAN standard. Its duration is programmable between 1 and
8 time quanta but may also be automatically shortened to compensate for
negative phase drifts.
The resynchronization Jump Width (SJW) defines an upper bound to the amount of
lengthening or shortening of the bit segments. It is programmable between 1 and 4 time
quanta.
To guarantee the correct behavior of the CAN controller, SYNC_SEG + BS1 + BS2 must be
greater than or equal to 5 time quanta.
Note: For a detailed description of the CAN bit timing and resynchronization mechanism, please
refer to the ISO 11898 standard.
As a safeguard against programming errors, the configuration of the Bit Timing Registers
CAN_BTR1 and CAN_BTR2 is only possible while the device is in Initialization mode.
Figure 153. Bit timing
with
where t
q
refers to the time quantum, t
sys
is the system clock period (f
MASTER
). BRP[5:0],
BS1[3:0], and BS2[2:0] are defined in the CAN_BTR1 and CAN_BTR2 registers.
SYNC_SEG BIT SEGMENT 1 (BS1) BIT SEGMENT 2 (BS2)
NOMINAL BIT TIME
1 x t
q
t
BS1
t
BS2
SAMPLE POINT TRANSMIT POINT
(1 .. 16 x t
q
) (1 .. 8 x t
q
)
(min. 5 x t
q
)
BaudRate
1
NominalBitTime
----------------------------------------------=
NominalBitTime t
q
t
BS1
t
BS2
++=
t
BS1
BS1[3:0] 1+()t
q
×=
t
BS2
BS2[2:0] 1+()t
q
×=
t
q
BRP[5:0] 1+()t
sys
×=

Table of Contents

Other manuals for ST STM8S

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM8S and is the answer not in the manual?

ST STM8S Specifications

General IconGeneral
BrandST
ModelSTM8S
CategoryMicrocontrollers
LanguageEnglish

Related product manuals