Configure USB host on Blues Swan (STM32L4+)

Post here first, or if you can't find a relevant section!
Post Reply
Pedrogmnz
Posts: 2
Joined: Fri Aug 16, 2024 1:10 pm

Configure USB host on Blues Swan (STM32L4+)

Post 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?
GonzoG
Posts: 494
Joined: Wed Jan 15, 2020 11:30 am
Answers: 36
Location: Prudnik, Poland

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

Post 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.
Pedrogmnz
Posts: 2
Joined: Fri Aug 16, 2024 1:10 pm

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

Post by Pedrogmnz »

So, what would be the most optimal way to connect a USB keyboard?
GonzoG
Posts: 494
Joined: Wed Jan 15, 2020 11:30 am
Answers: 36
Location: Prudnik, Poland

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

Post by GonzoG »

The one that's best for your project.
The simplest one is to setup USB as a host only.
Post Reply

Return to “General discussion”