Go to Post A robot is never "complete" - [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2014, 10:14
adlasa's Avatar
adlasa adlasa is offline
President and Lead Programmer
AKA: Sasha
FRC #1458 (Red Ties)
Team Role: Leadership
 
Join Date: Dec 2012
Rookie Year: 2011
Location: Bay Area
Posts: 35
adlasa has a spectacular aura aboutadlasa has a spectacular aura aboutadlasa has a spectacular aura about
CRio Flash Memory

In the WPI tutorial for vision tracking there is a warning about excessive rights to the CRio flash memory in the image tracking program.

It is in regard to writing images to the CRio memory from a camera within a While Loop
Quote:
Warning: It is strongly recommended to comment out the while loop before enabling the image writes in order to preserve the cRIO flash memory. Writing the images within the while loop may result in excessive wear to the cRIO flash memory.
Is this something to be concerned about? I have a hard time believing FIRST would right their code in a dangerous way by default given that a lot of teams may be inclined to just copy and paste.
__________________
Computers run on smoke. When the smoke escapes the computers stop working.
  #2   Spotlight this post!  
Unread 09-01-2014, 10:17
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,521
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: CRio Flash Memory

All non-volatile flash memory has a limited number of writes before it fails. They are cautioning you that constantly using that feature, say on your robot code, can add hundreds of thousands of writes depending on how often you are writing and overwriting the pictures.

It's a bit of overkill: we're still using our first 8-slot cRIO on a regular basis and have not suffered a memory failure. However, it's sound advice. If you're not going to be using those images there's no need to keep writing them to the disk.
  #3   Spotlight this post!  
Unread 09-01-2014, 10:28
E Dawg E Dawg is offline
... is not done with FRC yet.
AKA: Ethan
FRC #0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2012
Location: Fort Collins, CO
Posts: 267
E Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud of
Re: CRio Flash Memory

Using it is okay, just be careful. It shouldn't permanently damage your cRIO, but it can definitely eat up flash memory (and slow down your connection).
  #4   Spotlight this post!  
Unread 09-01-2014, 14:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: CRio Flash Memory

Quote:
Originally Posted by adlasa View Post
It is in regard to writing images to the CRio memory from a camera within a While Loop


Is this something to be concerned about? I have a hard time believing FIRST would right their code in a dangerous way by default given that a lot of teams may be inclined to just copy and paste.
Yes it is something to be concerned about. However, FIRST did not enable the image writing by default. You must uncomment the image write. They give the appropriate warning if you do uncomment the image write.


Quote:
Originally Posted by E Dawg View Post
Using it is okay, just be careful. It shouldn't permanently damage your cRIO, but it can definitely eat up flash memory (and slow down your connection).
This is incorrect. You can permanently damage the flash memory in the cRIO. Like Tom and the Tutorial said, do not write more often then needed.

From the cRIO-FRC II datasheet

Quote:
For information about the life span of the nonvolatile memory and about best practices for using nonvolatile memory, go to ni.com/info
and enter the Info Code SSDBP.
This leads to Understanding and Extending the Life of my Solid-State Drive, which states the following

Quote:
However, solid-state drives have a limited number of write/erase cycles. This disadvantage is the primary focus of this white paper. The physical cells of SSDs wear out over time.
In practice, with the wear leveling that the cRIO performs, I would guess that each team could get at least 1 million 8k writes. Given that an image is likely larger then 8k, if you wrote an image every 20ms, the cRIO flash memory could fail in around 100 hours. But, it's easy to avoid that. Even reducing that rate to once a second makes it so that a team would never run into an issue.

Last edited by Joe Ross : 09-01-2014 at 14:11.
  #5   Spotlight this post!  
Unread 09-01-2014, 16:32
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: CRio Flash Memory

Interestingly enough, the 2014 version of WPILib/C++ writes a file to flash memory every time that the cRio boots.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #6   Spotlight this post!  
Unread 09-01-2014, 18:24
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: CRio Flash Memory

Quote:
Originally Posted by virtuald View Post
Interestingly enough, the 2014 version of WPILib/C++ writes a file to flash memory every time that the cRio boots.
Better not boot the robot more than a million times.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi