<?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>Radio Test Example at high duty cycles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74348/radio-test-example-at-high-duty-cycles</link><description>I&amp;#39;m running the radio_test example on an nRF52840, but when I try different modulation duty cycles, it seems to work fine for everything less than 94% however 94% itself starts to get erratic (the pulse width and period vary by quite as bit and the carrier</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Apr 2021 09:11:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74348/radio-test-example-at-high-duty-cycles" /><item><title>RE: Radio Test Example at high duty cycles</title><link>https://devzone.nordicsemi.com/thread/306729?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 09:11:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2a3d8cf-2919-41cd-a67d-cc21600b5a18</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="hjeanmccurry"]However, what i&amp;#39;m still wondering about is why it has the behavior it does for the highest duty cycles. Is it a fallback mode to give it enough time to ramp up and down? Why does it basically delete ~50% from the cycle rather than, say, limit the duty cycle to the smallest possible value based on mode, payload, etc and return a warning/error? The quibbles of sample code and the very low level of control given by the socs?[/quote]
&lt;p&gt;The timing calculated for the actual RF payload, including ramp-up time, will be higher than the timers capture/compare value, so you get a timer triggered before the radio is done, thus the next one will then start the radio again. This will give you a approx. 50% DC. The limitations in this function is clearly a issue from our side, which I&amp;#39;ll report internally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test Example at high duty cycles</title><link>https://devzone.nordicsemi.com/thread/306578?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 14:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64ca9abe-4218-40b6-85d3-3f94c8947a7b</guid><dc:creator>hjeanmccurry</dc:creator><description>&lt;p&gt;Thank you for your response,&amp;nbsp;&lt;span&gt;H&amp;aring;kon. That&amp;#39;s about what I thought... However, what i&amp;#39;m still wondering about is why it has the behavior it does for the highest duty cycles. Is it a fallback mode to give it enough time to ramp up and down? Why does it basically delete ~50% from the cycle rather than, say, limit the duty cycle to the smallest possible value based on mode, payload, etc and return a warning/error? The quibbles of sample code and the very low level of control given by the socs?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Test Example at high duty cycles</title><link>https://devzone.nordicsemi.com/thread/306504?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 10:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae7e68a-f304-4d18-a1c0-a06d4e44b740</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I&amp;#39;m running the radio_test example on an nRF52840, but when I try different modulation duty cycles, it seems to work fine for everything less than 94% however 94% itself starts to get erratic (the pulse width and period vary by quite as bit and the carrier pokes above the spectrum curve) and 95 and above seem to subtract 48-50% from the requested duty cycle (95% is about the same as 47-48% and 99% is about 49-50%). This happens with both ble and regular nrf radios at 1Mbit. 2Mbit is similar, but this time its 89-99% that modulate at ~46-50% duty cycles. That doubling can&amp;#39;t be a coincidence. Does it stem from the downtime giving too little time for the radio to shut down and start up again?[/quote]
&lt;p&gt;Looking at the function, I think I know the source of your issue.&lt;/p&gt;
&lt;p&gt;It seems that&amp;nbsp;the radio ramp up time isn&amp;#39;t taken into consideration, which also is switched to fast mode (40 us) in some modes; and &amp;quot;legacy&amp;quot; mode in others (130 to 140 us).&lt;/p&gt;
&lt;p&gt;This is not modulated data, but has a direct impact on the timing of the signal. For the duty cycle to be correct on-air, we have to input a value that both respects the on-air duty cycle and gives the radio enough time to successfully ramp up.&lt;/p&gt;
&lt;p&gt;We could add this ramp up time to the equation, but that will then give you a duty cycle that isn&amp;#39;t correct.&lt;/p&gt;
&lt;p&gt;Lets say that a packet uses 2 ms, and you want to have 10 % DC -&amp;gt; wait time = (2ms/0.10) - 2 ms = 18 ms.&lt;/p&gt;
&lt;p&gt;If we account for 140 us ramp up in this equation, we get:&lt;/p&gt;
&lt;p&gt;2.14 ms, 10 % DC -&amp;gt; wait time = (2.14ms / 0.10) - 2.14 = 19.26 ms.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By adjusting for the radio ramp up time, the firmware will run as expected, but yield wrong results; the above will give a 9% DC&amp;nbsp;as an example.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the case that you need 100 % DC, I would recommend that you use command &amp;quot;start_tx_modulated_carrier&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Having a duty cycle &amp;gt; 80 % needs manual tuning (depending on radio mode, payload length etc), so we should have restricted this function to this limit.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However: there&amp;#39;s a bug in the duty cycle handling of the ieee 802.15.4 mode, because the size of the payload is 127 byte (+ 6 byte overhead).&lt;/p&gt;
&lt;p&gt;This can be fixed by patching radio_test.c::radio_modulated_tx_carrier_duty_cycle():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    #ifdef USE_MORE_RADIO_MODES
    uint32_t total_payload_size = 1 + 5 + sizeof(m_tx_packet);

    if (mode == NRF_RADIO_MODE_IEEE802154_250KBIT) 
    {
        total_payload_size = 5 + 1 + IEEE_MAX_PAYLOAD_LEN + 1;
    }
    #else
    // 1 byte preamble, 5 byte address (BALEN + PREFIX), and sizeof(payload), no CRC
    const uint32_t total_payload_size     = 1 + 5 + sizeof(m_tx_packet);
    #endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>