Yes, and it's not returning any errors.

On 2/21/07, Leijun Huang <[EMAIL PROTECTED]> wrote:

Did you call BlockWrite.commit() after writing to the flash ?

--Leijun

On 2/21/07, Bob Merrison <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm developing an application in TinyOS-1.x for a Moteiv TMote Sky mote
that
> makes fairly heavy use of the mote's 1024k external flash - via the
> components BlockStorageC, FormatStorageC (from Deluge), and FlashWPC. My
> application has various configuration parameters that need to be
persisted
> when the device is reset, as well as some data that it collects while
> running. As such, when formatting the flash I create two volumes -
> VOLUME_ID_SYS (ID 0xD0) to store the config stuff and VOLUME_ID_MATCH
(ID
> 0xD1) to store the main data as it is collected. The sequence of events
that
> occur when the device is first started up is:
>
> [In StdControl.start] Call Mount.mount(VOLUME_ID_SYS) [Mount the system
> volume]
> [In Mount.mountDone] Call BlockRead.read(...) [Read in system
configuration
> parameters]
> [In BlockRead.readDone] Call Mount.mount (VOLUME_ID_MATCH) [Mount the
main
> data volume]
> [In Mount.mountDone] Call BlockWrite.erase() [Clear out main data on
> startup]
> [In BlockWrite.eraseDone] Set state to main idle state.
>
> I'm checking the return value and status of every operation and nothing
is
> going wrong. Reading and writing to the system config volume works
> absolutely perfectly. However, I am getting some really weird problems
with
> the main data volume. Once some data has been collected and stored in
flash,
> when I attempt to read a record out of the flash the values are not at
all
> what I expected them to be. This itself wasn't a huge concern, as it
could
> well have been a problem with my data collection code. To try to figure
out
> what was going wrong, I added the FlashViewer component to my
application,
> connected to it using the FlashViewer Java application, issued the mount
> command to mount the main data volume (-mount 0xD1) and then read what
> should have been the first data record. The record was completely empty
(all
> Fs). I restarted the mote so that my application would bind the main
data
> volume and then ran FlashViewer again, this time not issuing any mount
> commands first, so that it would use whatever volume was already
mounted.
> Strangely enough, I got the same nonsense data out that I had read
before
> using my normal method.
>
> All I can surmise from this is that somehow when I mount the main data
> volume on startup some different area of memory is being mounted. Can
anyone
> offer any suggestion as to what might be going on?
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
>
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to