Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

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.

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