AnsweredAssumed Answered

FlashProgrammer fails 0x2010 bytes into a 0x4020 byte program on MPC5604B

Question asked by Jonah Ryan-Davis on Sep 21, 2017
Latest reply on Sep 26, 2017 by Jonah Ryan-Davis

I'm having trouble flashing the MPC5604B.

I tried this on two different chips with the same results.

It also doesn't seem to matter which location in memory is being flashed, it just fails after the Flash Programmer script tries to program 0x4020 bytes.

 

I tested this by creating a new MPC5604B project and using the default connection for flashing.

 

Here's the Flash Programmer output:

 

fl::target -lc "LC for Simple Flash (8)"
fl::target -b 0x40000000 0xa000
fl::target -v off -l off
cmdwin::fl::device -d "MPC5604B_CODE_FLASH" -o "512Kx32x1" -a 0x0 0x7ffff
cmdwin::fl::image -f "C:\\git\\firmware\\build\\BOOT_MPC5604B\\BOOT_MPC5604B_FLASH.mot" -t "Auto Detect" -re on -r 0x0 0x7ffff -oe off
cmdwin::fl::erase image
Beginning Operation ...
-------------------------
Auto-detection is successful.
File is of type Motorola S-Record Format.

Performing target initialization ...
reading SSCM.STATUS ...
processor in single chip mode.
searching for boot sectors ...
found boot sector at 0x0 and entry point at 0xd0.
Downloading Flash Device Driver ...
Reading flash ID ...
Erasing Sector 0x00000000 to 0x00007FFF
Erasing Sector 0x00008000 to 0x0000BFFF
Erasing Sector 0x00010000 to 0x00017FFF
Erasing ...
Erase Command Succeeded
cmdwin::fl::write
Beginning Operation ...
-------------------------
Using restricted address range 0x00000000 to 0x0007FFFF
Programming file C:\git\firmware\build\BOOT_MPC5604B\BOOT_MPC5604B_FLASH.mot
Auto-detection is successful.
File is of type Motorola S-Record Format.

Downloading Flash Device Driver ...
Reading flash ID ...
Auto-detection is successful.
File is of type Motorola S-Record Format.

Downloading 0x00000008 bytes to be programmed at 0x00000000
Executing program ....
Program Command Succeeded
Downloading 0x000000B8 bytes to be programmed at 0x00000010
Executing program ....
Program Command Succeeded
Downloading 0x00000080 bytes to be programmed at 0x000000D0
Executing program ....
Program Command Succeeded
Downloading 0x00000194 bytes to be programmed at 0x00000150
Executing program ....
Program Command Succeeded
Downloading 0x000000F4 bytes to be programmed at 0x00001000
Executing program ....
Program Command Succeeded
Downloading 0x000000A8 bytes to be programmed at 0x00001100
Executing program ....
Program Command Succeeded
Downloading 0x00004020 bytes to be programmed at 0x00003000
Executing program ....
Executing program .....
Executing program ......
Executing program .......
Executing program ........
Executing program .........
Executing program ..........
Executing program ...........

It just keeps doing that

 

If I check the memory of the device, I can see it programmed up until 0x00005010, exactly half of the record it was trying to program.

 

Where is this script stored and how can I modify the behavior of Flash Programmer to get this working?

Outcomes