Answers.Body: <p>LEGO Mindstorms all use flash storage which does have a limited number of write cycles, so the answer is technically yes in some capacity, but it's probably not something you need to worry about.</p>
  
  <p><a href="https://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#NXT_2.0" rel="nofollow noreferrer">A LEGO Mindstorms NXT 2.0 uses a Atmel AT91SAM7S256 microcontroller</a>. This board has 256 KB flash memory, which is roughly the size of the latest firmware image.</p>
  
  <p>According to <a href="http://www.keil.com/dd/docs/datashts/atmel/at91sam7s256_sum.pdf" rel="nofollow noreferrer">the datasheet for this board</a>, it should be good for 10,000 write cycles.</p>
  
  <blockquote>
    <ul>
    <li>256 Kbytes of Internal High-speed Flash, Organized in 1024 Pages of 256 Bytes
    
    <ul>
    <li>Single Cycle Access at Up to 30 MHz in Worst Case Conditions</li>
    <li>Prefetch Buffer Optimizing Thumb Instruction Execution at Maximum Speed</li>
    <li>Page Programming Time: 4 ms, Including Page Auto-erase, Full Erase Time: 10 ms</li>
    <li>10,000 Write Cycles, 10-year Data Retention Capability, Sector Lock Capabilities, Flash Security Bit</li>
    <li>Fast Flash Programming Interface for High Volume Production</li>
    </ul></li>
    </ul>
  </blockquote>
  
  <p>10,000 is actually quite a bit, and would take a very long time to reach intentionally, even if you automated it to run 24/7.</p>
  
  <p>I'm not sure how fast you physically can flash the firmware, but if you did it once every 10 minutes 24/7, it would take you almost 70 days to reach that limit.</p>
  
  <p>If you flashed it a still-unrealistic 10 times per-day, it would take you 1000 days to reach that limit.</p>
  
  <p>And of-course, if you did it once per-day, it would take you over 27 years.</p>
  
  <p>In practice, I think it's much more likely some other hardware component will fail first.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-03T18:51:36.573Z
Answers.Text: Not particularly reassuring. Thanks anyway.
Answers.UserDisplayName: Ruhi Batool
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-03T18:32:51.170Z
Answers.LastActivityDate: 2020-01-03T19:30:00.470Z
Answers.LastEditDate: 2020-01-03T19:30:00.470Z
Answers.UserDisplayName: Alexander O'Mara
Answers.Body: <p>I've found <a href="https://web.archive.org/web/20090224115834/http://forums.nxtasy.org/index.php?showtopic=1528" rel="nofollow noreferrer">a very old NXTasy thread</a> that answers this question definitively.  </p>
  
  <blockquote>
    <p>Flemming Bundgaard, from LEGO, ran two or three test-to-failure runs with my NXTTools utility repeatedly setting the brick into firmware download mode and downloading the standard NXT firmware to the brick. In each of his tests the brick failed, if I recall correctly, after ~7000-8000 iterations. There is no doubt that if you put your NXT into boot mode somewhere in the neighborhood of 8000 times your brick will no longer accept a new firmware download. You can test this yourself if you like using NXTTools undocumented iteration count switch and a brick running on an external power supply. Each iteration takes about 30 seconds so the test will run for ~67 hours. Of course, your brick could have a different lock bit lifespan than Flemming's bricks had. It is also worth pointing out that if you reflash or reset your NXT once a day 365 days a year it will probably take you almost 22 years to wear out your lock bits. If you do it 10 times a day, everyday, then your brick should last 2.2 years.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-10T01:25:07.617Z
Answers.LastActivityDate: 2020-01-10T01:25:07.617Z
Answers.UserDisplayName: MindS1
Body: <p>I have a Lego Mindstorms NXT 2.0, which I'm tinkering around with, writing a custom firmware for. I just want to know if repeated flashing could damage the flash memory.</p>
  
Tags: <nxt>
Title: Does repeated flashing cause degradation NXT
UserDisplayName: Ruhi Batool
ThreadText: # Does repeated flashing cause degradation NXT
  
  (Asked by: username_0 on 2020-01-03)
  
  I have a Lego Mindstorms NXT 2.0, which I'm tinkering around with, writing a custom firmware for. I just want to know if repeated flashing could damage the flash memory.
  
  **Tags:** nxt
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-01-03. Score: 3
  
  LEGO Mindstorms all use flash storage which does have a limited number of write cycles, so the answer is technically yes in some capacity, but it's probably not something you need to worry about.
  
  [A LEGO Mindstorms NXT 2.0 uses a Atmel AT91SAM7S256 microcontroller](https://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#NXT_2.0). This board has 256 KB flash memory, which is roughly the size of the latest firmware image.
  
  According to [the datasheet for this board](http://www.keil.com/dd/docs/datashts/atmel/at91sam7s256_sum.pdf), it should be good for 10,000 write cycles.
  
  > * 256 Kbytes of Internal High-speed Flash, Organized in 1024 Pages of 256 Bytes
  >   + Single Cycle Access at Up to 30 MHz in Worst Case Conditions
  >   + Prefetch Buffer Optimizing Thumb Instruction Execution at Maximum Speed
  >   + Page Programming Time: 4 ms, Including Page Auto-erase, Full Erase Time: 10 ms
  >   + 10,000 Write Cycles, 10-year Data Retention Capability, Sector Lock Capabilities, Flash Security Bit
  >   + Fast Flash Programming Interface for High Volume Production
  
  10,000 is actually quite a bit, and would take a very long time to reach intentionally, even if you automated it to run 24/7.
  
  I'm not sure how fast you physically can flash the firmware, but if you did it once every 10 minutes 24/7, it would take you almost 70 days to reach that limit.
  
  If you flashed it a still-unrealistic 10 times per-day, it would take you 1000 days to reach that limit.
  
  And of-course, if you did it once per-day, it would take you over 27 years.
  
  In practice, I think it's much more likely some other hardware component will fail first.
  
  > **Comments:**
  > **username_0**: Not particularly reassuring. Thanks anyway.  
  
  ---
  
  ### Answer by username_2 on 2020-01-10. Score: 2
  
  I've found [a very old NXTasy thread](https://web.archive.org/web/20090224115834/http://forums.nxtasy.org/index.php?showtopic=1528) that answers this question definitively.
  
  > Flemming Bundgaard, from LEGO, ran two or three test-to-failure runs with my NXTTools utility repeatedly setting the brick into firmware download mode and downloading the standard NXT firmware to the brick. In each of his tests the brick failed, if I recall correctly, after ~7000-8000 iterations. There is no doubt that if you put your NXT into boot mode somewhere in the neighborhood of 8000 times your brick will no longer accept a new firmware download. You can test this yourself if you like using NXTTools undocumented iteration count switch and a brick running on an external power supply. Each iteration takes about 30 seconds so the test will run for ~67 hours. Of course, your brick could have a different lock bit lifespan than Flemming's bricks had. It is also worth pointing out that if you reflash or reset your NXT once a day 365 days a year it will probably take you almost 22 years to wear out your lock bits. If you do it 10 times a day, everyday, then your brick should last 2.2 years.
  
  
  ---
  
  