<?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>SVC Number</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61694/svc-number</link><description>Hello, 
 i&amp;#39;m trying to understand how nrf52 and softdevice work to use it in the future, i&amp;#39;m working on STM32 and i have my own RTOS, i try to appropriate the platform by porting my rtos on nrf52. 
 I didn&amp;#39;t find any documentation on how should i retrieve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 May 2020 06:17:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61694/svc-number" /><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251591?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 06:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c7348b3-1ce9-4e8c-8e63-6677b350cc4c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I agree this is probably something we should have documented more clearly. I actually did not expect r0-r2 to get altered when SVC interrupt was forwarded through the Softdevice. Thanks for the update and good luck with your porting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251534?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 14:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37a95f0b-1e7b-4098-9cfe-18e2583a5441</guid><dc:creator>BricoFlo</dc:creator><description>&lt;p&gt;Okay, there is all i need to implement service call into my RTOS, thanks a lot, that&amp;#39;s clear now !&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if i missed something but maybe it should be written in the service call Api documentation ;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anyway, thanks !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251531?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 14:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cb8c75f-670d-441f-89e5-519e850a73b1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I did a quick test trying to use SVC in the app with the Softdevice enabled which you can see the result of below.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-48382e44330648aabc5e5c1db1fafdd0/Capture.PNG" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;LR is the same, but r0-r2 are different. r0 matches the SVC number, r1 the SP, and r2 holds the address to the SVC_Handler() in the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251404?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 08:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd7b899f-acab-4356-80ef-1a3df5741b45</guid><dc:creator>BricoFlo</dc:creator><description>&lt;p&gt;That&amp;#39;s what in needed to understand, the EXC_RETURN is not altered by softdevice or rewritten to match what should be without soft device, i&amp;#39;m right ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251398?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 08:23:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a28baea7-de8a-4351-b853-672dea3b7a5e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;LR will contain one of the EXC_RETURN (&lt;a href="https://developer.arm.com/docs/dui0553/a/the-cortex-m4-processor/exception-model/exception-entry-and-return"&gt;ARM documentation&lt;/a&gt;) values when you execute code inside the SVC handler. This is not something that&amp;#39;s specific to Nordic chips.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251234?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45f0e033-d1db-47ca-a7dd-c43fb857c0c0</guid><dc:creator>BricoFlo</dc:creator><description>&lt;p&gt;So i can read the link return register, it will point to my code and so i can read SVC number i called just like other cortex ? the return path of interrupt skip soft device if i understand well ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251232?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:44:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60b43a93-fcf7-43a2-932e-133a66b1eef9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The app gets notified of the SVC through an interrupt regardless if the Softdevice is present or not. The difference is the SVC interrupt gets routed through the Softdevice first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251228?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:484eed55-600b-4d79-b8bf-a2c00ab61397</guid><dc:creator>BricoFlo</dc:creator><description>&lt;p&gt;by a function parameter ? meaning that i have one parameter used for this, so not usable as other M4 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251225?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b746d702-07ae-4ca2-a1fb-c7b8c91077af</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It will be forwarded to the SVC_Handler in your application If the number was not in the Softdevice&amp;#39;s SVC range.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251223?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae9a09cd-e81f-46cf-bb1f-07b02e3f7e2b</guid><dc:creator>BricoFlo</dc:creator><description>&lt;p&gt;I already read the Supervisor Call interface chapter of the SDK but for numbers not intercepted by Softdevice and redirected to my SVC handler, how can i get the SVC Number if available ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVC Number</title><link>https://devzone.nordicsemi.com/thread/251221?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 10:28:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6164032-2028-44da-806a-08a6914449da</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;All SVC numbers that the application uses to interface with the Softdevice are handled inside the Softdevice. The Softdevice uses a separate SW interrupts to notify the application of various Softdevice events.&lt;/p&gt;
&lt;p&gt;This is explained in more detail in the &amp;quot;&lt;span&gt;&lt;a title="Supervisor call interface" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_svc.html?cp=7_1_3_51"&gt;Supervisor call interface&lt;/a&gt;&lt;/span&gt;&amp;quot; chapter of the SDK documentation and the &amp;quot;&lt;span&gt;&lt;a title="Application programming interface" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/overview/api_overview.html?cp=4_6_2_0_3"&gt;Application programming interface&lt;/a&gt;&lt;/span&gt;&amp;quot; section in the SDS.&lt;/p&gt;
&lt;p&gt;I would suggest taking a look at the &lt;span&gt;&lt;a title="Heart Rate Application with FreeRTOS" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_hrs_freertos.html?cp=7_1_4_2_2_14"&gt;Heart Rate Application with FreeRTOS&lt;/a&gt;&lt;/span&gt; example from the nRF5 SDK to maybe get an overview of what&amp;#39;s required to use the Softdevice with an RTOS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>