<?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>Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60126/issue-with-softdevice-s140-on-arduino-nano-ble-33-board-nrf52840</link><description>Hi Folks, 
 I am getting in trouble with SoftDevice activation. Indeed, my application did not return from the &amp;quot;nrf_sdh_enable_request()&amp;quot; call, more precisely it hangs into the &amp;quot;sd_softdevice_enable&amp;quot;. 
 I want to mention that I compile the S140 file within</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Aug 2020 21:29:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60126/issue-with-softdevice-s140-on-arduino-nano-ble-33-board-nrf52840" /><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/263314?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 21:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eaa0e7ca-f164-4eba-a186-626915e874cd</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Hi Sabas,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your efforts in porting the bootloader. I swapped to&amp;nbsp;the adafruit BSP few weeks ago so I do not use mbedos for the time being.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, it is a note for later ;), I&amp;#39;ll look at it for sure.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The best&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/260869?ContentTypeID=1</link><pubDate>Mon, 20 Jul 2020 16:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edc09b78-6d06-4ee2-9ba0-9480babac147</guid><dc:creator>sabas1080</dc:creator><description>&lt;p&gt;Hi Sebas&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We have port this core to be compatible with the bootloader UF2, if you want to test, is available here&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/ElectronicCats/ArduinoCore-nRF528x-mbedos"&gt;https://github.com/ElectronicCats/ArduinoCore-nRF528x-mbedos&lt;/a&gt;&lt;span&gt;, UF2 is open source now&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/248489?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 13:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:956cc439-ed71-4cce-aa18-e60ee8eb90ec</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, sorry for not being able to provide much help with mbedOS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/248475?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 13:06:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad230ec9-2f71-47e8-94b5-50bdb6573dc8</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;I suppose relocation is done into mbedos.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s why they integrate an old Softdevice version which is unfortunately not maintained and replaced by Cordio stack.&lt;/p&gt;
&lt;p&gt;We have decide to migrate to the Adafruit platform so that we can work with your latest softdevice version&lt;/p&gt;
&lt;p&gt;Thank you again for your support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/248225?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 14:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03bd2425-feec-45aa-b3b8-3fa0897a1662</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Seb,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have very limited experience with mbed OS. Am I understanding correctly that the SoftDevice is flashed to the nRF52840 and then the mbed application is placed on the first flashpage after the SoftDevice&lt;/p&gt;
&lt;p&gt;If so, then the SVC exeption should be handled by the SoftDevice first. Does the mBed application change the&amp;nbsp;Vector Table Offset Register (VTOR) register so that the SoftDevice is bypassed all together after the initial power up?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/247598?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 14:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc469e55-a33a-49c8-a7ec-7d840e84d956</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;Thank you again for your quick response.&lt;/p&gt;
&lt;p&gt;Yes it is a non-zero error code.&lt;/p&gt;
&lt;p&gt;To get deeper in detail, here is the ret_code once the &amp;quot;sd_softdevice_enable&amp;quot; executed:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0676.softdevice.png" /&gt;&lt;/p&gt;
&lt;p&gt;More precisely, this code come from a SVC_exit call in the irq_cm4f.S (cmis rtos starup code source:) which handles &amp;lt;SVC_Handler&amp;gt;.&lt;/p&gt;
&lt;p&gt;Here is the source code for visualization:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/maxgerhardt/framework-arduinostm32-modded/blob/master/CMSIS/CMSIS/RTOS2/RTX/Source/GCC/irq_cm4f.S"&gt;https://github.com/maxgerhardt/framework-arduinostm32-modded/blob/master/CMSIS/CMSIS/RTOS2/RTX/Source/GCC/irq_cm4f.S&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It seems that it redirect to the &amp;lt;SVC_User&amp;gt; function and try&amp;nbsp;to load&lt;span&gt;&amp;nbsp;address of &lt;/span&gt;&lt;span class="pl-c1"&gt;SVC&lt;/span&gt;&lt;span&gt; table at osRtxUserSVC.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At this point it call the exit function since it considers&amp;nbsp;&lt;span class="pl-c1"&gt;SVC&lt;/span&gt; maximum number&amp;nbsp; out of range.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;This is only for examinate this issue, now I will be interested in redirecting the call&amp;nbsp; to the softdevice SVC_Handler only for SVD call number above 0xF which is my case (0x10 for the softdevice_enable code).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe should I redirect Supervisor calls&amp;nbsp;back to asoftdevice thanks to the&amp;nbsp;&lt;a class="codeRef" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v5.0.0/group___n_r_f___s_d_m___f_u_n_c_t_i_o_n_s.html#ga46d2ce943076d65947ea8919198be106"&gt;sd_softdevice_vector_table_base_set&lt;/a&gt;&amp;nbsp;function?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To my mind, this bad call is due to the fact that mbedos has relocated&amp;nbsp;interrupt vector table, maybe this is due to the virtualization of the NVIC (remember the NVIC_RAM) with the&amp;nbsp;CMSIS_NVIC_VIRTUAL define flag on mbedos. However, mbedos can&amp;#39;t work if I don&amp;#39;t use NVIC_RAM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also tried to redefine the&amp;nbsp;&lt;span&gt;&amp;lt;SVC_Handler&amp;gt; compiling nrf_svc_handler.c file but there is a problem of redifinition with the one defined in&amp;nbsp;irq_cm4f.S&amp;nbsp;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;I have also tried&amp;nbsp;to keep default the Mbed configuration to generate an application with mbed + softdevice but it tries to implement a Cordio stack instead when using BLE wrapper functions but I don&amp;#39;t want it, I want softdevice &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Do you have any suggestions as to how I can get rid of my problem? I know it&amp;#39;s mbed-os related, that&amp;#39;s why I ask to them first but maybe you have a trick.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you in advance.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/247466?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 07:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07084334-8d5b-4781-8c52-8b23a89ea0dd</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Seb,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Glad to hear that you can jump to the application to your application the nRF52840 with the&amp;nbsp;&lt;span&gt;Adafruit_nRF52_Bootloader.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am afraid that dont have very much experience with Svc handlers, but&amp;nbsp;I guess there may be issues if the mBed OS and SoftDevice API uses the same SVC numbers. In our example projects the SVC Handler is weakly defined in the startup file(.s).&amp;nbsp; When the SoftDevice is flashed to the nRF52840, then all execptions are processed by the SoftDevice first and then forwarded to either the bootloader or application. THats atleast how it works in our SDK.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does&amp;nbsp;&lt;span&gt;sd_softdevice_enable return a non-zero error code ?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/247360?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 13:20:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e719ce09-0bce-48d1-bc0f-dee33b0c3c3e</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Welcome back!!,&lt;/p&gt;
&lt;p&gt;I can now boot my application from&amp;nbsp; the&amp;nbsp;&lt;span&gt;Adafruit_nRF52_Bootloader whatever the application offset is.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;First problem solved!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I bought a Segger Jlink mini&amp;nbsp;to perform the flashing operation, perfect.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now , I have still an issue when initialising softdevice upon mbedos&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have recently posted a detailled explanation on the mbed-os forum:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://forums.mbed.com/t/svc-exit-when-activating-softdevice/8251"&gt;https://forums.mbed.com/t/svc-exit-when-activating-softdevice/8251&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe you have an opinion on how to make work Nordic SDK on mbed OS when you have already flashed a softdevice on target. I seems that mbed OS has its own SVC_Handler and it results in going into application fault since softdevice is not properly initialised.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank u again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Seb&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/245277?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2020 14:34:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d08372e0-ec72-42fe-987a-391963fca30d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;No, but I will check&amp;nbsp;if the&amp;nbsp;&amp;quot;sd_ble_enable&amp;quot; return since for instance I have deactivated BLE in the main application.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope that RAM_NVIC&amp;nbsp;&amp;amp;&amp;nbsp;RAM_CRASH_DATA&amp;nbsp;sections are detected by Softdevice so that it can shift the application start adress accordingly taking into account them.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What do you suggest in that case? Specify the Softdevice ram section within linker script?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;As long as the&amp;nbsp;&lt;span&gt;ram_start value returned by sd_ble_enable is lower than the origin of the RAM_NVIC region then I think you should be good!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;Yes, i am talking about the SAM-BA factory bootloader of which I have recently checked the code and I have discovered they do not automate app start adress calculation.&lt;/p&gt;
&lt;p&gt;Consequently I&amp;#39;ll load a different bootloader (the&amp;nbsp;Adafruit_nRF52_Bootloader compatibles with nano 33 board) as soon as I&amp;#39;ll receive the programming board. Hope will be fine once done.&lt;/p&gt;
&lt;p&gt;Thank you again for your support. It helps me to under quickly how it works.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s be in touch later if you want to conclude this chapter.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Yes, let me know once you can program the board directly via SWD.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/245248?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2020 13:15:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe05ced6-bac8-4585-b5c8-8e0b0fe75fbd</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Thank you again for your answers and advices.&lt;/p&gt;
[quote userid="7571" url="~/f/nordic-q-a/60126/issue-with-softdevice-s140-on-arduino-nano-ble-33-board-nrf52840/245173"]&amp;nbsp;Ok, Is this the complete log?[/quote]
&lt;p&gt;No it is not and yes it starts from 0x00000000&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="7571" url="~/f/nordic-q-a/60126/issue-with-softdevice-s140-on-arduino-nano-ble-33-board-nrf52840/245173"]Have you checked which ram start value that&amp;nbsp;sd_ble_enable() function returns?[/quote]
&lt;p&gt;No, but I will check&amp;nbsp;if the&amp;nbsp;&amp;quot;sd_ble_enable&amp;quot; return since for instance I have deactivated BLE in the main application.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope that RAM_NVIC&amp;nbsp;&amp;amp;&amp;nbsp;RAM_CRASH_DATA&amp;nbsp;sections are detected by Softdevice so that it can shift the application start adress accordingly taking into account them.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What do you suggest in that case? Specify the Softdevice ram section within linker script?&lt;/span&gt;&lt;/p&gt;
[quote userid="7571" url="~/f/nordic-q-a/60126/issue-with-softdevice-s140-on-arduino-nano-ble-33-board-nrf52840/245173"]When you refer to the bootloader you are talking about the Arduino bootloader right?[/quote]
&lt;p&gt;Yes, i am talking about the SAM-BA factory bootloader of which I have recently checked the code and I have discovered they do not automate app start adress calculation.&lt;/p&gt;
&lt;p&gt;Consequently I&amp;#39;ll load a different bootloader (the&amp;nbsp;Adafruit_nRF52_Bootloader compatibles with nano 33 board) as soon as I&amp;#39;ll receive the programming board. Hope will be fine once done.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for your support. It helps me to under quickly how it works.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s be in touch later if you want to conclude this chapter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/245173?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2020 09:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18dffd08-4bf6-440d-998b-0ae0295a3ee0</guid><dc:creator>bjorn-spockeli</dc:creator><description>[quote user="sebastopolix"]You are right, I must buy a J-link to perform those operations.[/quote]
&lt;p&gt;&amp;nbsp;You can use a nRF51, NRF52 , nRF52840 and nRF52833 DK as a Jlink Porgrammer/Debugger for development purposes(not production programming). So if this is only for development, then a Nordic DK is more afordable than a Jlink probe.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;Bossac executable only understands *.bin files so that&amp;#39;s why I convert the generated hex files.&lt;/p&gt;
&lt;p&gt;This is the end when flashing mbr + sofdevice on the arduino board using bossac software:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Ok, Is this the complete log? The MBR and SD should be flashed from 0x0000 and upwards to 0x26000.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;Then, I flash the firmware application starting at 0x26000.&lt;/p&gt;
&lt;p&gt;Here is a snapshot of my linker script file:&lt;/p&gt;
&lt;p&gt;&lt;img style="cursor:zoom-in;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1587026776089v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;So I have started flashing from 0x26000 which is next sector.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am a bit unsure if its OK to place the RAM_NVIC and RAM_CRASH_DATA sections&amp;nbsp; before the the RAM section. Have you checked which ram start value that&amp;nbsp;sd_ble_enable() function returns?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;Another point is that the arduino Board only work when application is located at offset 0x10000 so maybe Bootloader reset handler is configured to jump at that address.&lt;/p&gt;
&lt;p&gt;I found very strange that Arduino has set up such king of default configuration since 0x10000 does not allow a Softdevice normal use.&lt;/p&gt;
&lt;p&gt;Maybe I miss something.&lt;/p&gt;
&lt;p&gt;Is there a way to modify this offset address in the bootloader in order to jump to the right offset?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When you refer to the bootloader you are talking about the Arduino bootloader right? Yes, I agree that it sounds weird that the application must be placed at 0x10000 if the Nano 33 BLE board supports BLE using the SD.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Nordic Bootloader will jump to 0x1000, which is the reset handler of the SoftDevice, which will do som initialization before jumping to 0x26000 where the application is located.&amp;nbsp; I do not know how to modify the Arduino bootloader.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;I also noticed that an application without softdevice flashed , so running from 0x10000 offset adress, shall have the RAM_NVIC configured so that it can work properly. It&amp;#39;s different compared to other examples which use ISR vector table but&amp;nbsp; I think it&amp;#39;s different things appart from my initial problem.&lt;/p&gt;
&lt;p&gt;In fact, I do not master how works the initilal sequence from hard reset to application start and what is involving this fixed offset address in flash memory.&lt;/p&gt;
&lt;p&gt;To me, in a normal sequence with softdevice (after single press on hard reset) we shall have MBR-&amp;gt;Softdevice-&amp;gt; Firmware application&lt;/p&gt;
&lt;p&gt;and on a double tap reset (&lt;span&gt;MBR-&amp;gt; Bootloader)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Again I can only provide insight on the Nordic Bootloader. The MBR will branch to a bootloader if its address is stored in UICR(0x10001014) and then the bootloader will jump to the SoftDevice, which in turn will jump to the application.&lt;/p&gt;
&lt;p&gt;If no bootloader address is stored in UICR, then the MBR will jump directly to the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/244895?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 09:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34442223-74fc-49b7-8471-d7627a92fd9e</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8880.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../8880.sdk_5F00_config.h&lt;/a&gt;Thank u again Bjorn.&lt;/p&gt;
&lt;p&gt;You are right, I must buy a J-link to perform those operations.&lt;/p&gt;
&lt;p&gt;Bossac executable only understands *.bin files so that&amp;#39;s why I convert the generated hex files.&lt;/p&gt;
&lt;p&gt;This is the end when flashing mbr + sofdevice on the arduino board using bossac software:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1587026638074v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Then, I flash the firmware application starting at 0x26000.&lt;/p&gt;
&lt;p&gt;Here is a snapshot of my linker script file:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1587026776089v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;So I have started flashing from 0x26000 which is next sector.&lt;/p&gt;
&lt;p&gt;Another point is that the arduino Board only work when application is located at offset 0x10000 so maybe Bootloader reset handler is configured to jump at that address.&lt;/p&gt;
&lt;p&gt;I found very strange that Arduino has set up such king of default configuration since 0x10000 does not allow a Softdevice normal use.&lt;/p&gt;
&lt;p&gt;Maybe I miss something.&lt;/p&gt;
&lt;p&gt;Is there a way to modify this offset address in the bootloader in order to jump to the right offset?&lt;/p&gt;
&lt;p&gt;I also noticed that an application without softdevice flashed , so running from 0x10000 offset adress, shall have the RAM_NVIC configured so that it can work properly. It&amp;#39;s different compared to other examples which use ISR vector table but&amp;nbsp; I think it&amp;#39;s different things appart from my initial problem.&lt;/p&gt;
&lt;p&gt;In fact, I do not master how works the initilal sequence from hard reset to application start and what is involving this fixed offset address in flash memory.&lt;/p&gt;
&lt;p&gt;To me, in a normal sequence with softdevice (after single press on hard reset) we shall have MBR-&amp;gt;Softdevice-&amp;gt; Firmware application&lt;/p&gt;
&lt;p&gt;and on a double tap reset (&lt;span&gt;MBR-&amp;gt; Bootloader)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I certainly miss something important!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/244840?ContentTypeID=1</link><pubDate>Thu, 16 Apr 2020 06:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc07f515-155a-44f7-bc22-cefb3cfbc36c</guid><dc:creator>bjorn-spockeli</dc:creator><description>[quote user="sebastopolix"]I compile the ble_app_blinky with Keil environment (PCA10056 board) and everything is fine concerning linker script (ROM/RAM offset) and I also set up RC internal clock since the Arduino board does not have XTAL.[/quote]
&lt;p&gt;Can you post the section of sdk_config.h with the clock source settings for the SoftDevice?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="sebastopolix"][/quote]&lt;/p&gt;
&lt;p&gt;So, in a nutshell, I first flash Softdevice with &amp;quot;Bossac&amp;quot; command then perform hex2bin for the blinky app and then flash it again with &amp;quot;Bossac&amp;quot;.&lt;/p&gt;
&lt;p&gt;Did u suspect something wrong in my procedure? Is Bossac recommended in that case? Or maybe I am missing something&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to make compatible&amp;nbsp;&lt;span&gt;PCA10056 board with the Arduino Nano BLE one (pin configurations or sdk_config.h).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am not that familiar with bossac, but as far as I understand its&amp;nbsp;the commandline version of the Bossa&lt;span&gt;&amp;nbsp;flash programming utility for Atmel&amp;#39;s SAM family of flash-based ARM microcontrollers.&amp;nbsp;So im not sure that you can use that with Nordic devices.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you flash the SoftDevice hex, then that should be placed correctly, but why do you convert the ble_app_blinky hex to bin and then flash the bin if you can flash hex files? If you flash the bin then you need to make sure that its placed on the first flash page after the SoftDevice&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We have our own commandline flash programming utility tool&amp;nbsp; called nrfjprog, see the&amp;nbsp;&lt;a title="nRF5x Command Line Tools" href="https://infocenter.nordicsemi.com/topic/ug_nrf5x_cltools/UG/cltools/nrf5x_command_line_tools_lpage.html?cp=8_1"&gt;nRF5x Command Line Tools&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Looking at the schematics of the Arduino Nano 33 BLE, found &lt;a href="https://content.arduino.cc/assets/NANO33BLE_V2.0_sch.pdf"&gt;here&lt;/a&gt;,&amp;nbsp; I see that the SWD interface is exposed. Do you have a a Jlink programmer or a Nordic development kit? If you do then you can use nrfjprog to flash the SoftDevice&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/244792?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 15:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11d51a26-5d7c-438d-8edd-6157229e884f</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;I have also tested with the XTAL clock source configuration, not successful&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/244784?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 15:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd30274-e22b-4d83-ab3b-2477f3f764a7</guid><dc:creator>Sebastien DRI</dc:creator><description>&lt;p&gt;Thank u a lot.&lt;/p&gt;
&lt;p&gt;Very clear explanations!&lt;/p&gt;
&lt;p&gt;I have still some issue&amp;nbsp;to run the ble_blinky&amp;nbsp; example.&lt;/p&gt;
&lt;p&gt;I am currently flashing over a SAM -BA Bootloader (the one installed on my Arduino nano board) via USB serial.&lt;/p&gt;
&lt;p&gt;I am also running teh blinky example using SDK 15.0.0 with the corresponding Softdevice (6.0.0).&lt;/p&gt;
&lt;p&gt;However, it seems that nothing is happening (no Peripheral detected while scanning BLE).&lt;/p&gt;
&lt;p&gt;I compile the ble_app_blinky with Keil environment (PCA10056 board) and everything is fine concerning linker script (ROM/RAM offset) and I also set up RC internal clock since the Arduino board does not have XTAL.&lt;/p&gt;
&lt;p&gt;So, in a nutshell, I first flash Softdevice with &amp;quot;Bossac&amp;quot; command then perform hex2bin for the blinky app and then flash it again with &amp;quot;Bossac&amp;quot;.&lt;/p&gt;
&lt;p&gt;Did u suspect something wrong in my procedure? Is Bossac recommended in that case? Or maybe I am missing something&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to make compatible&amp;nbsp;&lt;span&gt;PCA10056 board with the Arduino Nano BLE one (pin configurations or sdk_config.h).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)</title><link>https://devzone.nordicsemi.com/thread/244591?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 06:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70dc397d-f603-4bbb-ac96-60b813c478a0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Seb,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]I want to mention that I compile the S140&amp;nbsp;file within my application so I did not flash independently&amp;nbsp;the Softdevice hex previously into my target. Maybe my linker script file is not OK or my sdk_config.h file[/quote]
&lt;p&gt;&amp;nbsp;The SoftDevice is a precompiled binary(hex file) and we provide the header files for the SoftDevice API that you compile into your application. So in order to use the SoftDevice you need to compile the headers into your application and flash the SoftDevice hex file to the nRF52840.&amp;nbsp;&lt;/p&gt;
[quote user=""]My questions are: Is it possible to flash in one shot softdevice + application ?if yes, how must be configured the linker script file?[/quote]
&lt;p&gt;Below is the linker script for the ble_app_blinky application in our nRF5 SDK. You just need to place the application on the first flash page after the SoftDevice and then set the RAM origin according to the minimum RAM requirement stated in the S140 SoftDevice specification&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-1081cfedba394ebeb0369fa2603543d9/ble_5F00_app_5F00_blinky_5F00_gcc_5F00_nrf52.ld"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_blinky_5F00_gcc_5F00_nrf52.ld&lt;/a&gt;&lt;/p&gt;
[quote user=""]I have also noticed that the &amp;quot;&lt;span&gt;sd_softdevice_enable&amp;quot; function refers to a&amp;nbsp;sd_softdevice_enable to a&amp;nbsp;SVCALL so I suppose S140 must be flashed first in that configuration so my Arduino board must be in a hard fault reset state. Am I right?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;Correct. The SoftDevice API is implemented as SVCALLs so the S140 must be flashed to the nRF52840, otherwise the the SVCALL will just return and state that it could not find the SVC Handler of the SoftDevice.&lt;/p&gt;
[quote user=""]Another file contains a pure C definition , it is located in the named &amp;quot;ser_softdevice_handler.c&amp;quot;. Can it serve to implement Softdevice without in a single application file?[/quote]
&lt;p&gt;No, this is&amp;nbsp;the serialization API that allows you to use the nRF52 SoCs as connectivity chips through a serial interface to another MCU.&amp;nbsp;See&amp;nbsp;&lt;a title="Running a serialized application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf51_setups_serialization.html?cp=7_1_1_4"&gt;Running a serialized application&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_serialization.html"&gt;Serialization&lt;/a&gt;&lt;span&gt;&amp;nbsp;for further documentation on serialization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>