cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

caRa_3762551
New Contributor

I have used the timer-counter block, but I have not found a way to measure the compilation time of the program

0 Likes
Reply
1 Solution
NoriakiT_91
Employee

Which do you want to measure the COMPILATION time or RUN time?

If you want to measure the RUN time with the TCPWM block, please use following API to read the counter value.  The RUN time will be calculated as the difference between two counter values when a process begins and ends..

/* Scenario: there is a need to get the current counter value of

  * the first (index = 0) counter of the TCPWM0 block

  */

  #define MY_TCPWM_CNT_NUM (0UL)

  

  uint32_t count = Cy_TCPWM_Counter_GetCounter(TCPWM0, MY_TCPWM_CNT_NUM);

View solution in original post

0 Likes
Reply
2 Replies
NoriakiT_91
Employee

Which do you want to measure the COMPILATION time or RUN time?

If you want to measure the RUN time with the TCPWM block, please use following API to read the counter value.  The RUN time will be calculated as the difference between two counter values when a process begins and ends..

/* Scenario: there is a need to get the current counter value of

  * the first (index = 0) counter of the TCPWM0 block

  */

  #define MY_TCPWM_CNT_NUM (0UL)

  

  uint32_t count = Cy_TCPWM_Counter_GetCounter(TCPWM0, MY_TCPWM_CNT_NUM);

View solution in original post

0 Likes
Reply
caRa_3762551
New Contributor

Hi, I want to know the compilation time.

0 Likes
Reply
Top labels