This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CPU load (with SD) ?

Hello,

Is there any way to know CPU load (active vs sleep time) ?

  • I am getting more and more motivated to create a library with RTC1 and TIMER1 in counter mode to maintain system time which should work in all modes. It should be then easy to calculate the load if you diff system time before going to sleep and just after waking up (percentage diff between system time before and after __WFE instruction)

  • on the nRF52 you could use SysTick for that, since SysTick isn't really used and, because it stops every time the processor goes to sleep, hard to find a good use for.

    You'd also expect on the nRF52 some of this information is available via the expanded debugging facilities. For a start, when debugging nRF52 stuff I get a CPU cycle count, pretty sure you can read that from code, you also have the option of trace and SWO output. I enabled it once and CrossWorks chewed the data and gave me some kind of readable output but I haven't spent much time on it.

  • Good Info RK, I will try to explore few of those paths after easter vacation.

  • I don't know how easy it will be to check on nRF52, but on nRF51 observing current consumption gives good understanding of active/sleep time.

  • Wojtek's idea came to me as first and obvious way how to measure it. Any idea why it couldn't be precise enough to simply plug oscilloscope and measure power?

Related