Tagged: dwt

HAL Library 19- CPU LOAD monitor for STM32Fxxx 6

HAL Library 19- CPU LOAD monitor for STM32Fxxx

CPU load monitor library is simple library, which counts number of sleeping cycles using WFI() instruction compared to working cycles in one second. Load variable is updated every 1 second to determinate how much your processor works. For that case, you have to always put your system to sleep mode when you don’t need it. It uses DWT counter in Cortex M4/M7 to measure cycle counters! Library Read more about new HAL libraries Features Measures CPU load. Load depends between...

Library 60- CPU load monitor for STM32F4xx devices 3

Library 60- CPU load monitor for STM32F4xx devices

Yesterday, I’ve made a post about monitoring CPU load depending on CPU work and it’s sleep time using DWT counter. This post can be found here. This post is now a library, set together from post about CPU load. Library Features Measures CPU load. Load depends between sleep time and work time of CPU CPU load is updated for every System core clock cycles. In other words, that is each 1 second DWT counter used for measurements Sleep mode which...

CPU load monitor for STM32F4xx 0

CPU load monitor for STM32F4xx

I’ve been searching for a simple CPU load monitor on STM32F4xx device. Today, I’ve managed to get one very, very primitive CPU load monitor for these devices. Check library here. STM32F4xx have built-in DWT (Data Watchpoint and Trace unit) which has several timers there. 2 of them are cycle counter and sleep counter. The first counts number of CPU cycles and the second counts number of cycles where CPU was sleeping. It would be very easy to get CPU load,...