Jun 16, 2015
06:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 16, 2015
06:21 AM
Hello,
I am using WINUSB example on xmc4400 to connect it in device mode to PC host. I am not using P0.9 as USB.ID. Is there a way how to detect internaly that USB has been unplugged from PC?
Thanks
rum
I am using WINUSB example on xmc4400 to connect it in device mode to PC host. I am not using P0.9 as USB.ID. Is there a way how to detect internaly that USB has been unplugged from PC?
Thanks
rum
7 Replies
Not applicable
Jun 19, 2015
12:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 19, 2015
12:49 AM
Hello Rum,
Are you using DAVE3 or DAVE4 for the example?
Best regards,
Angel
Are you using DAVE3 or DAVE4 for the example?
Best regards,
Angel
Jun 20, 2015
12:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 20, 2015
12:37 AM
I am using dave3. The question is why otg session end interrupt is never triggered when Vbus voltage is disconnected from device. Any other suggestions?
Jun 23, 2015
05:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 23, 2015
05:36 AM
Hi Rum,
unfortunately without connecting the P0.9 USB.ID the OTG disconnect Interrupt will not be generated.
But some workarounds can be used. For example, in the currently public DAVE3 USBD APP we are not handling the disconnection-reconnection but in the USBD APP for DAVE4 we handle the disconnection-reconnection without the OTG Interrupt by monitoring the Resume Event.
If the Resume Event is detected and the SetConfiguration request has not been yet recieved, the device has been reconnected after a disconnection, so the internal buffers and indexes can be released.
BTW, we will release soon a new version of the USBD APP for DAVE 3 including the handling of the disconnection-reconnection.
Best regards,
Angel
unfortunately without connecting the P0.9 USB.ID the OTG disconnect Interrupt will not be generated.
But some workarounds can be used. For example, in the currently public DAVE3 USBD APP we are not handling the disconnection-reconnection but in the USBD APP for DAVE4 we handle the disconnection-reconnection without the OTG Interrupt by monitoring the Resume Event.
If the Resume Event is detected and the SetConfiguration request has not been yet recieved, the device has been reconnected after a disconnection, so the internal buffers and indexes can be released.
BTW, we will release soon a new version of the USBD APP for DAVE 3 including the handling of the disconnection-reconnection.
Best regards,
Angel
Jun 24, 2015
02:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 24, 2015
02:29 AM
Hi AngelB,
1 . Why there is no event when VBUS voltage is disconnected?
2. What is the purpose of OTG comparators - there is no description in manual.
3. I need to detect disconnection. Seems that your answer regards re-connection using resume event.
3. Another question, what is the purpose of following line under conditional compilation in xmc4_usb.c driver file? Should be removed if dave is not used?
#ifdef DAVE_CE
xmc_device.DeviceEvent_cb(USB_USBD_EVENT_SOF);
#endif
Thank you
rum
1 . Why there is no event when VBUS voltage is disconnected?
2. What is the purpose of OTG comparators - there is no description in manual.
3. I need to detect disconnection. Seems that your answer regards re-connection using resume event.
3. Another question, what is the purpose of following line under conditional compilation in xmc4_usb.c driver file? Should be removed if dave is not used?
#ifdef DAVE_CE
xmc_device.DeviceEvent_cb(USB_USBD_EVENT_SOF);
#endif
Thank you
rum
Jul 03, 2015
07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 03, 2015
07:38 AM
Hello Rum,
1. The OTG disconnection Event is generated after the presence/abscense of an ID Connection. So without connecting ID pin the OTG disconnection Event is not generated.
2. The part of the PHY which implements the OTG functionality.
3. For detecting the disconnection Event you can try to implement the secuence described in the section 13.4.3 of the xmc4200(for the non-OTG disconnection) reference Manual:
The device disconnect flow is as follows:
1. When the USB cable is unplugged or when the VBUS is switched off by the Host, the
device core triggers GINTSTS.USBRst [bit 12] interrupt bit.
2. When the device application detects GINTSTS.USBRst, the application sets a timeout
check for set address control transfer from host.
3. If application does not receive set address control transfer from host before the timeout
period, it is treated as a device disconnection.
4. In DAVE 3 we use this macro for identifying the DAVE enviroment. We were, in the past,not supporting the Start of Frame Event in other 3rd Party Tool where we were using the same library.
Regards,
Angel
1. The OTG disconnection Event is generated after the presence/abscense of an ID Connection. So without connecting ID pin the OTG disconnection Event is not generated.
2. The part of the PHY which implements the OTG functionality.
3. For detecting the disconnection Event you can try to implement the secuence described in the section 13.4.3 of the xmc4200(for the non-OTG disconnection) reference Manual:
The device disconnect flow is as follows:
1. When the USB cable is unplugged or when the VBUS is switched off by the Host, the
device core triggers GINTSTS.USBRst [bit 12] interrupt bit.
2. When the device application detects GINTSTS.USBRst, the application sets a timeout
check for set address control transfer from host.
3. If application does not receive set address control transfer from host before the timeout
period, it is treated as a device disconnection.
4. In DAVE 3 we use this macro for identifying the DAVE enviroment. We were, in the past,not supporting the Start of Frame Event in other 3rd Party Tool where we were using the same library.
Regards,
Angel
Not applicable
Nov 16, 2016
07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2016
07:26 AM
Hello AngelB,
is the improved USBD App for DAVE 3 still to be released or has it been cancelled?
is the improved USBD App for DAVE 3 still to be released or has it been cancelled?
AngelB wrote:
BTW, we will release soon a new version of the USBD APP for DAVE 3 including the handling of the disconnection-reconnection.
Nov 18, 2016
07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 18, 2016
07:21 AM
HI,
so there are no further plans for updating DAVE 3 version of an APP, so I suggest to migrate to DAVE 4 version of an APP. Sorry for any inconvenience this may cause.
Best regards,
Deni
so there are no further plans for updating DAVE 3 version of an APP, so I suggest to migrate to DAVE 4 version of an APP. Sorry for any inconvenience this may cause.
Best regards,
Deni