No announcement yet.

SD card corruption in field

  • Filter
  • Time
  • Show
Clear All
new posts

  • SD card corruption in field

    We have had one display come back from customer with corrupted display data. Display is Gen4-ULCD-43D, has two display images on SD (class4), comm via serial port, Driven by Arduino.
    First image loaded OK, second image has missing display elements. Reflash SD, everything runs OK. Replaced with class 10 SD for grins.

    Is this a common problem? I found one article about flash corruption when writing to SD with marginal power. We are only reading SD, no writes other than initial programming. Power should be OK, have an active rest circuit monitoring supply for dropouts/interruptions.

    Display data has 5 LEDText elements and 6 text blocks. Communicating at 9600 baud.

    Any ideas/suggestions?

  • #2

    What is the brand of microSD card you are using?
    Is it a 4D Systems microSD card, or something else?

    From what you are describing, it seems like "Read Disturb Phenomenon", which is a sad reality we have to deal with, when using microSD cards (specifically NAND Flash memory).
    Its basically caused by reading blocks of the microSD card over and over, such as the updating of fonts or widgets on the screen, which results in neighbouring bits in the microSD card loosing their charge and going from 1's to 0's or vice versa, and hence causing corruption. Note, it is the reading that causes it, which is counter intuitive to normal corruption.

    The only way around this is to use microSD cards suited to the application, which is why we offer industrial microSD cards on our website, which have firmware inside them to prevent read disturb.
    Read Disturb affects all sorts of companies, it is not just limited to ours, but the way our products work it can be exacerbated.

    If you are using an off the shelf cheap commercial card, or worse a cheap clone card, the problem can appear very quickly. Some commercial cards are better than others, but typically they all get it eventually. This was not a problem when cards were 2GB or less in size and used SLC technology, but since cards are getting larger and larger, the problems happen faster and is much more common, and now use MLC or sMLC technology, which has made the problem worse. 2GB and less cards are incredibly hard to source now, and expensive.

    The class of the card (Class 4, Class 10 etc) has no effect at all and means nothing to our displays anyway as our displays operate in SPI mode, not in SD mode which is what those ratings generally refer to.

    One way to slow down the progression of Read Disturb is to only update the display text and widgets when your data changes. You might be updating your text fields more often than you need to, so if you change your code to only update the screen when the text actually changes, then this can reduce the number of reads done to the card (specifically the font files) and can then slow down the progression of read disturb. Likewise for any other widgets you might have. The reason I am outlining Fonts specifically, is they can typically be the worst offenders.

    Depending on the Font you have used, you might be able to fit it inside one of Diablo's Flashbanks, so taking it off the uSD card entirely. Flashbanks are limited in size, so they can not be used for everything, but you do have 6 of them with Diablo, so that would be something I would recommend looking in to.

    I hope this helps



    • #3
      Failure was with a genric (MicroCenter) 4G class4 card. We are using SanDisk Ultra 16G class 10 now (only using first 4G, FAT16) in new builds.

      From your response, is the SD card read every time you send a value to a LEDDIgit?

      I will look into the flashbank option.... can you point me to any documentation that explains how to use it?


      • #4

        There is an example for this in Workshop 4 that may help.

        You can find it by clicking on File then Samples and navigate to Diablo Designer.

        The 2 programs you need are,

        BookAntiqua2032FontsInBank1 which will load the fonts into flashbank1
        FontInBankTest which uses the fonts loaded into flashbank 1

        If the Led Digits you are using are the uSD Led Digits then yes, the SD card will be read each time the LED Digits value changes.

        If you find that the fonts will work for you, it would be possible to use our Internal LED Digits which don't require the SD card

        Click image for larger version

Name:	LEDDigits.png
Views:	68
Size:	19.3 KB
ID:	76713

        I hope this helps

        Best regards



        • #5
          You have lost me somewhere....

          1- If the Led Digits you are using are the uSD Led Digits then yes, the SD card will be read each time the LED Digits value changes.

          If you find that the fonts will work for you, it would be possible to use our Internal LED Digits which don't require the SD card I just selected LedDigits on taskbar (first icon). I do not have the selection you are pointing to in taskbar (only the first four are in my taskbar).....

          2- I currently am using Genie as my command interface to display. Is it possible to access/control the Flashbanks with Genie commands?

          3- I have defined two pages. Page0 id the opening screen displaying "Power-up/Boot". Page1 is the "operating screen". It has 5 LedDigits and 6 text blocks defined. The text blocks normally are only written to during initial power up. The LedDigits are continuously being written to.

          I have attached my Genie files if that helps......

          Attached Files


          • #6

            Sorry about that, I didn't check to see if it was Visi-Genie you are using. The Font's from Fontbanks wouldn't be possible in Visi-Genie but the use of the new LED Digits will be which may solve your issue as the new LED Digits don't use the uSD card.

            Could you please let me know which version of Workshop you are using. You can check by Clicking on File, Options, Updates tab

            Click image for larger version

Name:	WorkshopVersion.png
Views:	64
Size:	77.2 KB
ID:	76717



            • #7
              The PC w/ software in not online, so that page does not appear to load.

              per startup screen v4.5.0.17


              • #8
                OK, after a delay, I have ver loaded.

                I have deleted the LedDigitsx, replaced with ILedDigitsx

                When I do a build, it still prompts for uSD

                I have several Statictextx boxes (in two forms) and two Stringx boxes. How do I replace these with internal style (I am assuming that is the build problem).

                Do I have to do something different to get these loaded?

                Is there a something I need to load/enable in my Arduino program to activate the PmmC Widgets functions?

                I am having difficulty figuring out how to utillize the PmmC widgets.......

                I have attached IDE file of working program for ulcd43d that uses the uSD card that I am trying to get to work with out the uSD card if that helps. Everything is communicated to the 43D via serial data (integer values to LedDigits and Acsii strings for the strings).

                If there is an application notes that explains all this, would be happy to read it if you can point me to it.....
                Attached Files


                • #9

                  Thats great that you have updated to the latest Workshop.

                  It will still prompt you for a uSD due to the use of statictext and strings so this is quite normal. As I mentioned previously it was only the Led Digits that you would be able to change to code based internal Led Digits which may solve your corruption issue with the uSD you are using so it might be worthwhile trying the Led Digits method first to see if this problem is solved.

                  Best regards



                  • #10
                    Just to make sure I am understanding.....

                    I can use ILedDigits to reduce the read hits on the uSD, but the StaticText/Strings will still need be on the uSD?

                    Is there something more than what's in the Workshop for Widgets manual as to how to use them (ILedDigits). The Widget manual doesn't explain the definition options at all (font options, size options, etc). Is there a specific Application note that explains this better?

                    Can I write to the display like I was previously to update the ILedDigits?

                    Do I have to add any Arduino code to enable the PmmC stuff?

                    Thanks for hanging with me on this.......MUCH appreciated!


                    • #11

                      Yes thats correct. I would imagine that the Led Digits updated more frequently and it's possible that your project will work better with these being handled internally

                      This appnote may help with the ILedDigits


                      The GenieArduino library has been updated recently and is available here


                      Also there is some additional information on this page that describes the writing to Internal Led Digits.

                      Best regards



                      • #12
                        Thank you, looks like I have some reading to do ;<)


                        • #13

                          I was previously using this command line to update the values in LedDigitsxx "genie,WriteObject(GENIE_LEDDIGiTS, x , value)"

                          If I add an "I" before LedDigits, I get a "IGENIE_LEDDIGITS not declared" error message when trying to compile (Arduino code)

                          What hoops do I have to do to write to the ILedDigits widget?

                          Since I am no longer loading the old LedDigits to the uSD, are they (ne ILedDigits) automatically loaded to the display during the build operation?

                          I have done a search on your site for "Workshop4 Widgets Refence Manual", get no hits, so obviously I'm looking in wrong place.....


                          • #14

                            You will need to use this to write to the Internal Led Digits

                            genie.WriteIntLedDigits(x, value); // Sets ILedDigits x to integer value

                            You may need to update your genieArduino library to the version on Github for this to work.

                            Best regards



                            • #15
                              I have replaced the LedDigits w/ the ILedDigits in the Workshop IDE. When I do a build, I get no errors, Loads files for text/strings to uSD. When repowering the 43D, I get the following error on 43D screen

                              ADDRESS TRAP
                              UserHeap 29798
                              SysHeap 11984

                              I tried using /tools/Load Inherents into Flash5, it closes active Workshop4 window and does not appear to do anything. I'm suspecting that the internal digits are not getting loaded.....

                              how far off am I?