STM32 external power adapter
From STM32F4DISCOVERYDiscovery kit with STM32F407VG MCU


  Board power supply: through USB bus or from an external 5 V supply voltage


USB provides power during programming.  This can be replaced by a charger only USB or separate 5V power connected to P2.