Part Number: TMS320F28388D
Tool/software: Code Composer Studio
Hi,
I am currently experimenting with the Erad module embedded on the TMS320F28388D microcontroller. The technical reference manual is pretty clear and I managed to profile different code segments, interruptions and CLA tasks using both the Enhanced Bus Comparator (EBC) and the System Event Counter (SEC).
However, I still have 2 issues to adress:
- I am note quite sure what the virtual program counter is (p.1453). This is the only mention of this counter in the whole document. My guess is that it refers to a counter in the debbuger server managing the pipeline steps.
- I have a CLA task triggered by an ADC interrupt triggered by a SOC generated by a PWM module. The PWM clock is running at 200Mhz, it is running in up and down mode and it generates a 602,4KHz (checked on an oscilloscope) signal so TBPRD = 166 and the whole period lasts 332 cycles.The System clock is the same than the PWM module so 200Mhz. I use a SEC submodule to profile the latency between the ADC interruption signal and the beginning of the task, and another to count the clock cycle between the beginning of the task and the next ADC interruption signal. Theses two timespans are supposed to describe a whole period. Both SEC submodules runs in start stop mode so it feeds the MAX_COUNT registers. When I run them, the maximum count for the latency is 2 clock cycles and the maximum count for my other counter is 328 which sums up to 330 clock cycles. However my period last 332 clock cycles so 2 clock cycles are lost. Is this one per measure?
Switching from the MAX MODE COUNT and the CUMULATIVE MODE COUNT during my experimentations, I noted that the number of cycles stored in the MAX_COUNT registered could actually be the value - 1 but the technical reference manual does not mention it.
I aim improving my real time management and I believe the ERAD module will be of great help so I am trying to clear any doubts.
Regards,
Quentin