AnsweredAssumed Answered

Second endpoint issue - STM32F107

Question asked by p.p on Oct 12, 2016
                                   
           


            We are using the following USB FS library. All I need is an additional IN end point to send data to Host. When I tried to add an End point, for end point 2, transfer complete flag is never set. When using End point 1 it is working fine.
           
            For End point 2: I can never clear the interrupt as transfer complete is never set. More over, I do not see any data sent to Host.
           
            Any help is really appreciated.
           
            if (diepint.b.emptyintr)
                  {
                   
                    DCD_WriteEmptyTxFifo(pdev , epnum);
                   
                    CLEAR_IN_EP_INTR(epnum, emptyintr);
                   
            }
           
            To add Endpoint:
           
            /**
              * @brief  CustomHIDDevice_Init
              *         Initialize the HID interface
              * @param  pdev: device instance
              * @param  cfgidx: Configuration index
              * @retval status
              */
            static uint8_t  CustomHIDDevice_Init (void  *pdev, uint8_t cfgidx)
            {
           
                /* Open EP IN */
                DCD_EP_Open((USB_OTG_CORE_HANDLE *)pdev,
                          EP1_IN,
                          0x40,
                          USB_OTG_EP_INT);
           
                /* Open EP IN */
                DCD_EP_Open((USB_OTG_CORE_HANDLE *)pdev,
                          EP2_IN,
                          0x40,
                          USB_OTG_EP_INT);
                MyUSBDescriptor.Get_SerialNum(&MyConfigData.MyVars);
                return USBD_OK;
            }
           
            Any ideas or help really appreciated. Here is the library code version:
           
           
              ******************************************************************************
              * @file    usb_dcd_int.c
              * @author  MCD Application Team
              * @version V2.1.0
              * @date    19-March-2012
              * @brief   Peripheral Device interrupt subroutines
           
           
           
           

           

Outcomes