Can we get CySysWdtGetCount value without corruption?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

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

0 Likes
1 Solution
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

CySysWdtGetCount()  API reads just the register of WDT_COUNTER.

And, it is not corrupted in this case.

View solution in original post

0 Likes
2 Replies
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

CySysWdtGetCount()  API reads just the register of WDT_COUNTER.

And, it is not corrupted in this case.

0 Likes

Hello, TakashiM_61-san,

Thank you very much.

Best regards,

Yocchi

0 Likes