how to look at the runtime of a code in psoc 6?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
caRa_3762551
Level 1
Level 1
First like given

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

0 Likes
1 Solution
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

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
2 Replies
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

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);

0 Likes
caRa_3762551
Level 1
Level 1
First like given

Hi, I want to know the compilation time.

0 Likes