<?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>POF comparator doesn&amp;#39;t work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52198/pof-comparator-doesn-t-work-as-expected--seems-to-crash-chip</link><description>Hardware: nRF52840, running on dev kit PCA10056 
 Software: SDK 15.0.0, no soft device 
 I&amp;#39;m trying to get the POF comparator working, and after struggling in our product I pared right back to a test case with blinking leds on the dev kit. (This dev kit</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Nov 2019 17:00:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52198/pof-comparator-doesn-t-work-as-expected--seems-to-crash-chip" /><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/218905?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2019 17:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f94a70f-19a6-4f3a-b78d-de2a69dd188c</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, I was able to reproduce the fail if I added CLOCK_ENABLED and CLOCK_CONFIG_IRQ_PRIORITY to the sdk_config. The problem is that you also need to add the clock driver source files to the project. If you only add the defines to sdk_config.h, then the clock driver is not part of the project, but the nrfx_power driver thinks it is, and sets the wrong interrupt handler. And then you get a crash.&lt;/p&gt;
&lt;p&gt;Add these files to the project:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;modules/nrfx/drivers/src/nrfx_power_clock.c&lt;/li&gt;
&lt;li&gt;modules/nrfx/drivers/src/nrfx_clock.c&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And then it will complain about missing CLOCK_CONFIG_LF_SRC. So add this to sdk_config.h:&lt;/p&gt;
&lt;p&gt;#ifndef CLOCK_CONFIG_LF_SRC&lt;br /&gt;#define CLOCK_CONFIG_LF_SRC 1 //(or 0 if you don&amp;#39;t want to use external LF crystal)&lt;br /&gt;#endif&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/218160?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 09:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d20a61d4-99f2-4936-bebc-18408a1670bb</guid><dc:creator>Thurlby</dc:creator><description>&lt;p&gt;I was wondering if you had any updates on this? It&amp;#39;s important to us&amp;nbsp;to have the clock enabled (we use various sdk&amp;nbsp;functions&amp;nbsp;that are dependent on it), so we still can&amp;#39;t get pof working at the moment. If we understood better what the interdependencies were we might be able to move forward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/214078?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 08:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcaf907e-8d5d-43eb-8bea-05e49eb4d7cb</guid><dc:creator>Thurlby</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve made that work using the blinky sdk_config, so then did a bit of diff reducing on my sdk_config and the blinky one and discovered that adding the lines&lt;/p&gt;
&lt;p&gt;#ifndef CLOCK_ENABLED&lt;br /&gt;#define CLOCK_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#ifndef CLOCK_CONFIG_IRQ_PRIORITY&lt;br /&gt;#define CLOCK_CONFIG_IRQ_PRIORITY 7&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_POWER_ENABLED&lt;br /&gt;#define NRFX_POWER_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_POWER_CONFIG_IRQ_PRIORITY&lt;br /&gt;#define NRFX_POWER_CONFIG_IRQ_PRIORITY 7&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To the top of blinky sdk_config.h (line 50, after the setup) made it fail (specifically, toggling the clock_enabled 0,1 makes it work and fail).&lt;/p&gt;
&lt;p&gt;This is with identical makefile to blinky blank(+ include sdk/modules/nrfx/drivers/include&amp;nbsp;and src sdk/modules/nrfx/drivers/src/nrfx_power.c), identical linker, and identical sdk_config.h except for this change.&lt;/p&gt;
&lt;p&gt;Can you explain the relationship between the clocks and the pof comparator?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/213843?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 10:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a85e067d-80cd-4e1e-be60-703859541d68</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;The code you provided is working just fine here without any modifications. SDK 15.0.0, starting with blinky example, pasting your code, adding nrfx_power.h and .c to the project, and NRFX_POWER_ENABLED=1 to sdk_config.h.&lt;/p&gt;
&lt;p&gt;LED2 turns off at 2.39V and LED4 continues blinking.&lt;/p&gt;
&lt;p&gt;Which DK version is this?&lt;/p&gt;
&lt;p&gt;Can you also please post the hex file so I can try it here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/212498?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 09:26:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78f9e008-a701-4202-87e8-95d9092da423</guid><dc:creator>Thurlby</dc:creator><description>&lt;p&gt;Thank you for your reply, I have been away so hadn&amp;#39;t replied sooner.&lt;/p&gt;
&lt;p&gt;You are right, I was not using that switch. However, the behaviour (other than the LED dimming) stays exactly the same if I do leave the&amp;nbsp;USB attached and use the VEXT-&amp;gt;nRF switch.&lt;br /&gt;&lt;br /&gt;New setup:&lt;br /&gt;Power over P21,&amp;nbsp;USB attached, VEXT-&amp;gt;nRF in ON position, same code as before&lt;br /&gt;&lt;br /&gt;Behaviour:&lt;br /&gt;Without the call to nrfx_power_pof_enable: blinking LED 4 (brightly) all the way down to 1.61 V, then cuts out both leds and reboots into flashing when power gets above 1.62V again.&lt;br /&gt;With the line nrfx_power_pof_enable: blinking LED 4 until 2.36V, then stops blinking the led, does not turn off led 2, as the pof event handler should, and does not restart when power goes up to 3.3 again.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: POF comparator doesn't work as expected- seems to crash chip</title><link>https://devzone.nordicsemi.com/thread/210685?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 11:22:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf13ce58-e18f-477c-bbf2-91297bbc4de9</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;The P21 is by default powering the whole board, including the ATSAM (Segger JLink) and some IC switches. If you decrease the voltage you will get unpredictable behavior. There is a small switch (VEXT-&amp;gt;nRF) close to the P21 header. If you put it in the ON position, the P21 will be powering the nRF directly, disconnecting the rest of the board from P21. It&amp;#39;s important to leave the USB cable connected to power the rest of the board (VDD). Now you can control the voltage on the nRF52 through P21.&lt;/p&gt;
&lt;p&gt;You can double check the voltage on the nRF52 by measuring on VDD_nRF on P20.&lt;/p&gt;
&lt;p&gt;The LEDs are powered by VDD (USB) so they will not dim when the voltage on P21 is decreased, if things are setup correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>