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
- SEGGER J-Link Base
- SEGGER J-Link Plus
Is there any known way how to reanable access to the chips memory?
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.
Try to set these pins as below , power on(or reset) board with these settings
Then try connect board with IDE.
See how it works.
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:
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?
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.
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).
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.
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.
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?