How to display code execution time in DAVE ?

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

cross mob
User13960
Level 3
Level 3
First like received
Hi everyone,

Is it possible to display the execution time of sections of code within DAVE 4 ?

For example the time to execute a function.

Thank you very much

PHAB
0 Likes
5 Replies
Nicky
Level 2
Level 2
5 sign-ins First question asked 5 replies posted
You can toggle an output at start and end of your code. This way you can measure with a scope how long it takes.

good luck.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

I would recommend the following post at interrupt memfault blog, https://interrupt.memfault.com/blog/profiling-firmware-on-cortex-m

Regards,
Jesus
0 Likes
User13960
Level 3
Level 3
First like received
Jesus, thanks for the blog link. Have you tried this method on the Infineon XMC parts ?

NIcky, thanks for the suggestion, it's exactly what I do normally. It's very reliable but means modifying code with the risk of forgetting to delete it prior to code release and it finding it's way into production.

Best regards
PHAB
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
The cycle counter is an standard feature of all ARM Cortex-M4, therefore all XMC4 support it.
For XMC1 you can go with the system timer which runs at the same frequency as the CPU, although it is "only" 24bit timer.
0 Likes
User13960
Level 3
Level 3
First like received
Thanks Jesus.
0 Likes