Chapter 33 Boot Assist Module (BAM)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
825
33.5.5.4
Download and execute the new code
From a high level perspective, the download protocol follows these steps:
1. Send message and receive acknowledge message for autobaud or autobit rate selection. (optional
step).
2. Send 64-bit password.
3. Send start address, size of downloaded code in bytes, and VLE bit
1
.
4. Download data.
5. Execute code from start address.
Each step must be complete before the next step starts.
The step from 2 to 5 are correct if autobaud is disabled. Otherwise, to measure the baud rate, some data is
sent from the host to the MCU before step 2 (see
Section 33.6.1, “Autobaud feature
).
The communication is done in half duplex manner. Any transmission from the host is followed by the
MCU transmission:
1. Host sends data to MCU and start waiting.
2. MCU echoes to host the data received.
3. MCU verifies if echo is correct.
— If data is correct, the host can continue to send data.
— If data is not correct, the host stops transmitting and the MCU needs to be reset.
All multi-byte data structures are sent MSB first.
A more detailed description of these steps follows.
33.5.5.5
Download 64-bit password and password check
The first 64 received bits represent the password. This password is sent to the Password Check procedure
for verification.
Password check data flow is shown in
•
SSCM_STATUS[SEC] = 1 means flash secured
•
SSCM_STATUS[PUB] = 1 means flash with public access.
16
19200
400 K
20
24000
500 K
40
48000
1 M
1. Since the device supports only VLE code and does not support Book E code, this flag is used only for backward compatibility.
Table 33-7. Serial boot mode without autobaud—baud rates
Crystal frequency
(MHz)
LINFlex baud rate
(baud)
FlexCAN bit rate
(bit/s)