Boot Assist Module (BAM)
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor 175
START_ADDRESS defines where the received data will be stored and where the MCU will branch after
the download is finished. The two LSB bits of START_ADDRESS are ignored by the BAM program, such
that the loaded code should be 32-bit word aligned.
CODE_LENGTH defines how many data bytes have to be loaded.
Figure 6-6. Start address, VLE bit, and download size in bytes
6.5.4.7 Download data
Each byte of data received is stored into the device’s SRAM, starting from the address specified in the
previous protocol step.
The address increments until the number of bytes of data received matches the number of bytes specified
in the previous protocol step.
Since the SRAM is protected by a 32-bit wide Error Correction Code (ECC), BAM always writes bytes
into SRAM grouped into 32-bit words. If the last byte received does not fall onto a 32-bit boundary, BAM
fills it with 0 bytes.
Then a dummy word (0x0000_0000) is written to avoid ECC error during core prefetch.
6.5.4.8 Execute code
The BAM program waits for the last echo message transmission to complete.
Then it restores the initial MCU configuration and jumps to the loaded code at the start address received
in step 2 of the protocol.
At this point, the BAM has finished its tasks and the MCU is controlled by new code executing from
SRAM.
START_ADDRESS[31:16]
START_ADDRESS[15:0]
VLE CODE_LENGTH[30:16]
CODE_LENGTH[15:0]