
XC2200 Derivatives
System Units (Vol. 1 of 2)
Startup Configuration and Bootstrap Loading
User’s Manual
10-26
V2.1, 2008-08
SCFG/BSL, V1.3
10.6.4
CAN Bootstrap Loader
The CAN bootstrap loader transfers program code/data via node 0 of the MultiCAN
module into the PSRAM. Data is transferred from the external host to the XC2200 using
eight-byte data frames. The number of data frames to be received is programmable and
determined by the 16-bit data message count value DMSGC.
The communication between XC2200 and external host is based on the following three
CAN standard frames:
•
Initialization frame - sent by the external host to the XC2200
•
Acknowledge frame - sent by the XC2200 to the external host
•
Data frame(s) - sent by the external host to the XC2200
The initialization frame is used in the XC2200 for baud rate detection. After a successful
baud rate detection is reported to the external host by sending the acknowledge frame,
data is transmitted using data frames.
shows the parameters and settings
for the three utilized CAN standard frames.
Note: The CAN bootstrap loader requires a point-to-point connection with the host, i.e.
the XC2200 must be the only CAN node connected to the network. A crystal with
at least 4 MHz is required for CAN bootstrap loader operation.
Initialization Phase
The first BSL task is to determine the CAN baud rate at which the external host is
communicating. Therefore the external host must send initialization frames continuously
to the XC2200. The first two data bytes of the initialization frame must include a 2-byte
baud rate detection pattern (5555
H
), an 11-bit (sent in 2 bytes) identifier ACKID
1)
for the
acknowledge frame, a 16-bit data message count value DMSGC, and an 11-bit (2-byte)
identifier DMSGID
to be used by the data frame(s).
The CAN baud rate is determined by analyzing the received baud rate detection pattern
(5555
H
) and the baud rate registers of the MultiCAN module are set accordingly. The
XC2200 is now ready to receive CAN frames with the baud rate of the external host.
Acknowledge Phase
In the acknowledge phase, the bootstrap loader waits until it receives the next correctly
recognized initialization frame from the external host, and acknowledges this frame by
generating a dominant bit in its ACK slot. Afterwards, the bootstrap loader transmits an
acknowledge frame back to the external host, indicating that it is now ready to receive
data frames. The acknowledge frame uses the message identifier ACKID that has been
received with the initialization frame.
1) The CAN bootstrap loader copies the two identifier bytes received in the initialization frame directly to register
MOAR. Therefore, the respective fields in the initialization frame must contain the intended identifier padded
with two dummy bits at the lower end and extended with bitfields IDE (=0
B
) and PRI (=01
B
) at the upper end.