<?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>Drive COMP RESULT on GPIO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67633/drive-comp-result-on-gpio</link><description>I am developing a product with nRF52832 in which we need to use the COMP module. We need to route the RESULT signal directly to the RX input of the UART, or to an output of the GPIO. From the datasheet this does not seem to be possible: the only way to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Oct 2022 13:46:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67633/drive-comp-result-on-gpio" /><item><title>RE: Drive COMP RESULT on GPIO</title><link>https://devzone.nordicsemi.com/thread/392190?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 13:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78407a6d-2a94-48c6-b894-354f4ef3f603</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Julian&lt;/p&gt;
&lt;p&gt;I will check with the hardware designers if they know of a good workaround to this situation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to add some kind of RC filter to the input signal, in order to remove the high frequency component of the signal?&lt;br /&gt;Possibly this is the best way to handle the situation, unless we can identify some kind of internal workaround.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Drive COMP RESULT on GPIO</title><link>https://devzone.nordicsemi.com/thread/391818?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2022 09:17:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c352c881-fa64-40bb-95ce-e569bf79c089</guid><dc:creator>Julian Schindler</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;In my application the comparator (single ended mode, NRF52833) is used as a constant-current-sink buck driver&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;VIN+ is connected to a shunt resistor (0.14V @700mA load current)&lt;/span&gt;&lt;/li&gt;
&lt;li style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;VIN- uses refernce ladder on internal voltage reference ( Vdown=0.13V, Vup=0.15V)&lt;/span&gt;&lt;/li&gt;
&lt;li style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;output pin controls highside switch (PFET)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I used the Event / Task solution with two different settings:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;1.
EEP: NRF_COMP_EVENT_UP -- TEP: NRFX_GPIOTE_TASK: CLR
EEP: NRF_COMP_EVENT_DOWN -- TEP: NRFX_GPIOTE_TASK: SET

2.
EEP: NRF_COMP_EVENT_UP -- TEP: NRFX_GPIOTE_TASK: CLR
EEP: NRF_COMP_EVENT_DOWN -- TEP: NRFX_GPIOTE_TASK: OUT (Polarity: LoToHi)&lt;/pre&gt;&lt;/p&gt;
&lt;p style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;For this application a high switching frequency is required (&amp;gt;100kHz) as well as a small hysteresis. The setup works fine most of the time but i got the following issue:&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;With both settings,&lt;strong&gt; it could happen that the output pin reflects not the OUTPUT state of the comparator&lt;/strong&gt;. This is when UP and DOWN events are triggered simultaneously (during the same clock cycle). &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;According to the task prioritys (OUT &amp;gt; CLR &amp;gt; SET), it results in: (i measured both cases)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;Output pin could stuck in low state, while comparator OUTPUT = high&lt;/span&gt;&lt;/li&gt;
&lt;li style="color:#57a64a;"&gt;&lt;span style="color:#000000;"&gt;Output pin could stuck in high state, while comparator OUTPUT = low&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any suggestion of how to make sure, that the output pin is set according to the correct comparator event? Where the &amp;quot;correct&amp;quot; event is the recent one (not the one with the higher priority).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Julian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Drive COMP RESULT on GPIO</title><link>https://devzone.nordicsemi.com/thread/277320?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 09:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea2588d1-d1ab-4251-99b5-b9bf4bf8a1aa</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you not use the DOWN and UP events of the COMP peripheral to control your pin, rather than the RESULT register?&lt;/p&gt;
&lt;p&gt;EVENTS_DOWN is triggered when the input goes below the reference. and EVENTS_UP occurs when it goes above the reference.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using a GPIOTE OUT channel and the PPI controller you can connect these two events so that they are reflected on a pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>