DWT CycCnt vs SysTick inaccuracy.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DWT CycCnt vs SysTick inaccuracy.

Jump to solution
2,530 Views
kubsztal
Contributor II

Hello,

I'm using PEmicro Multilink Universal debug probe with S32 Design Studio for S32K144 MCU. What I've found out is some inaccuracy between DWT CycCnt and SysTick during single stepping and while using breakpoints:
- when I measure LPIT IRQ intervals by tracing to RAM buffer without any interruptions, both counters show exactly the same amount of ticks elapsed (as expected),
- when I measure the same with stopping on a breakpoint inside LPIT ISR (MCR[DBG_EN]=0), SysTick measurements are 18 ticks bigger than CycCnt,
- when I single step with Instruction Stepping Mode enabled:
  - if CycCnt is increased by 1, SysTick is decreased by 8,
  - if CycCnt is increased by 2, SysTick is decreased by 9.
What could be a reason for these discrepancies?

Jakub

Labels (1)
Tags (2)
0 Kudos
1 Solution
1 Reply