How to force an early timer interrupt?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to force an early timer interrupt?

1,177 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by push2eject on Mon May 18 00:12:03 MST 2015
Hi all, first post here, with a bit of a noob question:

Is there a way to force an early timer interrupt via software?

Basically I want to set a bit in the TMR32B0IR register, but writing a 1 clears bits in this register and writing 0 has no effect.

Or is there some other way top achieve the same result, like writing the TC into the MRx register? Or..?

It feels like I must be missing something in the user manual, but I just can't find a way to do this!??

Thanks,
Kevin.
Labels (1)
0 Kudos
Reply
3 Replies

1,144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by push2eject on Mon May 18 06:39:13 MST 2015
Awesome - just the help I needed! :-) There is no STIR in the M0, but the NVIC ISPR register appears to do the same thing. And I found there is a CMSIS function as well:

NVIC_SetPendingIRQ(TIMER_32_0_IRQn);

Thanks again,
Kevin.
0 Kudos
Reply

1,144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon May 18 04:08:10 MST 2015

Quote: push2eject
It feels like I must be missing something in the user manual, but I just can't find a way to do this!??



Not sure which MCU we are talking about  :~  :quest:

If it's a  M0 there's no STIR register  :((

But there's an Interrupt Set-pending Register 

Sample:

   NVIC_SetPendingIRQ(TIMER_32_0_IRQn);
0 Kudos
Reply

1,144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Mon May 18 01:38:35 MST 2015
You may use the STIR register in the NVIC to trigger an interrupt.

0 Kudos
Reply