2 Replies Latest reply on Jun 16, 2019 7:43 PM by YoIs_1298666

    Can we get CySysWdtGetCount value without corruption?

    YoIs_1298666

      Hello,

       

      condition: PSoC4000S

       

      We want to get the current WDT counter value during running WDT.

      If the counting up and reading current WDT counter at the same time, is CySysWdtGetCount  API value corrupted?

       

      CY_ISR(wdt_interrupt)

      {

          /* Clear the watchdog interrupt */

          CySysWdtClearInterrupt();

       

          /* WDT match value is updated in order to obtain periodic interrupts. */

          CySysWdtSetMatch(CySysWdtGetCount()  + WDT_MATCH_VALUE);

       

          /* Clear interrupt status in an interrupt controller */

          wdt_isr_ClearPending();

       

       

          /* User ISR Code*/

                      ....

      }

       

      Best regards,

      Yocchi