Cerb40 standby mode and auto-wakeup

Hi,

I’m trying to put the Cerb40 in Standby mode and wakeup the Cerb using auto-wakeup. I’ve succeeded however there are still some strange things happening. At this moment I use the SLEEPONEXIT bit (see Programming Manual PM0214, Rev 3, September 2012, page 213) to put the processor into Standby mode. Better would be to use the WFI or WFE instruction. Is there a way use issue the WFI or WFE instruction in C#, like an inline assembly code?

Problem solved. Not exactly with an inline piece of code but with a work around. Cerb40 is now happily cycling between standby mode and running mode.
Code can be found in the Codeshare space.

Have fun!

Yes, just saw your code on codeshare. Well done