Part Number: TMS320F28377D
Tool/software: Code Composer Studio
I am using CCS 9.2, DSP chip TMS320F28377D, Blackhawk emulator USB560V2 system tracer.
I have a project where the main function only calls an initialization function and then runs into an infinite loop by design. the C-code is like this:
void main(void)
{
InitCPU1();
while(1)
{
SWTimerCheck();
}
}
When I compile and load the code into RAM, I sometimes get the following assembly code
01544b: 0041526C LB _c_int00
76 InitCPU1();
main():
01544d: 7625 ESTOP0
01544e: 3163 MPYB P, T, #99
82 SWTimerCheck();
C$L1:
01544f: FF69 SPM #0
015450: 7640A641 LCR SWTimerCheck
I understand ESTOP0 is a breakpoint for halting the program by the emulator, but what is the next instruction (MPYB) for? This generated assembly code causes the program to hang.
What is weird is that sometimes it does produce the following assembly code and it works like charm.
72 LB _c_int00 ;Branch to start of boot._asm in RTS library
01544b: 0041526C LB _c_int00
76 InitCPU1();
main():
01544d: 76413163 LCR InitCPU1
82 SWTimerCheck();
C$L1:
01544f: FF69 SPM #0
015450: 7640A641 LCR SWTimerCheck
where somehow it does not add ESTOP, neither the MPYB instruction. Where is the setting that I did not do right to cause the inconsistent behavior?
Thanks a lot.
Jinhui Zhang