Other Parts Discussed in Thread: HALCOGEN,
I am using a TMDX570LC4357HDK board, CCS v11.1.0.0.00012, and the TI 20.2.5.LTS compiler.
My application is generating an undef abort in the prologue of the esmHighInterrupt() function generated by HalCoGen.
I added a static counter variable at the start of the esmHighInterrupt() handler to determine the number of times this handler is executed before the undef abort.
My program gets this abort after approximately 18 seconds, and the handler has been executes 18,198 times, so approximately 1000Hz.
Here is the asm for the ISR prologue:
esmHighInterrupt():
0001743c: E92D500F push {r0, r1, r2, r3, r12, r14}
00017440: EEF8CA10 vmrs r12, fpexc
00017444: E92D1000 stmdb r13!, {r12}
00017448: EEF1CA10 vmrs r12, fpscr
0001744c: E92D1000 stmdb r13!, {r12}
00017450: ED2D0B10 vpush {d0, d1, d2, d3, d4, d5, d6, d7}
00017454: E24DD008 sub r13, r13, #8
The r14_UND is 0x0001744C, so the bold line above. I believe this means that the undef abort should have been generated on the previous instruction: vmrs r12, fpscr
This seems odd to me because although using an FPU instruction with the FPU disabled can cause an undef abort, that's the second FPU instruction in teh handler, and the handler has been successfully executed many times.
I have checked the memory browser to ensure that the disassembly is correctly showing me what instructions are there in flash - so I know that nothing has somehow corrupted that instruction.
I believe that the source of the esm interrupt is consistent: the ESM status 2 register is always 8 and the ESM Interrupt Offset High Register is always 0x24. According to section 16.4 of the TMS570LC43x Technical Reference Manual, this means that it is a group 2 channel 15 error. The TMS570LC4357 datasheet claims that this error is 'Reserved' (Table 6-45).
I must be making a mistake somewhere, but I cannot see where. What is causing this undef abort? Or is it a red herring somehow?
Thanks in advance,
Adam