[Tinyos-help] LogWrite.erase() bug in LogStorageP?

David wizzardx at gmail.com
Wed Mar 12 04:09:16 PDT 2008


Hi list.

My app erases a flash log at startup, and then starts appending to it.
The first append seems to always have a recordsLost error. I didn't
have this before (I only added in the erasing recently).

Basically, the logic is:

1) Call LogWrite.erase()
2) Wait for the LogWrite.eraseDone()
3) Call LogWrite.append()
4) Wait for the LogWrite.appendDone() event
5) Check the recordsLost argument

In 5) the recordsLost argument is always set to TRUE.

My guess is that LogWrite.eraseDone() doesn't tidy up state variables
properly when it runs, so the first append() gets confused. Later
append() operations don't have this problem.

I'm using a tmote sky mote, with stm25p flash. Also, I'm using the
latest tinyOS CVS.

Another question: Does the flash log need to be 262144 bytes (4 64k
erase units) for stm25p flash? This is the size used in the
PacketParrot tutorial app and I don't see it documented anywhere else.

David.


More information about the Tinyos-help mailing list