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
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to