Page 1 of 1

Configure USB host on Blues Swan (STM32L4+)

Posted: Sat Aug 17, 2024 12:38 pm
by Pedrogmnz
Image
Is it possible, through the pins in the image, to configure a USB port on the Blue Swan as a USB HOST to, for example, connect a USB keyboard?

Re: Configure USB host on Blues Swan (STM32L4+)

Posted: Sat Aug 17, 2024 1:46 pm
by GonzoG
Yes, you can enable USB host on this board, but there is no support for usb host in STM32duino, so you'll have to do everything by yourself (interface initialization, device recognition, etc).

USB needs only 4 pins: 5V, GND, DP, DM, so just 2 pins from MCU.
If you want to use it in OTG mode (host/guest) you'll need a 3rd pin from MCU to switch modes.

Re: Configure USB host on Blues Swan (STM32L4+)

Posted: Sun Aug 18, 2024 2:54 pm
by Pedrogmnz
So, what would be the most optimal way to connect a USB keyboard?

Re: Configure USB host on Blues Swan (STM32L4+)

Posted: Sun Aug 18, 2024 3:25 pm
by GonzoG
The one that's best for your project.
The simplest one is to setup USB as a host only.