mdk (keil) method of observing program segment/function execution time through online debugging

Personal records, please correct me if there are mistakes

The first step is to change the system clock to a clock with the same frequency as the chip in the configuration. Find the location shown below in the configuration, add my chip system clock to 72MHZ, then I will change the configuration to 72.

 In the second step, click on online debugging, switch to the registers column on the left, where the value at Sec is the current time. If you want to know the execution time of a program, you can put a breakpoint in front of the program, record the breakpoint time, and then Set a breakpoint at the end of the program, record the time when running to the subsequent breakpoint, and subtract the two times to get the execution time of the program segment.

 

Guess you like

Origin blog.csdn.net/shijizai/article/details/128361136