<?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>SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102752/softdevice-controller-encryption-execution-time</link><description>We are currently running a custom protocol which have strict timings on encryption/decryption on incoming and outgoing packets. 
 We have a build which is using nRF5-SDK SoftDevice s140 v7.2.0 where we use sd_ecb_block_encrypt() and we meet our strict</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Aug 2023 14:47:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102752/softdevice-controller-encryption-execution-time" /><item><title>RE: SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/thread/441426?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 14:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0d2da4e-134c-450e-b71c-024c3408a6e4</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Robin,&lt;br /&gt;&lt;br /&gt;There are a few additional operations which could cause NCS API call to be somewhat slower than API call in nRF5 SDK.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Have you considered bare metal implementation?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/thread/441401?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 13:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a92658c3-24ce-47a0-94f1-9a1c4b5b0232</guid><dc:creator>Robin J</dc:creator><description>[quote userid="127766" url="~/f/nordic-q-a/102752/softdevice-controller-encryption-execution-time"]&lt;p&gt;On average the sdc_soc_ecb_block_encrypt() call is 3 us slower than the sd_ecb_block_encrypt(), running the same application apart from using MPSL API and SoftDevice Controller API instead of the SoftDevice API from nRF5-SDK SoftDevice s140 v7.2.0&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;sd_ecb_block_encrypt() avg time: 14.2 us&lt;/li&gt;
&lt;li&gt;sdc_soc_ecb_block_encrypt avg time: 17.0 us&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The setup using MPSL and SoftDevice Controller is only using the SoftDevice Controller API for encryption and the sdc_soc_ecb_block_encrypt() call is made inside a MPSL timeslot.&lt;/p&gt;[/quote]
&lt;p&gt;As is stated in my first post, I&amp;#39;m using MPSL API and I am accessing the ECB peripheral through the API sdc_soc_ecb_block_encrypt() provided in sdc_soc.h&lt;/p&gt;
&lt;p&gt;My question is not how I should access the ECB peripheral, but rather if it is expected that the sdc_soc_ecb_block_encrypt() API call from the SoftDevice Controller library should be slower than the&amp;nbsp;&lt;span&gt;sd_ecb_block_encrypt() API call provided with the nRF5-SDK SoftDevice s140 v7.2.0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it is not expected to be slower, I&amp;#39;m asking for advice to improve the execution time of it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Robin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/thread/441327?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 09:33:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e13ae698-07b7-4556-bb9c-46a3407cd3c1</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Robin,&lt;br /&gt;&lt;br /&gt;As described in &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/softdevice_controller.html#integration-with-applications"&gt;integrating with application&lt;/a&gt;, Softdevice Controller takes ownership of the ECB peripheral. However, it is still possible to access ECB peripheral, not directly but by APIs provided in sdc_soc.h and by&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/README.html#multiprotocol-service-layer"&gt;Multiprotocol Service Layer (MPSL)&lt;/a&gt;. You can have a look at&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/doc/timeslot.html#timeslot"&gt;Timeslot&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/mpsl/timeslot/README.html#mpsl-timeslot"&gt;MPSL Timeslot&lt;/a&gt;&amp;nbsp;sample.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/thread/441093?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 08:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6fcd713-faae-4413-a94d-9d15346ca652</guid><dc:creator>Robin J</dc:creator><description>&lt;p&gt;Yes, but then I can&amp;#39;t&amp;nbsp;initialize the SoftDevice Controller right? Since the documentation for the SoftDevice Controller states that the SoftDevice Controller takes ownership of the ECB peripheral and direct access by the application is not permitted.&lt;/p&gt;
&lt;p&gt;I want to initialize the SoftDevice Controller to be able to use the API to for Bluetooth communication.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Robin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice controller encryption execution time</title><link>https://devzone.nordicsemi.com/thread/440987?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 14:22:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b90367e-77ba-4c36-bd51-595cc266acc6</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could try using NRF_ECB peripheral. Please have a look at&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/ecb/hal.html"&gt;nrfx ECB HAL reference API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>