5 can data buffers, 7 can timer – Rainbow Electronics ATmega64M1 User Manual
Page 177
177
8209A–AVR–08/09
ATmega16M1/32M1/64M1
20.6.4
MOb Page
Every MOb is mapped into a page to save place. The page number is the MOb number. This
page number is set in CANPAGE register. The other numbers are reserved for factory tests.
CANHPMOB register gives the MOb having the highest priority in CANSIT registers. It is format-
ted to provide a direct entry for CANPAGE register. Because CANHPMOB codes CANSIT
registers, it will be only updated if the corresponding enable bits (ENRX, ENTX, ENERR) are
enabled (c.f.
20.6.5
CAN Data Buffers
To preserve register allocation, the CAN data buffer is seen such as a FIFO (with address
pointer accessible) into a MOb selection.This also allows to reduce the risks of un-controlled
accesses.
There is one FIFO per MOb. This FIFO is accessed into a MOb page thanks to the CAN mes-
sage register.
The data index (INDX) is the address pointer to the required data byte. The data byte can be
read or write. The data index is automatically incremented after every access if the AINC* bit is
reset. A roll-over is implemented, after data index=7 it is data index=0.
The first byte of a CAN frame is stored at the data index=0, the second one at the data index=1,
...
20.7
CAN Timer
A programmable 16-bit timer is used for message stamping and time trigger communication
(TTC).
Figure 20-11. CAN Timer Block Diagram
clk
IO
clk
CANTIM
CANTIM
CANTTC
CANSTM[i]
CANTCON
TTC
SYNCTTC
"EOF
"
"SOF
"
OVRTIM
TXOK[i]
RXOK[i]
overrun
ENFG
8