This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS5.5.0+TMS320F28035+XDS100V1 debug.use “clock” to test the time of SFO().

Other Parts Discussed in Thread: TMS320F28035

in the environment of CCS5.5.0+TMS320F28035+XDS100V1,use "clock" to test the time of SFO()。

we test the this function:update_MepScaleFactor();

void update_MepScaleFactor( void )

{ /* MEP_ScaleFactor initialized using function SFO ()*/

while (SFO() == 0) { } /* MEP_ScaleFactor calculated by MEP Cal Module */

}

test method:use CCS5 "run->clock"

result:

use "step into",update_MepScaleFactor() test clock result 2723。

use "step over",update_MepScaleFactor() test clock result138599。

Q:why use "step into" and "step over" get  two diff results?

  • a simple question,but too hard!!!

  • hai sun said:

    result:

    use "step into",update_MepScaleFactor() test clock result 2723。

    use "step over",update_MepScaleFactor() test clock result138599。

    At which point in the code do you perform the "step into" or "step over"?
    If you perform a "Step into" at the line where there is a function call, it will step into the function. If you perform a "step over" at the line where there is a function call, it will set a breakpoint at the next source line following that function call, and run to it. So basically it will run through the entire function and then halt at the line of code after it returns from that function. So the clock cycles will be dependent on exactly which instructions are being executed, and that could be different depending on what the step into and step over is doing.

    Also see this page for alternate options: http://processors.wiki.ti.com/index.php/Profiling_on_C28x_Targets

  • AartiG said:

    result:

    use "step into",update_MepScaleFactor() test clock result 2723。

    use "step over",update_MepScaleFactor() test clock result138599。

    At which point in the code do you perform the "step into" or "step over"?
    If you perform a "Step into" at the line where there is a function call, it will step into the function. If you perform a "step over" at the line where there is a function call, it will set a breakpoint at the next source line following that function call, and run to it. So basically it will run through the entire function and then halt at the line of code after it returns from that function. So the clock cycles will be dependent on exactly which instructions are being executed, and that could be different depending on what the step into and step over is doing.

    Also see this page for alternate options: http://processors.wiki.ti.com/index.php/Profiling_on_C28x_Targets

    [/quote]Hi,AartiG.thanks for your reply.I know the differents between "step into" and "step over" just as what you have said.

    I just  "step over" and "step into"this function: update_MepScaleFactor().

    just click "step over" once ,this function update_MepScaleFactor() is end.the result is 138599.

    click "step into",we will go into update_MepScaleFactor() .And click "step into" until the function update_MepScaleFactor() is end.we get the result 2723.

    does SFO() impact the result?

     

  • I suspect SFO() is impacting the result, and maybe the CCS clock is not the best way to measure cycles when using SFO. I found this interesting thread in the C2000 forms which I think you will find helpful:
    http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/318547.aspx

    If the information in that thread still does not help answer your question, you may want to try posting a new question to the C2000 forums as the experts might be able to comment further on the effect of SFO routine.

  • AartiG said:

    I suspect SFO() is impacting the result, and maybe the CCS clock is not the best way to measure cycles when using SFO. I found this interesting thread in the C2000 forms which I think you will find helpful:
    http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/318547.aspx

    If the information in that thread still does not help answer your question, you may want to try posting a new question to the C2000 forums as the experts might be able to comment further on the effect of SFO routine.

    Hi,AartiG.Thanks for your reply.

    We learn a lot from the thread.It is helpful to us.