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 loading 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.
From the Reference Manual:
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
The first two bytes transmitted appear to be some sort of header as the second byte increments with each message. What are the first two bytes that are transmitted? and what is returned isn't exactly what was transmitted.
While the code for this small test program blinks an led on the evaluation board, as expected, the data transmitted, as shown in the RAppID BL trace window does not include all the zeros I added to make the code contiguous. I don't really understand that either.
When my simple program executes, it transmits the data as described in the reference manual, and 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? i have and have read the manual embedded in RAppID BL tool. I'd be happy to use the RAppID tool if it didn't crash (always with a timeout error message) before it finishes loading.
Here are my questions:
1. Why does RAppID BL crash before uploading my larger files?
2. Why does the data RAppID BL transmits to the evaluation board differ from what is described in the MPC5605B Reference manual?
3. Why does my small program that loads memory (SRAM) not jump to the start address when upload is complete? (The program runs fine when uploaded with RAppID BL or using the JTAG port.)
3. a. The data below is where the RAppID BL transitions from "BTL" to "App". Is there a document that describes what's going on here? I don't know what BTL is and there is apparently an Initiation process and an Erasing process that happens before the application begins to load. I'd like to understand what is happening here