Thank you Gentlemen for the responses. I fear the same, my device does not
wake up from LPM, and since everything depends on timer interrupt and it
ceases to fire, the whole system does not other then interrupt of receiving
packets.

Here is my implementation of timer interrupt. Please correct me if I am
doing it wrong.

I call this initializeRandomTimer in main function
void initializeRandomTimer(){

    BCSCTL3 |= LFXT1S_2;
    TACCTL0 = CCIE;
    TACCR0= 437 ;
    TACTL = MC_1 | TASSEL_1 | ID_3;
  }


here is my ISR

interrupt(TIMERA0_VECTOR) Timer_A (void)
{
   if(++sendInterval >= SENDINTERVAL){
          radioReady=1;
     sendInterval = 0;

   }

   P1OUT ^= 0x01;
        if(++timercounter>=20){
                globaltimer++;
                timercounter=0;
          // radioReady=1;
        }

    __bic_SR_register_on_exit(LPM1_bits);
}


and here is my for loop in main

for(;;){

        //enter LPM1
    __bis_SR_register(LPM1_bits);

        //TIMER interrupt fired


    //If our radio is ready to fire
    if(radioReady==1){

           mrfiPacket_t packet;
           packet.frame[0] = 8+20;
           packet.frame[RXPACKET_HEADER]  = TXHI;
           sendPacket(LOWPOWER, &packet);
    }

}

my global interrupts are enabled in main.  Timer gets stuck after an hour
or so, when receiving a packet from similar other device.


Thanks and Regards,
Ravi


On Thu, Sep 5, 2013 at 6:52 AM, Peter Bigot-4 [via MSP430 gcc - Users] <
ml-node+s1086195n6866...@n5.nabble.com> wrote:

> Are you sure that there is an interrupt that will wake you from LPM1, that
> it is firing, and that when it finishes it clears the LPM flags on the
> stack so that the MCU will return to active mode?  What you describe so
> far
> is exactly what should happen if no wakeup occurs.  You should be able to
> examine the SR value from mspdebug or gdb since it's r2.
>
>
> On Thu, Sep 5, 2013 at 3:06 AM, Wayne Uroda <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=6866&i=0>>
> wrote:
>
> > I don't think bt actually works correctly on mspgdb (at least it never
> has
> > for me in the last 6 years). I recommend you check the sp directly with
> the
> > "info registers" command (or simply "i r"). The sp is r1 if I recall
> > correctly.
> >
> > Then you can dump the memory in your stack and do something of a manual
> > backtrace - if you know the current pc (again available through the
> > registers) and you have a full assembly listing it should be possible to
> > spot the return addresses in the stack (or simply check every word, if
> it
> > corresponds to a location in code just following where you called a
> > function then it is likely a return address - note I've only ever done
> this
> > in my own software which I know back-to-front and it is all 16bit
> > addressing, no msp430x).
> >
> > Or, you could try mspdebug - I think it has many debugging features and
> > probably has a working "bt" command (I am still use mspgdb though so I'm
> > not sure).
> >
> > - Wayne
> >
> > On 05/09/2013, at 16:38, ravim <[hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=6866&i=1>>
> wrote:
> >
> > > I am working on a project which involves CC2500 and msp430f2274. I
> have
> > been
> > > struggling with a bug for more than 4 weeks, and still unable to debug
> > it.
> > > My code stops working after an hour (just time, however device keep
> > > receiving packets)
> > >
> > > During my debugging, I have checked stack which is fine. I checked
> > globals
> > > too, which have legitimate values too.
> > >
> > > Whenever my code gets stuck, msp430-gdb bt  always always gives me
> just
> > this
> > >
> > > 0x00008092 in main ()
> > >
> > > When I dissemble my code around that address,
> > >
> > > 08084: b0 12 72 86               CALL    #wor_start
> > >    08088: b0 12 38 90               CALL    #initializeRandomTimer
> > >    0808c: 32 d2                     EINT
> > >    0808e: 32 d0 50 00               BIS     #0x0050, SR
> > >    08092: 5f 42 0e 02               MOV.B   &radioReady, R15
> > >    08096: 5f 93                     CMP.B   #0x0001, R15
> > >
> > >
> > > I believe some how my SR is getting corrupted. I would really
> appreciate
> > why
> > > it could be getting corrupted. I mean what could be possible reasons
> for
> > > getting SR corruption.
> > >
> > > Thanks and regards.
> > > Ravi
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://msp430-gcc-users.1086195.n5.nabble.com/SR-getting-corrupted-tp6864.html
> > > Sent from the MSP430 gcc - Users mailing list archive at Nabble.com.
> > >
> > >
> >
> ------------------------------------------------------------------------------
>
> > > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> > > Discover the easy way to master current and previous Microsoft
> > technologies
> > > and advance your career. Get an incredible 1,500+ hours of
> step-by-step
> > > tutorial videos with LearnDevNow. Subscribe today and save!
> > >
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> > > _______________________________________________
> > > Mspgcc-users mailing list
> > > [hidden email] <http://user/SendEmail.jtp?type=node&node=6866&i=2>
> > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
> >
> >
> >
> ------------------------------------------------------------------------------
>
> > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> > Discover the easy way to master current and previous Microsoft
> technologies
> > and advance your career. Get an incredible 1,500+ hours of step-by-step
> > tutorial videos with LearnDevNow. Subscribe today and save!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Mspgcc-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=6866&i=3>
> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> >
>
> ------------------------------------------------------------------------------
>
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft
> technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> Mspgcc-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6866&i=4>
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://msp430-gcc-users.1086195.n5.nabble.com/SR-getting-corrupted-tp6864p6866.html
>  To unsubscribe from SR getting corrupted, click 
> here<http://msp430-gcc-users.1086195.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6864&code=cmF2aS5tYW5kbGl5YUBnbWFpbC5jb218Njg2NHw4MjM1NTA4OTY=>
> .
> NAML<http://msp430-gcc-users.1086195.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://msp430-gcc-users.1086195.n5.nabble.com/SR-getting-corrupted-tp6864p6867.html
Sent from the MSP430 gcc - Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to