This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

profiling on a nrf51422

Hi, have some of you expierence with profiling on a nrf51422? I think what would be nessesary, is at least one high priority timer, to sample the program counter, some kind of channel to get the data out of the µcontroller (ant for example) and something analyse the data off target, like google perftools. In addition it would be very helpfull to get the top of the callstack (just the function backtrace) for analysis of the cumulative cpu usage of some functions.

I wonder if it would be doable in conjuction with a softdevice. Especialy the high priority timer part of idea.

cheers, Torsten

Parents
  • When I needed to optimize some of my code, I did two things:

    1. Selected 2 GPIOs for LEDs, toggled the LEDs at key milestones of the code. One line was kind of synchronization (start of the repeated computation), the other was progress. I have then used scope to analyze the time spent in individual parts.
    2. I wrote a "test suite" for unit testing that also does timing. Basically, I type "make test" and it rebuilds the "test-main.c" against all other sources, flashes it to the device (where it runs all the tests and stores the results in a binary log), waits some time, pull back the memory with the binary log and parse the log. This not only helped me tremendously when implementing complex computations, but it also allowed me to record the timing of the building blocks of those computations.
  • Hi Nenik, I didn't understood how you use the LEDs. Some kind of pulse width modulation and the brightness of the LEDs give you an impression on the performance?

Reply Children
No Data
Related