2015-06-08 01:48 AM
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-irq2015-06-08 05:03 AM
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 Peacock2015-06-08 05:57 AM
SVC or BKPT ?
2015-06-08 10:22 AM
SVC is often used by an RTOS so not the best choice. Same for BKPT, might interfere with a debugger.