You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include"stm32f4xx-hal-dwt-counter/dwt-counter.h"intmain(void)
{
uint32_tcycles;
floats, ms, us, ns;
/* Super loop */while(1) {
/* Start the counter */DWT_Start();
/* Do some operations here *//* Get CPU cycles count */cycles=DWT_GetCycle();
/* Get elapsed time in seconds */s=DWT_GetTime_s();
/* Get elapsed time in mili seconds */ms=DWT_GetTime_us();
/* Get elapsed time in micro seconds */us=DWT_GetTime_us();
/* Get elapsed time in nano seconds */ns=DWT_GetTime_ns();
/* Stop the counter */DWT_Stop();
}
}