Part Number: TMS320F28075
Tool/software: TI C/C++ Compiler
I would like to create a runtime statistical code profiler. I have setup a timer to generate a periodic interrupt. In the timer ISR I would like to capture the value of the Program Counter prior to the ISR context switch.
In section 3.1 of the TMS320C28x CPU and Instruction Set Reference Guide, it says that the current program context (ST0, T, AL, AH, PLm PH, AR0, AR1, DP, ST1, DBGSTAT, PC and IER) is saved on the stack when an interrupt is handled.
Questions:
1) Can you tell me what order those registers are stored on the stack?
2) I'm assuming that I can read the PC value by using the appropriate address offset to the Stack Pointer. Is this valid?
3) Do I have to consider ASP and NASP assembly instructions in order to use the Stack Pointer in this manner?
4) Is there some other method I should be looking at to do what I want to do?
Thanks