<?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>aes crypt hangs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1404/aes-crypt-hangs</link><description>Hello, 
 I&amp;#39;m trying to make use of the AES crypt code from the application level code. 
 Per devzone.nordicsemi.com/.../51822-aes-encryption-and-decryption-demo-code 
 I&amp;#39;m trying to implement the CTR approach. 
 However, whenever I call the aes encrypt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jan 2014 16:12:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1404/aes-crypt-hangs" /><item><title>RE: aes crypt hangs</title><link>https://devzone.nordicsemi.com/thread/6302?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2014 16:12:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77ccf193-68f6-4f30-9931-47de0852ad11</guid><dc:creator>Matthew E.</dc:creator><description>&lt;p&gt;Yes, sorry, I meant to delete this question, as I determined exactly as you wrote a few hours later. thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: aes crypt hangs</title><link>https://devzone.nordicsemi.com/thread/6301?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2014 09:02:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b4e6bbb-c8d0-4c3b-84e0-9b62d9f0db2b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;When using the softdevice, you need to make sure to not use blocks that are listed as restricted or blocked directly from your application. If you do, you&amp;#39;ll see a HardFault. You can see a list of these peripherals in the SoftDevice Specification, and the ECB block is one of them. This is the reason taht the nrf_ecb_* functions fail. (If you halt the device with the debugger after having tried to call one of these functions, you should be able to easily see that it hangs in the HardFault_Handler of arm_startup_nrf51.s.)&lt;/p&gt;
&lt;p&gt;As for the reason for sd_ecb_block_encrypt() &amp;quot;fails&amp;quot;, I suspect that what you see is that debugging isn&amp;#39;t really possible when any time critical activities have been started with the softdevice (advertising, connection). This has been discussed at length here previously, for example &lt;a href="https://devzone.nordicsemi.com/index.php/can-i-debug-ble-program"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/index.php/can-nordic-please-document-how-to-debug-code-on-their-processors"&gt;here&lt;/a&gt;. If however you run this AES code before starting advertising or a connection, you should be able to debug this code as you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>