<?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>Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15306/bandwidth-configuration-for-maximum-throughput-nrf51</link><description>Hi, 
 I am trying to achieve the maximum throughput when using the nRF51822. 
 According to the answer in this link ( devzone.nordicsemi.com/.../) , operation mode (write command or write request), connection interval (down to 7.5ms for both sides)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Jul 2016 07:13:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15306/bandwidth-configuration-for-maximum-throughput-nrf51" /><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58483?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2016 07:13:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4820400-9e56-4a34-bd4e-a48b7fcd24bd</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;I am using nRF5_SDK_11.0.0_89a8197.&lt;/p&gt;
&lt;p&gt;If you look at function ble_stack_init() in examples\ble_peripheral\ble_app_uart\main.c,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ble_enable_params_t ble_enable_params;
    err_code = softdevice_enable_get_default_config(CENTRAL_LINK_COUNT,
                                                PERIPHERAL_LINK_COUNT,
                                                &amp;amp;ble_enable_params);
    APP_ERROR_CHECK(err_code);
    
    //Check the ram settings against the used number of links
    CHECK_RAM_START_ADDR(CENTRAL_LINK_COUNT,PERIPHERAL_LINK_COUNT);

    // I printf conn_bw_counts here

    // Enable BLE stack.
    err_code = softdevice_enable(&amp;amp;ble_enable_params);
    APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ble_enable_params is not NULL; it is obtained through function softdevice_enable_get_default_config(), after which I printf and got those figures.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58482?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 10:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:863720d4-c5dd-4b2b-960f-02a3401252ed</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;These values are not valid, the SoftDevice will use default values if a NULL pointer is provided to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58478?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 10:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:843123b2-1702-4b75-a47d-55cd8a63950e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You need to check app_ram_base after sd_ble_enable() has returned, this is an in/out parameter. First it is input, so that the SoftDevice can check that the required amount of ram is reserved for it. Then it is output, so that you can use it to see how much ram the SoftDevice actually require.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58477?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 10:14:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ecdae6a-d8d4-433c-97bd-8293c8084337</guid><dc:creator>YSK</dc:creator><description>&lt;p&gt;Right, I uploaded a new project file after doing what Petter said in the below answer. (updated on July 27 2016 with the revision of the IRAM1 start address and size)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58476?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 09:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34b09b74-b605-4ba8-a1ae-45777245661f</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;as Petter said, setting IRAM1 starting point and size is done in project option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58484?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 06:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39ffe9e0-91cc-429e-ae0e-488821a058b2</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;It works like a charm after setting IRAM1 starting point and its size as said.&lt;/p&gt;
&lt;p&gt;But I have a question regarding to the setting of peripheral, which by default is said to use high bandwidth.&lt;/p&gt;
&lt;p&gt;In the function ble_stack_init() of peripheral code, I printf conn_bw_counts and got the following values:&lt;/p&gt;
&lt;p&gt;Tx: Hi 0, Mid 4, Low 0&lt;/p&gt;
&lt;p&gt;Rx: Hi 32, Mid 229, Low 8&lt;/p&gt;
&lt;p&gt;The hight_counts for tx is 0. Why is it so? Is the peripheral not using high bandwidth to transmit?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58481?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 09:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bd5178c-af6f-4849-b06d-db75d570655e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I tested your project, if you use the debugger you can see that ram_start is 0x20001CE0, while app_ram_base is 0x20001F80. Set IRAM1 start to 0x20001F80 and size to 0x6080, then it should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58480?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 07:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f40afb59-c86d-4d26-8b1a-9e0babab7707</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m guessing that you have provided too little ram for the SoftDevice. You should compare ram_start and app_ram_base in softdevice_enable(). You can use the debugger, just set Optimization Level to 0. You can upload your complete project by editing your question above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58479?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 05:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e14af9-1873-4bfb-b645-03f03149a7c7</guid><dc:creator>YSK</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;Yes, I&amp;#39;ve changed the memory setting in &amp;quot;Options for Target &amp;#39;nrf51422_xxac_s130&amp;quot;.
In &amp;quot;Read/Wirte Memory Areas&amp;quot; section, the &amp;quot;Start&amp;quot; and &amp;quot;Size&amp;quot; of IRAM1 are 0x20001CE0 and 0x6320, respectively.
I refered to the &amp;quot;#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20001ce0&amp;quot; in &amp;quot;app_ram_base.h&amp;quot; file. (There is no option for &amp;quot;HIGH_BW&amp;quot;.)&lt;/p&gt;
&lt;p&gt;Regarding to the debugging, I defined  the &amp;quot;NRF_LOG_USES_RTT=1&amp;quot; in the &amp;quot;C/C++&amp;quot; tab of &amp;quot;Options for Target &amp;#39;nrf51422_xxac_s130&amp;quot; and add a line, &amp;quot;#include &amp;quot;SEGGER_RTT.h&amp;quot; in &amp;quot;main.c&amp;quot; file.
All I could see in the &amp;quot;J-Link RTT viewer V5.12h&amp;quot; is repeated messages, which is the &amp;quot;sd_ble_enable: RAM START at 0x20001CE0&amp;quot;.
I didn&amp;#39;t get any other errors in the J-Link RTT viewer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried checking the some parameters after the &amp;quot;ble_stack_init()&amp;quot; in a main function as below, but they were not shown in the J-Link RTT viewer.&lt;/p&gt;
&lt;p&gt;int main(void)
{
ble_opt_t ble_opt; //refer to &amp;quot;ble.h&amp;quot;
ble_enable_params_t ble_enable_params;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);

uart_init();
buttons_leds_init();
db_discovery_init();
  ble_stack_init();

  SEGGER_RTT_printf(0,&amp;quot;tx %d, rx %d, role %d\r\n&amp;quot;, ble_opt.common_opt.conn_bw.conn_bw.conn_bw_tx, ble_opt.common_opt.conn_bw.conn_bw.conn_bw_rx, ble_opt.common_opt.conn_bw.role);
SEGGER_RTT_printf(0,&amp;quot;rx high %d, mid %d, low %d\r\n&amp;quot;, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;rx_counts.high_count, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;rx_counts.mid_count, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;rx_counts.mid_count);
  SEGGER_RTT_printf(0,&amp;quot;tx high %d, mid %d, low %d\r\n&amp;quot;, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;tx_counts.high_count, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;tx_counts.mid_count, ble_enable_params.common_enable_params.p_conn_bw_counts-&amp;gt;tx_counts.mid_count);
  
  nus_c_init();
 // Start scanning for peripherals and initiate connection
// with devices that advertise NUS UUID.
scan_start();
//printf(&amp;quot;Scan started\r\n&amp;quot;);
	
for (;;)
{
    power_manage();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried uploading the complete project but I don&amp;#39;t know how to do that in comments section.
Could you tell me how to attach the file here?&lt;/p&gt;
&lt;p&gt;Thank you for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bandwidth configuration for maximum throughput [nRF51]</title><link>https://devzone.nordicsemi.com/thread/58475?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 12:09:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66b63ab9-8bb1-4366-86e9-3590645559d8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Have you changed the memory settings in your project? What do you mean could not start the scan? Do you get an error? Have you tried to use the debugger? Could you upload your complete project so I can&amp;#39;t test it, instead of this code snippet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>