Disabling all interrupts except a specific WDT

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

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

I am trying to disable all interrupts except one like this:

CyGlobalIntDisable; // disable all interrutpts

CySysWdtEnable(CY_SYS_WDT_COUNTER2_MASK); // enable just this one.

is there a better way?

0 Likes
1 Solution

Try using a Global Signal Reference component. This should fire by WDC and leave deep sleep

Bob

View solution in original post

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am afraid that this will not work.

CyGlobalIntDisable will seta bit in the processor status register to prevent any interrupt from firing (except NMI)

Bob

0 Likes

Thanks !

Is there another disable all interrupts function i can use?

0 Likes

Afaik there isn't. EnterCriticalSection() and ExitCriticalSection do the same.

Would be better when you tell a bit more what your problem is.

Bob

0 Likes

I want to disable all interrupts before sleep, and wake up from only the WDT2 interrupt and nothing else.

0 Likes

Try using a Global Signal Reference component. This should fire by WDC and leave deep sleep

Bob

0 Likes