<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>USB data detection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76583/usb-data-detection</link><description>Hello, 
 My device is a USB HID peripheral connected to a PC. There is a case when the PC is turned off, but USB power is present. I want to detect this situation. 
 At the moment I use APP_USBD_EVT_DRV_SOF event as an indicator that the data line is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Jun 2021 14:55:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76583/usb-data-detection" /><item><title>RE: USB data detection</title><link>https://devzone.nordicsemi.com/thread/316314?ContentTypeID=1</link><pubDate>Mon, 21 Jun 2021 14:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d6e2c70-b5bb-4877-9e0b-f21192ba45bb</guid><dc:creator>ilia</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ll use it. Somehow I didn&amp;#39;t find it previously.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB data detection</title><link>https://devzone.nordicsemi.com/thread/316304?ContentTypeID=1</link><pubDate>Mon, 21 Jun 2021 14:19:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:494ebbb5-0e46-479a-adee-af817bc539dc</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;SOF event should be a quite reliable way, no SOF for 2 seconds means port is in suspended state... There is also&amp;nbsp;&lt;span&gt;app_usbd_core_state_get() method, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68597/about-identifying-the-usb-device-plugged-into-the-pc-or-power-bank-or-adapter/281090#281090"&gt;this&lt;/a&gt; discussion.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>