Forum Discussion
Altera_Forum
Honored Contributor
10 years agoUpon entering exception, the Exception Address (EA) register take and store the PC+4 value. Performing a direct eret will result in Nios to continue to execute code at PC+4. Therefore, you will need to decrement by 4 the EA register before the eret so that Nios can re-execute the instruction that has taken the interrupt at the first place.
I think that should already handled by the Nios II HAL code. Of course, if you are not using this, you must be a very advanced user.