/* Enable or disable the power down mode during RUN mode.  */
__RAM_FUNC FLASH_RUNPowerDownCmd(FunctionalState NewState)
/* Enable or disable the power down mode during RUN mode.  */
__RAM_FUNC FLASH_RUNPowerDownCmd(FunctionalState NewState)
{
  FLASH_Status status = FLASH_COMPLETE;
  if (NewState != DISABLE)
  {
     FLASH->PDKEYR = FLASH_PDKEY1;
     FLASH->PDKEYR = FLASH_PDKEY2;
     FLASH->ACR |= (uint32_t)FLASH_ACR_RUN_PD;
     if((FLASH->ACR & FLASH_ACR_RUN_PD) != FLASH_ACR_RUN_PD)
     {
       status = FLASH_ERROR_PROGRAM;
     }
  }
  else
  {
    FLASH->ACR &= (uint32_t)(~(uint32_t)FLASH_ACR_RUN_PD);
  }
  return status;  
}