Sector Protection Error when program flash on t4240qds

cancel
Showing results for 
Search instead for 
Did you mean: 

Sector Protection Error when program flash on t4240qds

1,727 Views
Contributor I

Hi,

   I tried to program nor flash on a t4240qds bareboard via CodeWarrior TAP, but got following error.

   I added an unprotect , an erase  and a program action. I'm sure the qds board is good.

fl::target -lc "test_RAM_T4240_Download"

fl::target -b 0x0 0x180000

fl::target -v off -l off

cmdwin::fl::device -d "S29GL01GP" -o "64Mx16x1" -a 0xe8000000 0xefffffff

cmdwin::fl::protect all off

Beginning Operation ...   

-------------------------

Performing target initialization ...   

Downloading Flash Diagnostics Driver ...  

Reading flash ID ...

Unprotecting all sectors...  

Unprotecting ...  

Unprotecting ....  

Unprotecting .....  

Unprotecting ......  

Unprotect Command Succeeded   

cmdwin::fl::device -d "S29GL01GP" -o "64Mx16x1" -a 0xe8000000 0xefffffff

cmdwin::fl::device -sd all

cmdwin::fl::device -se 0

cmdwin::fl::erase list

-------------------------

Downloading Flash Device Driver ...  

Reading flash ID ...

Erasing Sector 0xE8000000 to 0xE801FFFF  

Erasing ...

Error:  Erase failed.   Flash driver reports the following error(s):  Sector Protection Error

Error: Erase failed. Flash driver reports the following error(s):  Sector Protection Error

Any help will be appreciated.

   Regards,

     weiqiang

0 Kudos
7 Replies

19 Views
Contributor I

I have the same problem. How can i solve it? I can erase flash, but i cant write data.

pastedImage_2.png

0 Kudos

19 Views
Contributor II

hello, do you solved this problem?  what reason causes this error?

0 Kudos

19 Views
NXP Employee
NXP Employee

Instead of adding Erase action for sector, you must use Program Action with Erase sectors before program.

Adrian

0 Kudos

19 Views
Contributor I

Hi Adrian,

  Thank you for your patience to answer.

   I also tried the way which you metioned above, but still show me Sector Protection Error.This is very confusing. Is there any other helpful tips I missed?

sectorerror.png

        Thanks,

    Weiqiang

0 Kudos

19 Views
NXP Employee
NXP Employee

Did you check 'Restricted Addresses in this Range' option? Also, make sure you use the init when connecting to board.

Adrian

0 Kudos

19 Views
Contributor I

Yes, I checked this option.

range.png

0 Kudos

19 Views
NXP Employee
NXP Employee

This option will restrict actions on that memory zone. You don't have to use this option, just use Erase before programming and eventually the Address Offset.

Adrian

0 Kudos