Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MSP430 interrupts and IAR kickstart problem, pls Help!!!

Status
Not open for further replies.

chenkl

Newbie level 6
Joined
Aug 8, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,376
Hi, there,

I have problem in downloading the code onto the chip. I'm using IAR kickstart software for downloading code onto MSP430. Previously, I have been writing code without using interrupts. And the way I download the code onto msp430 from IAR is:
1. click "download and debug" button
2. in the debug environment, click "go"
3. and then click "stop debugging" to exit downloading code

Now that I added some interrupt code, this no longer works, because it got interrupted in the debugging mode.

So could anyone suggest me a way to download the interrupt-based code onto msp430? Thanks!
 

Hi

Lower you interrupt rate - this will aloow you proper debugging

All the best

Bobi
 

Hello!

There are cases where the interrupt HAS to be for instance 1000 Hz, so you cannot
necessarily lower the interrupt rate.
I don't know what your application is but I think the problem happens as follows.
For instance, if you want to get interrupts from a timer at, say, 10 ms interval.
You set a break point in your interruption function. Now the program stops, but as
soon as you step forwards, another interrupt is already coming, and stops you
exactly at the same point in your interrupt function.
What you should do:
- Disable the interrupt at the beginning of your interrupt routine (using _DINT());
- Re-enable with _EINT() at the end of the interrupt routine.

Then you will be able to stop in between and debug as much as you want since
no new interrupt will happen.
Now if you run without debug, the overhead of DINT and EINT is extremely
small and will not alter your program flow.
And the good thing of this: if the amount of code in the interrupt routine is
too big, then it will still work, but you will start to skip interrupts. This is
easier to debug because the program still somewhat works. Use a scope
to verify that you have the right interrupt frequency. If not, try to reduce
the processing.

Dora.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top