Hello Graham,
Exiting a spurious interrupt as quickly as possible is probably the best approach, unless the noise burst that caused the interrupt has additionally corrupted registers, etc. In this instance you may wish to force a reset, perhaps by purposely generating an illegal operation ILOP error reset. You will need to judge which would be the least disruptive to normal operation.
Placing a RTI instruction at each vector location will not work - the interrupt is entered by fetching the address present at the vector location. So the following approach would be needed. You may also wish to consider placing additional diagnostic code within the ISR, so that the number of spurious interrupts that occur may be interrogated in some manner.
ILOP equ $3E
DUMMY_ISR2: ; Causes illegal operation reset
ILOP
DUMMY_ISR1: ; Exit interrupt
rti
...
; Vector table:
org $FFDE
fdb DUMMY_ISR1 ; ADC conversion
fdb DUMMY_ISR1 ; Keyboard
org $FFF2
fdb DUMMY_ISR1 ; TIM overflow
fdb DUMMY_ISR1 ; TIM channel 1
fdb DUMMY_ISR1 ; TIM channel 0
fdb $FFFF ; Not used
fdb DUMMY_ISR1 ; IRQ
fdb DUMMY_ISR1 ; SWI instruction
fdb START ; Reset
It may also be possible that the noise burst is corrupting the I/O setup. In particular the data direction and pull-up enable registers may be critical to operation. Traditionally, these registers are initialised following a reset, and are then expected to remain uncorrupted for an indefinite period, maybe days, weeks or months in some instances. You may therefore find that it be desireable to re-initialise the data direction and pull-up enable registers on each circuit of the main loop.
Regards,
Mac