Skip to content

nrf54lm20a: flash algorithm faults (IPSR=3) and 'pyocd reset' is a no-op #2016

Description

@Divad27

Summary

With target nrf54lm20a (Seeed XIAO nRF54LM20A, on-board CMSIS-DAP), pyOCD cannot
program the device and pyocd reset has no effect. Reading and mass-erase work fine,
so the probe connection itself is healthy.

Tested with pyOCD 0.44.1 and 0.45, on 5 boards, Windows 11.

Command Result
pyocd list ✅ works
pyocd rtt ✅ works (RTT streaming is reliable)
pyocd erase --mass ✅ works (needed once on fresh boards — they ship with APPROTECT set)
pyocd flash / load ❌ fails inside the flash algorithm with a fault (IPSR = 3 / HardFault); the old image stays on the device
pyocd reset ❌ no effect — the target keeps running, accompanied by NRF54LM20A is not in a secure state

For contrast, the nRF54L15 (target nrf54l) programs flawlessly with pyOCD on the
same host and the same kind of on-board probe, so this appears specific to the
nRF54LM20A target support (RRAM instead of the usual flash controller).

Steps to reproduce

pyocd erase --mass -t nrf54lm20a -u <SERIAL>     # fresh boards: clears APPROTECT
pyocd flash -t nrf54lm20a -u <SERIAL> zephyr.hex # faults in the flash algo
pyocd reset -t nrf54lm20a -u <SERIAL>            # returns, target unaffected

Expected

flash programs the image; reset restarts the target.

Workaround we use

OpenOCD with Seeed's support/openocd.cfg, using the vendor nrf54lm20a-load command
plus verify_image, each command passed as its own -c (chaining them with semicolons
swallows the load/verify output):

openocd -f boards/seeed/xiao_nrf54lm20a/support/openocd.cfg \
  -c "adapter serial <SERIAL>" -c init -c "reset halt" \
  -c "nrf54lm20a-load app.hex" -c "verify_image app.hex" \
  -c "reset run" -c shutdown

We still use pyOCD for list, rtt and erase --mass — those are solid.

Environment

  • pyOCD 0.44.1 and 0.45 (both affected)
  • Windows 11, Python 3.12
  • Seeed XIAO nRF54LM20A (non-Sense), on-board CMSIS-DAP, 5 units — all behave identically

Note

Possibly related to #1985 (pyocd load fails for nRF54L15), but the signature differs
(there: skipped bytes on nRF54L15; here: a fault inside the algorithm on nRF54LM20A) and
nRF54L15 works fine for us — so I am filing this separately rather than piling on.

Happy to run any diagnostic command that would help narrow this down; the hardware is
on my desk.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions