<?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>Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35447/increase-hvn_tx_queue_size-to-maximize-throughput</link><description>I posted on the forum regarding the same project here https://devzone.nordicsemi.com/f/nordic-q-a/34022/optimizing-throughput-with-multiple-central-links-and-1-peripheral-link . 
 I wan&amp;#39;t to stream with about 25kb/s as a minimum. Iv&amp;#39;e calcuated that if</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Jun 2018 12:19:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35447/increase-hvn_tx_queue_size-to-maximize-throughput" /><item><title>RE: Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/thread/136258?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 12:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f13667d8-7983-40a0-a432-513517ed2feb</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="wsi-alex"]Basically the same as before but no suggestion to change RAM settings. How can this be?[/quote]
&lt;p&gt;The SoftDevice does not support&amp;nbsp;dynamic RAM sizes over 64 kB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For S140 V6.0.0, the base minium requirement is at&amp;nbsp;5.54 kB, so if you configure the SoftDevice to use more RAM than&amp;nbsp;5.54 kB + 64 kB, then this is not supported, and the sd_ble_enable() function will then return NRF_ERROR_NO_MEM.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; We will look more into this limit internally, and see if we can increase it for the next SoftDevice release.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Sigurd&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/thread/136257?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 04:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6067e663-c484-44e1-913b-8f7712d23543</guid><dc:creator>Alexander </dc:creator><description>&lt;p&gt;No when I decrease hvn_tx_queue_size&amp;nbsp; or remove&amp;nbsp;rows 14 - 19 it&amp;#39;s possible to enable sd again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/thread/136256?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 14:12:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b6ac5b2-01cb-4a96-aa2c-d0403b0dbf0c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Interesting. If you set&amp;nbsp;hvn_tx_queue_size back to 1, does the same thing happen?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/thread/136255?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 13:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8049015d-d3c7-484e-9646-80eceb557233</guid><dc:creator>Alexander </dc:creator><description>&lt;p&gt;Ok, so I ran into a similar problem again. I want to set&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 247. It is currently set to 100. When I set it to 247 i get this error ouput on RTT&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20010DF8 to 0x2001EE58.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0x211A8.
&amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
&amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at ../src/ble_core.c:435
PC at: 0x00026E85
&amp;lt;error&amp;gt; app: End of error report
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I then change to those settings in my linker script and build and flash. I then get this error output&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
&amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at ../src/ble_core.c:435
PC at: 0x00026E85
&amp;lt;error&amp;gt; app: End of error report
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Basically the same as before but no suggestion to change RAM settings. How can this be?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase hvn_tx_queue_size to maximize throughput</title><link>https://devzone.nordicsemi.com/thread/136254?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2018 12:52:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1126800b-f39a-4b02-bae8-984fd1967e7a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]But if I increase it to above 11 i get&amp;nbsp;NRF_ERROR_NO_MEM when running&amp;nbsp;nrf_sdh_ble_enable(). This is fine, I check what RAM settings I should use and try, but I still get same error.[/quote]
&lt;p&gt;This sounds strange. I was not able to reproduce this issue. If nrf_log is enabled, the RAM&amp;nbsp;requirements&amp;nbsp;for the SoftDevice will be printed over either RTT or UART(depending on nrf_log backend) e.g.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20004368 to 0x20004F78.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then you need to adjust the RAM start in the IDE/toolchain you are using.&lt;/p&gt;
&lt;p&gt;What IDE/toolchain are you using? Where are you setting this number?&lt;/p&gt;
[quote user=""]Is there a max value for hvn_tx_queue_size?[/quote]
&lt;p&gt;No, it should only be limited by RAM, but by setting it very big you will run out of RAM for your application.&lt;/p&gt;
[quote user=""]Do I need a big TX buffer to be able to send as many as 52 packets in 1 connection interval?[/quote]
&lt;p&gt;Not necessarily. In the&amp;nbsp;ble_app_att_mtu_throughput example we don&amp;#39;t set the&amp;nbsp;hvn_tx_queue_size in the application, but we still achieve maximum&amp;nbsp;throughput. Note that both sides of the link need to support this number of packets per interval. Most smartphones only support maybe 6-9 packets per interval.&lt;/p&gt;
[quote user=""]Does it matter what&amp;nbsp;&lt;span&gt;hvn_tx_queue_size is set to if I push data really fast?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, if you&amp;nbsp;exceed the&amp;nbsp;event length/resources that is set aside for the link, and want to&amp;nbsp;queue more data that should be send the next connection interval, you might want to increase this number.&amp;nbsp;Notice the definition of the hvn_tx_queue_size, “Minimum guaranteed number of Handle Value Notifications that can be queued for transmission.”&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>