i figured it out later and wired it. it's still not possible to switch the radio on and off repetitively.
do u know of any updated Meshbean platform code? i'm using an old one from ETZ ( http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/ethz/meshbean900/ ). On Tue, Sep 21, 2010 at 4:24 PM, Janos Sallai <[email protected]>wrote: > Please read tep 112 (it's in the doc directory of your TinyOS > installation). That should explain everything on MCU power management, > including that it is the McuSleepC component that uses the > McuPowerOverride interface. > > Janos > > On Tue, Sep 21, 2010 at 2:55 AM, C L <[email protected]> wrote: > > that was silly of me not to see that! > > > > i changed it accordingly. could u pls help me to how/what to wire > > McuPowerOverride.nc interface in HplRF230C.nc? i don't knwo what > component > > to wire it to. > > > > > > > > > > > > > > On Fri, Sep 10, 2010 at 5:30 PM, Janos Sallai < > [email protected]> > > wrote: > >> > >> Yes. You need a boolean variable "enabled" that gets set in > >> IRQ.captureRisingEdge() and cleared in IRQ.disable(). > >> > >> Janos > >> > >> On Fri, Sep 10, 2010 at 9:41 AM, C L <[email protected]> wrote: > >> > hello janos > >> > > >> > hope u remember this thread from a long time ago. starting work on it > >> > again. > >> > > >> > is this correct (with reference to ur last email)? is it what u meant? > >> > pls > >> > see the commented areas. > >> > > >> > ------------------------------------------------- > >> > > >> > module HplRF230P > >> > { > >> > provides > >> > { > >> > interface GpioCapture as IRQ; > >> > interface Init as PlatformInit; > >> > //interface McuPowerOverride; > >> > } > >> > > >> > uses > >> > { > >> > interface HplAtm128Interrupt as Interrupt; > >> > interface GeneralIO as PortIRQ; > >> > interface HplAtm128Timer<uint16_t> as Timer; > >> > } > >> > } > >> > > >> > implementation > >> > { > >> > command error_t PlatformInit.init() > >> > { > >> > call PortIRQ.makeInput(); > >> > call PortIRQ.clr(); > >> > return SUCCESS; > >> > } > >> > > >> > async event void Interrupt.fired() { > >> > uint16_t time = call Timer.get(); > >> > signal IRQ.captured(time); > >> > } > >> > > >> > async command error_t IRQ.captureRisingEdge() > >> > { > >> > call Interrupt.edge(TRUE); > >> > call Interrupt.enable(); > >> > > >> > return SUCCESS; > >> > } > >> > > >> > async command error_t IRQ.captureFallingEdge() > >> > { > >> > // falling edge comes when the IRQ_STATUS register of the > RF230 > >> > is > >> > read > >> > return FAIL; > >> > } > >> > > >> > async command void IRQ.disable() > >> > { > >> > call Interrupt.disable(); > >> > } > >> > > >> > async event void Timer.overflow() {} > >> > > >> > /*async command mcu_power_t lowestState() > >> > { > >> > if enabled // how to do this? > >> > return ATM128_POWER_IDLE > >> > else // how to do this? > >> > return ATM128_POWER_DOWN > >> > }*/ > >> > } > >> > > >> > ------------------------------------------------- > >> > > >> > thanks > >> > > >> > CL > >> > > >> > On Sun, May 23, 2010 at 1:35 AM, Janos Sallai > >> > <[email protected]> > >> > wrote: > >> >> > >> >> Based on my experiences with the ZigBit OEM module (I used the one > >> >> with the power amp and the rf230 transceiver), I can say that it's > not > >> >> a particularly great hardware for TinyOS. You must not allow the MCU > >> >> to sleep while the radio is on, because the IRQ pin of the rf230 is > >> >> connected to a pin of the MCU that can't wake up the MCU in edge > >> >> triggered interrupt mode. > >> >> > >> >> The best workaround is to change > >> >> tos/platforms/zigbit/chips/rf2xx/HplRf230P such that it provides > >> >> McuPowerOverride, and McuPowerOverride.lowestState() returns > >> >> ATM128_POWER_IDLE if the interrupt is enabled, or ATM128_POWER_DOWN > >> >> if the interrupt is disabled. You know that the interrupt is enabled > >> >> after IRQ.captureRisingEdge() called, and it is disabled after > >> >> IRQ.disable(). You'll need to maintain this state in the module. > >> >> > >> >> Janos > >> >> > >> >> > >> >> > >> >> On Sat, May 22, 2010 at 11:40 AM, C L <[email protected]> > wrote: > >> >> > Hello guys > >> >> > > >> >> > I'm testing some of my TOS applications (which work on TelosB) on > the > >> >> > Meshbean platform. > >> >> > > >> >> > I access my radio through SplitControl, and I get success for > >> >> > RadioControl.start() the first time. However, I can't stop the > radio: > >> >> > RadioControl.stop() returns an error. > >> >> > > >> >> > Have you come across similar issues? Any ideas to solve this? No > idea > >> >> > is > >> >> > a > >> >> > bad idea! > >> >> > > >> >> > CL > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > Tinyos-help mailing list > >> >> > [email protected] > >> >> > > >> >> > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > >> >> > > >> > > >> > > >> > > >> > -- > >> > > >> > > >> > Rgds > >> > > >> > CL > >> > > >> > > > > > > > > > -- > > > > > > Rgds > > > > CL > > > > > -- Rgds CL
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
