I have a overlay problem: I've got one function who is called from main and from my interrupt service routine. When the interrupt calls the function my local variables point to an indefinite adress. I have the problem however I deactivate overlaing. My programm:
void main (void) { ... eventChannelPtr = XSDevice_GetEventChanByID( &XSIM_DeviceGroups, groupID, chanID)} } void task_1ms(void) interrupt 1 using 1 { ... eventChannelPtr = XSDevice_GetEventChanByID( &XSIM_DeviceGroups, groupID, chanID); } tXSEvent_ChannelPtr XSDevice_GetEventChanByID( tXSDevice_DeviceEntry* deviceEntryPtr, tXS_Group groupID, tXS_Channel chanID) { tXSEvent_SourcePtr eventSrcEntry; tXSEvent_ChannelPtr retVal; ... eventSrcEntry = &deviceEntryPtr->eventListPtr[groupID]; }
I've got one function who is called from main and from my interrupt service routine. Is the function reentrant ? I do not see the reentrant keyword in the source code, and from the list of parameters I would guess that the function is not intrinsically reentrant.