<?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>How to run Power Profiler Kit on top of nRF52832 with USB/UART communication line used by application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48617/how-to-run-power-profiler-kit-on-top-of-nrf52832-with-usb-uart-communication-line-used-by-application</link><description>My setup: nRF52832 with nRF6707 on top. My embedded application synchronously exchanges UART messages with a desktop application that feeds it data (on demand from embedded app). I am interested in power profiling my embedded application . COM port is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jun 2019 08:22:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48617/how-to-run-power-profiler-kit-on-top-of-nrf52832-with-usb-uart-communication-line-used-by-application" /><item><title>RE: How to run Power Profiler Kit on top of nRF52832 with USB/UART communication line used by application</title><link>https://devzone.nordicsemi.com/thread/193325?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 08:22:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:533f174d-417c-48fa-a35a-c4439140ee6e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re OK with this and do not want to spend more time digging into it, could you please close the case, or verify your reply as an answer? If you&amp;#39;d like to keep going, I&amp;#39;ll, of course, help you, but I&amp;#39;ll need you to provide an error code or similar as this doesn&amp;#39;t tell me much, except that it seems difficult to reliably reproduce.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to run Power Profiler Kit on top of nRF52832 with USB/UART communication line used by application</title><link>https://devzone.nordicsemi.com/thread/193248?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 16:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a838bd1-7bd2-4714-9649-023555d21f39</guid><dc:creator>rnkayab</dc:creator><description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My example is built on top of your ble_app_uart example from nRF5_SDK_15.3.0_59ac345. I disabled the ble and timers from the example, left uart on, and added some DWT cycle counting and am using the event scheduler to notify my app that a full message was decoded from the uart interrupt byte buffer in the spirit of the example. My app sleeps in nrf_pwr_mgmnt_run() until a full message is decoded.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        // Fetch new data
        fetched_new_data = false;
        ask_data_in_detect_peaks((int32_t)g_chunk_start, (int32_t)g_chunk_end);
        do {
          nrf_pwr_mgmt_run();
          app_sched_execute();
          NRF_LOG_PROCESS();
        } while (!fetched_new_data);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I start in release mode (no debugger attached) with P22 unjumpered. The power profiler board sits on top. I don&amp;#39;t use debugging from the power profiler. I have a single USB connected to the nrf52.&lt;/p&gt;
&lt;p&gt;My desktop sends 409 bytes of data, and my embedded app requests more data via a 49 bytes message.&lt;/p&gt;
&lt;p&gt;Today I was able to reproduce the problem once on my 119th message exchange&lt;/p&gt;
&lt;p&gt;(desktop view:)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="265" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hang.jpg" width="348" /&gt;&lt;/p&gt;
&lt;p&gt;and once on my 2021th message exchange and once not at all. In the mean time, the power profiler runs ok. I can see the message exchanges and my embedded computation in between:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/power_5F00_profiler-0.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Once in a while I get a big gap in my embedded byte-by-byte receive (left side of the pic below), suggesting something is getting in between (could it be Power Profiler communication)?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/power_5F00_profiler-5.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;When my app does hang, I try to attach debugger leaving P22 unjumpered, but this time it shows something in dissassembly with no stack information:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/attached-debugger-to-release-version.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;At this point, I can live with the hang as I get the power measurement I need.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to run Power Profiler Kit on top of nRF52832 with USB/UART communication line used by application</title><link>https://devzone.nordicsemi.com/thread/193092?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 08:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32e17056-36ed-4c15-8cac-65bef5771664</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Are you able to see what error the app_uart_put returns? I assume the TX buffer might be full of &amp;quot;PPK data&amp;quot; which causes the app_uart_get to return NRF_ERROR_NO_MEM. Are you running the peripheral\uart example or have you made your own application, and what SDK are you using? If you&amp;#39;re not using the SDK example, could you try flashing that to confirm that the PPK works alongside the UART example?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>