cancel
Showing results for 
Search instead for 
Did you mean: 

Bugs in USB OTG library

niko
Associate II
Posted on January 06, 2010 at 12:10

Bugs in USB OTG library

#usb-stm32
40 REPLIES 40
thomasbretgeld9
Associate II
Posted on May 17, 2011 at 13:30

I think I found another bug today regarding suspend and resume with CL devices:

Inside the usb_istr.c function STM32_PCD_OTG_ISR_Handler the Suspend() function from usb_pwr.c gets called on suspend, but the corresponding call to Resume(RESUME_STATE) is missing. This leads to an incomplete resume procedure after suspend. This only applies to CL devices.

Inside the STM32_PCD_OTG_ISR_Handler function the following change fixes the issue:

#ifdef INTR_WKUPINTR   

    if (gintr_status.b.wkupintr)

    {

      //Begin Added by Thomas Bretgeld

      Resume(RESUME_EXTERNAL);

      //End Added by Thomas Bretgeld

      retval |= OTGD_FS_Handle_Wakeup_ISR();

    }

#endif /* INTR_WKUPINTR */  

Kind regards,

Thomas Bretgeld