Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
565
/
631
store the 16-bit timestamp.The software can access the output mailbox of the receiving FIFO to read the received
message. Once the software has processed the message, such as reading it out, the software should set the
CAN_RFFx.RFFOM bit to release the corresponding receive FIFO, so as to reserve storage space for later messages.
Table 25-3 Receive mailbox register list
Offset from the base address of the receiving mailbox
Register name
0
CAN_RMIx
4
CAN_RMDTx
8
CAN_RMDLx
12
CAN_RMDHx
Bit time characteristic
The bit time characteristic logic monitors the serial CAN bus by sampling, and adjusts its sampling point by
synchronizing with the edge of the frame start bit and resynchronizing with the following edge. To avoid
programming errors in software, setting the bit time characteristic register (CAN_BTIM) can only be done when
CAN is initialized.
Its operation can be simply understood as dividing each bit time into three segments:
Synchronization segment
(SYNC_SEG), Time period 1(BS1) and Time period 2(BS2).
Usually, it is expected that the change of bits will occur in SYNC_SEG. Its value is fixed to 1 time unit (1 × t
CAN
).
BS1 defines the position of the sampling point. It includes PROP_SEG and PHASE_SEG1 in CAN standard. Its
value can be programmed into 1 to 16 time units, but in order to compensate the forward drift of phase caused by the
frequency difference of different nodes in the network, it can also be automatically extended.
In BS2, it defines the location of the sending point. It stands for PHASE_SEG2 in CAN standard. Its value can be
programmed into 1 to 8 time units, but it can also be automatically shortened to compensate for the negative drift of
phase.
If a valid transition is detected in BS1 but not in SYNC_SEG, then the time of BS1 is extended by at most RSJW to
delay the sampling point. On the contrary, if a valid transition is detected in BS2 but not in SYNC_SEG, then the
time of BS2 is shortened at most RSJW to advance the sampling point.
In the above description, RSJW(the resynchronization hop width) defines the upper limit of how many time units can
be extended or shortened in each bit. Its value can be programmed into 1 to 4 time units. The effective transition is
defined as the first transition from the dominant bit to the recessive bit when CAN itself does not send the recessive
bit.
Note: 1. The time characteristics and resynchronization mechanism of CAN bits are detailed in the ISO11898
standard.
2. In order to improve the CAN bit time accuracy, it is not recommended to use HSI as the clock source.