We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
As we know, the instruction count can be calculated as:
# instructions executed = DWT_CYCCNT - DWT_CPICNT - DWT_EXCCNT - DWT_SLEEPCNT - DWT_LSUCNT + DWT_FOLDCNT
The count register DWT_CPICNT , DWT_EXCCNT , DWT_SLEEPCNT , DWT_LSUCNT , DWT_FOLDCNT is only 8 bit. When the register overflows, the number of statistical instructions is inaccurate. so I think it can't count too many instructions.
Is there another method to count the instructions?