Skip to main content
Associate III
February 14, 2024
Question

USB OTG Sample

  • February 14, 2024
  • 1 reply
  • 4081 views

Hi team,

            I am working on USB recently, wanted to try the OTG application. I want to understand the OTG working is there any project or sample code or docs available for the same? if yes, plz share me the reference.

 

Thanks,

Shikamru

1 reply

STTwo-32
Technical Moderator
February 14, 2024

Hello @Shikamaru 

First, you can start following this tutorial. Then, I suggest you take a look at the following application on this link:

STTwo32_0-1707916953982.png

Also, you can take a look at the UM1720 and UM1734.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ShikamaruAuthor
Associate III
February 14, 2024

Thanks for quick reply @STTwo-32 , I will go through it and will be back here with doubts for sure.

 

Thanks,

Shikamaru

Lead II
February 15, 2024

For which MCU/Board?

Do you mean special OTG features (like changing between Device and Host on the fly?), or any USB example (using an OTG USB device)?

So may examples out there, e.g. as USB VCP UART (I have several on different boards), even USB Audio ...
Try to bring up a USB VCP UART (or called ACM) first... Works fine on "old" STM HAL and Middleware, as well as on "new" AZURE RTOS stack.

What is your intention (and which board/MCU)?

If you use Portenta H7, STM32H747/STM32H745, STM32U5xx - I have several examples for (OTG) USB...