<?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>Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18293/power-profiling-kit-rtt-documentation</link><description>We would like to use the PPK for automating some of our tests. Is there any documentation on how to drive the PPK over RTT? If push really comes to shove, we can always read what&amp;#39;s in ppk.py, but it would be easier if there&amp;#39;s some semi-official documentation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Mar 2017 12:18:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18293/power-profiling-kit-rtt-documentation" /><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70655?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2017 12:18:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a27f6d3b-cdac-470e-a627-09f2be327fc8</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;I got it from here: &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF51822/nRF5x-Command-Line-Tools-Win32/33444"&gt;www.nordicsemi.com/.../33444&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I fixed it by bumping up the wait after calling &lt;code&gt;NRFJPROG_rtt_start&lt;/code&gt; to 1.5 seconds.  I think the 1 second timeout was right on the hairy edge.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70656?ContentTypeID=1</link><pubDate>Fri, 10 Mar 2017 08:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f0321b5-f23d-43d0-9bb7-bf1b0cfa040d</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;And where did you get that dll from? It&amp;#39;s all in the dll, so if it is the same as pynrfjprog 9.3.1 is using, I am out of ideas as to why this happens. Even so, if you catch that exception and just retries, will things continue to work or is the board reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70654?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2017 14:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11496778-986c-4dd2-b6e1-d2513a38aaa0</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;This is all being written in C#, so I&amp;#39;m not using pynrfjprog library.  I wrote a pinvoke wrapper around &lt;code&gt;jlinkarm_nrf52_nrfjprog.dll&lt;/code&gt; and am using that to interact with the Jlink debugger.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70653?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2017 11:24:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd77a3d-f447-431f-bdfb-324972377a82</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;That I do now know. Have never seen this myself. Are you using pynrfjprog 9.3.1? This version fixed some minor issues regarding this write.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70652?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2017 20:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c95f53a-ae59-46bb-b321-29efda29c3ca</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;@wilhelmsen The &lt;code&gt;write_stuffed&lt;/code&gt; method writes 0x00000001 to &lt;code&gt;NRF_EGU0_BASE + TASKS_TRIGGER0_OFFSET&lt;/code&gt;.  I&amp;#39;m occasionally getting a nrfjprog error along the lines of NVMC control is needed to write that position in my code.  I&amp;#39;ve never seen it in the Python app.  Do you know what causes the NVMC requirement to change on the PPK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70651?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2017 11:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f0be29b-34d5-4a31-ba57-7d59d11ed3fb</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;&lt;code&gt;SAMPLE_INTERVAL = 13.0e-6&lt;/code&gt;
&lt;code&gt;self.sample_interval = SAMPLE_INTERVAL&lt;/code&gt;
&lt;code&gt;self.avg_interval = self.sample_interval * 10&lt;/code&gt;
thus sample interval for the trigger window is 13µs per sample, average window is 130µs, since it is an average of ten samples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70649?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 18:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca70cf0-b6ff-44c1-81f5-7c05d842e3bf</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;@wilhelmsen  I think I have the reading values back working.  Do you know what the time span each sample covers?  I&amp;#39;m making the assumption that it&amp;#39;s 15us because that&amp;#39;s what [the documentation says], but I can&amp;#39;t find anything definitive in the python code.&lt;/p&gt;
&lt;p&gt;(&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/power_profiler_kit/PPK_user_guide_Intro.html?cp=5_3)."&gt;infocenter.nordicsemi.com/.../PPK_user_guide_Intro.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70650?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 12:10:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15f4f93c-c65b-40b0-a2d5-29306063430d</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;That wait is critical for RTT operation in general. I don&amp;#39;t know what has to settle, but yes, I have seen this as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70648?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 15:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63c98ebd-ae81-4888-b895-c07dafa2ac3b</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;Scratch all of my questions.  It appears that 1 second wait after calling &lt;code&gt;NRFJPROG_rtt_start&lt;/code&gt; is critical for proper PPK operation.  I have no idea why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70647?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 15:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54c59343-fd68-4c83-8dc4-287c9a84458a</guid><dc:creator>CurtisHx</dc:creator><description>&lt;p&gt;I have a few questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Occasionally, the PPK will return all 0&amp;#39;s when trying to read the Board ID, calibrations values, etc.  My code goes through these steps :&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;a) Connect to the debugger at the max SWD speed. &lt;code&gt;NRFJPROG_connect_to_emu_with_snr&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;b) Connect to the device. &lt;code&gt;NRFJPROG_connect_to_device&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;c) Call system reset. &lt;code&gt;NRFJPROG_sys_reset&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;d) Call go. &amp;#39;NRFJPROG_go`&lt;/p&gt;
&lt;p&gt;e) Start RTT. &lt;code&gt;NRFJPROG_rtt_start&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;f) Wait for the RTT Control block to be found.  Does a spin wait loop calling
&lt;code&gt;NRFJPROG_rtt_is_control_block_found&lt;/code&gt; until &lt;code&gt;found&lt;/code&gt; is true.
g) Read 200 characters over RTT.  This will occasionally return all 0s.&lt;/p&gt;
&lt;p&gt;The only difference I see between my startup code and the PPK Python code is the Python code calls &lt;code&gt;time.sleep(1)&lt;/code&gt;, where my code waits for the RTT control block.  Should I just wait for 1 second instead of looking for the RTT control block?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Profiling Kit RTT Documentation?</title><link>https://devzone.nordicsemi.com/thread/70646?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 10:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf67855-8cd1-4760-bbea-3b40b1b96f21</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;No, there are no RTT documentation for the PPK interface. It is quite easy to disect the python file, and look at (for instance) the RTT commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    RTT_CMD_TRIGGER_SET         = 0x01 
    RTT_CMD_AVG_NUM_SET         = 0x02 
    RTT_CMD_TRIG_WINDOW_SET     = 0x03 
    RTT_CMD_TRIG_INTERVAL_SET   = 0x04
    RTT_CMD_SINGLE_TRIG         = 0x05
    RTT_CMD_RUN                 = 0x06
    RTT_CMD_STOP                = 0x07
    RTT_CMD_RANGE_SET           = 0x08
    RTT_CMD_LCD_SET             = 0x09
    RTT_CMD_TRIG_STOP           = 0x0A
    RTT_CMD_CALIBRATE_OFFSET    = 0x0B
    RTT_CMD_DUT                 = 0x0C
    RTT_CMD_SETVDD              = 0x0D
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and how to send them (rtt.py).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rtt.write([RTT_COMMANDS.RTT_CMD_RUN])


   def write(self, cmd):
        try:
            s = []
            s.append(STX)
            for byte in cmd:
                if byte == STX or byte == ETX or byte == ESC:
                    s.append(ESC)
                    s.append(byte ^ 0x20)
                else:
                    s.append(byte)
            s.append(ETX)
            try:
                self.nrfjprog.rtt_write(0, s, encoding=None)
                self.nrfjprog.write_u32(NRF_EGU0_BASE + TASKS_TRIGGER0_OFFSET, 0x00000001, 0)
                self.nrfjprog.go()
            except Exception as e:
                raise
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hopefully there will be an API coming soon. If there are any specifics you wonder about, please ask, and I will do my best to answer them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>