This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

__WFI does not come back at interrupts when using WLCSP

With my sparkfun 52832 board, when I use the __WFI instruction and I set my device to generate interrupts on P04, the code returns when an interrupt is generated.
With the 52832 WLCSP (internal LDO configuration) it gets stuck at the __WFI instruction even when an interrupt happens. 
Is there a reason for it?
Is this a normal behavior?
Do I need to configure anything special?

Parents
  • Hi,

    Internally the die is identical, it's only the pin out/package that is different.

    There is various reason why __WFI() may not work, and there are online discussion on '__wfi vs. __fwe arm' (for instance the interrupt may already have occured when you call wfi). My suggestion is to replace __WFI() with:

    // Clear event
    __SEV();
    __WFE();
    // Wait for event
    __WFE();

    Best regards,
    Kenneth

Reply
  • Hi,

    Internally the die is identical, it's only the pin out/package that is different.

    There is various reason why __WFI() may not work, and there are online discussion on '__wfi vs. __fwe arm' (for instance the interrupt may already have occured when you call wfi). My suggestion is to replace __WFI() with:

    // Clear event
    __SEV();
    __WFE();
    // Wait for event
    __WFE();

    Best regards,
    Kenneth

Children
Related