cancel
Showing results for 
Search instead for 
Did you mean: 

Generate softaware interrupt..

hariprasad
Associate III
Posted on June 08, 2015 at 10:48

Hi,

I want to generate a software interrupt,.. ie;when I execute one step it should go to ISR and do some activities..

My scenario..

I'm using RTOS for my application. I am reading data from a FIFO and storing it to a buffer via DMA, so while the DMA is ongoing I want so send some packets via WIFI, but the thing is that for context switching it takes max 1ms which is too much, so if I do the conetxt switch with in ISR it'll be switched in 10microsec... this is why I need to generate a software interrupt

Please help me....

#interrupts #!stm32f4-disco #software-irq
3 REPLIES 3
jpeacock
Associate II
Posted on June 08, 2015 at 14:03

The NVIC has an Interrupt Set Pending register that will request interrupt service on an interrupt vector.  Check the ARM Cortex M Technical Reference Manual (not the ST one) to see how the NVIC works.  It does not set any peripheral status registers so the ISR has to look at the NVIC to determine if it's a software request instead of a hardware trigger.  Use the Interrupt Clear Pending register to clear it once in the ISR.

This can be done inside another ISR so you can tail-chain the interrupts.

  Jack Peacock

Posted on June 08, 2015 at 14:57

SVC or BKPT ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jpeacock
Associate II
Posted on June 08, 2015 at 19:22

SVC is often used by an RTOS so not the best choice.  Same for BKPT, might interfere with a debugger.