Skip to main content
Chandan Bhatia1
Associate III
July 20, 2020
Question

CPU cycles spent (MOOC - MOOC - STM32F7 hands-on workshop)

  • July 20, 2020
  • 1 reply
  • 706 views

Hello, I am following " MOOC - MOOC - STM32F7 hands-on workshop" from STM official YouTube channel . In workshop there is example code to measure number of clock cycle spent for piece of code with TIM_MEASURE_START and TIM_MEASURE_END. As there are using different IDE, I can't use same code and not able to find definition of TIM_MEASURE_START , TIM_MEASURE_END. For reference I am adding main.c of code.

We can download full example code with below link. I am referring for example code "Hands_on\Projects\STM32F7-Discovery\01_averageBenchmark".

https://drive.google.com/file/d/17NLix6YCmvzb9F9AiBXv4Avv5ylJOPrE/view

Any help.

https://www.youtube.com/playlist?list=PLnMKNibPkDnHxpOv2HETihQy5HHQGv2nS

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
July 20, 2020

Can't you just use 32-bit TIM2 or TIM5 free running, or DWT_CYCCNT ?

Or Google

http://www.tjaekel.com/eth/doxygen/main_8h.html

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Chandan Bhatia1
Associate III
July 20, 2020

Yes but its good to check others implementation and get inspired. Anyway thanks for comment.