<?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>SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30018/swi2_irqhandler-trouble</link><description>Edit: I&amp;#39;m using the softdevice S110, 8.0.0, Nrf51822 chip, Keil uv5.12 
 Edit #2: Added more detail and revised certain description. 
 
 What&amp;#39;s the problem? 
 
 My program constantly crash into hard fault handler when 1. My android device is reading</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Feb 2018 14:50:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30018/swi2_irqhandler-trouble" /><item><title>RE: SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/thread/119770?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 14:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e4f8097-4613-4508-8826-2a435bb2d011</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Ok, please make sure you do not call softdevice functions from within the timer2 interrupt. Instead you should create an event that you can handle in main context later on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/thread/119461?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 03:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09ae572d-9bf1-452c-980f-93aed85c1591</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hello, thank you for your reply. The only softdevice estricted peripherals I can think of is the radio and timer. I&amp;#39;m using timer 2, not even 3, and I&amp;#39;m definitely not using the radio at all, I&amp;#39;ve also used TWI and SPI and that&amp;#39;s it.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still checking whether my app is making interrupt calls from within the SWI interrupt, most likely the timer2. Will get back later. I hope that is what you meant by your 1st reply.&lt;/p&gt;
&lt;p&gt;In the mean time, please make more suggestions, thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/thread/119288?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 14:09:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e4b59cf-44d7-4743-bf79-ff29b44aa073</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Could you be using any HW peripherals that is blocked by or restricted by the SD? Please check the softdevice specification, chapter 11 SoC resource requirements. For restricted peripherals e.g. the RNG you need to use the SD api to use this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/thread/119287?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 10:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5893d0c6-8692-4579-b40f-9f40a2d7dba8</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hi the SDK is 10.0.0, I don&amp;#39;t know how to check that yet but I think I&amp;#39;ll figure it out, you can give me a tip or 2 if you want to. I&amp;#39;ll get back later. On the other hand, what is the chance of a data collision? By that I mean something on the stack overridden something it shouldn&amp;#39;t?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWI2_IRQHandler trouble?</title><link>https://devzone.nordicsemi.com/thread/119286?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 10:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49d08541-df4f-424c-8849-390490607e57</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Which SDK version are you using? Could you check that you are not calling any SD functions from isr? i.e.  If you are running in ISR and calling a new ISR with the same priority or higher, the CPU core will trigger a fault.&lt;br /&gt;
There is a couple of good threads &lt;a href="https://devzone.nordicsemi.com/question/82875/sd-ble-event-priority-and-task-management/"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/56288/why-does-sd-use-swi2-for-passing-events/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>