Netduino home hardware projects downloads community

Jump to content


Photo

Accessing NVRAM


  • Please log in to reply
2 replies to this topic

#1 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 10 December 2014 - 10:01 PM

Is there a driver needed to access the NVRAM and write persistent data to the ARM processor?

How much NV is available in say the ARM M4 on the Netduino plus 2?

 

Can you make a DeviceIOControl Call to get to flat memory?

how is this done?

 

Do we have a library for doing this?

 

thanks

 

PETER

 



#2 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 02 January 2015 - 03:15 PM

I think there IS a need for this. SD Cards are overkill (and expensive). A lot of projects just need to save a little bit of configuration data. 

 

I have found some information about using ExtendedWeakeReferences class to save data across sessions (see http://informatix.mi...WeakReference).However, Chris Walker posted (e.g. here) that it isn't supported on Netduino and that there are 'better methods'. But he never says what those better methods are...

 

@Chris Walker... what's the recommended way to store persistent data other than on an SD card? (i.e. in the built-in flash memory)?

 

--Tim Long



#3 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 02 January 2015 - 07:05 PM

I think there IS a need for this. SD Cards are overkill (and expensive). A lot of projects just need to save a little bit of configuration data. 

 

I have found some information about using ExtendedWeakeReferences class to save data across sessions (see http://informatix.mi...WeakReference).However, Chris Walker posted (e.g. here) that it isn't supported on Netduino and that there are 'better methods'. But he never says what those better methods are...

 

@Chris Walker... what's the recommended way to store persistent data other than on an SD card? (i.e. in the built-in flash memory)?

 

--Tim Long

 

 

There are really no other methods. You need to write a driver or access code to get to the memory map for the processor and do an DeviceIOControl command to access the driver in standard windows. This is just a framework. So what you need to do is write an assembly module that knows where the registers are and the free area of the NVRam, then poke the memory. You map the pointer to a struct then populate the struct. I do not know if wear leveling is needed for this but it should not be to hard. I have not had the time to devote to this as I am relocating to a new house. I will get back on this soon.

 

Basically. All you need to do is write memory as a flat pointer to the Processor's memory map for that area.

That should be it. Having a C# feature to do this would be cool.

It has to be processor specific due to how the memory is setup and the  mode the processor is in matters as you can strap most of these devices as I have seem in different modes with different things enabled.

 

I have a M4 for the Net Duo 2. so I will have to see what it takes to do that. It would be good to have just a console and C++ as well as C# assembies






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.