AnsweredAssumed Answered

MPC5602B Data Flash programming with CodeWarrior

Question asked by Serge Avitor on Mar 24, 2019
Latest reply on Mar 27, 2019 by Martin Kovar

Hello Everyone,

I'm trying to store my .bin file into DataFlash section of MPC5602B (Addr : 0x00800000) with CodeWarrior Development Studio v.11.1 and OSJTAG device. I've make a new Target Task:

 

I erased and successfully checked for blank flashing region. But writing is programmed only 8 first bytes with the next error:

Full log of all operations is below:

 

fl::target -lc "DATA_FLASH_OSJTAG"
fl::target -b 0x40000000 0x3000
fl::target -v off -l off
cmdwin::fl::device -d "MPC5602B_DATA_FLASH" -o "64Kx32x1" -a 0x800000 0x80ffff
cmdwin::fl::erase all
 Beginning Operation ...    
-------------------------
Chip erase not supported. Erasing sector by sector.   
Performing target initialization ...    
reading SSCM.STATUS ...
processor in single chip mode.
searching for boot sectors ...
found boot sector at 0x0 and entry point at 0x1558.
 Downloading Flash Device Driver ...   
 Reading flash ID ...
Erasing Sector 0x00800000 to 0x00803FFF   
Erasing Sector 0x00804000 to 0x00807FFF   
Erasing Sector 0x00808000 to 0x0080BFFF   
Erasing Sector 0x0080C000 to 0x0080FFFF   
 Erasing ...
 Erase Command Succeeded    
cmdwin::fl::blankcheck all
 Beginning Operation ...    
-------------------------
 Downloading Flash Utility Driver ...   
Performing Blank Check from 0x00800000 to 0x0080FFFF ...    
 Blank Checking ...
 Blank Check Succeeded    
Blank Check Completed Successfully   
cmdwin::fl::image -f "C:\\DataFlash5602.bin" -t "Binary/Raw Format" -re off -oe on -o 0x800000
cmdwin::fl::write
-------------------------
Programming file C:\DataFlash5602.bin   
 Downloading Flash Device Driver ...   
 Reading flash ID ...
Downloading 0x00001678 bytes to be programmed at 0x00800000   
Executing program ....   
Error:  Program failed.   Flash driver reports the following error(s):  Chip reported error during program. Please check that the sector you are programming is erased.

 

I've tried to program file with all 0xFF - writing finished without any problem. It seems like after programming 8 bytes system is checking again writing region for blank.

 

How to resolve this problem?

Outcomes