From the description I don't get a clear picture of the issue. Let me try to sort it out:
- You have an application running in the LPC54628 in your development, it worked for a while and then it stopped. So you started an investigation and saw that something is wrong with the first 4 bytes of the internal flash.
- You used MCUXpresso and FlashMagic to check the flash content and to erase/program it.
- The Link-2 adapter together with MCUXpresso seems to work, you can erase and program an application image. This uses SWD on the JTAG port.
- If you use Flash Magic to read out a flash which is supposed to be programmed, you see the first 4 bytes as 0x00
The algorithms to erase/program/read/verify the internal flash are in ROM code, so whatever tool you use (Flash Magic, Link-2, J-Link, U-Link, i-Jet etc), they all talk to the ISP API in the ROM code. So whatever happens with the flash, the real action comes from the ROM code and not from the external tool. This external tool gives a command and provides the binary to be programmed, nothing else. So I don't expect any magic behavior from the SEGGER J-Link.
If I remember correctly, the Link-2 can be programmed with a SEGGER J-Link firmware, so it behaves like a J-Link adapter.
What remains is maybe a problem with Flash Magic. I tested the actual version 12.25 and also the Classic version 11.20, both read the first sector 0 - 0x7FFF with the first 4 bytes as 0. So I will try to find out what's going on here.
Regards,
Bernhard.