<?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>APP_USBD_EVT_POWER_READY is not triggered properly when USB is connected after initizalization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66638/app_usbd_evt_power_ready-is-not-triggered-properly-when-usb-is-connected-after-initizalization</link><description>We&amp;#39;re using nRF52840 with S140 SoftDevice (version 7.0.1) and 16.0.0 SDK. When USB cable is connected before USB initialization we receive correctly APP_USBD_EVT_POWER_READY event, but when we start our device and later connect USB cable event APP_USBD_EVT_POWER_READY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Oct 2020 12:21:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66638/app_usbd_evt_power_ready-is-not-triggered-properly-when-usb-is-connected-after-initizalization" /><item><title>RE: APP_USBD_EVT_POWER_READY is not triggered properly when USB is connected after initizalization</title><link>https://devzone.nordicsemi.com/thread/273221?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 12:21:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38b219f3-de74-41aa-bc11-473cb0e54ba2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Let us look at this from a SW point of view, then:&lt;/p&gt;
&lt;p&gt;the APP_USBD_EVT_POWER_READY event is generated in app_usbd.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case NRF_DRV_POWER_USB_EVT_READY:
        {
            static const app_usbd_internal_evt_t ev = {
                .type = APP_USBD_EVT_POWER_READY
            };
            app_usbd_event_add(&amp;amp;ev);
            break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And the NRF_DRV_POWER_USB_EVT_READY is generated if &amp;quot;APP_USBD_CONFIG_POWER_EVENTS_PROCESS&amp;quot; is defined as 1 in sdk_config.h, and&amp;nbsp;USBD_POWER_DETECTION needs to be set to true somewhere in your project, like it is e.g. in the usbd_cdc_acm example project.&lt;/p&gt;
&lt;p&gt;So in your project:&lt;/p&gt;
&lt;p&gt;1. is APP_USBD_CONFIG_POWER_EVENTS_PROCESS set to 1 in sdk_config.h?&lt;/p&gt;
&lt;p&gt;2. is USBD_POWER_DETECTION set to true?&lt;/p&gt;
&lt;p&gt;3. is&amp;nbsp;app_usbd_power_events_enable() called? If so, does it return NRF_SUCCESS?&lt;/p&gt;
&lt;p&gt;4. is the&amp;nbsp;app_usbd_power_event_handler() in app_usbd.c called with the NRF_DRV_POWER_USB_EVT_READY event?&lt;/p&gt;
&lt;p&gt;5. if all of the above is set correctly, is the APP_USBD_EVT_POWER_READY event generated?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_USBD_EVT_POWER_READY is not triggered properly when USB is connected after initizalization</title><link>https://devzone.nordicsemi.com/thread/272761?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 13:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ecbdb2d-2943-4469-8e96-d16cf40acb95</guid><dc:creator>elwas</dc:creator><description>&lt;p&gt;Yes, it is connected to USB connector. Diagrams below.&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1601646798190v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1601646830306v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_USBD_EVT_POWER_READY is not triggered properly when USB is connected after initizalization</title><link>https://devzone.nordicsemi.com/thread/272708?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 11:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ece198a1-585c-4c13-a1bf-05afc085c105</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;The event&amp;nbsp;&lt;span&gt;APP_USBD_EVT_POWER_READY should trigger when you power up the VBUS pin. Is this on a custom board? How do you handle the VBUS pin?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>