About flash memory of the OpenRB-150

Hello,

I have a quick question. Can I save a data to the flash memory inside of the OpenRB-150? The manual says it has 256kB memory, but I cannot find any description about it in the manual. Could you let me know?

Bests,
HyunGyu Kim

@hyungyu8066

For these types of questions, the key concept is to remember that the OpenRB-150 is a variant of the Arduino MKR ZERO (i.e. SAMD21 controller). So when I made a search on Arduino references to Flash Storage for the MKR ZERO, I found these links:

So I just followed their instructions:

  1. Use the Arduino Library Manager to install the FlashStorage_SAMD library (currently V. 1.3.2).

image

  1. Go to your user Documents folder on Windows, i.e.
    C:\Users\username\Documents\Arduino\libraries\FlashStorage_SAMD\examples\FlashStoreAndRetrieve to find the example sketch “FlashStoreAndRetrieve.ino”.

image

  1. I have verified that this sketch compiled and downloaded to the OpenRB-150 OK.

  2. This sketch is designed to add ONE to the current value found in EEPROM’s address “0”, each time that it is executed.

First run then I pushed reset button on OpenRB-150

FirstRun

Second run then I pushed reset button on OpenRB-150

SecondRun

Third run

ThirdRun

Then I completely Powered Off the OpenRB-150 and then re-enabled power to the 150 and ran the sketch again

4thRunAfterCompletePowerOff

So this example sketch is working as it is supposed to :grinning:

Thanks for your reply!!! it was helpful!

Hello,

I have one more question. The saved values are changed if I upload the code again, even I did not update the value. Is it normal? it always show -1.

Every time that this “ino” program is run, it prints the current value that it finds at address 0 (line 57), and then adds 1 to it (line 60) for the next run, then this program terminates (as shown in my previous post). Remember to close your Serial Monitor window each time to refresh it.

If your 150 keeps on showing -1, then there is something wrong with your hardware and that part I do not know how to fix. You better ask the Arduino Forum directly or try this program on another 150 if you have one.