Hardware Reference
In-Depth Information
13.9 MSCAN Module Memory Map
An HCS12 member may have up to five CAN modules and each CAN module occupies
64 bytes of memory space. The MSCAN register organization is shown in Figure 13.15. The
detailed MSCAN register memory map is shown in Figure 13.16.
Address
offset
$_00
Control registers
12 bytes
$_0B
$_0C
$_0D
$_0E
Reserved (2 bytes)
Error counters
2 bytes
$_0F
$_10
Identifier filter
16 bytes
$_1F
$_20
Receive buffer
16 bytes (window)
$_2F
$_30
Transmit buffer
16 bytes (window)
$_3F
Figure 13.15 MSCAN register organization
Each receive buffer and each transmit buffer occupies 16 bytes of space. Even though each
MSCAN module has three transmit buffers, only one of them is accessible to the programmer
at a time. Similarly, only one of the five receive buffers is accessible to the programmer at a
time. Only the offset of each register relative to the start of MSCAN register block is shown
in Figure 13.16. The address of each register is the sum of the offset and the base address of the
MSCAN register block.
13.9.1 MSCAN Control Registers
The function of each MSCAN control register is explained in this section. Since the HCS12
may have up to five identical CAN modules having the same set of control registers, Freescale
names each CAN register as CAN xYYYY , where x indicates the CAN module and YYYY speci-
fies the register.
MSCAN C ONTROL R EGISTER 0 (CAN X CTL0)
The contents of this register are shown in Figure 13.17. The RXFRM bit is set whenever a
valid frame is received by the MSCAN module. This flag bit can be cleared by writing a 1 to it.
The RXACT flag is a read-only flag and indicates whether the MSCAN is receiving a message.
Setting the CSWAI bit will disable all clock signals to the MSCAN during the wait mode and
further reduce power consumption.
 
Search WWH ::




Custom Search