<?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>DTM test w/ nAN34 examply.py</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49178/dtm-test-w-nan34-examply-py</link><description>Hi Sir, 
 
 For EN 300 328 V2.1.1, I reference below setting. 
 https://devzone.nordicsemi.com/f/nordic-q-a/21643/en-300-328-v2-1-1-receiver-blocking-test-setup/84959#84959 
 . 
 IC: 51822 
 PCB: nRF51-DK x 2 
 SDK: SDK_12.3.0\examples\dtm\direct_test_mode</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Jul 2019 09:55:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49178/dtm-test-w-nan34-examply-py" /><item><title>RE: DTM test w/ nAN34 examply.py</title><link>https://devzone.nordicsemi.com/thread/196221?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 09:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab5f2b10-7356-4f68-ac3e-204139ee0079</guid><dc:creator>Hsu</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Bj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s clear.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTM test w/ nAN34 examply.py</title><link>https://devzone.nordicsemi.com/thread/195917?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 09:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a027682-8e06-43ab-b6cc-56a8acf8bb2e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Hanyu,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the an empty DTM test packet is 10 bytes, so adding a payload length of 10 will result in a total packet length of 20bytes. When using the 1Mbit Radio mode, the radio will use 8uS per byte, so 20byte * 8uS/byte =&amp;nbsp;&lt;span&gt;160uS. However, when using the 250kbit mode, the transmission time per byte is increased by a factor of 4, i.e. 32uS per byte, so the same 20byte packet will now take 32uS/byte*20byte =&amp;nbsp;640uS to transmit.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If we look at the DTM code from SDK 12.3.0, we can see that the code assumes that 1Mbit is used as it uses the 8uS/byte factor to calculate the transmission time of a packet of a given m_packet_length.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; // Set the timer to the correct period. The delay between each packet is described in the
        // Bluetooth Core Spsification version 4.2 Vol. 6 Part F Section 4.1.6.
        if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 8  &amp;lt;= 376)
        {
            mp_timer-&amp;gt;CC[0]       = 625;                        // 625uS with 1MHz clock to the timer
        }
        else if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 8  &amp;lt;= 1000)
        {
            mp_timer-&amp;gt;CC[0]       = 1250;                        // 625uS with 1MHz clock to the timer
        }
        else if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 8  &amp;lt;= 1624)
        {
            mp_timer-&amp;gt;CC[0]       = 1875;                        // 625uS with 1MHz clock to the timer
        }
        else
        {
            mp_timer-&amp;gt;CC[0]       = 2500;                        // 625uS with 1MHz clock to the timer
        }

        // Configure PPI so that timer will activate radio every 625 us
        NRF_PPI-&amp;gt;CH[0].EEP = (uint32_t)&amp;amp;mp_timer-&amp;gt;EVENTS_COMPARE[0];
        NRF_PPI-&amp;gt;CH[0].TEP = (uint32_t)&amp;amp;NRF_RADIO-&amp;gt;TASKS_TXEN;
        NRF_PPI-&amp;gt;CHENSET   = 0x01;
        m_state            = STATE_TRANSMITTER_TEST;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In our case the DTM code will send a packet every 625uS as the total packet length is 20byte, but each packet will take 640uS when using the 250kbit mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the python code it also assumes that a packet will maximum use 625uS per packet.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;	def _calculateTimeForPackage (self):
		&amp;quot;&amp;quot;&amp;quot;Calculate how long time from start of one package to the start of next&amp;quot;&amp;quot;&amp;quot;
		return 0.625*2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So I think if you modify the DTM code(dtm_cmd() in ble_dtm.c) as shown below to take in to account for the 4 time increase in transmit time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 32  &amp;lt;= 376)
        {
            mp_timer-&amp;gt;CC[0]       = 625;                        // 625uS with 1MHz clock to the timer
        }
        else if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 32  &amp;lt;= 1000)
        {
            mp_timer-&amp;gt;CC[0]       = 1250;                        // 625uS with 1MHz clock to the timer
        }
        else if ((m_packet_length + DTM_ON_AIR_OVERHEAD_SIZE ) * 32  &amp;lt;= 1624)
        {
            mp_timer-&amp;gt;CC[0]       = 1875;                        // 625uS with 1MHz clock to the timer
        }
        else
        {
            mp_timer-&amp;gt;CC[0]       = 2500;                        // 625uS with 1MHz clock to the timer
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and multiply the total time from one packet to the next in the python script by 2&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;	def _calculateTimeForPackage (self):
		&amp;quot;&amp;quot;&amp;quot;Calculate how long time from start of one package to the start of next&amp;quot;&amp;quot;&amp;quot;
		return 0.625*2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;then I think you should get better results with the payload length set to 10 in the python script.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTM test w/ nAN34 examply.py</title><link>https://devzone.nordicsemi.com/thread/195780?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 02:48:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb97827f-c63e-4674-a205-00a3cc6b8721</guid><dc:creator>Hsu</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Bj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It improves the PER, thanks for your help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Based on the original setting, the 10 bytes should not long.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think it should work at 250K/1M/2M link speed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you share why reduce the length/runtime can improve the PER?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BRs, Han&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1562035072610v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTM test w/ nAN34 examply.py</title><link>https://devzone.nordicsemi.com/thread/195629?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 12:17:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3249a1b-114a-4550-bc1d-93a6e0308410</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Hanyu,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;can you reduce the test packet length to 5 and the runtime to 50, i.e.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setup[&lt;/span&gt;&lt;span&gt;'Length'&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;#Length of the test package&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setup[&lt;/span&gt;&lt;span&gt;'Runtime'&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;50&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;#How long the Receiver should be receiving. In ms&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and see if that improves the PER?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>