Announcement

Collapse
No announcement yet.

Problem with updating display from uSD card

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

  • Problem with updating display from uSD card

    Hello all,
    I have searched the forum and found a few related posts, but no one seems to have had the same problem that we have.

    We would like to have the ability to update displays by only swapping out the uSD card, without having to use a programming adapter to write the updated program to flash.

    My understanding is that I first have to run "Update Bank(s) and Run" to write the parent program that allows this feature to Bank 0. Then I select uSD as the destination (which automatically selects Bank 1), build, copy all the files (including RunBank1.4xe) to the card, reinsert the card, and I should be good to go. However, when I reapply power I get the following message:
    Code:
    Bank 1 Update reqd: 2019/12/12 18:21:34 != 0/00/00 00:00:00
    Program failed to load into Flashbank 1
    The same program runs perfectly fine when selecting Flash as the destination.

    I am fairly new to all this, so it's probably something dumb I did (or didn't do). Does anybody have an explanation?

    Btw, I am using the ViSi-Genie environment in Workshop 4.5.0.17 with a Gen4-uLCD-50DCT-CLB.

    Thanks in advance,
    Wolfgang

  • #2
    Sorry, never seen this before, there are several possibilities, but most are checked and shown with meaningful text.

    To get the underlying reason printed out please place the file in the attached zip in C:\Users\Public\Documents\4D Labs\4DUpdates\Utils replacing the one that is already there

    Then click on 'Update Bank(s) and Run' to reload the updated stub program.

    Then when you try and run the update you will get a reason code.

    This code has the following meanings

    Code:
    FL_BAD_BANK_NUMBER      1   // bank number out of range
    FL_BAD_PAGE_NUMBER      2   // page number out of range
    FL_OVERWRITE_DENIED     3   // write protected or current running bank overwrite
    FL_PAGE_WRITE_DENIED    4   // write would overlay executable code
    FL_BAD_BANK_SETTINGS    5   // bank to load to invalid
    FL_MOUNT_FAILED         6   // mount failed for uSD (uSD missing)
    FL_OPEN_FAILED          7   // open filed for file (file missing)
    FL_FILE_SIZE            8   // File too large to load in bank
    Let us know what you get.
    Attached Files
    Mark

    Comment


    • #3
      Thank you, Mark.

      I did as you said, and it gives me reason 6. However, the card is definitely inserted properly. Plus, if I switch back to "Run from Flash" the card mounts just fine and the program executes (so, I don't think the card is bad). I tried a different card anyway, same result.

      Any idea what this could be?

      Comment


      • #4
        Can you give us the make and model of the card.

        I'm guessing it's not a Phison Industrial card sourced from us?
        Mark

        Comment


        • #5
          Indeed, it's not a card sourced from you. I purchased the display from RS in Germany. They carry a pretty extensive range of your products, but not your recommended card.
          The one I used is a 4 GB Intenso class 4. The other one was a Sandisk. Not sure wich type, I don't have it at hand at the moment.
          If the card is the problem, and I can't source the one you recommend, which other, more accessible, type could I try?

          Comment


          • #6
            I'm wondering if we can get this card working, although a card without read disturb protection is always a bit of a worry for long term use.

            Run the attached, you should get a continuous stream of the same number to the display, but in your case I suspect you will get an alternating number and 0. You might even get one number and then continuous 0s.

            Then uncomment line 11 and run again, hopefully you will then get the right output, but you might not.

            If you get the right output, then you can try inserting line 11 after line 149 in the UpRunBank.inc file.
            Attached Files
            Mark

            Comment


            • #7
              Now it's there. 👍
              Last edited by wpunkts; 14 December 2019, 07:03 AM.

              Comment


              • ESPsupport
                ESPsupport commented
                Editing a comment
                Sorry, I forgot it initially, you must have viewed it before I remembered and attached it

            • #8
              With line 11 commented out, I get alternating 16342 and 0. After uncommenting line 11, I get 16339 and 0.
              Btw, I found the Phison card on Mouser Germany, so I'll order one. Seems to be a good idea anyway. Still, I'd like to figure out what's wrong (i.e. is it the card I'm currently using, or some other issue/defect?)

              Comment


              • #9
                Right, so it's failing every second mount. (The differing numbers are just because the RAM address of the disk structure changes because the program is a different size)

                There might be a way to fix this, but I'd need one of these cards to Diagnose the issue.

                So, it would, appear that the workaround should be to place a simple
                Code:
                file_Mount() ;
                after line 149.

                It's quite odd that the unmount achieved nothing, but we have to remember that the most common way these cards are used is that they are power cycled between inits, so issues like this become more unusual to catch.
                Mark

                Comment


                • #10
                  Well, that did it! Thank you so much. So, you reckon it's the card and not something else? I'll make sure to test with the original, unedited UpRunBank once I have the Phison card.

                  Comment


                  • #11
                    Pretty sure it's the card, but no idea if it's just 'that card', or every card from that manufacturer 'from now on'.
                    Mark

                    Comment

                    Working...
                    X