<?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 priority</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39329/lpcomp-priority</link><description>Hi guys, 
 I&amp;#39;m using following setup NRF51822, SD130, SDK 12.3.0. I control one transistor with PWM output via timer 1. Before enabling PWM I start 8bit ADC task to measure voltage on AN1 and I also start LPCOMP which triggers interrupt when AN1 cross</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Oct 2018 07:53:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39329/lpcomp-priority" /><item><title>RE: LPCOMP priority</title><link>https://devzone.nordicsemi.com/thread/152606?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51fa5bd8-4cef-44f9-ac87-ac2871ff467e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;You mentioned that you are using ADC simultaneously as the LPCOMP, but this is not possible since it uses the same analog inputs as the ADC module and only one of the modules can be enabled at the same time. I assume you are only using the LPCOMP, since that will cover the needs in order to achieve mentioned functionality.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;What ADC sample rate can I expect in described configuration?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;By this, I assume you mean how fast it takes from a crossing happens until an event is generated. According to the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/pdf/nRF51822_PS_v3.3.pdf"&gt;Product Specification&lt;/a&gt;&amp;nbsp;on page 66, it says that the time from a VIN crossing to ANADETECT generated is 15µs.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;How to get the highest priority for LPCOMP interrupt – higher than SoftDevice?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is not possible unfortunately, the Exception model from the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/pdf/S130_SDS_v2.0.pdf"&gt;SoftDevice S130 Specification&lt;/a&gt;&amp;nbsp;is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-7dae88560d80440ca23d8c8a97b7c21e/priorities.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;The SoftDevice needs a higher priority (0) than the application (1), in order to maintain a stable BLE link.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards, Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>