Skip to content

Commit 9c7f8ca

Browse files
committed
cpu/stm32/periph_usb: block idle power mode
This USB peripheral seems to not be clocked when entering IDLE, at least on STM32F3. Given that an increase of power consumption in the order of 10s of mA is usually of little concern when powered via USB, this just disables the idle power state for all STM32 MCUs when USB is in use to rather err on the side of additional power draw, rather than broken USB.
1 parent dcaf225 commit 9c7f8ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpu/stm32/periph/usbdev_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ static void _usbdev_init(usbdev_t *dev)
354354
/* Block STOP/STANDBY */
355355
pm_block(STM32_PM_STOP);
356356
pm_block(STM32_PM_STANDBY);
357+
pm_block(STM32_PM_IDLE);
357358

358359
#if defined(RCC_CFGR_USBPRE)
359360
/* If `RCC_CFGR_USBPRE` is defined, the USB device FS clock of 48 MHz is

0 commit comments

Comments
 (0)