Xiao-nrf54l15 An error occurred: Memory transfer fault @ 0x00ffc31c-0x00ffc31f

Hello,

The regular upload is not working anymore with my xiao-nrf54l15 board. So I am trying to unlock via mass erase as a workaround:
Do you know how to fix this error?

 *  Executing task: C:\Users\user\.platformio\penv\Scripts\platformio.exe run --target upload --environment seeed-xiao-nrf54l15 

Processing seeed-xiao-nrf54l15 (platform: https://github.com/Seeed-Studio/platform-seeedboards.git; framework: zephyr; board: seeed-xiao-nrf54l15)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
board id is nrf,will call board_build/nrf/nrf_build.py
CONFIGURATION: https://docs.platformio.org/page/boards/Seeed Studio/seeed-xiao-nrf54l15.html
PLATFORM: Seeed Studio Xiao Series (1.0.0+sha.47379f3) > Seeed Studio XIAO nRF54L15
HARDWARE: NRF54L15 128MHz, 256KB RAM, 1.50MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink)
PACKAGES:
 - framework-zephyr @ 3.40100.0 (4.1.0)
 - tool-bossac-nordicnrf52 @ 1.10901.201022 (1.9.1)
 - tool-cmake @ 3.30.2
 - tool-dtc @ 1.4.7
 - tool-ninja @ 1.9.0 
 - tool-openocd @ 3.1200.0 (12.0)
 - tool-sreccat @ 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi @ 1.80201.181220 (8.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\seeed-xiao-nrf54l15\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   2.3% (used 6084 bytes from 262144 bytes)
Flash: [          ]   1.7% (used 27508 bytes from 1572864 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, custom, jlink
CURRENT: upload_protocol = custom
Uploading .pio\build\seeed-xiao-nrf54l15\firmware.hex
2025-09-05 13:05:42,328 [INFO] Auto-selected probe: 92CC15C9 (Seeed Studio Seeed Studio XIAO nrf54 CMSIS-DAP)
2025-09-05 13:05:42,329 [INFO] Connecting to target...
2025-09-05 13:05:42,429 [INFO] Target type is nrf54l
2025-09-05 13:05:42,483 [INFO] Asserting reset prior to connect
2025-09-05 13:05:42,560 [INFO] DP IDR = 0x6ba02477 (v2 rev6)
2025-09-05 13:05:42,649 [INFO] AHB-AP#0 IDR = 0x84770001 (AHB-AP var0 rev8)
2025-09-05 13:05:42,663 [INFO] AHB-AP#1 IDR = 0x84770001 (AHB-AP var0 rev8)
2025-09-05 13:05:42,673 [INFO] AP#2 IDR = 0x32880000 (AP var0 rev3)
2025-09-05 13:05:42,673 [INFO] Checking CTRL-AP IDR
2025-09-05 13:05:42,697 [WARNING] NRF54L15 APPROTECT enabled: will try to unlock via mass erase
2025-09-05 13:05:43,424 [INFO] AHB-AP#0 Class 0x1 ROM table #0 @ 0xe00fe000 (designer=244 part=01c)
2025-09-05 13:05:43,427 [INFO] [0]<e00ff000:ROM class=1 designer=43b:Arm part=4c9>
2025-09-05 13:05:43,428 [INFO]   AHB-AP#0 Class 0x1 ROM table #1 @ 0xe00ff000 (designer=43b:Arm part=4c9)
2025-09-05 13:05:43,432 [INFO]   [0]<e000e000:SCS M33 class=9 designer=43b:Arm part=d21 devtype=00 archid=2a04 devid=0:0:0>
2025-09-05 13:05:43,435 [INFO]   [1]<e0001000:DWT M33 class=9 designer=43b:Arm part=d21 devtype=00 archid=1a02 devid=0:0:0>
2025-09-05 13:05:43,437 [INFO]   [2]<e0002000:BPU M33 class=9 designer=43b:Arm part=d21 devtype=00 archid=1a03 devid=0:0:0>
2025-09-05 13:05:43,440 [INFO]   [3]<e0000000:ITM M33 class=9 designer=43b:Arm part=d21 devtype=43 archid=1a01 devid=0:0:0>
2025-09-05 13:05:43,448 [INFO]   [5]<e0041000:ETM M33 class=9 designer=43b:Arm part=d21 devtype=13 archid=4a13 devid=0:0:0>
2025-09-05 13:05:43,454 [INFO] [1]<e0040000:TPIU M33 class=9 designer=43b:Arm part=d21 devtype=11 archid=0000 devid=ca1:0:0>
2025-09-05 13:05:43,466 [INFO] CPU core #0: Cortex-M33 r1p0, v8.0-M architecture
2025-09-05 13:05:43,466 [INFO]   Extensions: [DSP, FPU, FPU_V5, MPU, SEC]
2025-09-05 13:05:43,466 [INFO]   FPU present: FPv5-SP-D16-M
2025-09-05 13:05:43,470 [INFO] 4 hardware watchpoints
2025-09-05 13:05:43,472 [INFO] 8 hardware breakpoints, 1 literal comparators
2025-09-05 13:05:43,480 [INFO] Deasserting reset post connect
2025-09-05 13:05:43,488 [ERROR] An error occurred: Memory transfer fault @ 0x00ffc31c-0x00ffc31f
Traceback (most recent call last):
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 601, in read_ap_result_callback
    value = result()
            ^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 1080, in read_reg_cb
    res = transfer.get_result()
          ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 161, in get_result
    self.daplink.flush()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\utility\concurrency.py", line 29, in _locking
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 885, in flush
    self._read_packet()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\utility\concurrency.py", line 29, in _locking
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 1166, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 484, in decode_data
    data = self._decode_transfer_data(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 390, in _decode_transfer_data
    self._check_response(data[2])
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 368, in _check_response
    raise DAPAccessIntf.TransferFaultError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferFaultError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\.platformio\platforms/Seeed Studio/scripts/xiao_nrf54l15_recover_flash.py", line 234, in main
    with ConnectHelper.session_with_chosen_probe(unique_id=probe_id, **session_options) as session:
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\core\session.py", line 415, in __enter__
    self.open()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\core\session.py", line 557, in open
    self._board.init()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\board\board.py", line 156, in init
    self.target.init()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\coresight\coresight_target.py", line 123, in init
    super().init()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\core\soc_target.py", line 174, in init
    seq.invoke()
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke
    resultSequence = call()
                     ^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\target\family\target_nRF54L.py", line 152, in check_part_info
    partno = self.read32(0x00FFC31C)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\core\memory_interface.py", line 116, in read32
    return self.read_memory(addr, 32, now)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\core\soc_target.py", line 232, in read_memory
    return self.selected_core_or_raise.read_memory(addr, transfer_size, now)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\coresight\cortex_m.py", line 630, in read_memory
    result = self.ap.read_memory(addr, transfer_size, now)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\utility\concurrency.py", line 29, in _locking
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\coresight\ap.py", line 1188, in _read_memory
    result = read_mem_cb()
             ^^^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\coresight\ap.py", line 1166, in read_mem_cb
    res = result_cb() # type: ignore # ignore possibly unbound result_cb
          ^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\coresight\dap.py", line 923, in read_ap_cb
    result = result_cb()
             ^^^^^^^^^^^
  File "C:\Users\user\.platformio\penv\Lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 606, in read_ap_result_callback
    raise self._convert_exception(error) from error
pyocd.core.exceptions.TransferFaultError: Memory transfer fault @ 0x00ffc31c-0x00ffc31f
*** [upload] Error 2
==================================================================================================================================== [FAILED] Took 12.97 seconds ====================================================================================================================================

1 Like

One of my three nRF54L15 devices has also become unable to upload. Below is the error message. I tried connecting JLink to the pads on the back of the board to attempt a bulk erase, but I couldn’t even connect JLink due to an “unknown error”.
What exactly was the situation where you couldn’t upload?

Linking .pio\build\seeed-xiao-nrf54l15\zephyr\firmware-pre0.elf
Memory region Used Size Region Size %age Used
FLASH: 23976 B 1428 KB 1.64%
RAM: 4504 B 188 KB 2.34%
IDT_LIST: 73 B 32 KB 0.22%
Generating ISR table .pio\build\seeed-xiao-nrf54l15\zephyr\isr_tables.c
Compiling .pio\build\seeed-xiao-nrf54l15\zephyr_final\zephyr\isr_tables.c.o
Linking .pio\build\seeed-xiao-nrf54l15\firmware.elf
Memory region Used Size Region Size %age Used
FLASH: 23976 B 1428 KB 1.64%
RAM: 4504 B 188 KB 2.34%
IDT_LIST: 0 GB 32 KB 0.00%
Checking size .pio\build\seeed-xiao-nrf54l15\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 1.7% (used 4581 bytes from 262144 bytes)
Flash: [ ] 1.4% (used 22064 bytes from 1572864 bytes)
Building .pio\build\seeed-xiao-nrf54l15\firmware.hex
Configuring upload protocol…
AVAILABLE: cmsis-dap, jlink
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\seeed-xiao-nrf54l15\firmware.hex
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1

cortex_m reset_config sysresetreq

Error: Failed to read memory at 0xe000ed00
Warn : target nrf54l.cpu examination failed
Error: Target not examined yet

*** [upload] Error 1

Using platformio when I press Upload.

It doesn’t actually cause an error, does it?

That seems to be a mistake since it doesn’t work, right?
I am using the regular USB openOCD method. Not JTAG.

cortex_m reset_config sysresetreq

Error: Failed to read memory at 0xe000ed00
Warn : target nrf54l.cpu examination failed
Error: Target not examined yet

*** [upload] Error 1

The error message is from when the upload failed via USB. Comparing the error messages, it seems you’re in exactly the same situation. After that, I tried connecting JLink to the pads on the back of the board to perform a bulk erase for verification, but I couldn’t connect.

Were you able to recover?

No, I just wrote to support about this issue.

I had it replaced.

By the way, can you think of any possible causes?

On my semi-bricked one I poked around,
My main core is halted.
But the flpr core is running.

I tried various combinations of halts and erases but never managed to turn off the memory protection that prevented me from properly wiping the chip back to defaults.

Try adding
CONFIG_FPROTECT=n
To your prj. Conf?

It’s something I just found on the Nordic forums on a post about similarly bricked DK versions of the board

Unfortunately, it could not be compiled.

C:/Users/msfujino/Documents/PlatformIO/Projects/zephyr-blink/zephyr/prj.conf:3: warning: attempt to assign the value ‘n’ to the undefined symbol FPROTECT

error: Aborting due to Kconfig warnings

Same issue for me:

Loading Zephyr default modules (Zephyr base).


C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/zephyr/prj.conf:4: warning: attempt to assign the value 'n' to the undefined symbol FPROTECT

error: Aborting due to Kconfig warnings

CMake Error at C:/Users/user/.platformio/packages/framework-zephyr/cmake/modules/kconfig.cmake:396 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/Users/user/.platformio/packages/framework-zephyr/cmake/modules/zephyr_default.cmake:133 (include)     
  C:/Users/user/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/Users/user/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

There is not FPROTECT in Zephyr doc

it’s from these Nordic docs.

it mentions that the protection module gets turned on by
HW_UNIQUE_KEY
being part of the config.

Build to build too:

-- Found BOARD.dts: C:/Users/user/.platformio/platforms/Seeed Studio/zephyr/boards/arm/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuapp.dts
-- Found devicetree overlay: C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/zephyr/boards/xiao_nrf54l15_nrf54l15_cpuapp.overlay
-- Generated zephyr.dts: C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/.pio/build/seeed-xiao-nrf54l15/zephyr/zephyr.dts
-- Generated pickled edt: C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/.pio/build/seeed-xiao-nrf54l15/zephyr/edt.pickle
-- Generated devicetree_generated.h: C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/.pio/build/seeed-xiao-nrf54l15/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/.pio/build/seeed-xiao-nrf54l15/zephyr/dts.cmake
Parsing C:/Users/user/.platformio/packages/framework-zephyr/Kconfig

Loaded configuration 'C:/Users/user/.platformio/platforms/Seeed Studio/zephyr/boards/arm/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuapp_defconfig'

Merged configuration 'C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/zephyr/prj.conf'

-- Configuring incomplete, errors occurred!

Loading Zephyr default modules (Zephyr base).


C:/GitHub/Seeed-platform-seeedboards/examples/zephyr-battery/zephyr/prj.conf:9: warning: attempt to assign the value 'n' to the undefined symbol HW_UNIQUE_KEY



error: Aborting due to Kconfig warnings



CMake Error at C:/Users/user/.platformio/packages/framework-zephyr/cmake/modules/kconfig.cmake:396 (message):  
  command failed with return code: 1
Call Stack (most recent call first):
  C:/Users/user/.platformio/packages/framework-zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  C:/Users/user/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/Users/user/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

https://github.com/Seeed-Studio/platform-seeedboards/blob/main/scripts/xiao_nrf54l15_recover_flash.py

There is a script can recover this. However, I lack enough samples to test its stability.Can you help me test it?

I’m not familiar with software. If you could give me specific instructions on what to do, I’d be happy to help.

It‘s easy, just to do following:

  1. Install python in your computer and download the py sripts
  2. Prepare a hex file and put it in the same directory as the script. You can find it in the build directory of your successfully compiled NCS project.
  3. Open terminal and run python xiao_nrf54l15_recover_flash.py --hex merged.hex --mass-erase

I followed the instructions, but an error occurred.
This XIAO cannot be connected to JLink via pads on the back.
[ERROR] No connected debug probes found.

This does not use jlink, but uses USB directly.

1 Like

Of course, I tried using a USB connection. As additional information, this XIAO also failed to connect via JLink.

@lboue You can try it. Just now I encountered the same problem and successfully recover with this script.

However, the method mentioned in Readme really can’t recover successfully.

Note for XIAO_nRF54L15 users:
Due to the internal NVM write protection mechanism of the nRF54L15 chip, you may encounter issues where uploading with OpenOCD fails. To unlock the chip and upload firmware, please use the provided Python script. After using the script, you can use OpenOCD to upload normally.
Add the following lines to your platformio.ini to enable the script:
upload_protocol = custom
upload_command = python "${platformio.platforms_dir}/Seeed Studio/scripts/xiao_nrf54l15_recover_flash.py" --hex $SOURCE --mass-erase

In fact, they use the same script.So, I think this may be caused by inconsistent versions of pyocd used by pio’s python environment.

I will investigate and verify it and wait for my news.