title: ARM WFI won't sleep
body: <p>I am trying to enter standby mode on a Cortex-M4. The normal behaviour is that the device wakes up about every 2 minutes but on my latest FW release, it seems that the code is "randomly" stuck.</p>
  
  <p>After investigation it seems that the code passes the <code>WFI</code> instruction without going to standby (no standby => no reset => infinite loop => ... => 42).</p>
  
  <p>So after many unclear spec reading my understanding is that the <code>WFI</code> may not go to sleep if there are pending interrupts.</p>
  
  <ol>
  <li>Can you confirm the last sentence </li>
  <li>How to ensure all pending interrupts are cleared before calling <code>WFI</code> ?</li>
  </ol>