<?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>LPCOMP Reference voltage switching</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74372/lpcomp-reference-voltage-switching</link><description>Hi Team, 
 regarding my application I need to switch the reference voltage we are taking two deferent reference voltage Ex: one for 2.25 and another 0.75 so we have requirement if the voltage is crossing the 2.25 reference it will trigger the call back</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Apr 2021 12:55:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74372/lpcomp-reference-voltage-switching" /><item><title>RE: LPCOMP Reference voltage switching</title><link>https://devzone.nordicsemi.com/thread/306805?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 12:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:295fb353-369d-487c-a4fe-091b34e284f3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]1) can we able to do switching reference value?[/quote][quote user=""]2) is it supported to switching any other methods?&amp;nbsp;[/quote]
&lt;p&gt;The nrfx LPCOMP driver unfortunately do not support dynamic reference changes. To switch &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrf__lpcomp__hal.html&amp;amp;anchor=ga0c957a3dd1132acd90e420b70477cef0"&gt;the reference&lt;/a&gt;&amp;nbsp;when using the nrfx_lpcomp driver&amp;nbsp;you will have to uninitialize the driver, and re-initialize it with the new reference.&lt;br /&gt;&lt;br /&gt;You can see &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__lpcomp.html"&gt;the nrfx driver API Reference documentation here&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Flpcomp.html&amp;amp;anchor=concept_tdv_zkx_lr"&gt;read more about the capabilities of the LPCOMP peripheral in its peripheral documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For future reference, please use the &amp;quot;Insert-&amp;gt;Code&amp;quot; option when sharing code here on DevZone - it increases its readability tenfold.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>