[SOLVED] JLink - Connection to LPC55S69 on a Factory Fresh IC

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

  • [SOLVED] JLink - Connection to LPC55S69 on a Factory Fresh IC

    I have run into a issue where I cannot connect to an LPC55S69 which is "factory fresh". In this state, the MCU will enter its ROM bootloader as there is not valid application in Flash. I am working with NXP on determining what the initialial state of the Flash memory and what configuration bits are.

    I can get a J-Link to program, erase, etc if I connect using a CMSIS-DAP probe (I am using an LPC-LINK II with MCU XPresso). Once I use MCUXPresso and a CMSIS DAP adapter to program the device (or even just erase) , I can succussfully connect witha jlink (via both Ozone and GDB).

    Here is some output when there is a failure:

    Here is the Console Output when i try to connect:
    VTref=3.299V
    Target connection not established yet but required for command.
    Device "LPC55S69" selected.
    Connecting to target via SWD
    ConfigTargetSettings() start
    Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
    ConfigTargetSettings() end
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x6BA02477
    DPIDR: 0x6BA02477
    Scanning AP map to find all available APs
    AP[3]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x84770001)
    AP[1]: AHB-AP (IDR: 0x84770001)
    AP[2]: JTAG-AP (IDR: 0x002A0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FE000
    CPUID register: 0x410FD213. Implementer code: 0x41 (ARM)
    Found Cortex-M33 r0p3, Little endian.
    FPUnit: 8 code (BP) slots and 0 literal slots
    Security extension: implemented
    Secure debug: enabled
    CoreSight components:
    ROMTbl[0] @ E00FE000
    ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB4C9 ROM Table
    ROMTbl[1] @ E00FF000
    ROMTbl[1][0]: E000E000, CID: B105900D, PID: 000BBD21 Cortex-M33
    ROMTbl[1][1]: E0001000, CID: B105900D, PID: 000BBD21 DWT
    ROMTbl[1][2]: E0002000, CID: B105900D, PID: 000BBD21 FPB
    ROMTbl[1][3]: E0000000, CID: B105900D, PID: 000BBD21 ITM
    ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BBD21 Cortex-M33
    SetupTarget() start
    Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
    SetupTarget() end
    Cortex-M33 identified.
    Reset delay: 0 ms
    Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
    ResetTarget() start
    Reset strategy selected in debugger ignored. Performing device specific reset.
    Reset handler addr: 0x00000000
    ResetTarget() end
    AfterResetTarget() start
    AfterResetTarget() end
    **************************
    WARNING: CPU could not be halted
    **************************
    ****** Error: Failed to halt CPU.
    **************************
    WARNING: CPU could not be halted
    **************************
    Downloading file [C:\ELI\lpc55s69_mini\SRC\MiniMonkeyTimeSeries\Debug\TimeSeries.hex]...
    **************************
    WARNING: CPU could not be halted
    **************************
    ****** Error: Failed to read back RAMCode for verification.
    Failed to prepare for programming.
    Failed to download RAMCode!
    Can not read register 16 (XPSR) while CPU is running
    Can not read register 20 (CFBP) while CPU is running
    Can not read register 0 (R0) while CPU is running
    Can not read register 1 (R1) while CPU is running
    Can not read register 2 (R2) while CPU is running
    Can not read register 3 (R3) while CPU is running
    Can not read register 4 (R4) while CPU is running
    Can not read register 5 (R5) while CPU is running
    Can not read register 6 (R6) while CPU is running
    Can not read register 7 (R7) while CPU is running
    Can not read register 8 (R8) while CPU is running
    Can not read register 9 (R9) while CPU is running
    Can not read register 10 (R10) while CPU is running
    Can not read register 11 (R11) while CPU is running
    Can not read register 12 (R12) while CPU is running
    Can not read register 14 (R14) while CPU is running
    Can not read register 15 (R15) while CPU is running
    Can not read register 17 (MSP) while CPU is runn
    Unspecified error -1
    Script processing completed.
    Unable to perform operation!
    Command failed with exit code 1
  • I have some more information that may help. This may require an updated to the Flash programming algorithm:

    This is probably cause by two reasons:
    1. JLINK try to operate flash before flash self-initialization is done.(operate flash immediatly after RESET)
    2. JLINK's flash algorithm try to read to an empty flash content(will cause hard fault.)
    for 1: the flash algorithm need to wait for flash self-initlization is done, which means INT_STATUS register bit2 is set and bit 0 and bit 1 is cleared(no FAIL or ERR happened).
    [img]https://community.nxp.com/servlet/JiveServlet/downloadImage/2-1337918-321910/pastedImage_30.png[/img]
    for 2: it need SEGGER to update flash algorithm that when algo want to AHB read flash data, it need first call ROM API's VerfityErase to check if it's empty, erased flash, if yes, just return all 0xFF, if not, you can AHB read flash data safely. see [LPC55xx] How to fix AHB Read HardFault Error
  • Hello,

    Thank you for your inquiry.
    We received your request via our support system in parallel.
    To make sure no information gets lost between channels this thread will be closed now and the correspondence will continue via e-mail.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.