Thursday, September 27, 2012

Create new folder - first couple of moments of program flow on STM32

I'm working on a new project with STM32F4. I got stuck on USB communication and wanted to compare my project to the mass storage sample that comes with the library from ST. I recorded the first couple of seconds of the program flow on the STM32 after clicking the "Create new folder" in Windows explorer. Below are the screen shoots of the recorded flow on the STM32 with the couple of zoomed in regions. At the end there are also statistics.

Some notes:
  • I set the trigger to SCSI write function and recording started when I clicked the new folder button.
  • Not all function are shown. I have set the filter to only show the USB related ones.
  • Full speed USB was configured in project.

First, the complete 7sec recording. Interesting stuff is going on in the first half of second. Next images show that area zoomed in. (Click images to see them larger.)

First half of second. Most functions are still marked purple and seem to be running in parallel. This is because in time covered by one pixel width the function was called and also returned.


30ms span. There are still some functions that are called too many times to show at this zoom level.

2ms span. Most functions are marked red. The pale red in function flow shows when the execution was outside the function body due to subroutine call.

Finally 5us span where also the calls to the shortest functions are clearly seen.


 This is the statistics view of the same recording. Note the overall time spent in each function and the function call count.

No comments:

Post a Comment