[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/atm128/spi Atm128SpiP.nc, 1.4, 1.5

dmm rincon at users.sourceforge.net
Thu Jan 25 11:12:26 PST 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128/spi
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27267

Modified Files:
	Atm128SpiP.nc 
Log Message:
MicaZ's CC2420 Transmit (?) has a problem where it's writing bytes to the SPI bus, but then the SPI bus gets disabled.  This sends Atm128SpiP into an infinite loop.  This version ensures the SPI bus is enabled before trying to write to it, but the real culprit needs to be tracked down probably inside of CC2420TransmitP.

Index: Atm128SpiP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128/spi/Atm128SpiP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Atm128SpiP.nc	12 Dec 2006 18:23:04 -0000	1.4
--- Atm128SpiP.nc	25 Jan 2007 19:12:23 -0000	1.5
***************
*** 126,131 ****
      call McuPowerState.update();
    }
!   
    async command uint8_t SpiByte.write( uint8_t tx ) {
      call Spi.write( tx );
      while ( !( SPSR & 0x80 ) );
--- 126,133 ----
      call McuPowerState.update();
    }
! 
    async command uint8_t SpiByte.write( uint8_t tx ) {
+     call Spi.enableSpi(TRUE);
+     call McuPowerState.update();
      call Spi.write( tx );
      while ( !( SPSR & 0x80 ) );



More information about the Tinyos-2-commits mailing list