Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Memory loses all data when the battery is empty

    Scheduled Pinned Locked Moved WiPy 2&3
    wipyexpansion boardflash
    6 Posts 2 Posters 27 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      Wolli01
      last edited by

      I often have problems when I let my Wipy with board us battery run down and then reconnect it to USB/battery or AC adapter, it loses all stored data and then only flashes blue. Does anyone know this problem?

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Wolli01
        last edited by

        @Wolli01 What do you mean with "looses all data"?

        Is the file system empty at that point?
        Which file system do you use, LFS or FAT?

        AFAIK, brown out protection is not implemented. So you have to do that in your code. ESP32 works fine down to 3V. So you can switch off your device at that point in a controlled manner.

        1 Reply Last reply Reply Quote 0
        • W Offline
          Wolli01
          last edited by

          It loses the whole program what was on it. Afterwards it is like in the delivery state. The blue light shines in the cycle. All data is gone. This does not always happen but a few times. So an example:
          The program runs days, weeks excellent over a USB power supply. Then I pull the power plug and let it run on the internal Lipo battery until it is empty. If I then take the board and connect it to power, it happens in between that suddenly all data are gone.
          Chip-Release: 1.18.3 Version: v1.8.6-849-e0915e1 on 2019-10-06 Board: 1.1.2

          Translated with www.DeepL.com/Translator (free version)

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wolli01
            last edited by

            How can you turn it off in a controlled way?
            I have also had it when I disconnect the usb cable from the board (without an internal battery) that the data is also gone.
            Like some kind of short circuit

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @Wolli01
              last edited by

              @Wolli01 No 1: You should upgrade to a recent firmware and use the littlefs file system. That is built be more safe against file corruption upon power failure.

              You can measure the Vin voltage with the built-in ADC. If you use the expansion board, VBatt is connected to P16 via a voltage divider. The division factor depends on the expansion board model, but you have to tell anyhow the ADC read-back value at which the battery is low. At that point you must close all files. Unfortunately, the is no "power off and stay off" mechanism implemented. So you have to do something like that in your code. There is little 100% reliable I can think of. It will be complicated by the fact, that the battery will recover a little one it is less used, and the power capability depends on the temperature. But at least you can avoid any file operations if the battery voltage is low.
              File operations of the firmware during boot are out of reach for your code.

              1 Reply Last reply Reply Quote 0
              • W Offline
                Wolli01
                last edited by

                Thank You

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom