Announcement

Collapse
No announcement yet.

uSD FileMount fails after hardware reset

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uSD FileMount fails after hardware reset

    Dear All,
    I have this problem. Sometimes, after a Hardware reset the uSD can not be mounted at start up.
    I tried a SystemReset() function at the beginning but this works only if I take away and insert again the uSD from its connector.
    Does anybody have a suggestion for me?

    thank you

    regards,
    Maurizio

  • #2
    What brand of uSD card are you using?

    Perhaps you should try another brand.
    Mark

    Comment


    • #3
      I am using SanDisk 2GB. Can you tell me a good alternative? Not industrial grade please..

      thank you
      regards,
      Maurizio

      Comment


      • #4
        SanDisk should be fine.

        What version PmmC are you using?

        What is the supply voltage to the display?

        Can you post some simple code that demonstrates the issue?
        Mark

        Comment


        • #5
          Hi,
          I am using Pmmc 4.2
          Power supply if 5V, 1A
          Please find attached the boot code that fails after a reset.


          #platform "uLCD-43PT"
          #inherit "4DGL_16bitColours.fnc"
          #inherit "../estor.inc"
          #STACK 400
          #MODE RUNFLASH

          /*********************************************************************
          FileName: MAINBOOT.4DG
          Dependencies: See inherits section
          Device: uLCD4-43PT
          Company: NIROX SRL
          Size: 389 bytes
          ********************************************************************/


          func main()
          var W; //New window object
          var NewTreat:=0; //A new treatment has to be done (1)
          var SelectedLanguage:=0; //Index of the selected language
          var ExitMode:=0; //Exit code of the main window
          var P[23]; //Parameters to be passed to start the main window, see note1

          pin_Set(OUTPUT, LCDOUT); // set IO2 to be used as an output
          pin_Set(INPUT, LCDIN); // set IO2 to be used as an output
          pin_LO(LCDOUT);

          media_Init();

          //uSD check
          if(!file_Mount())
          repeat
          gfx_MoveTo(150,120);
          print("SD Card not detected!");
          pause(1000);
          SystemReset();
          pause(1000);
          until(file_Mount());
          endif


          endfunc




          bye and thank you
          Maurizio

          Comment


          • #6
            Addictionally. I've seen that uLCD43PT is out of stock. Are you planning to stop the production? Is uLCD-43DT a direct replacement?
            Thank you

            Comment


            • #7
              Additcional info: after a failed file_Mount it returned Error code 26 from file_Error() but in the error table this code is not described.

              Comment


              • #8
                Please can I find any support here? Please find attached an image after a reset and following media_Init fail and the code used to create it.
                Attached Files

                Comment


                • #9
                  Sorry for the delay, I got sidetracked yesterday.

                  The uLCD-43PT is currently out of stock, more stock is coming in the next few weeks, unfortunately we have been unable to keep up with sales.

                  Both the programs you have posted appear to work 'normally' for me.

                  But I have a few concerns about the code and what you are trying to achieve with it.

                  1. media_Init() only needed if you are going to access the uSD in RAW mode, file_Mount() is a superset of media_Init()
                  2. What is the purpose of the SystemReset()? You can 'stay' in the file_Mount() loop 'forever', doing a SystemReset() will not achieve anything. The file_Mount loop used in the Designer samples and included in 'new' ViSi programs is all that is needed.
                  3. file_Error() 26 is "Timeout during sector read, probable unexpected media removal". What are you doing to receive this?

                  Can you measure the voltage as it enters the display?
                  Mark

                  Comment


                  • #10
                    Hi Maurizio,

                    I have noticed that the SD card may have some problems with mounting, if the voltage supply has some strange ramps during switch on/off. For example during shutdown, if you have a large supply capacitor, the voltage will quickly drop to some 2 V and the LCD will shutdown, but the SD card will remain in some intermediate state until the supply voltage drops well bellow 0.5 V. This is a feature of the SD card and power supply and not a problem with the display.
                    I also noticed an interesting phenomena in my system. I am powering the display from the device, but for updating the firmware, I attach also the 4D Systems programming cable with the 5V supply pin disconnected. This works fine. But if I switch off the device power supply, there is a small leakage from the programming cable to the power supply line of the display and consequently the SD card, which prevents the supply voltage from dropping to 0V. In this case, after device restart, the SD card will not mount. If I switch off the device again, disconnect the programing cable (SD card supply voltage drops to 0V), reconnect the programming cable and restart the device, the device will restart just fine. Again, this is a feature of the SD card and is probably related to some fault-protection algorithm. This is clearly required in the SD card specification, chapter 6.4.1.2 : "Host needs to keep power line level less than 0.5V and more than 1ms before power ramp up."
                    I am not sure that this is causing your problem, but it is certainly one of the possible causes.
                    Note also that if this is the cause of your problems, there is nothing you can do from display software, as the SD card will be sort-of locked-in and will ignore your attempts to communicate.

                    Regards,
                    Valentin

                    Comment


                    • #11
                      Hi Maurizio, Mark,

                      Just wondered if either of you had any ideas on resolving this. I'm having exactly the same problem.

                      I have a Picaso LCD-43PT hooked up to a PIC micro. My sequence of events is:
                      - Power on system (powers up micro and Picaso)
                      - Micro pulls Picaso reset line low and releases
                      - Micro uses File Mount serial command, works correctly and system runs as expected

                      Subsequently:
                      - Reset micro without power cycling whole system
                      - Micro pulls Picaso reset line low and releases
                      - Micro uses File Mount serial command, fails, error 26 reported.
                      (In other tests I've removed the Picaso reset from my initialisation routine - this makes no difference)

                      It's a Transcend 2GB uSD. PmmC is 4.0. There is no voltage drop to the 4D Picaso card at any point.

                      There doesn't seem to be any way to forcibly reset the SD card, which I'd like to try next - any suggestions?

                      Andy

                      Comment


                      • #12
                        Replace the Transcend card with another brand, they are not very good
                        Mark

                        Comment

                        Working...
                        X