Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. The best memory chip for a SAMD node?

The best memory chip for a SAMD node?

Scheduled Pinned Locked Moved Hardware
8 Posts 3 Posters 2.0k Views 1 Watching
  • 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.
  • sky2000S Offline
    sky2000S Offline
    sky2000
    wrote on last edited by
    #1

    I am developing a SAMD node and wonder what would be the best memory chip to fullfill the following requirements:

    • the ability to safe application data like the MySensors configurations and save states
    • OTA update
    • good life time
    • not too expensive

    The internal EEPROM emulation is not a solution. It has only 50.000 write cycles and minimum 4kb erase pages.

    So, what do you think about it? The SAMD is getting more and more around..

    1. My first thought was to put a flash on it like on the moteino. But I would not get MySensors up and running because of the very big erase pages (although I could double the space - flash is cheap - and write an API which enables me to write single bytes with wear leveling in mind). This needs adaptations to MySensors but only in the hardware specific part.

    2. I could get a good small EEPROM and write / adapt the bootloader to load a new rom over the air. The space for the bootloader is not an issue (8kb or may be 16kb). But the bootloader would get more and more complex. It would need configurations, more frequent updates because of changes or bugs and it could even get MySensors specific!? This also needs adaptations to MySensors - but theses are already work in progress ??

    3. I could also use a 2Mbit EEPROM to store the OTA rom and application data. But this one would be much more expensive (like about three times of a flash) and needs adaptations to MySensors too to safe the OTA rom in an EEPROM and not flash. Adapting the bootloader would not be an issue for me - I already did it.

    4. The internal EEPROM for OTA updates is not sufficient due to the max of 16kb - so far for the official emulation / lock. But one could cut the internal flash into halfs and use the upper one for the OTA download. The bootloader, the linker script and even the region lock could take care of this memory border. This might be okay for the 256k variant but not for the smaller ones !?

    So, many options.. and I'm not sure which way to go.. may be I tend to option 2?

    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      I'd go with option 1 and https://github.com/pellepl/spiffs - no need to write your own file system.

      sky2000S 1 Reply Last reply
      0
      • scalzS Offline
        scalzS Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #3

        @sky2000
        Hi.

        that's very interesting :)
        I thought a bit about this as i have some custom samd21e nodes. but these are proto for fun, so i have not solved the question, no ota :disappointed:
        but I thought that 4) could solve it. Even with d21e17 (i'm using those) that is 128k, i don't know what could be the resulting free program mem but i think a lot more than 328 lol. the 256k is nice too sure
        I still needed an eeprom for using with mysensors so I'm using a cheap basic 24lc32 for the datastorage, i didn't wanted emulation.
        Thinking about this, it seems that we could roughly samd+spiflash vs esp32 : nice mcu with flash for ota, spiffs...
        but i like samd too, it's cool, and my serial gw is a samd21e17 dongle, so.. :)

        But your idea is really interesting if SAML could be integrated to arduino in future. it starts to appear at interesting price in the tqfp version, and i think could be a very nice alternative to pico 328p. I mean for arduino world, as there are other alternative like cc1310 etc but not arduino.

        Sorry I didn't help you too much :blush: but the link from @mfalkvidd is nice :thumbsup:
        I will follow your work :)

        sky2000S 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          I'd go with option 1 and https://github.com/pellepl/spiffs - no need to write your own file system.

          sky2000S Offline
          sky2000S Offline
          sky2000
          wrote on last edited by
          #4

          @mfalkvidd I already found a similar library - but cannot find it again. My thoughts were that a full filesystem is really too much overhead for just storing some configuration bytes. But the more I think about it, the more I like the idea. Flash is really cheap and with 8Mbit it would be enought - also for wear leveling. The first 2Mbits are reserved for OTA downloads and the rest is formatted with the filesystem. A application could reuse it for data logging or something like this..

          I already tried to implement it. But spiffs is not a out of the box library and I'm not quite sure how this hardware specific should be integrated to MySensors..

          I also found this for the spark core: https://github.com/m-mcgowan/spark-flashee-eeprom

          1 Reply Last reply
          1
          • scalzS scalz

            @sky2000
            Hi.

            that's very interesting :)
            I thought a bit about this as i have some custom samd21e nodes. but these are proto for fun, so i have not solved the question, no ota :disappointed:
            but I thought that 4) could solve it. Even with d21e17 (i'm using those) that is 128k, i don't know what could be the resulting free program mem but i think a lot more than 328 lol. the 256k is nice too sure
            I still needed an eeprom for using with mysensors so I'm using a cheap basic 24lc32 for the datastorage, i didn't wanted emulation.
            Thinking about this, it seems that we could roughly samd+spiflash vs esp32 : nice mcu with flash for ota, spiffs...
            but i like samd too, it's cool, and my serial gw is a samd21e17 dongle, so.. :)

            But your idea is really interesting if SAML could be integrated to arduino in future. it starts to appear at interesting price in the tqfp version, and i think could be a very nice alternative to pico 328p. I mean for arduino world, as there are other alternative like cc1310 etc but not arduino.

            Sorry I didn't help you too much :blush: but the link from @mfalkvidd is nice :thumbsup:
            I will follow your work :)

            sky2000S Offline
            sky2000S Offline
            sky2000
            wrote on last edited by
            #5

            @scalz Thanks for your thoughts! The cc1310 is really interesting.. may be for the next project ;-)
            I like the SAM family but I sometimes I have doubts if I have chosen the right mcu. This is especially for the 5000$ for a USB id for the bootloader if I am going to sell some of these things.. May be I could circumvent it with an STM? But I like it to write my own bootloader too :-)
            The SAML is really nice and I'm already experimenting with it :-D
            So, I will go with the flash option and prepare a second prototype. I hope to get my first panel after this round..

            1 Reply Last reply
            0
            • scalzS Offline
              scalzS Offline
              scalz
              Hardware Contributor
              wrote on last edited by scalz
              #6

              @sky2000
              what? SAML? oh no, unfair :smile: do you use it with Atmel studio, not with arduino yet? I have a big sensors order to do, so I think I will add one for curiosity.
              Same for me about the mcu choice..it moves too fast! and always something different. I'm really curious to try esp32 and its price, it could be my winner if power consumption is nice. And no, please, don't tell me you have the ESP31 beta version :laughing:

              Keep the good work, I will follow it, sure ;)

              sky2000S 1 Reply Last reply
              0
              • scalzS scalz

                @sky2000
                what? SAML? oh no, unfair :smile: do you use it with Atmel studio, not with arduino yet? I have a big sensors order to do, so I think I will add one for curiosity.
                Same for me about the mcu choice..it moves too fast! and always something different. I'm really curious to try esp32 and its price, it could be my winner if power consumption is nice. And no, please, don't tell me you have the ESP31 beta version :laughing:

                Keep the good work, I will follow it, sure ;)

                sky2000S Offline
                sky2000S Offline
                sky2000
                wrote on last edited by
                #7

                @scalz No, it is a SAMD so far ;-) Arduino integration for SAML would be a really tough challenge - although it is nearly pin compatible but the registers are not. I go for the low power sub-ghz route - so I have never played with an ESP. The real game changer may be the official meshing for BLE..

                1 Reply Last reply
                0
                • scalzS Offline
                  scalzS Offline
                  scalz
                  Hardware Contributor
                  wrote on last edited by scalz
                  #8

                  @sky2000
                  ah oki. i agree about saml registers, that's a big job.
                  I'm for lowpower sub ghz too mainly because i don't want wifi for everything.
                  but i have few things working with esp. and this is really a nice mcu if you don't look at pin count&mux, and power consumption. But spiffs, ota, lot of libs etc works very well. Impressive when you think this is quite recent.

                  but look at the LoPy, esp32 based. ble mesh or subghz will be possible. i can't wait to make my own ;)
                  I think esp32 will be a game changer, sure more expensive than 8266. but I remember that 8266 didn't start at 2$ and today...you should look at the specs..https://espressif.com/en/products/hardware/esp32/overview

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  18

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.1k

                  Posts


                  Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • MySensors
                  • OpenHardware.io
                  • Categories
                  • Recent
                  • Tags
                  • Popular