LPC54S018J2M bricked after accidently choosing LPC54S018J4M as target

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

LPC54S018J2M bricked after accidently choosing LPC54S018J4M as target

1,233 Views
marius_alf
Contributor I

After accidently choosing LPC54S018J4M as the target when actually programming a LPC54S018J2M, the chip's memory cannot be read, erased or written anymore.

Software tools used for trying to access the chips memory:

- MCUXpresso IDE v11.3.0

- SEGGER J-Link V7.52a

- SEGGER J-Flash V7.52a

- SEGGER J-Flash Lite V7.52a

Hardware tools:

- SEGGER J-Link Base

- SEGGER J-Link Plus

Is there any known way how to reanable access to the chips memory?

Kind regards,

Marius

0 Kudos
9 Replies

736 Views
ppardo
Contributor II

Hi @ZhangJennie and @marius_alf .

I experience the same kind of problem.

During my devs, i program the lpc54s018j2m with MCUExpresso tools and it works fine.

For some tests, I have to program with segger-jlink and it works fine too.

...but...

After a segger-jflash, i cannot anymore:

- erase the device (the procedure works fine, but nothing is erased, my program still works fine on it)

- program another firmware

- debug with MCU xpresso

- ...

My device is bricked.

Do you have any advice ?

 

here's the message:

Auto programming target (106228 bytes, 1 range) ...
- Connecting ...
- Connected successfully
- Checking if selected data fits into selected flash sectors.
- Start of preparing flash programming
- End of preparing flash programming
- Start of determining dirty areas in flash cache
- End of determining dirty areas
- CPU speed could not be measured.
- Start of erasing sectors
- Blank checking 0x10000000 - 0x1001FFFF
- Erasing range 0x10000000 - 0x1001FFFF ( 2 Sectors, 128 KB)
- End of erasing sectors
- Start of flash programming
- Programming range 0x10000000 - 0x1000FFFF ( 1 Sector, 64 KB)
- ERROR: Programming failed @ address 0x1000000C (block verification error)
- End of flash programming
- ERROR: Program failed
- Start of restoring
- End of restoring
- ERROR: Failed to auto program target
Disconnecting ...
- Disconnected

ppardo_0-1677656932006.png

 

Some more message:

When I try to erase: (but nothing is erased)

Erasing chip ...
- Connecting ...
- Connected successfully
- 32 sectors, 1 range, 0x10000000 - 0x101FFFFF
- Start of preparing flash programming
- End of preparing flash programming
- Start of determining dirty areas in flash cache
- End of determining dirty areas
- CPU speed could not be measured.
- Start of erasing chip
- End of erasing chip
- Start of restoring
- End of restoring
- Erase operation completed successfully - Completed after 0.348 sec

And a blank check:

ppardo_1-1677657058687.png

Blank checking target ...
- 32 of 32 sectors selected, 1 range, 0x10000000 - 0x101FFFFF
- Start of preparing flash programming
- End of preparing flash programming
- Blank checking 0x10000000 - 0x1001FFFF
- ERROR: Blank check failed @ addr 0x10000000 (Read: 0x30000, Expected: 0xFFFFFFFF)
- Start of restoring
- End of restoring
- ERROR: Failed to check blank target
Disconnecting ...
- Disconnected

 

I do not use OTP.

Any advice will be welcome

Regards

Tags (2)
0 Kudos

1,217 Views
marius_alf
Contributor I

Hi Jun Zhang,

thanks for your reply.

What exactly do you mean by connecting the board and the PC in ISP mode? We don't use any USB in our design, it's used as a network interface. The only way to programm the chip is by useing the SWD interface. Therefore we connect with a J-Link Plus. When doing so, we end up in the described probelm, indepenedent of the application. Is there any way to "reset" the whole memory to a dedfined state via SWD?

Another problem we found is that erasing of the flash is not possible (also not with device that otherwise still work well). Whenever we erase the content, we get a positive feedback by J-Link, but when reading the device memory, we still find the data we previously wrote to the chip's memory.

Kind regards,
Marius

0 Kudos

1,214 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Try to set these pins as below ,  power on(or reset) board with these settings

ISP2   ISP1   ISP0 
(P0-6)  (P0-5)  (P0-4) 
High High Low

 

Then try connect board with IDE.

See how it works.

Tags (1)
0 Kudos

1,210 Views
marius_alf
Contributor I

Our bord is designed to run only from internal serial flash programmed via SWD. According to table 6 of the chip's user manual (UM11155, p.19) the possible ISP settings for this are:

Boot modeISP2  ISP1  ISP0 
 (P0-6) (P0-5) (P0-4) 
autoHighHighHigh
SPIFILowHighHigh

 

Also according to this user manual, using the ISP pin settings you suggested would choose the boot mode "UART/I2C/SPI". We do not have the option to set ISP0 to Low and to used you suggested configuration, because we do not want to boot from UART/I2C/SPI.

The booting from internal serial flash also still works. But the serial flash cannot be reprogrammed.

Since you suggest accessing via different ISP settings: do you think by flashing accidently the chip with wrong memory settings, it might have disabled SWD functionality? Is accessing via ISP pins the only way to bring that functionality back?

0 Kudos

1,203 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I wonder your application code  burned to LPC prevent SWD accessing for some unknown reason.

So I suggest you entering to ISP mode to bypass application code.

If my assumption is true, this can fix the problem.

0 Kudos

1,193 Views
marius_alf
Contributor I

I undestand. Sadly the ISP pins in our design cannot be changed since we use a BGA chip and don't have access from the outside. Therefore your suggestions is not fixing the problem for us. Do you see any other way?

The application itself is not preventing SWD. It works on a lot of other boards. We only encounter the problem with those boards, that were accidentaly flashed with the wrong chip selected (as described in the title).

0 Kudos

1,172 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Your board worked before but can't be connected now.

The last suggestion is to try Jlink commander, try if erase command can work.  If none of above can't resolve, maybe OTP is enabled by accident that disables SWD, if so we can't recover it any more. 

Or the LPC is broken for some reason.

 

0 Kudos

1,150 Views
marius_alf
Contributor I

Sadly non of those ideas work, the chips seem to be broken.

Meanwhile we have a similar problem, but without having chosen the wrong chip when programing:

We write our application with J-Link via SWD to the chip successfully and everything works fine. But on some devices, we later can't override the application anymore. SWD is not disabled in this case, we can still read the memory from the device, but we do not have write access anymore.

0 Kudos

1,223 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi marius_alf 

Please try try program board in isp mode: 

- Connect your board with PC in ISP mode

- Open your MCUXpresso IDE in a NEW workspace,

- Import demo hello_world_qspi_xip. Try to connect board using this demo.

See how it works?

Thanks,

Jun Zhang

0 Kudos