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 <w.ur...@gmail.com> 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 <ravi.mandl...@gmail.com> 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
> > Mspgcc-users@lists.sourceforge.net
> > 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
> Mspgcc-users@lists.sourceforge.net
> 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
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to