<?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>Copying vector table to RAM unknown function at 0x00000000</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54956/copying-vector-table-to-ram-unknown-function-at-0x00000000</link><description>I am using the nRF52840 DK with the s140 softdevice and am trying to copy the interrupt vector table to RAM to modify interrupts during run time. 
 I run the following function at the beginning of main() 
 
 But I run into problems when running ble_stack_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Nov 2019 21:03:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54956/copying-vector-table-to-ram-unknown-function-at-0x00000000" /><item><title>RE: Copying vector table to RAM unknown function at 0x00000000</title><link>https://devzone.nordicsemi.com/thread/222460?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 21:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2660953-5819-4016-a39d-f22097a4f300</guid><dc:creator>clansdale@boston-engineering.com</dc:creator><description>&lt;p&gt;Worked like a charm! Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copying vector table to RAM unknown function at 0x00000000</title><link>https://devzone.nordicsemi.com/thread/222452?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 18:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:201447f7-1bab-44b2-8aef-664322570d16</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Your vector_table_ram most likely has wrong alignment. VTOR requires unusual 128 byte alignment instead of the usual 4 bytes.&lt;/p&gt;
&lt;p&gt;Try (if using gcc):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint32_t vector_table_ram[VECTOR_TABLE_SIZE] __attribute__ ((aligned (128)));&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>