Skip to main content
SBhon.1
Associate II
January 14, 2025
Solved

Custom Bootloader exection time measurement

  • January 14, 2025
  • 1 reply
  • 591 views

Hi,

 

I have written a custom bootlader which verifies CRC of the aplication and then jumps to the application. I wanted to know how can I check the total execution time it takes from start of the bootloader execution to the start of the application execution. Is there any method to do this?

Currently what I am doing is setting a GPIO pin in the bootloader and then resetting that GPIO at the start of the application code. Is the a correct approach or is there any other method should I try?

 

Thanks,

Sahil

This topic has been closed for replies.
Best answer by Andrew Neil

Yes, toggling a GPIO is a very common way to do this.

Another option is to use a Timer.

Possibly the DWT_CYCCNT:

https://developer.arm.com/documentation/ka001499/latest/

 

1 reply

Andrew Neil
Andrew NeilBest answer
Super User
January 14, 2025

Yes, toggling a GPIO is a very common way to do this.

Another option is to use a Timer.

Possibly the DWT_CYCCNT:

https://developer.arm.com/documentation/ka001499/latest/

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.