MPC5602B Data Flash programming with CodeWarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5602B Data Flash programming with CodeWarrior

721 Views
mefagon
Contributor I

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:2.jpg

 1.jpg

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

3.jpg

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?

0 Kudos
1 Reply

561 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

some time ago, I created tutorial, how to program QSPI Flash. From my point of view, there are the same steps for data flash, only different algorithm must be used.

Please see the link below:

How to program QSPI flash using CodeWarrior 10.x 

Instead of qspi algorithm, use dflash. Please see the figure below:

pastedImage_2.png

Please let me know, if it works on your side.

Regards,

Martin

0 Kudos