Arm Mbed OS support forum

__USB_CLK_ENABLE() undefined (Nucleo-F042K6)

Good morning

Found this USB device library ( which should enable to use the PA11/PA12 pins as USB device connection…

But seems this library is rather old and not supported anymore as I get this __USB_CLK_ENABLE() undefined error during online compile…

Is there another more recent USB library I could use for the smaller STM32F0/L1 parts?

thanks in advance

Hi there,

the macro __USB_CLK_ENABLED is in stm32_hal_legacy.h try to include it into the library .

BR, Jan