The
problem is you're not waiting for BlockStorage to get done mounting before you
start reading/writing.
You
should mount(1), and only access BlockStorage again after mount() returns FAIL
or you get the event mountDone(..) back.
In
mountDone(..), call your write(..) statement - if write(..) doesn't return
FAIL, you should expect a writeDone(..) event back.
And in
writeDone call your read(..) statement.
Follow
the same flow if you want to erase the sector. Just don't try to
call more than one BlockStorage command at once because the
flash will already be busy doing something else.
-David
-----Original Message-----Hi all,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jagan nath
Sent: Tuesday, February 14, 2006 2:43 AM
To: tinyos-help@Millennium.Berkeley.EDU
Cc: [EMAIL PROTECTED]
Subject: [Tinyos-help] doubt in read/write flash (tmotes)
i have written a small sample program to
check the read/write functionality on external flash on tmotes. some how it is not working
I,m appending the code below,can anyone look into it and find out the bugs please.
The program is compiling fine but when loaded on to the mote, the green LED is glowing, i.e the BlockWrite.write() is failing.
Can u please look into it.
regards
Jagan
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help