Code:
//Suggestion:
#define NVIC_STIR (*(volatile uint32_t *)0xE000EF00) //Software Trigger Interrupt Register
//#define TRIGGER_INTERRUPT(x) NVIC_SET_PENDING(x);
#define TRIGGER_INTERRUPT(x) NVIC_STIR=(x);
Hi Paul, two little suggetions:
a) during the search of a good "free" software interrupt for the mp3/aac audioobject, i noticed, that there unused ("reserved") interruptnumbers.
You are using IRQ_SOFTWARE, and it is not free anymore for the user. You could use (for example) #55 instead, then IRQ_SOFTWARE stays available for the user.
b) there is a register called "NVIC_STIR", Software Trigger Interrupt Register, which basically does the same as the Pending-Register - but you don't need the shifts. This needs less instructions.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0179b/ar01s01s01.html
Regards, Frank
Last edited: