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

    How can I write to SiPy flash memory?

    Scheduled Pinned Locked Moved SiPy
    sipyinternal flashdocumentation
    4 Posts 2 Posters 2.4k 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.
    • A Offline
      apsolar
      last edited by

      I need persistent storage for my application and intend to use the internal flash memory. The spec sheet says that there is 4MB flash but I can't find any documentation for using the flash. We are not designing another pcb and intend to just use the sipy board with a power supply for a demo. Without having the ability to use onboard flash memory, the application isnt much use when the power resets which would happen periodically.

      1 Reply Last reply Reply Quote 0
      • A Offline
        apsolar
        last edited by

        more info about my Sipy
        rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
        configsip: 0, SPIWP:0xee
        clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
        mode:DIO, clock div:1
        load:0x3fff9010,len:12
        ho 0 tail 12 room 4
        load:0x3fff9020,len:388
        load:0x40078000,len:11584
        load:0x4009fb00,len:848
        entry 0x4009fc9c
        MicroPython v1.8.6-724-g2b9ed601 on 2017-07-28; SiPy with ESP32
        Type "help()" for more information.

        import os
        os.uname()
        (sysname='SiPy', nodename='SiPy', release='1.7.8.b1', version='v1.8.6-724-g2b9ed601 on 2017-07-28', machine='SiPy with ESP32', sigfox='1.0.
        1')

        1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino
          last edited by jmarcelino

          You can write files to the onboard /flash filesystem, there's about 512Kb available

          (the stated 4MB includes the space taken up by two copies of MicroPython and some system storage area)

          See this existing topic on how to read/write to files:

          https://forum.pycom.io/topic/1610/nonvalatile-storage-on-wipy

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            apsolar @jmarcelino
            last edited by

            @jmarcelino Thank you for sharing this. To add to this question, are there code example of we can persist an array of structs to the file system? I have a clear idea of how I want to implement a simple persistent database but I cant find micropython examples of doing so. The btree library would have been great but I realised I couldnt use it in this version of the port.

            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