cancel
Showing results for 
Search instead for 
Did you mean: 

USB OTG Stack Problem in STM32F4xxx

Shail Shah
Associate II
Posted on August 01, 2017 at 07:29

Hello all,

We are using STM32Fxxx.

Can U help us to provide the information on how to convert USB Standard peripheral library to HAL Library?

Actually we are currently working on USB OTG Stack Implementation and not able to switch between Device and HOST mode. ID Line detection might be problem. What kind of configuration is require to detect ID Pin status correctly?

Is any hardware changes required?

Can U help us to provide OTG Driver as per HAL Library?

what can be initial state of USB HOST or Device in USB OTG Implementation?  How to configure OTG init function for USB OTG Implementation?

Thanks and Regards,

Shail Shah
7 REPLIES 7
Micha Valach
Associate III
Posted on August 01, 2017 at 08:07

Same Question for STM32F-777-ZI

Khouloud GARSI
Lead II
Posted on August 03, 2017 at 12:38

Hi

Shah.Shail

‌,

  • To correctly configure the USB controller in dual mode (FS), please make sure your hardware respects the following:

0690X00000607qwQAA.png

Khouloud.

Shail Shah
Associate II
Posted on August 03, 2017 at 14:17

Hello,

(1) what can be initial state of USB HOST or Device in USB OTG Stack Implementation?  How to configure OTG init function for USB OTG Implementation?

(2) How to make use of SRP and HNP Protocols?

(3) In USB OTG Driver SRP request after that

USB_OTG_HandleSessionRequest_ISR

invoking.

What Need to be added to inform upper layer USB_OTG_HandleSessionRequest_ISR as per HAL Library?.

  if (IsDeviceMode(&otgfs_dev1) && (otg_ctl.b.bsesvld))  

  {  

      /* inform upper layer here */  ??

      /***************************/  

      / ??????????????????/

  }  

  else if (otg_ctl.b.asesvld)  

  {  

      /* inform upper layer here */   ??

      /***************************/  

      / ??????????????????/

  }  

  

Simliar way in HNP request after that

USB_OTG_HandleConnectorIDStatusChange_ISR invoking

What Need to be added to inform upper layer?

(4) Is descriptor need to update to detect SRP and HNP Protocols ?

Thanks and Regards,

Shail Shah

Posted on August 03, 2017 at 14:18

Hello,

Thanks for your kindly support. We are able to detect ID Pin by changing configuration in GPIO Pins.

Question:

(1) what can be initial state of USB HOST or Device in USB OTG Stack Implementation?  How to configure OTG init function for USB OTG Implementation?

(2) How to make use of SRP and HNP Protocols?

(3) In USB OTG Driver SRP request after that

USB_OTG_HandleSessionRequest_ISR

invoking.

What Need to be added to inform upper layer USB_OTG_HandleSessionRequest_ISR as per HAL Library?.

  if (IsDeviceMode(&otgfs_dev1) && (otg_ctl.b.bsesvld))  

  {  

      /* inform upper layer here */  ??

      /***************************/  

      / ??????????????????/

  }  

  else if (otg_ctl.b.asesvld)  

  {  

      /* inform upper layer here */   ??

      /***************************/  

      / ??????????????????/

  } 

Simliar way in HNP request after that

USB_OTG_HandleConnectorIDStatusChange_ISR invoking

What Need to be added to inform upper layer?

(4) Is descriptor need to update to detect SRP and HNP Protocols ?

Thanks and Regards,

Shail Shah

Shail Shah
Associate II
Posted on August 07, 2017 at 07:15

Hello,

we need to know detail about HNP and SRP Protocol.

Where we need to call this function USB_OTG_InitiateSRP and USB_OTG_InitiateHNP in USB OTG Stack ?

Should we need to in USB_OTG_HandleSessionRequest_ISR?

Thanks and Regards,

Shail Shah

Amel NASRI
ST Employee
Posted on August 07, 2017 at 17:48

Hi

Shah.Shail

‌,

Please contact our FAEs in India to get morededicated assistance.

-Amel

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.

Shail Shah
Associate II
Posted on August 08, 2017 at 09:07

Hello Amel,

   Thanks for your reply.Kindly provide the contact detail of FAEs in India.

Thanks and Regards,

Shail Shah