<?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-C VBUS measurement</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110667/usb-c-vbus-measurement</link><description>Hi there, 
 I want to measure VBUS without any external circuitry and came across the USB-C VBUS Zephyr API . 
 Is this API suitable for what I&amp;#39;m after? If so, do I need to sacrifice one or multiple pins for this purpose? 
 I found some relevant KConfig</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Apr 2024 11:04:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110667/usb-c-vbus-measurement" /><item><title>RE: USB-C VBUS measurement</title><link>https://devzone.nordicsemi.com/thread/481048?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 11:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb71d763-7925-4a0e-98bf-1c32fe8066c7</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I want to measure VBUS without any external circuitry[/quote]
&lt;p&gt;From &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.1/zephyr/build/dts/api/bindings/usb-c/zephyr,usb-c-vbus-adc.html#zephyr-usb-c-vbus-adc"&gt;zephyr,usb-c-vbus-adc&lt;/a&gt;: &amp;quot;Resistance of the lower leg of the voltage divider&amp;quot;&lt;/p&gt;
&lt;p&gt;This means that you need a voltage divider, which is external circuitry.&lt;/p&gt;
&lt;p&gt;I do not think you will be able to measure the voltage without any external circuitry with a nRF52840.&lt;/p&gt;
[quote user=""]do I need to&amp;nbsp;sacrifice one or multiple pins for this purpose?[/quote]
&lt;p&gt;From what I can see, you need 1 pin to measure the voltage. I suggest that you test the sample with a DK to be sure.&lt;/p&gt;
[quote user=""]CONFIG_DT_HAS_ZEPHYR_USB_C_VBUS_ADC_ENABLED[/quote]
&lt;p&gt;This is automatically generated if you have enabled the DTS node.&lt;/p&gt;
[quote user=""]However, any of the above nodes make the build fail.[/quote]
&lt;p&gt;I need a build log to be able to say what went wrong.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>