Skip to main content
Graduate II
May 13, 2024
Question

OTG on STM32F7 controller

  • May 13, 2024
  • 1 reply
  • 877 views

Hi team,

             Is there any sample of OTG MSC on F7 controller. Need both Host and Device stack on single application. Based on the ID pin need to decide which one to run.  For Host - If i connect an USB stick to controller, it can read and write on stick. And if i connect the controller to laptop, i can access it's external flash area as MSC device (For Device). Is there any sample code or example available for this, Kindly provide me reference here. 

 

 

 

Thanks,

Shikamaru

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 13, 2024

    Hi @Shikamaru 

    This is supported by our hardware. But unfortunately, our stack doesn't support OTG functionality to switch Host/Device in one single application.  You can develop your own application and merge both middleware for host and device in one single project and manage negotiation through ID pin as you mentioned. 

    ShikamaruAuthor
    Graduate II
    May 13, 2024

    @FBL wrote:

    Hi @Shikamaru 

    This is supported by our hardware. But unfortunately, our stack doesn't support OTG functionality to switch Host/Device in one single application.  You can develop your own application and merge both middleware for host and device in one single project and manage negotiation through ID pin as you mentioned. 


    Thanks for reply @FBL ,

                                           Just need couple of clarity here. can you provide me the idea on how to achieve negotiation through ID pin. My confusion here is that, initialization and deinitialization of stack will happen only one time in main while executing. How to achieve this in Runtime.