You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a Moteino M0. A Moteino M0 uses a ATSAMD21G18 processor. When I try to run a simple serial gateway, I found during initialization when MySensors tries to write the parent node id to eeprom, the process hanges. I put debug statements before and after each line to isolate the place it hung. According to the SAM D21 datasheet, the eeprom is emulated. Here is the line where it hangs,
The booloader is located in the first 8KB of internal flash memory and is protected by the NVM user byte fuse.
There is no dedicated EEPROM on the SAMD21 microcontroller but EEPROM can be emulated up to 16kb and the Arduino EEPROM library can be used to access this emulated EEPROM.
I also found this arduino issue related to the eeprom on SAMD.
I think the current SAMD configuration was developed around the Sensebender-Gateway. Based on the BOM, the Sensebender-Gateway has an extra "32Kb (4096x8) Serial EEPROM with Unique Serial Number"
In my local copy of MySensors, I #ifdef wrapped the calls to hwRead/hwWrite and the gateway runs as expected. In the MyHwSAMD.h, there is currently no way to opt out of the external EEPROM,
In my case, I can think of the following options for persisting the configuration,
Use the emulated eeprom
Use external flash memory (Moteino M0 has an optional
Do not persist the configuration
I would like some help coming up with a proposed solution that can be merged into the main MySensors. The very first thing that comes to mind is adding a new defines to define what kind of storage to use (eeprom, external eeprom, i2c / spi flash, none).
The text was updated successfully, but these errors were encountered:
Yes, I was only focusing on using the external eeprom when I made the initial samd support, so emulated eeprom was never made.
We should support the emulated part, but as the emulated eeprom is done in flash, which has a reduced re-write count (compared to real eeprom), we should still keep the external eeprom as an option for gateways etc (which stores routing tables, and other "frequently updated" content in eeprom).
Right now coding time on mysensors is almost at zero, due to other projects that has higher WAF score :) but I'll be happy to do code reviews..
Moved from #1066.
I am using a Moteino M0. A Moteino M0 uses a ATSAMD21G18 processor. When I try to run a simple serial gateway, I found during initialization when MySensors tries to write the parent node id to eeprom, the process hanges. I put debug statements before and after each line to isolate the place it hung. According to the SAM D21 datasheet, the eeprom is emulated. Here is the line where it hangs,
MySensors/core/MySensorsCore.cpp
Line 165 in 3ae4fb6
A note from Moteino M0 guide, https://lowpowerlab.com/guide/moteino/moteinom0/
I also found this arduino issue related to the eeprom on SAMD.
I think the current SAMD configuration was developed around the Sensebender-Gateway. Based on the BOM, the Sensebender-Gateway has an extra "32Kb (4096x8) Serial EEPROM with Unique Serial Number"
In my local copy of MySensors, I #ifdef wrapped the calls to hwRead/hwWrite and the gateway runs as expected. In the MyHwSAMD.h, there is currently no way to opt out of the external EEPROM,
MySensors/hal/architecture/SAMD/MyHwSAMD.h
Lines 48 to 50 in 3ae4fb6
In my case, I can think of the following options for persisting the configuration,
I would like some help coming up with a proposed solution that can be merged into the main MySensors. The very first thing that comes to mind is adding a new defines to define what kind of storage to use (eeprom, external eeprom, i2c / spi flash, none).
The text was updated successfully, but these errors were encountered: