We revised a piece of code in at45db and update at45db driver from "B" to
"D" version.
In tinyos-2.x/tos/platforms/mica2/chips/at45db/HplAt45dbIOP.nc, waitIdle()
function ought to be revised as follows:
command void HplAt45dbByte.waitIdle() {
// Setup interrupt on rising edge of flash in
#ifdef AT45DB041B_OBSOLATE
. current codes.
#else
atomic
{
int i;
call Clk.clr();
call BusyWait.wait(2);
while( ! call In.get() ) {
for( i=0; i < 8; i ++ ) { // skip other 7 bits of status register.
call Clk.set();
call Clk.clr();
call BusyWait.wait(2);
}
}
post avail();
}
#endif
}
The reason is that the RDY/BUSY pin function was removed in new batch of
45db041d after Feb. 2007, and
RDY/BUSY polling would be achieved through whole Status register loading.
By the way, BusyWait() can not be removed for some curious reasons, at least
for mica2 and micaz platforms;
"atomic" keyword seems be not necessary, but lack of tests.
Wish this revision do some help after.
HandsomeZhu
Jan. 2, 2007
Ningbo IC Center, Ningbo, P.R.China
>>
Dear all
Did Tinyos support another storage chip, at45db041d ? It seems a totally
different chip with at45db041b which was out of date and atmel stopped it
from last year.
If someone has developed the driver of this chip in tinyos 2.02, it will be
a big help for me.
Handsomezhu
2007-12-19
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help