Hi,
Here's what you must knwo about interrupt.
Interrupt are synchronous event triggered by peripheral or core. When an event occur, the code execution is stopped and interrupt rouine is served. Exiting from interrupt, the previous execution context is restore, and code execution is resumed.
Interrupt are controled by 2 flag ( 1 enable xxIE , and 1 event triggered xxIF) At core level there is a global interrupt enable flag use to mask all interrupts
To do so you must :
* Declare a interrupt service routine: It shall be mapped in a non banked area and decaler as an interrupt to inform the compiler to add conctext save / resore code ( interrupt prolog and epilog)
#pragma CODE_SEG __NEAR_SEG NON_BANKED
__interrupt void __near vDIna_iSeqAcquisition_Isr(void)
* Within the routine, you must acknwoledge the interrupt flag ( if not you'll loop inside the interrupt routine)
* At init you must enable your peripheral interrupt soucre and clear the interrupt triggered flag.
* You must alos configure the interrupt controller to register the address of the interrupt routine
* At the end you must enable global interrupt and start your peripheral.
You should download code example for your micro and make a code reading to see an impementation example.