<?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 Power Consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55950/usb-power-consumption</link><description>Hi, 
 On our NRF52840 Based product, we have enabled USB CDC Use. 
 We see increase of ~0.5 mA when enabling USB . We are ok with this , However - when we remove the USB cable , we still see this 0.5 mA increase. 
 I&amp;#39;d like to de-init the PHY once I detect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jan 2020 11:07:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55950/usb-power-consumption" /><item><title>RE: USB Power Consumption</title><link>https://devzone.nordicsemi.com/thread/227864?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2020 11:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27f09eff-6db5-44cf-aa39-e124e187b378</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;The HF clock (HFINT, not to be confused with the crystal (HFXO)) is used by the softdevice, CPU and many other peripherals, It turns on and off by request from the peripherals, so it&amp;#39;s not running all the time. Generally, if the peripherals are not de-initialized correctly the clock request might never be released, and the clock is then stuck. The only way of releasing the clock is then to power cycle the peripheral.&lt;/p&gt;
&lt;p&gt;How to power cycle peripherals is described in this errata: &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_89.html?cp=4_2_1_0_1_26"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_89.html?cp=4_2_1_0_1_26&lt;/a&gt; The errata is written for SPI and TWI, but you can try this on the USB peripheral as well. Note that the base address for the USB peripheral is 0x40027000, so the POWER register will have the address: 0x40027FFC.&lt;/p&gt;
&lt;p&gt;Try this out and see if the current consumption is going down afterwards. If it is, then the high current is most likely caused by the HF clock.&lt;/p&gt;
&lt;p&gt;The drawback of power cycling the peripheral is that all configuration registers are cleared, so the USB peripheral will have to be re-initialized. So ideally you should figure out why the driver is not de-initializing the USB correctly.&lt;/p&gt;
&lt;p&gt;As a reference the nrfx USB driver is documented here: &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrfx__usbd.html?cp=7_1_6_9_0_43_1"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrfx__usbd.html?cp=7_1_6_9_0_43_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the disable function: &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/9136253e271f978a8da735864fc50d60e0ed68c6/drivers/src/nrfx_usbd.c#L1835"&gt;https://github.com/NordicSemiconductor/nrfx/blob/9136253e271f978a8da735864fc50d60e0ed68c6/drivers/src/nrfx_usbd.c#L1835&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Power Consumption</title><link>https://devzone.nordicsemi.com/thread/227760?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 16:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bef41ed0-9d5c-4083-8545-e8e4f1580dd3</guid><dc:creator>ran</dc:creator><description>&lt;p&gt;This was tested with 3rd party USB Driver ( Segger emUSB ) , I will test with Nordic&amp;#39;s CDC.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;HF Clock will be used by SD any case right ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For Nordic&amp;#39;s CDC\USB - Is there de-init function somewhere I can reference ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Power Consumption</title><link>https://devzone.nordicsemi.com/thread/227754?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 16:13:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93ed9d98-30b7-48f4-96c6-d893180b0893</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, this sounds like the USB is not de-initialized correctly and that the HF clock is still running when the USB cable is unplugged. Do you see this with the USB CDC SDK example? Which version of the SDK is this, and if you are using nrfx drivers, which driver version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Power Consumption</title><link>https://devzone.nordicsemi.com/thread/227573?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 07:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e69fb319-9231-441a-881f-d0770d02e2f4</guid><dc:creator>ran</dc:creator><description>&lt;p&gt;anyone ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Power Consumption</title><link>https://devzone.nordicsemi.com/thread/226852?ContentTypeID=1</link><pubDate>Thu, 26 Dec 2019 06:12:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:403ceb87-e804-4115-a5cb-94d1e6f24be3</guid><dc:creator>ran</dc:creator><description>&lt;p&gt;Any Ideas ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>