cancel
Showing results for 
Search instead for 
Did you mean: 

USB OTG Sample

Shikamaru
Associate III

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

4 REPLIES 4
STTwo-32
ST Employee

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.

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

 

Thanks,

Shikamaru

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

HI @tjaekel ,

                    I am using stm32f756igxx MCU for my application. 


@tjaekel wrote:

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)?

 


This is what am interested(on the fly) however if it is USB example i.e. OTG USB Device I would like to understand that as well. what will be the changes from OTG USB devices to on the fly decision making mechanism? . Can we achieve this on the fly decision through firmware ?. i read somewhere ki based on the ID pin we can decide device or host.

 

 

Regards,

Shikamru