1 Reply Latest reply on Aug 14, 2019 7:20 PM by PraveenM_86

    PSoC6 Code Timer TCPWM Example

    KevinR_91

      Attached please find a simple example project for using the TCPWM block as a code timer. The code timer can be used to measure the execution of certain pieces of code or events in a project. This is especially helpful during initial development of embedded projects.

       

      TESTING

       

      The best way to test this project is to run the debugger.  A breakpoint can be set after:

       

      captured_time = Code_Timer_GetCounter();

       

      This variable can then be added to the watch window, once it is captured it should match compare_time -1.  When running the debugger compare_time can be directly edited to change the delay, and captured_time can be seen to follow this change.