Other Parts Discussed in Thread: OPT3001
Tool/software: Code Composer Studio
I have a project with C and Assembly code that is constantly resetting. I have edited the code to help simplify the fault conditions and observations. The code fragment of interest has a call to an Assembly function that does nothing (just a RETA instruction) then an enable interrupt then a normal C function call. The C function call never finishes, the uC resets. The C code is built under a 'large model' by the way. Removing either the Assy function or the enable interrupt seems to stop the continual reset. This issue looks very similar to a previous post except I am using the correct RETA instruction (not RET)
(void) main(void)
{
initRxMsgHandler(); // do nothing Assy function
__enable_interrupt(); // enable interrupts globally
init_FRAM( ); // ordinary C function
microcontroller resets here!!!!!!!!!!!!!!!!!!!!!!!
init_OPT3001( );
}
initRxMsgHandler:
; NOP
RETA