2025-08-07 5:37 AM
I want to use the 32-pin package of STM32L412 (STM32L412KBU3) as a USB device, using I2C to connect to a few sensors.
2025-08-07 6:29 AM
> If I use HSE clock on pin PA0, any suggestion as to a suitable crystal & caps?
See here for some recommendations and how to choose a crystal:
Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs - Application note
> Could I use LSE instead, would this be accurate enough for reliable USB?
LSE doesn't help with USB support.
> Is the internal HSI clock accurate enough for USB? Would it be corrected?
The STM32L412 supports crystal-less USB, which means it can use the HSI when being a USB device. No HSE needed.
Introduction to USB hardware and PCB guidelines using STM32 MCUs - Application note
> How to get power from USB-C connector to Vdd - I assume an LDO convertor to get from USB 5v down to 3.3v
Yes, use a 3.3V LDO.