Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
DWT CycCnt vs SysTick inaccuracy.
Jakub M. Jan 11, 2018 at 05:32 AM (05:32 hours)
Staff: Juan S.

  • Hello,

    I'm using Multilink Universal 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 values (as expected),
    - when I measure the same with stopping on a breakpoint inside 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 is a reason for these discrepancies?



  • Hi Jakub, 

    According to the ARMv7-M Debug manual:

    CYCCNT does not increment when the processor is halted in Debug state.

    This may explain the discrepancy that you are seeing.

    Juan See

Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2019 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement