meshtastic/docs/getting-started/flashing-firmware/nrf52/nrf52-erase.mdx

55 lines
2.9 KiB
Plaintext

---
id: nrf52-erase
title: Flash nRF52/RP2040 Factory Erase
sidebar_label: Factory Erase
sidebar_position: 3
description: Instructions for factory erasing an nRF52 or RP2040 device.
---
import Link from "@docusaurus/Link";
Meshtastic uses the [littlefs](https://github.com/littlefs-project/littlefs) library to store configuration, logs, and other data in the internal flash of nRF52 & RP2040 devices. Updating the firmware does _not_ erase this additional data, which can cause issues when the format and location of data changes between releases.
:::info
You may now use the [Meshtastic Web Flasher](https://flasher.meshtastic.org) to Factory Erase your nRF52 or RP2040-based devices. Visit the flasher, select your board, and click the trash can icon to the right of the Flash button. This will open a dialogue to begin the erase procedure.
Alternatively, follow the instructions below.
:::
### nRF52
To reset the flash storage on your nRF52 board:
1. Download and unzip the latest firmware from [Meshtastic Downloads](https://meshtastic.org/downloads).
2. Connect your device to your computer with a USB data cable.
3. Double click the reset button on your device (this will put it into bootloader mode)
4. Notice a new drive will be mounted on your computer (Windows, Mac, or Linux)
5. Open this drive and you should see three files: `CURRENT.UF2`, `INDEX.HTM`, and `INFO_UF2.TXT`
6. Open the `INFO_UF2.TXT` file with a text editor and note the `SoftDevice` value.
7. Find the file included in the downloaded firmware matching your softdevice major version number (7.x.x or 6.x.x). Either use `Meshtastic_nRF52_factory_erase_v3_S140_7.3.0.uf2` or `Meshtastic_nRF52_factory_erase_v3_S140_6.3.0.uf2` and copy it onto the new drive. The device should reboot.
8. With the [Meshtastic CLI](/docs/software/python/cli/) installed, open your Terminal/Console and enter the command: `meshtastic --noproto`.
9. You should see the message: `Formatting... Done`.
Once the device has been erased, you can proceed to install the latest Meshtastic firmware on a clean storage filesystem by clicking the link below.
### RP2040
To reset the flash storage on your RP2040 board:
1. Download [flash_nuke.uf2](https://datasheets.raspberrypi.com/soft/flash_nuke.uf2) to your computer.
2. Press the BOOTSEL button and while keeping it pressed, connect it to your computer via a USB cable.
3. The board should now appear as a mass storage device on your computer with the label RPI-RP2.
4. Copy the flash_nuke.uf2 file to the device.
5. The board will now restart and the flash memory will be erased.
Once the device has been erased, you can proceed to install the latest Meshtastic firmware on a clean storage filesystem by clicking the link below.
<div className="indexCtasBody">
<Link
className={"button button--outline button--lg cta--button"}
to={"/docs/getting-started/flashing-firmware/nrf52/"}
>
Flash nRF52/RP2040 Firmware
</Link>
</div>