I'm still having issues getting serial boot mode to work on a MPC5605B device. When I write a very small piece of code, the RAppID BL Tool works fine, but anything over about 10K of code causes the boot loader to hang and time out before booting finishes. I thought I'd just write my own bootloader, but I seem to be missing some information. The protocol described in the RM doesn't match what is displayed in RAppID BL Tool's trace window.
Table 5-8. UART boot mode download protocol
Protocol
step Host sent message BAM response message Action
1 64-bit password(MSB first) 64-bit password Password checked for validity and compared against
stored password.
2 32-bit store address 32-bit store address Load address is stored for future use.
3 VLE bit + 31-bit number of bytes(MSB first)
VLE bit + 31-bit number of bytes (MSB first)
Size of download are stored for future use.
Verify if VLE bit is set to 1
4 8 bits of raw binary data 8 bits of raw binary data 8-bit data are packed into a 32-bit word. This word is
saved into SRAM starting from the “Load address”.
“Load address” increments until the number of data
received and stored matches the size as specified in the
previous step.
5 None None Branch to downloaded code
RAppID BL doesn't have an option to simply program SRAM. Erase and Program is the only option for loading code into the processor. Skipping past the section that's doing "BTL" (by the way - what's BTL?) the trace window has the following:
TX: 01 00 00 00 aa aa aa aa
RX: ff 00 00 fe 00 00 00 00 Init
TX: 02 01 00 00 40 00 01 00
RX: ff 00 01 fe 00 00 00 00 Erasing
TX: 10 02 00 00 02 e0 aa aa
RX: ff 00 02 fe 00 00 00 00 Erasing
TX: 22 03 02 36 02 47 02 58
^ My code starts here and continues on the subsequent lines
RX: ff 00 03 00 40 00 01 0C
What are the first two bytes that are transmitted and returned?
Why aren't the received bytes the same as what was transmitted?
When my bootloader executes, the data goes across and is reflected back, but it doesn't branch to the start address once the last data byte has been transmitted.
Is there a document that describes the RAppID BL tool Trace window format and what the extra bytes transmitted are about? Or is more information available than what is in the reference manual about serial boot mode?
thanks,
ken