English
Language : 

PXD20RM Datasheet, PDF (183/1628 Pages) Freescale Semiconductor, Inc – PXD20 Microcontroller
Then, the initial device configuration is restored and the code jumps to the address of downloaded code.
At this point BAM has finished its task.
If there is any error (that is, communication error, wrong boot selected, etc.), BAM restores the default
configuration and puts the device into static mode. Static mode means the device enters the low power
mode SAFE and the processor executes a wait instruction. It is needed if the device cannot boot in the
mode which was selected. During BAM execution and after, the mode reported by the field
S_CURRENT_MODE of the register ME_GS in the module MC_ME Module is "DRUN".
6.5.4.3 BAM resources
BAM uses/initializes the following MCU resources:
• MC_ME and MC_CGM to initialize mode and clock sources
• FlexCAN 0, LINFlex 0 and their pads when performing serial boot mode
• SSCM to check the boot mode and during password check (see Table 6-4 and Figure 6-5)
• External oscillator
• SWT (the BAM disables it)
As already mentioned, the initial configuration is restored before executing the downloaded code.
6.5.4.4 Download and execute the new code
From high level perspective, the download protocol follows steps:
1. Send 64 bit password
2. Send start address, size of downloaded code in bytes and VLE bit
3. Download data
4. Execute code from start address.
Each step must be complete before the next step starts.
The communication is done in half duplex manner, any transmission from host is followed by the MCU
transmission:
• host sends data to MCU and start waiting
• MCU echoes to host the data received
• MCU verifies if echoes is correct
— if data is correct host can continue to send data
— if data is not correct host stops to transmit and MCU need to be reset.
All multi-byte data structures are sent with MSB first.
A more detailed description of these steps follows.
PXD20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor
6-7
Preliminary—Subject to Change Without Notice