From 836413fd8a2418364ddbff8283ee0421d7871eb6 Mon Sep 17 00:00:00 2001 From: seaxwi <71350948+seaxwi@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:44:43 +0200 Subject: [PATCH 1/4] Created "Recover an Arduino Opta with read-only flash memory" in a new "Opta" section --- ...rduino-Opta-with-read-only-flash-memory.md | 41 ++++++++++++++++++ .../Opta/img/github-download.png | Bin 0 -> 5525 bytes .../Opta/img/symbol_monitor.png | Bin 0 -> 448 bytes .../Opta/img/symbol_upload2.png | Bin 0 -> 1850 bytes 4 files changed, 41 insertions(+) create mode 100644 content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md create mode 100644 content/Hardware Support/Opta/img/github-download.png create mode 100644 content/Hardware Support/Opta/img/symbol_monitor.png create mode 100644 content/Hardware Support/Opta/img/symbol_upload2.png diff --git a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md new file mode 100644 index 00000000..0f775839 --- /dev/null +++ b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md @@ -0,0 +1,41 @@ +--- +title: "Recover an Arduino Opta with read-only flash memory" +--- + +In certain situations, the QSPI flash memory on the Arduino Opta may become configured as read-only. + +The QSPI flash is likely read-only if: + +* You are unable to erase or overwrite the QSPI flash memory. +* You encounter an `Error formatting OTA partition` message when attempting to [partitioning the memory](https://support.arduino.cc/hc/en-us/articles/16206977438748-Reset-the-flash-memory-on-STM32H747-based-devices). + +The write protection can be removed by uploading a recovery sketch. + +---- + + + +Follow these steps: + +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. + + ![Downloading a file on GitHub.](img/github-download.png) + +1. Open the sketch in your editor: + + * Arduino IDE: Do one of the following: + + * Create a new sketch and paste the entire unlockOptaNORFlash sketch into the editor. + * 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`. + + * 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`. + +1. Connect your Opta to your computer and select it in the editor. + +1. ![Upload button](img/symbol_upload2.png) **Upload** the sketch. + +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). + +1. The process is complete when the line `---end---` appears in the serial output. + +[^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). diff --git a/content/Hardware Support/Opta/img/github-download.png b/content/Hardware Support/Opta/img/github-download.png new file mode 100644 index 0000000000000000000000000000000000000000..3e81d2eb38866f9b829bc0d2ed93765ae758030c GIT binary patch literal 5525 zcmV;G6>92m724YD9h*a!R+#bGhd z=(tNrzy;xRLBS!T%%G!=j-yOML_|Kt6;Wo~*g|BD*#t>ggak%{BtX(3-RY#4`u^y2 zNJ92>r?cGmdFtt|>Z*HB)$RWExu$L?(&^d65iM@KU0=C%LSo<~CT%#^ovP1=__a`E#M)9-(Jq=Y= zHGq_wn##6q+vIoOeOE3hD9{3WK!>AEG}XHcvFSXh)r$?V0F|Mkp;fuLxt8i}LSULe z2u;T$OOj*-q{PHTuYm&x>PC$k6%-dYd)}%wA3U^c&kw%X?Vh$#&W1~TefTw0@Dn_qwxTViHWMOudke(oLv6F2OpGc zBzdT(Z4$H&v)Qb#sHl(&3JTc2f4>l#W)MQ-8C0XuDE<2Duj;8&r_gG(p`JEK&}y7_ z2SEhwn?-b;JVbV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`TCJ3pox@UDiPdWDR;fK&i#t=|DvE;M+lRow z!0LbMmO0waHad6i92I6WHmj}6wUH!AXcP_JUS9b7`=cmIi_hOlXGn>ADE}9R4h|mx zlmJGcs`lr?qiFNI1M21<(UtI7SL9K<6F-BoGKX12(E16~GKs(ty}V zoEIAn4uMgs*Sp?BBLab-qft5EE3)Dc9y|5oG*YeC+M-kYGl4)LXbh*IIK`#GVDSF~ X025<*-18u200000NkvXXu0mjfq*&Ui literal 0 HcmV?d00001 diff --git a/content/Hardware Support/Opta/img/symbol_monitor.png b/content/Hardware Support/Opta/img/symbol_monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..1d947c0abebc94df71c4dbae91c0aa17b51cbf02 GIT binary patch literal 448 zcmV;x0YCnUP)4RXt9GKotI1_ZSQp&>93TU@R>N&E7x~6BBDod%OY7 zW*bkz5~em5mb~={MVcs`yfPx|uNe4oYiVT#s2jrbzEW$>;VdFw9COkQiJq^z8TX<`)Orya2VIc&hkF!h zVvw;{yw}AEJfY53K%00DmoHqaMNF)Ftm|Ezz!NCaM1^$?w7HPf0!ca;mauHLJJm-+ zM(8+oL&o|H!R4bQ!pG+q0Kjp8n~U>b2uEE6pzg56PuEuffS1=dNFwMstva&&p6X|`V@7YF?t(hki@#x_>#-Y=z@sy!z q5V6(zu$&7xB!koYujT*!VSfN1W4@a9EniLm0000aVqgWc85q16rQz%#Mh&PMCI*J~Oa>OHnkXO*0vsd^Q;1t47vHWgMtW^QUpqC!P(PF}H9g{=};g%ywu64qBz04piUwpEJo4N!2- zFG^J~(=*UBP_pAvP*AWbN=dT{a&d!d2l8x{GD=Dctn~HE%ggo3jrH=2()A53EiLs8 zjP#9+bb%^#i!1X=5-W7`ij^UTz|3(;Elw`VEGWs$&r<-Io0ybeT4JlD1hNPYAnq*5 zOhed|R}A$Q(1ZFQ8GS=N1AVyJK&>_)Q7iwV%v7MwAoJ}EZNMr~#Gv-r=z}araty?$ zU{Rn~?YM08;lXCdB^mdSoq>Vnm8Xkih=pKnXm*B7sEFP7do$f_wO6pC(~`36iW{~TCR21( zJ@XZ3zvteg;L|D?s2rso>h;{JrvBU8aQo=x@^+WL{R@lE>3F@vobSnrBVS~5-|8x_ zdwp+p%bPFUt$DGl1G`?w2?VT-i81NiDRuPM@vGTKA0L;${a?EvNT)Hi)3hD%oOkxwA;%BPU9!C%S+KEt=1gAZrg=S3a{9&w)#K*{d=~4-uHctd0HQP+@s!| z@7WJLZYhe@?^L>X$Z(EPZiI2d6kirN`nnuIugdSf(P`yz$3ArI7mn>+Y_9 z{;8GOW9g(hE+Gy4k|JycSN{CI`t$Rb&qwcP9M9bzBA62P`qgv;d4eScG%`iiVc zT~Ccx@>nRn?+B8d?RImg*m3?-HTyPP=jXoLndZ5)gQut05h@}wmgbXEB^^HBZg_cM#n!m>2VFeGJY{$42R{izmwegob&iuhM_%;26Z?3rNc!GE7BME_3iJk{9 zEIVXpI&s2;*9&C&&RTv`5f|~ZYL>B_pg1XUtxBD!hgI*2xHDU~PPjJ9Rgd}p^4i+! z*={aY~M0fdxOkArj1~_>!^DK|j(+@LP zl5(#wE#O#BI=+=4`jpd+zdk%_8(hh2T9 zNe1`z_Jt|S>PL8~6fos&dp_%Di+Uc@?piTd--WlIEAC`+FjeVld$ywD(TALc927ipkk4KqDm9DZa*l6gk zANMPp>9?7o?=hZxbN)!oFJ|_#@c;eujska6w5?k>)8Q}GL6AW+OGK3y4i>N#1rcIU)-I;d-xrj)uhW44?bA==xU2tTwmadssC$DO*cx` zPPPn;pI`jp!^0TOh4-%ItULetjzDh{L&?r9VOG<>&z-sP;>TC@dwu@1W$Jf}xtj@^ PgDMbDS3j3^P6 Date: Mon, 7 Oct 2024 16:42:52 +0200 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Renat0Ribeir0 <86349945+Renat0Ribeir0@users.noreply.github.com> --- .../Recover-an-Arduino-Opta-with-read-only-flash-memory.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md index 0f775839..42c3d8c4 100644 --- a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md +++ b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md @@ -7,13 +7,12 @@ In certain situations, the QSPI flash memory on the Arduino Opta may become conf The QSPI flash is likely read-only if: * You are unable to erase or overwrite the QSPI flash memory. -* You encounter an `Error formatting OTA partition` message when attempting to [partitioning the memory](https://support.arduino.cc/hc/en-us/articles/16206977438748-Reset-the-flash-memory-on-STM32H747-based-devices). +* 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). The write protection can be removed by uploading a recovery sketch. ---- - Follow these steps: @@ -23,12 +22,12 @@ Follow these steps: 1. Open the sketch in your editor: - * Arduino IDE: Do one of the following: + * In Arduino IDE, do one of the following: * Create a new sketch and paste the entire unlockOptaNORFlash sketch into the editor. * 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`. - * 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`. + * 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`. 1. Connect your Opta to your computer and select it in the editor. From 22b0a6187afa1a158375babae2bbd4062b213fc6 Mon Sep 17 00:00:00 2001 From: seaxwi <71350948+seaxwi@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:43:55 +0200 Subject: [PATCH 3/4] Remove empty line --- .../Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md index 42c3d8c4..af88b1bf 100644 --- a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md +++ b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md @@ -13,7 +13,6 @@ The write protection can be removed by uploading a recovery sketch. ---- - Follow these steps: 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. From fccc871e6534b6ab4696bc9ead57a03a5df708fe Mon Sep 17 00:00:00 2001 From: seaxwi <71350948+seaxwi@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:22:03 +0200 Subject: [PATCH 4/4] Add instruction about double press reset --- .../Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md index af88b1bf..41d3dad0 100644 --- a/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md +++ b/content/Hardware Support/Opta/Recover-an-Arduino-Opta-with-read-only-flash-memory.md @@ -28,7 +28,7 @@ Follow these steps: * 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`. -1. Connect your Opta to your computer and select it in the editor. +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. 1. ![Upload button](img/symbol_upload2.png) **Upload** the sketch.