cancel
Showing results for 
Search instead for 
Did you mean: 

USB and WFI

root
Associate II
Posted on December 06, 2011 at 08:46

Hello,

I finally get the USB stack to work on my custom hardware.

Last thing I need to fix is that once everything is started I rely only upon interrupts (as the USB stack), so my main method looks like :

int main(void)

{

init();

while(1)

__WFI();

}

But with the USB stack active, it works only if I change the __WFI() intrinsic by __nop().

That means the MCU doesn't automatically enters sleep mode between interrupts, and my power consumption increased a lot (by 20/30mA), I cannot really afford that on the LDO.

Do anyone have a clue about why the USB stack doesn't work with WFI ?

Thomas.

[EDIT] Do you think using SLEEPONEXIT would change something ?
0 REPLIES 0