EmbeddedRelated.com
Forums

Software Interrupt.

Started by bumerang boom November 8, 2006
I need to add a software interrupt to my program. The SLU00049 shows that the Digital I/O section can be used for such a purpose by setting a particular P1IFG true in software. Also it adds that the Interrupts will be recognized even they occur in an ISR.

My TimerA maintains 4 software counters which at their expiration execute certain task.
I dedicated Counter4 to set the P1IFG0 at its expiration. This works and I can see the bit set with CSPY. The corresponding IE bit is set indicating the acceptance of this IRQ. However, the vector is not taken and the ISR is not accessed when TIMERA ISR sets P1IFG0.

Can any one clarify this?

TIA.
BB

---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.

Beginning Microcontrollers with the MSP430

Hi,

It sounds like you need to ensure that your interrupts can be nested. I
think you need to set the GIE bit at the start of your Timer A routine.

Check out the System Resets, Interrrupts and Operating Modes section of
the user guide for more detailed info.

Cheers,

Michael

-----Original Message-----
From: m... [mailto:m...] On Behalf
Of bumerang boom
Sent: Wednesday, November 08, 2006 9:49 AM
To: m...
Subject: [msp430] Software Interrupt.

I need to add a software interrupt to my program. The SLU00049 shows
that the Digital I/O section can be used for such a purpose by setting a
particular P1IFG true in software. Also it adds that the Interrupts will
be recognized even they occur in an ISR.

My TimerA maintains 4 software counters which at their expiration
execute certain task.
I dedicated Counter4 to set the P1IFG0 at its expiration. This works
and I can see the bit set with CSPY. The corresponding IE bit is set
indicating the acceptance of this IRQ. However, the vector is not taken
and the ISR is not accessed when TIMERA ISR sets P1IFG0.

Can any one clarify this?

TIA.
BB

---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
My feeling is that interrupts should be as short as possible, to get the
data they need to get, set the flag that needs to be set, and exit.
Processing on the data should be handled in the main routine.

Long interrupts can be a big problem when you have multiple interrupts
going off.

You can design it either way, so design it with short fast interrupts.

Kip

On Wed, 2006-11-08 at 09:48 -0800, bumerang boom wrote:
>
> I need to add a software interrupt to my program. The SLU00049 shows
> that the Digital I/O section can be used for such a purpose by setting
> a particular P1IFG true in software. Also it adds that the Interrupts
> will be recognized even they occur in an ISR.
>
> My TimerA maintains 4 software counters which at their expiration
> execute certain task.
> I dedicated Counter4 to set the P1IFG0 at its expiration. This works
> and I can see the bit set with CSPY. The corresponding IE bit is set
> indicating the acceptance of this IRQ. However, the vector is not
> taken and the ISR is not accessed when TIMERA ISR sets P1IFG0.
>
> Can any one clarify this?
>
> TIA.
> BB
>
> ---------------------------------
> Access over 1 million songs - Yahoo! Music Unlimited.
>
>
>
--
Kipton Moravec
Thank you all for your input ... It boils down that the line that is setting the P1IE bit 0 was not executed every time and thus the Interrupt was not recognized. It was a mater of program flow :( ...

BB.

bumerang boom wrote:

I need to add a software interrupt to my program. The SLU00049 shows that the Digital I/O section can be used for such a purpose by setting a particular P1IFG true in software. Also it adds that the Interrupts will be recognized even they occur in an ISR.

My TimerA maintains 4 software counters which at their expiration execute certain task.
I dedicated Counter4 to set the P1IFG0 at its expiration. This works and I can see the bit set with CSPY. The corresponding IE bit is set indicating the acceptance of this IRQ. However, the vector is not taken and the ISR is not accessed when TIMERA ISR sets P1IFG0.

Can any one clarify this?

TIA.
BB
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.



Yahoo! Groups Links

---------------------------------
Sponsored Link

Mortgage rates near historic lows: $150,000 loan as low as $579/mo. Intro-*Terms