Hardware Reference
In-Depth Information
6
7
5
4
3
2
1
0
RXFRM
RXACT
CSWAI
SYNCH
TIME
WUPE
SLPRQ
INITRQ
Reset:
0
0
0
0
0
0
0
1
RXFRM: received frame flag
0 = no valid message was received.
1 = a valid message was received since last clearing of this flag.
RXACT: receiver active status
0 = MSCAN is transmitting or idle.
1 = MSCAN is receiving a message (including when arbitration is lost).
CSWAI: CAN stops in wait mode
0 = the module is not affected during wait mode.
1 = the module ceases to be clocked during wait mode.
SYNCH: synchronization status
0 = MSCAN is not synchronized to the CAN bus.
1 = MSCAN is synchronized to the CAN bus.
TIME: timer enable
0 = disable internal MSCAN timer.
1 = enable internal MSCAN timer and hence enable time stamp.
WUPE: wake-up enable
0 = wake-up disabled (MSCAN ignores traffic on CAN bus).
1 = wake-up enabled (MSCAN is able to restart).
SLPRQ: sleep mode request
0 = running—the MSCAN functions normally.
1 = sleep mode request—the MSCAN enters sleep mode when CAN is idle.
INITRQ: initialization mode request
0 = normal operation.
1 = MSCAN in initialization mode.
Figure 13.17 MSCAN control register 0 (CAN x CTL0, x 5 0, 1, 2, 3, or 4)
To make sure that the CAN protocol is not violated, the MSCAN can only be configured
when the MSCAN is in the initialization mode. The initialization mode is entered by setting the
INITRQ bit. The registers CAN x CTL1, CAN x BTR0, CAN x BTR1, CAN x IDAC, CAN x IDAR0,7,
CAN x IDMR0,7 can only be written by the CPU when the MSCAN is in the initialization mode.
When the INITRQ bit is cleared by the CPU, the MSCAN restarts and then tries to synchronize
to the CAN bus.
MSCAN C ONTROL R EGISTER 1 (CAN X CTL1)
This register provides for various control and handshake status information of the MSCAN
module. The contents of this register are shown in Figure 13.18. The MSCAN module must be
enabled before it can operate. Setting the CANE bit enables the MSCAN module. The clock
source of the CAN module can be either the E-clock or the oscillator clock. When the CAN bus
is operating at a high data rate and the E-clock is generated by the PLL circuit, the user should
select the oscillator clock as the clock source because the PLL circuit has jitter.
The loopback mode can be used to test the software. The loopback mode is entered by set-
ting the LOOPB bit. The MSCAN module can be placed in the listen-only mode to monitor
the CAN bus traffic without participating in the CAN data exchange. The listen-only mode
 
Search WWH ::




Custom Search