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.

CCS/MSP430FR5969: measuring function execution time with MSP430fr5969 board.

Part Number: MSP430FR5969

Tool/software: Code Composer Studio

Hello.

I would like to measure function execution time running on MSP430FR5969 board.

I am thinking of using timer in this board, 

Is there any example about measuring function execution time using timer?

Or Is there any tool that I could measure it?

Best, 

Mirae

  • Hi Mirae,
    Code Composer Studio is counting the clock cycles. You can set a breakpoint before your function and afterward to check how many clock cycles your function needs. The execution time is given by multiplying the clock cycles with your MCLK period time.

    Best regards,
    Tobias
  • Tobias Oschmann said:
    Hi Mirae,
    Code Composer Studio is counting the clock cycles. You can set a breakpoint before your function and afterward to check how many clock cycles your function needs. The execution time is given by multiplying the clock cycles with your MCLK period time.

    Yes, but if I remember right, it is reported here on e2e few times, that CCS reported clock cycles is wrong. Anyway, anybody can do this simple test for F5xx...

        rra.b @R5         ; 3        rra.b @R5         ; 3
        nop               ; 1        rra.b @R5         ; 3
        rra.b @R5         ; 3        rra.b @R5         ; 3
        nop               ; 1        rra.b @R5         ; 3
        rra.b @R5         ; 3        rra.b @R5         ; 3
        nop               ; 1        rra.b @R5         ; 3
        rra.b @R5         ; 3        nop               ; 1
        nop               ; 1        nop               ; 1 
        rra.b @R5         ; 3        nop               ; 1
        nop               ; 1        nop               ; 1
        rra.b @R5         ; 3        nop               ; 1
        nop               ; 1        nop               ; 1
    -------------------------    -------------------------
    Total number of cycles 24    Total number of cycles 27

    And on FRAM devices number of cycles is science fiction (just replace jmp $+2 with two NOP's and alignment is gone). My advice is to use timers.

**Attention** This is a public forum