TMS320VC5509A
BIOS 5.41.09.34
Code Composer 4.2.0.10017
Blackhawk USB510L JTAG emulator
RTDX kills my app
My first issue is that if I try to use RTDX while my target is running, eg using code composer Tools->RTA->CPU Load, my target crashes. I have reviewed all the TI BIOS manuals (which btw are only useful for upt CCS 3.x) and cannot find problem. I have same BIOS version in both project settings and macros like BIOS_CG_ROOT. I have in my tcf
bios.enableRealTimeAnalysis(prog);
bios.enableRtdx(prog);
I have interrupts 25 and 26 set to BIOS/TCF defaults, ie RTDX_Poll() and RTDX_H2TPoll()
To be honest, I have not seen this working since an older Code Composer, BIOS, and using the Spectrum Digital DSK5509A development kit (with its onboard USB emulator).
My questions below for now are more important, but any advice here is welcome.
Troubles trying to understand Implicit Instrumentation
I decided that my final product will have built in CPU load logging anyway, so kind of gave up on RTDX. Read all the TI docs, would seem pretty simple, I just need to periodically read (and clear) the IDL_busyObj, which the IDL_cpuLoad object function writes to. Also need to access the CLK_D_idletime, and GBL_getFrequency(). This gives me all I need, N, I1, M, and T for the formula in SPRU423H 3.8.1. Now the problems started
[1]CLK_D_idletime. I have TCF set so is autocalculated as per SPRU423H. I can see this in my debugger, coff etc, and the value seems reasonable at about 370. But when try to compile it in I get link error, it must be declared local (static)? How can I access this idle time count? Obviously with RTDX the host must get it somehow.
[2]IDL_busyObj. This is a STS_Obj, but apparently is used in some adhoc manner. SPRU423H makes that clear, "count provides a measure of N", "total provides the value T". So it is not really a STS_Obj now is it? Just a memory location used in some specific manner for CPU load. Anyway, N==count==STSobj->num seems as I expected. But getting unusual T==total==STS->obj.acc. According to SPRU423J "The IDL_busyObj total provides the value T in units of the high-resolution clock.". I have TCF setup so 1000.0 microseconds = 1 high resolution tick. I was expecting this T value to be simply the milliseconds expired. After quite some time and mind bending, it seems this is not exactly the case. It looks like the first 16bits is a negative count in clock ticks (or 1mS in my case). I dont know what the 2nd 16bits is for. So for example over 100mS the value is 0xFF9C = -100. Once again the second value seems to change but I cant make any sense of it. Please help me to understand this.