Skip to content

Writing an Interrupt Service Routine #706

Answered by stnolting
e76nystrom asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @e76nystrom!

I was looking at the disassembled code from the ISR of the SPI IRQ demo program and it does not appear to save the registers or use the mret.
Is this correct?

Yes, this is correct.

This "interrupt service routine" is not a "real" interrupt service routine. 😅 It is just a normal function that is called by the actual interrupt service routine, which is buried in the NEORV32 Runtime Environment (RTE). All the register saving as well as the termination of the interrupt handler via mret is done by the RTE.

You can find more in-depth information about the RTE in the online data sheet: 📚 NEORV32 Runtime Environment

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@e76nystrom
Comment options

Answer selected by e76nystrom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants