NPX LPC11E36/501: Failed to erase sectors 16 @ address 0x00010000

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

NPX LPC11E36/501: Failed to erase sectors 16 @ address 0x00010000

Jump to solution
1,146 Views
rbeno1
Contributor I

I was able to program the LPC11E36/501 using J-Flash yesterday. 
I ran a JLink_EraseChip yesterday, which returned a code -5, and since then I am unable to Program the same and other LPC11E36/501. 

From the Commander:

J-Link>connect
Device "LPC11E36/501" selected.


Connecting to target via SWD
Found SW-DP with ID 0x0BB11477
DPIDR: 0x0BB11477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p0, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
[0][0]: E000E000 CID B105E00D PID 000BB008 SCS
[0][1]: E0001000 CID B105E00D PID 000BB00A DWT
[0][2]: E0002000 CID B105E00D PID 000BB00B FPB
Memory zones:
Zone: "Default" Description: Default access mode
Cortex-M0 identified.
J-Link>erase
No address range specified, 'Erase Chip' will be executed
'erase': Performing implicit reset & halt of MCU.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
CPU did not halt after bootloader.
CPU did not halt after bootloader.
Erasing device...

****** Error: Failed to erase sectors 16 @ address 0x00010000 (Algo24: Invalid sector)
J-Link: Flash download: Total time needed: 4.853s (Prepare: 0.076s, Compare: 0.000s, Erase: 1.774s, Program: 0.000s, Verify: 0.000s, Restore: 3.003s)

****** Error: Timeout while restoring target, RAMCode did not respond in time (PC = 0x10000346, XPSR = 0x41000000, SP = 0x10000670)!
Failed to restore target. RAMCode never stops
ERROR: Erase returned with error code -5.
J-Link>erase
No address range specified, 'Erase Chip' will be executed
'erase': Performing implicit reset & halt of MCU.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
CPU did not halt after bootloader.
CPU did not halt after bootloader.
Erasing device...

****** Error: Timeout while erasing sectors, RAMCode did not respond in time (PC = 0x1FFF1FFE, XPSR = 0x01000003, SP = 0x10000650)!
J-Link: Flash download: Total time needed: 13.022s (Prepare: 0.001s, Compare: 0.000s, Erase: 10.013s, Program: 0.000s, Verify: 0.000s, Restore: 3.006s)

****** Error: Timeout while restoring target, RAMCode did not respond in time (PC = 0xFFFFFFFE, XPSR = 0x01000003, SP = 0x10000670)!
Failed to restore target. RAMCode never stops
ERROR: Erase returned with error code -5.
J-Link>

Labels (1)
0 Kudos
Reply
1 Solution
1,102 Views
rbeno1
Contributor I

Hi @xiangjun_rong,

Thanks for the help.
I was able to figure out why I was having the error. 
My processor is LPC11E35 but I am using a J-LINK LPC11E36 project setting configuration/file. By default, the program was looking for sector 16, which only exists in LPC11E36 and is nonexistent in the attached target LPC11E35. 
J-LINK does not have a project configuration file for LPC11E35.

UPDATED ANSWER:
As of December 6, 2023, SEGGER has added support for LPC11E35, and the error is gone.

View solution in original post

0 Kudos
Reply
2 Replies
1,118 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

For the LPC11E36, it has 96KB flash, which ranges from 0x0000 to 0x17FFF. You said that you could erase previously, but you can not now, maybe the flash has been damaged.

Pls try to use sector page erasing or page erasing instruction.

xiangjun_rong_1-1700469101847.png

Pls check if you can use Keil or MCUXPresso tools to download application code.

BTW, pls check if you can use flashmagic tools to download code in ISP mode

Hope it can help you

BR

XiangJun Rong

 

 

0 Kudos
Reply
1,103 Views
rbeno1
Contributor I

Hi @xiangjun_rong,

Thanks for the help.
I was able to figure out why I was having the error. 
My processor is LPC11E35 but I am using a J-LINK LPC11E36 project setting configuration/file. By default, the program was looking for sector 16, which only exists in LPC11E36 and is nonexistent in the attached target LPC11E35. 
J-LINK does not have a project configuration file for LPC11E35.

UPDATED ANSWER:
As of December 6, 2023, SEGGER has added support for LPC11E35, and the error is gone.

0 Kudos
Reply