5 canstml and canstmh – can time stamp registers, 6 canmsg – can data message register, 12 examples of can baud rate setting – Rainbow Electronics ATmega64M1 User Manual
Page 197
197
8209A–AVR–08/09
ATmega16M1/32M1/64M1
• Bit 2 – RTRMSK: Remote Transmission Request Mask
– 0 - comparison true forced
– 1 - bit comparison enabled.
• Bit 1 – Reserved Bit
Writing zero in this bit is recommended.
• Bit 0 – IDEMSK: Identifier Extension Mask
– 0 - comparison true forced
– 1 - bit comparison enabled.
20.11.5
CANSTML and CANSTMH – CAN Time Stamp Registers
• Bits 15:0 - TIMSTM[15:0]: Time Stamp Count
CAN time stamp counter range 0 to 65,535.
20.11.6
CANMSG – CAN Data Message Register
• Bit 7:0 – MSG[7:0]: Message Data
This register contains the CAN data byte pointed at the page MOb register.
After writing in the page MOb register, this byte is equal to the specified message location of the
pre-defined identifier + index. If auto-incrementation is used, at the end of the data register writ-
ing or reading cycle, the index is auto-incremented.
The range of the counting is 8 with no end of loop (0, 1,..., 7, 0,...).
20.12 Examples of CAN Baud Rate Setting
The CAN bus requires very accurate timing especially for high baud rates. It is recommended to
use only an external crystal for CAN operations.
for timing description and
for “CAN Bit Timing Registers”).
Bit
7
6
5
4
3
2
1
0
TIMSTM7
TIMSTM6
TIMSTM5
TIMSTM4
TIMSTM3
TIMSTM2
TIMSTM1
TIMSTM0
CANSTML
TIMSTM15 TIMSTM14 TIMSTM13 TIMSTM12 TIMSTM11 TIMSTM10
TIMSTM9
TIMSTM8
CANSTMH
Bit
15
14
13
12
11
10
9
8
Read/Write
R
R
R
R
R
R
R
R
Initial Value
-
-
-
-
-
-
-
-
Bit
7
6
5
4
3
2
1
0
MSG 7
MSG 6
MSG 5
MSG 4
MSG 3
MSG 2
MSG 1
MSG 0
CANMSG
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
-
-
-
-
-
-
-
-