Download to internal flash of LPC2214 using J-Link

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Download to internal flash of LPC2214 using J-Link

    Hi there,

    I'm using J-Link v4.20h.

    As the subject header suggests, I am attempting to download binary files to the internal flash of an NXP LPC2214.
    I have used J-Flash to erase the chip before starting. It's worth mentioning here that I have successfully programmed the chip using J-Flash but I believe should be able to achieve the same successful results from J-Link as well.

    So, with a blank chip to start:
    I have successfully downloaded a bios file to memory location 0x2000 using the following commands:
    J-Link>exec device LPC2214
    J-Link>loadbin C:\testbios1.bin, 2000

    I checked that this was successful by reading the memory back again:
    J-Link>mem 2000 50

    The issue is that I cannot obtain successful results when writing to 0x0 using this method in J-Link.
    Additionally, although the chip is reportedly blank before starting (according to J-Flash), J-Link and J-Mem both report data at the 0x0 location:

    J-Link>mem 0 50
    00000000 = 34 40 9F E5 02 50 A0 E3 00 50 84 E5 03 50 A0 E3
    00000010 = 04 50 84 E5 1C 20 9F E5 00 30 A0 E3 93 00 02 E1
    00000020 = 28 20 82 E2 93 10 02 E1 07 30 C0 E3 28 30 02 E5
    00000030 = 04 F0 1F E5 C4 E1 FF 7F 14 C0 02 E0 00 C0 1F E0
    00000040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

    When I run the following commands:
    J-Link>exec device LPC2214
    J-Link>loadbin C:\testboot1.bin, 0
    I don't get any error messages - by all appearances the download of my file to 0x0 was successful. But it becomes clear that the download failed (or never actually attempted) when I read the memory back and see the same output as above and not the data from my file.

    I'm guessing that there are some initiation steps that I'm missing which will allow me to write to 0x0. Perhaps something that J-Flash is doing before downloading to 0x0 and I haven't asked J-Link to do here. Can you confirm this? Can you provide sample commands that I should be using here?

    Thanks in advance