<?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>Advice on doing several characteristic writes in a row as fast as possible ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50024/advice-on-doing-several-characteristic-writes-in-a-row-as-fast-as-possible</link><description>Hello Nordic team, 
 I&amp;#39;m currently working on a project on a nrf52840 DK with the SDK 15.3.0. 
 As central role, I have an external component that sends big chunks of data to be written in the peripheral device characteristic. 
 The chunks size are about</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jul 2019 09:06:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50024/advice-on-doing-several-characteristic-writes-in-a-row-as-fast-as-possible" /><item><title>RE: Advice on doing several characteristic writes in a row as fast as possible ?</title><link>https://devzone.nordicsemi.com/thread/199698?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 09:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74555aaf-c4a1-466a-bf96-d73a815972d8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, both approaches should work, although mine is not optimized for RAM usage:) I used a ring buffer because it allowed me to reuse the buffer implementation from the ble_app_ancs_c example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advice on doing several characteristic writes in a row as fast as possible ?</title><link>https://devzone.nordicsemi.com/thread/199557?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2019 13:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bf7c247-0927-4083-a1f6-95a9029c5a4d</guid><dc:creator>AKYR</dc:creator><description>&lt;p&gt;Ok I see it,&lt;/p&gt;
&lt;p&gt;My implementation is kinda similar but I write in a TX_FIFO instead of inserting a tx_buffer and process to&amp;nbsp;send the maximum amount of data I can from the TX_FIFO when you are processing a buffer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess both method work :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have an argument to prefer one over the other ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only one I can see is in the case of small data inputs you will create a lot of buffer of small size whereas the data will br write in queue in the FIFO (but it is not my case so...).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advice on doing several characteristic writes in a row as fast as possible ?</title><link>https://devzone.nordicsemi.com/thread/199545?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2019 13:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fba6a20-6431-415b-89b7-ab39963a3a40</guid><dc:creator>AKYR</dc:creator><description>&lt;p&gt;Hey Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for your answer :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have a look at it and I&amp;#39;ll come back thx !&lt;/p&gt;
&lt;p&gt;Have a good day,&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alo&amp;iuml;s KYROU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advice on doing several characteristic writes in a row as fast as possible ?</title><link>https://devzone.nordicsemi.com/thread/199523?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2019 12:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad2128b7-981d-4749-953b-bdca9fec4d9d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Aloïs,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please have a look at the attached example below. I based it on the ble_app_uart_c example in sdk 15.3.0 and added a ring buffer to queue write commands in the app in order to handle any &amp;quot;no resource&amp;quot; error from the send API.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-d78c71fefad34ae18df96d79834896f8/ble_5F00_app_5F00_uart_5F00_c_5F00_mod.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_c_5F00_mod.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: the timer instance used to process the buffer in this example is not really necessary, and the project is configured for 52832 so you should copy the source code to&amp;nbsp;a 52840 project before you try it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>