Description
I have three identical Seeed Studio XIAO nRF52840 + Wio-SX1262 devices.
Two are working correctly with MeshCore. On the third device I
accidentally selected/flashed the wrong firmware once (meshpocket one). Since then I can
successfully flash the correct MeshCore firmware, but the application
does not work over either USB or Bluetooth.
I'm trying to determine whether this is recoverable without an SWD
debugger, or whether the internal flash may have been damaged or left in
a bad state.
What I have tested
Bootloader
The UF2 bootloader still works.
INFO_UF2.TXT on both a working device and the faulty device is
identical:
UF2 Bootloader 0.6.1 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: Seeed XIAO nRF52840
Board-ID: Seeed_XIAO_nRF52840_Sense
SoftDevice: S140 version 7.3.0
Date: Nov 12 2021
MeshCore
I tried both:
- Companion Bluetooth
- Companion USB
using the MeshCore web flasher.
The web flasher reports a successful flash, but the faulty XIAO does not
appear over Bluetooth with Companion Bluetooth.
I also tried the web flasher's Erase Flash function.
I swapped the Wio-SX1262 peripheral boards between a working and faulty
XIAO. The working XIAO continued to work, so the problem appears to
follow the XIAO rather than the Wio-SX1262 board.
I also tried:
Xiao_nrf52_QSPIFlash_Format-v1.2.uf2
without success.
Meshtastic test
To eliminate MeshCore and the Wio-SX1262 as variables, I disconnected
the peripheral board and flashed Meshtastic 2.7.26
(seeed_xiao_nrf52840_kit).
Meshtastic boots and USB serial output works.
It can read the existing filesystem successfully, including:
prefs/
nodes.proto
config.proto
channels.proto
device.proto
adafruit/
bond_prph/
bond_cntr/
However, during startup it reaches:
and the device then disappears/reboots.
It also does not become available over Bluetooth.
Factory erase A/B test
I then used the Meshtastic factory erase image matching the SoftDevice:
Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2
On the faulty XIAO, serial output is:
Meshtastic nRF52 Factory Restore v3 27 June 2024 - by Mark Birss
Formating ...
It remains there indefinitely. I waited more than 30 minutes.
For comparison, I ran the exact same UF2 on one of my identical
working XIAOs.
The working device immediately completes:
Meshtastic nRF52 Factory Restore v3 27 June 2024 - by Mark Birss
Formating ... Done, rebooting device into DFU mode
The subsequent serial error is expected because the device deliberately
disconnects and reboots into DFU mode.
So the factory erase application itself runs on both XIAOs, but
formatting completes on the good XIAO and hangs on the faulty one.
Current suspicion
It looks like the faulty XIAO can:
- run the UF2 bootloader
- accept firmware
- boot applications
- use USB serial
- read its internal filesystem
but has a problem when an application tries to write or format its
internal storage.
Since the identical Meshtastic factory-erase UF2 completes on the good
XIAO but hangs on the faulty one, this does not appear to be specific to
MeshCore or the Wio-SX1262.
Questions
- Is there a known way that flashing incorrect firmware can leave an
nRF52840/XIAO in this state?
- Is there anything else I can erase/reset from UF2 without an SWD
debugger?
- Could UICR, flash protection, SoftDevice state, or another nRF52
configuration cause InternalFS.format() to hang like this?
- Is SWD
recover / mass erase the appropriate next step?
- Is there anything useful I can collect from the device before
attempting SWD recovery?
I currently have other XIAO nRF52840 boards and jumper wires, but no
dedicated SWD/CMSIS-DAP/J-Link programmer.
Description
I have three identical Seeed Studio XIAO nRF52840 + Wio-SX1262 devices.
Two are working correctly with MeshCore. On the third device I
accidentally selected/flashed the wrong firmware once (meshpocket one). Since then I can
successfully flash the correct MeshCore firmware, but the application
does not work over either USB or Bluetooth.
I'm trying to determine whether this is recoverable without an SWD
debugger, or whether the internal flash may have been damaged or left in
a bad state.
What I have tested
Bootloader
The UF2 bootloader still works.
INFO_UF2.TXTon both a working device and the faulty device isidentical:
MeshCore
I tried both:
using the MeshCore web flasher.
The web flasher reports a successful flash, but the faulty XIAO does not
appear over Bluetooth with Companion Bluetooth.
I also tried the web flasher's Erase Flash function.
I swapped the Wio-SX1262 peripheral boards between a working and faulty
XIAO. The working XIAO continued to work, so the problem appears to
follow the XIAO rather than the Wio-SX1262 board.
I also tried:
Xiao_nrf52_QSPIFlash_Format-v1.2.uf2without success.
Meshtastic test
To eliminate MeshCore and the Wio-SX1262 as variables, I disconnected
the peripheral board and flashed Meshtastic 2.7.26
(
seeed_xiao_nrf52840_kit).Meshtastic boots and USB serial output works.
It can read the existing filesystem successfully, including:
However, during startup it reaches:
and the device then disappears/reboots.
It also does not become available over Bluetooth.
Factory erase A/B test
I then used the Meshtastic factory erase image matching the SoftDevice:
Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2On the faulty XIAO, serial output is:
It remains there indefinitely. I waited more than 30 minutes.
For comparison, I ran the exact same UF2 on one of my identical
working XIAOs.
The working device immediately completes:
The subsequent serial error is expected because the device deliberately
disconnects and reboots into DFU mode.
So the factory erase application itself runs on both XIAOs, but
formatting completes on the good XIAO and hangs on the faulty one.
Current suspicion
It looks like the faulty XIAO can:
but has a problem when an application tries to write or format its
internal storage.
Since the identical Meshtastic factory-erase UF2 completes on the good
XIAO but hangs on the faulty one, this does not appear to be specific to
MeshCore or the Wio-SX1262.
Questions
nRF52840/XIAO in this state?
debugger?
configuration cause
InternalFS.format()to hang like this?recover/ mass erase the appropriate next step?attempting SWD recovery?
I currently have other XIAO nRF52840 boards and jumper wires, but no
dedicated SWD/CMSIS-DAP/J-Link programmer.