Re: [Mspgcc-users] SR getting corrupted

2013-09-06 Thread Peter Bigot
On Thu, Sep 5, 2013 at 2:20 PM, ravim ravi.mandl...@gmail.com wrote: 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

Re: [Mspgcc-users] SR getting corrupted

2013-09-06 Thread ravim
Thanks Peter, I really appreciate your response. I tried so, however my error persists. I would be really grateful if you could answer one more question. I still get the timer stuck after 45-60 mins. I forgot to mention that I am doing a flash write too in my program , and in doing so , I disable

[Mspgcc-users] SR getting corrupted

2013-09-05 Thread ravim
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

Re: [Mspgcc-users] SR getting corrupted

2013-09-05 Thread Wayne Uroda
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

Re: [Mspgcc-users] SR getting corrupted

2013-09-05 Thread Peter Bigot
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

Re: [Mspgcc-users] SR getting corrupted

2013-09-05 Thread Peter Bigot
It's not necessarily wrong, but if there's a control path through sendPacket that leaves interrupts disabled what you observe would happen. Test that by either looking for GIE to be clear in SR when sendPacket returns, or work around it by using __bis_SR_register(LPM1_bits | GIE). There is a more

Re: [Mspgcc-users] SR getting corrupted

2013-09-05 Thread ravim
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