| |||||
Technical Support Support Resources
Product Information | BL51: OVERLAY DATA FROM INTERRUPT ROUTINE WITH MAINInformation in this article applies to:
QUESTIONIn my application there is an interrupt function which is only used for exception handling. It never returns to the application after execution. Is there a way to overlay data from this function with the main application to save data space? ANSWERYes, this is possible with the OVERLAY directive of BL51 and LX51. In the interrupt routine itself you should call a separate function which does the required operations (e.g. a reset). Your code may look like this example:
void test_int2 (void) {
... // Do something here, for example exception handling
while(1); // Never return from the interrupt - a WDT can reset here
}
void test_int (void) interrupt 1 using 1 {
test_int2();
}
To instruct the linker to overlay the local variables that are used in test_int2...
test_int ~ test_int2 ignores calls of test_int2 from test_int. MORE INFORMATIONLast Reviewed: Tuesday, August 01, 2006 | ||||