<?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>sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99343/sd_ecb_block_encrypt-execution-time</link><description>We have a custom protocol with strict deadlines in the radio stack between receiving a packet, decrypting it, processing encrypting an ack and send the ack. 
 For that reason, we have strict deadlines on sd_ecb_block_encrypt(), and it seems to work for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 May 2023 10:58:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99343/sd_ecb_block_encrypt-execution-time" /><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/428415?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:58:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffd3a748-3a71-4e6a-953f-2865d8de966e</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="pengi"]Regarding this workaround, I don&amp;#39;t think that&amp;#39;s a problem as long as we know what to expect.[/quote]
&lt;p&gt;I have confidence in the workaround and it is not a complex one either. If you do not have anything else then please mark &lt;a href="https://devzone.nordicsemi.com/support-private/support/307203#permalink=859767"&gt;this&lt;/a&gt;&amp;nbsp;reply as verified so as to help other community members in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/428402?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:29:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d350715d-a12b-435b-8e21-8d2e6cbd8dad</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;That makes sense. Think I&amp;#39;ve heard about that too.&lt;/p&gt;
&lt;p&gt;Regarding this workaround, I don&amp;#39;t think that&amp;#39;s a problem as long as we know what to expect.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/428397?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a046f266-9f04-45f9-a5a8-d9dea6fe8556</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Max, Thanks for confirming that the fix works.&lt;/p&gt;
[quote user="pengi"]How long should we keep this workaround, and what should we look for in the release notes if it gets fixed?[/quote]
&lt;p&gt;Unfortunately, I do not think we are releasing any baremetal Softdevice(s) versions anymore. The fix for this has been applied to Softdevice Controller (Zephyr based Nordic BLE controller). So you need to maintain this workaround in your application as long as you use nRF5 SDK and not the latest Nordic Connect SDK.&lt;/p&gt;
[quote user="pengi"]Will this become a problem if we use it on the s132 softdevice too, or do that have the same issue?[/quote]
&lt;p&gt;This part of the Softdevice code is common for both S132 and S140. So, Yes, you need to maintain this code for both versions of your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/428393?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 10:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a7ebb3f-54ce-4ae8-b75b-f1c8ff848874</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;Oh, also one more thing.&lt;br /&gt;&lt;br /&gt;Will this become a problem if we use it on the s132 softdevice too, or do that have the same issue?&lt;/p&gt;
&lt;p&gt;We are running the same project on both nrf52840 and nrf52832, and we want to keep the codebase as common as possible&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/428222?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 14:28:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae15ff9e-97b6-4102-b974-3e023e5cd371</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Sorry for the delays. But I have finally managed to test it. I haven&amp;#39;t hooked up an oscilloscope yet, but I&amp;#39;ve tried without the fix and then with the fix in our main system where we got the packet loss due to missing the deadlines.&lt;/p&gt;
&lt;p&gt;I can confirm that the fix/workaround works fine. So no issue with missing the deadline we have. Have been sending a couple of hundred packets with 100% PDR it seems now. Before, I might have had one or two of those to squeeze through before.&lt;/p&gt;
&lt;p&gt;Thanks for the help :)&lt;/p&gt;
&lt;p&gt;One last question then:&lt;/p&gt;
&lt;p&gt;How long should we keep this workaround, and what should we look for in the release notes if it gets fixed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/427326?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 18:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e355a60-e57d-4b18-b6ea-37fc5cf9a83c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am confident that I tested this well on my end. But this is firmware workaround and we cannot be 100% sure unless you see the same. Good luck with your tests.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/427171?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 10:03:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fe58239-3584-4785-a740-9b6847e9aa85</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry not. I got some more urgent issues here that I needed to fix. It is still next in the pipeline after those issues though. But will take a day or two longer.&lt;/p&gt;
&lt;p&gt;If your tests where deterministic, I feel comfortable that it will work, so I&amp;#39;m planning to go directly to test it in our main system.&amp;nbsp; But for that I need to set up at least two nodes running with correct versions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/427102?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 07:33:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:768f5a45-0fcd-4aa7-a31a-a2ccc60c471e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Did you get a chance to test this Max? Just curious.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426573?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 12:55:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:544ad5a0-287f-48d7-8e87-5d9615e6e153</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;Thanks. I&amp;#39;ll try that tomorrow when I have access to the setup again. Looks promising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426552?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 12:13:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce979dc1-00eb-488b-ab78-eb8d6a8a3913</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I know that there was a fix inside sd_ecb_block_encrypt applied in S140v7.2.0 to solve a power consumption issue which is relevant when we use SEVONPEND bit. The inclusion of this fix seems to have another side affect of wakeup time being longer in many cases. I see that this fix inside the sd_ecb_block_encrypt is removed later in our repo was not being released in nRF5 SDK.&lt;/p&gt;
&lt;p&gt;I think you can have a workaround to temporarily disable the SEVONPEND while requesting to block encrypt, something like below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ENCRYPT_IRQHandler(
    void)
{
    int i;
    ENCRYPT_GPIO_PORT-&amp;gt;OUTSET = 1 &amp;lt;&amp;lt; ENCRYPT_GPIO_TRIG_PIN;
    for (i = 0; i &amp;lt; 20; i++) {
        /* Just fill with something */
        memset(&amp;amp;ecb_buf, i, sizeof(nrf_ecb_hal_data_t));

        /* Disable temporarily */
        SCB-&amp;gt;SCR &amp;amp;= ~SCB_SCR_SEVONPEND_Msk;

        ENCRYPT_GPIO_PORT-&amp;gt;OUTSET = 1 &amp;lt;&amp;lt; ENCRYPT_GPIO_ENC_PIN;
        sd_ecb_block_encrypt(&amp;amp;ecb_buf);
        ENCRYPT_GPIO_PORT-&amp;gt;OUTCLR = 1 &amp;lt;&amp;lt; ENCRYPT_GPIO_ENC_PIN;

        /* Re-enable */
        SCB-&amp;gt;SCR |= SCB_SCR_SEVONPEND_Msk;
    }
    ENCRYPT_GPIO_PORT-&amp;gt;OUTCLR = 1 &amp;lt;&amp;lt; ENCRYPT_GPIO_TRIG_PIN;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have tested this on my end and it seems to work. Can you please test the above changes of code in your&amp;nbsp;vendor\nRF5_SDK_17.0.2_d674dde\examples\peripheral\freertos-nrf-encrypt-timings-main\src\encrypt.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426538?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 11:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1efd87c2-0a04-4bd3-b5d5-3e30fa855a6f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Wow, That was interesting. I see the same thing that you wrote here Max.&lt;/p&gt;
&lt;p&gt;You have given me everything that I need to dig into. I will comeback to you when I have more info or workaround for this. Please expect a day or two, while I am at this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426455?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 07:58:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddcf6777-a23e-43f5-b631-27dc67bae8f3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Max, Sorry for late reply, we had a long weekend due to some holidays here in Norway.&lt;/p&gt;
&lt;p&gt;Thanks for attaching a simplistic project. I will take a look at it today.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426138?ContentTypeID=1</link><pubDate>Thu, 18 May 2023 07:38:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f254b3b-4150-4f31-aa22-6222065194f3</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;That&amp;#39;s a good theory, I&amp;#39;m not entirely sure that&amp;#39;s the case though. Since it&amp;#39;s not the latency for the interrupt to start that is the issue, but execution time of the function&amp;nbsp;&lt;span&gt;sd_ecb_block_encrypt() itself. All GPIO pins are controlled from within the interrupt, and all 20 executions of&amp;nbsp;sd_ecb_block_encrypt() behaves the same.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It would be if&amp;nbsp;sd_ecb_block_encrypt() itself puts the CPU and flash to sleep during execution. But then, I would think all executions would be equally fast without debugger. But they are faster in our full system not running FreeRTOS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But is it possible to force the flash to be always on from software during the execution of that interrupt? If so, that would be something easy to test.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426134?ContentTypeID=1</link><pubDate>Thu, 18 May 2023 06:52:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5da7db79-61f3-495d-820c-f34f37f20964</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;Are you running your interrupt code from RAM or from flash? Usually after an interrupt triggers, if code from flash starts to run, something like 10 us are needed for starting up the flash. When the debugger is connected, flash is always on so this time is eliminated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/426098?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 19:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d54bcd13-e951-4ce4-82d5-4840f41818bc</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have managed to simplify it a lot. I don&amp;#39;t now the best way to send it so it persists in this ticket for other people to read in the future. But I have for now created a github repository containing the project.&lt;/p&gt;
&lt;p&gt;Since it involves setup of softdevice, and a few other components, it is multiple files.&lt;/p&gt;
&lt;p&gt;It can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/pengi/freertos-nrf-encrypt-timings"&gt;https://github.com/pengi/freertos-nrf-encrypt-timings&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the trace without debugger connected can be seen as:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/trace_5F00_1.png" /&gt;&lt;/p&gt;
&lt;p&gt;But as soon as I connect with gdb, I get this result, no settings is changed on the oscilloscope:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/trace_5F00_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;And it is for me really deterministic.&lt;/p&gt;
&lt;p&gt;I am running on a PCA10056 v1.1.0&lt;/p&gt;
&lt;p&gt;Ask if I should check any CPU variants or revisions that I missed. But I guess this is where that can be read out:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FICR.DEVICEADDRTYPE              = ffffffff
    DEVICEADDRTYPE                 .......1 - Random
FICR.DEVICEADDR[0]               = 5acc59e0
    DEVICEADDR                     5acc59e0 - 5acc59e0
FICR.DEVICEADDR[1]               = 78b66b84
    DEVICEADDR                     78b66b84 - 78b66b84
FICR.INFO_PART                   = 00052840
    PART                           00052840 - N52840
FICR.INFO_VARIANT                = 41414430
    VARIANT                        41414430 - AAD0
FICR.INFO_PACKAGE                = 00002004
    PACKAGE                        00002004 - QI
FICR.INFO_RAM                    = 00000100
    RAM                            00000100 - K256
FICR.INFO_FLASH                  = 00000400
    FLASH                          00000400 - K1024&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/425003?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 06:15:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9b06658-47dd-416a-90e8-cb64d67e5331</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="pengi"]I can make an attempt to scale it down again, but that unfortunately has to wait until next week due to some other more urgent issues here.[/quote]
&lt;p&gt;I understand. Thanks for considering to attempt to make a simplistic project. It will make both of our debugging path a bit easier.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/424719?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 07:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:179d8f32-743e-4009-9ed5-000c801bd887</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;No worries. This is really a vague problem statement, and the fact I can&amp;#39;t really reproduce it either in more than some scenarios that seems unrelated makes it a bit harder.&lt;/p&gt;
&lt;p&gt;The issue is that it happens in one setup we have with out full system, but not others, means that the project we have to reproduce it with is our entire system, including our IP. So sending the entire project over is not really possible.&lt;/p&gt;
&lt;p&gt;I can make an attempt to scale it down again, but that unfortunately has to wait until next week due to some other more urgent issues here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/424491?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 11:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c36e40f8-7535-43a9-b805-a9c7dfb76794</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Max,&lt;/p&gt;
&lt;p&gt;I am having a bit of a hard time trying to create a simplistic project to test solely this ecb encrypt function. Instead of me trying to spend so much time on trying to configure my project to get to your, can you please attach your project here. Sorry for making you wait while I attempted to make a simplistic project to test this. But I am not able to use&amp;nbsp;&lt;span&gt;sd_ecb_block_encrypt outside peer manager and I do not want to test the latencies of&amp;nbsp;sd_ecb_block_encrypt under peer manager umbrella as there might be many other things happening under the hood.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/423962?ContentTypeID=1</link><pubDate>Fri, 05 May 2023 11:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcbc0367-4219-43e1-aa5a-b570f28c4315</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am sorry, I did not manage to look at it today, I will have to create a small setup to be able to test this, most likely I will do it early next week. I think you have given clear description and I think I would manage to try to test this time with and without FreeRTOS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/423796?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 13:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07501620-f9f5-4849-882e-43a6ab409521</guid><dc:creator>Max Sikstr&amp;#246;m</dc:creator><description>&lt;p&gt;This is actually what confuses me a bit too, since it seems like most of the things that differ is totally unrelated. And what I find even more interesting is that just connecting with gdb, and type &amp;quot;mon reset&amp;quot; and &amp;quot;continue&amp;quot; will also &amp;quot;fix&amp;quot; the problem for the exact same executable.&lt;/p&gt;
&lt;p&gt;I have unfortunately no clue how to break it down further to isolate the issue, but happy to try to pinpoint it further if there are parts that may differ, for example if it is a clock issue, if I can get a clue of what peripherals or settings to look for, given what that function can do. But since that function to me is a black box, I don&amp;#39;t know what peripherals it depends on.&lt;/p&gt;
&lt;p&gt;For the different scenarios we have we first need to look at what we are making. We are making a network stack, which has code running in interrupt level, and then a main loop internall. That network stack we are delivering to customers as a library. It is possible to run the main loop as a task in FreeRTOS, or use the main loop and process handling (based on contiki) as base for the program. That means, it is possible to run our library with or without FreeRTOS.&lt;/p&gt;
&lt;p&gt;But the part related to encryption is, even though quite deep down in the code, only dependent on this RADIO or TIMER0 interrupt running via the time slotting API waking up a lower priority interrupt via nrf_egu_task_trigger(...) to drop priority, and then do the calls. So I can not see how interrupts of lower priorities, or even thread level code, affects that call. And even just some in the same interrupt.&lt;/p&gt;
&lt;p&gt;I was thinking of checking if something else was running and taking up time using a lauterbach utrace, but didn&amp;#39;t manage to get that running without also having SWD and debug session going, which means it won&amp;#39;t trigger the issue.&lt;/p&gt;
&lt;p&gt;So this is actually where I&amp;#39;m lost. I want to isolate it, but I need input and help of what has the possibility to affect the runtime, to know what to look for. Or even if there is any information that I should provide here. And it seems to be affected by so seemingly unrelated parts, I&amp;#39;m not sure I can manage to reproduce it in an isolated environment either.&lt;/p&gt;
&lt;p&gt;I get it&amp;#39;s hard to give a clean explanation for it with the information I provide, but I&amp;#39;m happy to investigate myself, just that some input or thoughts of where I should continue to look, even if it turns out to be a dead end, would be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/423751?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 11:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9872f48-265b-43d2-b0d1-56f03dd6f7f3</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]I have measured that the call to sd_ecb_block_encrypt() and a block copy takes 15.8us in every case we have without running FreeRTOS, or when using that version of FreeRTOS while connected to a debugger, but in running state.[/quote]
&lt;p&gt;Can you please define what a &amp;quot;running state&amp;quot; and without FreeRTOS means here? I think this is super interesting as it seems like FreeRTOS might be doing something it was not supposed to do in terms of masking non application specific interrupts. I will anyhow have to reproduce this in a minimalistic way. For that I need to understand what running state and without freertos means here? I am guessing it just means that you have tested with and without starting the freertos scheduler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ecb_block_encrypt() execution time</title><link>https://devzone.nordicsemi.com/thread/423744?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 10:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:262d1b27-1549-404c-b305-7751a8adc13f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Oh Wow,&lt;/p&gt;
&lt;p&gt;This is super interesting, Just calling sd_ecb_block_encrypt() in FreeRTOS have different execution times even if it is configured to run in high priority. I will have to re-read your description and test few things. Will be back to you with hopefully somemore meaningful info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>