Skip to content

Commit e444559

Browse files
Opta recovery (#429)
* Created "Recover an Arduino Opta with read-only flash memory" in a new "Opta" section * Apply suggestions from code review Co-authored-by: Renat0Ribeir0 <[email protected]> * Remove empty line * Add instruction about double press reset --------- Co-authored-by: Renat0Ribeir0 <[email protected]>
1 parent 76c0762 commit e444559

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Recover an Arduino Opta with read-only flash memory"
3+
---
4+
5+
In certain situations, the QSPI flash memory on the Arduino Opta may become configured as read-only.
6+
7+
The QSPI flash is likely read-only if:
8+
9+
* You are unable to erase or overwrite the QSPI flash memory.
10+
* You encounter an `Error formatting OTA partition` message when attempting to [partition the memory](https://support.arduino.cc/hc/en-us/articles/16206977438748-Reset-the-flash-memory-on-STM32H747-based-devices).
11+
12+
The write protection can be removed by uploading a recovery sketch.
13+
14+
----
15+
16+
Follow these steps:
17+
18+
1. Download or copy the [unlockOptaNORFlash.ino](https://github.com/manchoz/unbrick-recover-readonly-flash-arduino-opta/blob/master/unlockOptaNORFlash/unlockOptaNORFlash.ino)[^1] sketch from GitHub.
19+
20+
![Downloading a file on GitHub.](img/github-download.png)
21+
22+
1. Open the sketch in your editor:
23+
24+
* In Arduino IDE, do one of the following:
25+
26+
* Create a new sketch and paste the entire unlockOptaNORFlash sketch into the editor.
27+
* Copy the .ino file into your [Sketchbook](https://support.arduino.cc/hc/en-us/articles/4412950938514-Open-the-Sketchbook-folder). Ensure that `unlockOptaNORFlash.ino` is inside a folder named `unlockOptaNORFlash`.
28+
29+
* In Cloud Editor, open the [Sketches tab](https://app.arduino.cc/sketches) and click on the **Create** button in the top-right corner. Select **Import local file** in the dropdown menu and import `unlockOptaNORFlash.ino`.
30+
31+
1. Connect your Opta to your computer and select it in the editor. If your Opta does not appear on a port, press the **RESET** button twice in quick succession.
32+
33+
1. ![Upload button](img/symbol_upload2.png) **Upload** the sketch.
34+
35+
1. Click the ![Serial Monitor button](img/symbol_monitor.png) **Serial Monitor** button in the top-right corner or select Tools > Serial Monitor (IDE only).
36+
37+
1. The process is complete when the line `---end---` appears in the serial output.
38+
39+
[^1]: The sketch works by reinitializing the QSPI and configuring the hardware protection data pin as a GPIO input. The internal pull-up resistor of the QSPI flash is then used to deactivate the hardware flash protection. Through this approach, writing can be enabled, and the protection bits can be reset. Learn more about the procedure [here](https://github.com/manchoz/unbrick-recover-readonly-flash-arduino-opta).
5.4 KB
Loading
448 Bytes
Loading
1.81 KB
Loading

0 commit comments

Comments
 (0)