title: STM32L1x Stop mode + RTC too much current
body: <p>I am able to put my stm32L1xDiscovery board in STOP mode with RTC running.
  according to the datasheet this should draw about 1.3 µA. But my application draws 3.3 µA.</p>
  
  <p>I noticed I did not put the FLASH in a low power mode during sleep. But when I did this, nothing changed. </p>
  
  <p>This is what I use to go into STOP mode:</p>
  
  <pre><code>SCB-&gt;SCR |= ((uint32_t)SCB_SCR_SLEEPDEEP);
  
  RCC-&gt;APB1ENR |= RCC_APB1Periph_PWR;
  PWR-&gt;CR |= ((uint32_t)(PWR_CR_LPSDSR|PWR_CR_ULP)); // ULP seems to have no effect on power consumption
  RCC-&gt;APB1ENR &amp;= ~RCC_APB1Periph_PWR;
  
  FLASH-&gt;ACR |= SLEEP_PD; // seems to have no effect at all on power consumption
  
  __WFI();
  </code></pre>
  
  <p>Any idea what I am missing here?</p>