Author Topic: Can't erase Security bits  (Read 14161 times)

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Can't erase Security bits
« on: December 10, 2007, 03:43:43 pm »
Hi friends! ;D

  I was happy with my project. It was running fine. But, I set the security bits (bit 0, bit 1 and bit 2) in many blocks and I can't erase ou programmer it again.
  I'm using lpc915.  I am using self made Hardware (like MCB900) in ICP mode. The bridge code is version 1.7 ,in a LPC921.

  The bridge works fine (I think). I read device signature, Blank check, etc. But, I can't to erase (global erase) in LPC915.
  In LPC936, I erase all memory (Global erase). It's work fine. But in LPC915, the FM show: Operation Failed.(erasing device).
  In command line, the problem is the same:

F:\>fm @lpc915teste.txt
Flash Magic Version 4.02.260
8051/XA Driver Version 2.41.258
ARM Driver Version 1.32.260
(C) Embedded Systems Academy 2000-2007 All rights reserved
NON PRODUCTION USE ONLY
Connected
Device selected
Manufacturer ID: 0x15
Device ID 1: 0xDD
Device ID 2: 0x17
Erase failed: invalid command - Operation Failed. (erasing device) (DEVICE)

The file is:

DEVICE(89LPC915,7.372)
READSIGNATURE
COM(2,19200) HARDWARE(KEILMCB900, 250, 300) ERASE(DEVICE, PROTECTISP)
ERASE(1, PROTECTISP)
ERASEUSED(Pul.hex, PROTECTISP)
HEXFILE(Pul.hex, NOCHECKSUMS, NOFILL, PROTECTISP)

  So, how can I erase the Security bits in LPC915?  :'(

   thank for help !
       Jorge

 

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #1 on: December 11, 2007, 08:25:44 am »
Can you erase blocks with no security bits set?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #2 on: December 11, 2007, 12:51:29 pm »
Hi Andy,

  Yes, before to set security bits, I could erase any block, but global erase never run in LPC915. To erase all blocks, I did select all blocks and run command erase in the FM.
I had set security bit 0 and bit 1. Then, when I wanted to program again, I select erase all blocks (not global erase), and the FM could do it without problems.

  Jorge

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #3 on: December 11, 2007, 01:01:05 pm »
To erase the security bits you probably need to erase the entire device (including the ISP bootloader) via ICP. Afterwards ISP won't work until you program back in the ISP bootloader. You can get the hex file from the resources section of this site. If you want to do this then read on...

Go to Options -> Advanced Options -> Security Tab
Uncheck "Protect ISP"
Click on OK.
In step 1 select an ICP interface from the interfaces drop down list
Go to ISP -> Erase and erase all the flash

Then go to ISP -> Read Security Bits... to confirm that they were erased.

*** turn Protect ISP back on before doing anything else ***

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #4 on: December 11, 2007, 02:03:15 pm »
Hi Andy, Thanks for reply,

  The LPC915 don't use ISP. Use only ICP mode.

In menu: Options -> Advanced Options -> Security Tab
Uncheck "Protect ISP" is not possible. This option is disable when I select LPC915.

I choose another mcu and do your recommendations. Protect ISP was Uncheck. Then I go back and select LPC915. The Protect ISP is unchecked.
I try global erase, but the problem is the same.

  I think that my bridge have some bug. I contacted local office, and They contacted Bauke, that wrote the bridge code. He commented a similar problem, but I don't  have more news about it.
 
  Jorge
 

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #5 on: December 17, 2007, 06:09:42 am »
Hi friends,

  I don't have idea about to resolve this problem. So, I will remove the mcu.

   Jorge

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #6 on: December 17, 2007, 07:42:10 am »
Bauke didn't get back to you?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #7 on: December 17, 2007, 09:45:28 am »
Hi Andy,

 No, who contact Bauke was local office. I don't know Bauke e-mail.

  Jorge

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Can't erase Security bits
« Reply #8 on: December 18, 2007, 12:26:50 am »
I am not sure if Bauke is till there?

Joe

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #9 on: December 19, 2007, 11:10:41 am »
I can confirm that Bauke left in October, so your local FAE probably sent him an email, but there won't be a reply.

Can you tell us what the following means exactly? Can you find out more details about this problem?

Quote
He commented a similar problem, but I don't  have more news about it

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #10 on: December 19, 2007, 12:54:30 pm »
Hi Andy,

  When I was developing my LPC900 programmer (one year ago), I had exactly this problem: I couldn't to erase the LPC915 memory flash using Global Erase. FM showed this message:Operation Failed. (erase device).

  I reported this problem to local office from Philips and they contacted Bauke. They told me that Bauke commented a similar problem with the LPC, but I have no more details about it.
  I think that similar problem with FM means trying the command global erase in a LPC900 and this command failure.

   I didn't take care about it a one year ago. But, this problem happen again in this project.


    Jorge

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #11 on: December 19, 2007, 12:56:41 pm »
What version of the NXP bridge code are you using? Is it modified?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #12 on: December 19, 2007, 01:22:26 pm »
Hi Andy,

The bridge code version is 1.7(I think). I modified this code to use in LPC921 as bridge.

  Jorge

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't erase Security bits
« Reply #13 on: December 19, 2007, 01:29:11 pm »
Can you get an LPC935 and try an unmodified version of the bridge code?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jmlopes

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Can't erase Security bits
« Reply #14 on: December 19, 2007, 01:57:11 pm »
I have a LPC936. I will to program with the unmodified version of the bridge code.

   Jorge