<?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 change</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35893/lpcomp-reference-change</link><description>I wonder if it is OK to change the lpcomp ref input on the fly, without any other stop task or disable/enable. Just like this: 
 //-------------------- 
 static void lpcomp_set_ref(int hl) { if (hl == 1) 
 NRF_LPCOMP-&amp;gt;REFSEL = (NRF_LPCOMP_REF_SUPPLY_7_8</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Jul 2018 13:55:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35893/lpcomp-reference-change" /><item><title>RE: lpComp reference change</title><link>https://devzone.nordicsemi.com/thread/138538?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 13:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14eb2e12-fca5-443a-8e56-a1c1111d2024</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;A &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27149/lpcomp-start-up-time-and-refsel-while-running"&gt;similar question&lt;/a&gt;&amp;nbsp;was asked here on DevZone which triggered a discussion with the LPCOMP architects and they indicated that that changing the REFSEL with the LPCOMP could affect the time it takes for the reference to stabilize. The startup time of the LPCOMP can be up-to 135uS.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpComp reference change</title><link>https://devzone.nordicsemi.com/thread/138522?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 13:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0f491d1-bc19-4fe6-aaaf-e64d0d31e4fe</guid><dc:creator>johananh</dc:creator><description>&lt;p&gt;Well, I checked this code and it works.&lt;/p&gt;
&lt;p&gt;I need&amp;nbsp;to have a relaxation oscillator, which is a resistor from one pin charging/discharging a capacitor on LPCOMP input. Every time a DOWN/UP event on LPCOMP, it will change&amp;nbsp; the charging polarity and change the LPCOMP ref voltage via interrupt (which will happen long before the voltage passes the HYST gap).&lt;/p&gt;
&lt;p&gt;This way I can make sure that capacitor voltage will be from 1/8 VCC to 7/8 VCC. I did not implement ppi yet, but I would like to do it.(current version works software only, no ppi)&lt;/p&gt;
&lt;p&gt;I can see that this voltage ref change works without STOP of LPCOMP, do I really need it? what will be the&amp;nbsp; effect on the working speed? What is the risk of doing it without STOP (As I said, it does work)?&lt;/p&gt;
&lt;p&gt;Thanks for you comments.&lt;/p&gt;
&lt;p&gt;Johanan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpComp reference change</title><link>https://devzone.nordicsemi.com/thread/138516?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 13:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3afff33-81e9-4aff-b8c9-cb7ca7f31886</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Jonhanan,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I apologize for the late reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No, the LPCOMP&amp;nbsp; must&amp;nbsp;be stopped before modifying PSEL or any other configuration register and then started again for the change to take affect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>