STMicroelectronics SPC572L series Reference Manual page 1554

Table of Contents

Advertisement

Boot Assist Flash (BAF)
1.
8 bytes that represent the password.
2.
4 bytes that represent the start address where the code is to be downloaded.
3.
4 bytes that represent the number of bytes to be downloaded, NO_ECHO bit and the
VLE bit.
4.
x bytes of code that is downloaded to SRAM and executed (x must match the value
specified in step 3).
52.2.5.3
MCAN download protocol
The MCAN download protocol uses very similar structure to the LINFlexD protocol, but it
makes use of the message ID's provided by CAN.
The tool sends data packed into standard CAN message in the following manner:
1.
A message with 11h as the ID and an 8-byte length to send the password. The MCU
transmits the same message, but with an ID of 1h.
2.
A message with 12h as the ID and and 8-byte length to send the start address, size of
the code and VLE mode bit.The MCU transmits back the same data but with an ID of
2h.
3.
A message with 13h as the ID is used to send data that is to be downloaded to SRAM.
The MCU transmit the same data with an ID of 3h.
52.2.5.4
Download 64-bit password and password check
The first 64 bits received represent the password. The MCU only supports public
passwords. The received password is always compared with the public password
FEED_FACE_CAFE_BEEFh.
If the correct password is received, BAF continues its task.
If an incorrect password is supplied, BAF puts the device into static mode(low power
safe mode).
If 64 bits of password data is not received after approximately 30s, BAF causes a
destructive reset of the MCU.
52.2.5.5
Download start address, VLE bit, NO_ECHO bit and code size
After the password, the next 8 bytes received by the MCU contains a 32-bit start address,
the VLE mode bits, NO_ECHO bit and 30-bit code length as shown in
Figure 925
The VLE bit (Variable Length Encoding) is used to indicate for which instruction set the
downloaded code is compiled. The UART serial boot protocol supports download of VLE
Code (VLE = 1) and Book E Code (VLE = 0).
The MCU only supports VLE code. If the BAF detects that the host is sending Book E code,
the BAF puts the device into static mode.
The NO_ECHO bit is used to indicate if download data should be echoed by the MCU. If the
NO_ECHO bit is set (for example, NO_ECHO = 1), then only 8 bytes of password, 4 bytes
of download address, and 4 bytes of download size are echoed, but download data is not
echoed. If the NO_ECHO bit is clear, then every byte sent to the MCU must be echoed.
The start address defines where the received data is stored and where the MCU branches
after the download is finished. The three LSB bits of the start address are ignored by BAF,
such that the load address is 64-bit double-word aligned.
1554/2058
DocID027809 Rev 4
RM0400
Figure 924
and

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SPC572L series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents