Author Topic: EEPROM/Flash  (Read 13191 times)

Cez

  • RFduino Jr. Member
  • **
  • Posts: 21
  • Karma: +2/-0
    • View Profile
EEPROM/Flash
« on: November 25, 2013, 01:11:49 AM »
I need to store some data that persists even after the module loses power. If RFduino doesn't have EEPROM, we need to use the Flash memory, right? How is this achieved?

ticpu

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #1 on: November 28, 2013, 10:10:53 PM »
I'd really like to know that as for example, I was not able to set output power while the device is running as RFduinoBLE.begin() seems to restart the device, so to set the power / advertisement it seems necessary to reboot at the moment which makes it impossible to change any bluetooth parameters.

RFadmin

  • Administrator
  • *****
  • Posts: 77
  • Karma: +9/-2
    • View Profile
Re: EEPROM/Flash
« Reply #2 on: December 05, 2013, 06:49:36 PM »
Hi Guys, we are working on a method to write and read from flash, its coming soon  :)

Cez

  • RFduino Jr. Member
  • **
  • Posts: 21
  • Karma: +2/-0
    • View Profile
Re: EEPROM/Flash
« Reply #3 on: December 05, 2013, 10:12:46 PM »
Hi Guys, we are working on a method to write and read from flash, its coming soon  :)

Thanks for the reply. I really need this feature!

wingedpower

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #4 on: December 09, 2013, 09:48:41 PM »
+1 for this. I'm working on a beacon project and EEPROM functionality is something I used with the normal arduino and standalone atmega328P chips. EEPROM read/write would be invaluable.

Thanks!

Wing,

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: EEPROM/Flash
« Reply #5 on: December 20, 2013, 01:32:10 PM »
Hi, please download the latest RFduino version from http://www.rfduino.com/download.html .

A flash read/write feature was added in version 1.5.0

disk91

  • RFduino Jr. Member
  • **
  • Posts: 24
  • Karma: +1/-0
    • View Profile
    • www.disk91.com
Re: EEPROM/Flash
« Reply #6 on: January 20, 2014, 01:20:43 AM »
Really good to see this upgrade. Will you update the documentation with the API to be used ?
http://www.disk91.com - website
https://twitter.com/disk_91 - follow me on twitter

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: EEPROM/Flash
« Reply #7 on: January 20, 2014, 12:21:57 PM »
Hi disk91, yes we will be updating the API as we move along.

MichaelJay

  • RFduino Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #8 on: January 26, 2014, 09:51:04 AM »
I don't see the library EEPROM.h available. What syntax do I use to read / write EEPROM memory?

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: EEPROM/Flash
« Reply #9 on: January 27, 2014, 01:05:56 PM »
Hi Michael, the RFduino does not have a EEPROM. You will have to use the Flash memory instead.

mtnscott

  • RFduino Jr. Member
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #10 on: February 04, 2014, 10:01:18 AM »
I'm trying to use the flash and the RFduino resets after I call flashPageErase(251).  The example in RFduinoNonBLE/Flash/FlashStructure also does not appear to work. 

Could you send us an example of how to erase and flash variables stored in a structure.

Thanks

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: EEPROM/Flash
« Reply #11 on: February 04, 2014, 12:49:09 PM »
Hi does the FlashButtonUpdate example not work properly and does it also reset?

mtnscott

  • RFduino Jr. Member
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #12 on: February 04, 2014, 01:47:44 PM »
Well, I did not try since I did not have the RGB / Button shield. But with that said, I took a look at the schematics and wired up the button & led.  That example does work.

mtnscott

  • RFduino Jr. Member
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: EEPROM/Flash
« Reply #13 on: February 04, 2014, 02:52:41 PM »
So I went back and got the FlashStructure example to work.  However when I added RFduinoBLE.begin() it misbehaves.

I am guessing that you can't have the radio active when you want to write flash.  I'm surprised that the flash write function does not just return an error instead of resetting, or hanging.
« Last Edit: February 04, 2014, 03:16:43 PM by mtnscott »

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: EEPROM/Flash
« Reply #14 on: February 05, 2014, 02:18:06 PM »
Hi, correct you probably don't want to perform flash write operations while the radio is busy. You can try using:

while (RFduinoBLE.radioActive)
    ;

To wait while the radio is busy before performing critical tasks

 

anything