cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l412kbu3 USB

SLevi.1
Associate III

I want to use the 32-pin package of STM32L412 (STM32L412KBU3) as a USB device, using I2C to connect to a few sensors.

  • If I use HSE clock on pin PA0, any suggestion as to a suitable crystal & caps?
  • Could I use LSE instead, would this be accurate enough for reliable USB?
  • Is the internal HSI clock accurate enough for USB? Would it be corrected?
  • How to get power from USB-C connector to Vdd - I assume an LDO convertor to get from USB 5v down to 3.3v
1 REPLY 1
TDK
Super User

> 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.

If you feel a post has answered your question, please click "Accept as Solution".