From: rincon Date: Thu, 28 Feb 2008 17:28:12 +0000 (+0000) Subject: Roman Lim's fix: X-Git-Tag: release_tinyos_2_1_0_0~498 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=300ae69d6615a2d24bfb07f1f87a905b0381d578;p=tinyos-2.x.git Roman Lim's fix: "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" --- diff --git a/tos/chips/msp430/usart/Msp430SpiDmaP.nc b/tos/chips/msp430/usart/Msp430SpiDmaP.nc index cf7fc336..cebc0838 100644 --- a/tos/chips/msp430/usart/Msp430SpiDmaP.nc +++ b/tos/chips/msp430/usart/Msp430SpiDmaP.nc @@ -32,6 +32,7 @@ /** * @author Jonathan Hui * @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 ]() {