AnsweredAssumed Answered

Problems with 'Erase Whole Device'

Question asked by tom vogel on May 15, 2014
Latest reply on May 19, 2014 by Adrian Stoica

I am using CodeWarrior V10.3 with a board of our own design (called UBER).

This board is based on the P1020RDB development board..has a P1020 processor with NOR flash.

The flash is a Spansion S29GL512S (64 MByte) .

 

I have not been able to successfully "Erase Whole Device" from the Simple Flash Utility.

 

I have created a Flash device xml configuration file "UBER_NOR-FLASH.xml" in Support/TargetTask/Flash_Programmer/QorIQ_P1.

<?xml version="1.0" encoding="UTF-8"?>

<TargetTaskFramework GroupFullPath="Root">

<Element Type="TargetTask">

<TargetTask ContextIndex="1" ExecutionContextName="Active Debug Context" ProviderIndex="1" TaskName="UBER_NOR_FLASH.xml" TaskProvider="Flash Programmer">

<TaskConfiguration Actions_Count="0" Buffer_Address="8192" Buffer_Size="196608" Flash_Base_Address_0="4227858432" Flash_Device_Name_0="S29GL512P" Flash_Device_Organization_0="32Mx16x1" Flash_Devices_Count="1" Flash_Top_Address_0="4294967295" Verify_Memory_Writes="false"/>

</TargetTask>

</Element>

</TargetTaskFramework>

 

I am able to successfully program Uboot to the flash in the last 4 sectors. The output from console when flashing uboot:

fl::target -lc "LC for Simple Flash (3)"
fl::target -b 0x2000 0x30000
fl::target -v off -l off
cmdwin::fl::device -d "S29GL512P" -o "32Mx16x1" -a 0xfc000000 0xffffffff
cmdwin::fl::protect all off
Beginning Operation ...   
-------------------------
Performing target initialization ...   
Downloading Flash Diagnostics Driver ...  
Reading flash ID ...
Unprotecting all sectors...  
Unprotecting ...  
Unprotect Command Succeeded   
cmdwin::fl::image -f "/home/vogel/QorIQ-SDK-V1.4-20130625-yocto/uboot/u-boot.bin" -t "Auto Detect" -re on -r 0xfc000000 0xffffffff -oe on -o 0xfff80000
cmdwin::fl::erase image
-------------------------
Auto-detection is successful.  
  File is of type Binary/Raw Format.  

Downloading Flash Device Driver ...  
Reading flash ID ...
Erasing Sector 0xFFF80000 to 0xFFF9FFFF  
Erasing Sector 0xFFFA0000 to 0xFFFBFFFF  
Erasing Sector 0xFFFC0000 to 0xFFFDFFFF  
Erasing Sector 0xFFFE0000 to 0xFFFFFFFF  
Erasing ....
Erase Command Succeeded   
cmdwin::fl::write
Beginning Operation ...   
-------------------------
Using restricted address range 0xFC000000 to 0xFFFFFFFF  
Programming file /home/vogel/QorIQ-SDK-V1.4-20130625-yocto/uboot/u-boot.bin  
Auto-detection is successful.  
  File is of type Binary/Raw Format.  

Downloading Flash Device Driver ...  
Reading flash ID ...
Auto-detection is successful.  
  File is of type Binary/Raw Format.  

Downloading 0x00010000 bytes to be programmed at 0xFFF80000  
Downloading 0x00010000 bytes to be programmed at 0xFFF90000  
Executing program ....  
Program Command Succeeded   
Downloading 0x00010000 bytes to be programmed at 0xFFFA0000  
Downloading 0x00010000 bytes to be programmed at 0xFFFB0000  
Executing program ....  
Program Command Succeeded   
Downloading 0x00010000 bytes to be programmed at 0xFFFC0000  
Downloading 0x00010000 bytes to be programmed at 0xFFFD0000  
Executing program ....  
Program Command Succeeded   
Downloading 0x00010000 bytes to be programmed at 0xFFFE0000  
Downloading 0x00010000 bytes to be programmed at 0xFFFF0000  
Executing program ....  
Program Command Succeeded

 

When I select 'Erase Whole Device' from the Simple Flash Programmer, I get this:

fl::target -lc "LC for Simple Flash (3)"
fl::target -b 0x2000 0x30000
fl::target -v off -l off
cmdwin::fl::device -d "S29GL512P" -o "32Mx16x1" -a 0xfc000000 0xffffffff
cmdwin::fl::erase all
Beginning Operation ...   
-------------------------
Performing target initialization ...   
Downloading Flash Device Driver ...  
Reading flash ID ...
Erasing entire flash ...   
Erasing ...
Erase Command Succeeded   
cmdwin::fl::blankcheck all
Beginning Operation ...   
-------------------------
Downloading Flash Utility Driver ...  
Performing Blank Check from 0xFC000000 to 0xFFFFFFFF ...   
Blank Checking ...
Error:  Blank Check failed.
Could not restore context from exception
[CCS last error: Invalid handle ](CCSProtocolPlugin)
Error: Blank Check failed.

 

 

The "Erase Command Succeeded" response comes back immediately. The flash is not erased as Uboot is still present after I reboot.
I have checked the chip erase command sequence for S29GL512P vs S29GL512S and they appear to be the same.

There are some differences with regards to how the status of the chip erase is determined:

     S29GL512P -> The system can determine the status by using DQ7 or DQ6/DQ2 (Data Polling).

     S29GL512S -> The system can determine the status by using RY/BY#, the Status Register or using Data Polling.



Outcomes