]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Roman Lim's fix:
authorrincon <rincon>
Thu, 28 Feb 2008 17:28:12 +0000 (17:28 +0000)
committerrincon <rincon>
Thu, 28 Feb 2008 17:28:12 +0000 (17:28 +0000)
"i noticed that my application (running on tmotes) using dma on spi does not go to the lowest possible sleep mode but only to LPM1.
i managed to find out, that in McusleepC when calculating the lowpower mode, ME1 had the USPIE bit set. this is, because in Msp430SpiDmaP the unconfigure command does nothing. I don't know, if this is done on purpose, but if not, the same code as in Msp430SpiNoDmaP would do the job (see follwing diff)

roman"

tos/chips/msp430/usart/Msp430SpiDmaP.nc

index cf7fc336ec21bf2e4bc1c631c9dc84b772b43e09..cebc0838d0fe59bf4a95a80cd13d1c77e33f74a1 100644 (file)
@@ -32,6 +32,7 @@
 /**
  * @author Jonathan Hui <jhui@archedrock.com>
  * @author Mark Hays
+ * @author Roman Lim
  * @version $Revision$ $Date$
  */
 
@@ -89,6 +90,9 @@ implementation {
   }
 
   async command void ResourceConfigure.unconfigure[ uint8_t id ]() {
+    call Usart.resetUsart(TRUE);
+    call Usart.disableSpi();
+    call Usart.resetUsart(FALSE);
   }
 
   event void UsartResource.granted[ uint8_t id ]() {