This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue with Softdevice S140 on Arduino Nano BLE 33 board (nRF52840)

Hi Folks,

I am getting in trouble with SoftDevice activation. Indeed, my application did not return from the "nrf_sdh_enable_request()" call, more precisely it hangs into the "sd_softdevice_enable".

I want to mention that I compile the S140 file within my application so I did not flash independently the Softdevice hex previously into my target. Maybe my linker script file is not OK or my sdk_config.h file

My questions are: Is it possible to flash in one shot softdevice + application ?if yes, how must be configured the linker script file?

I have also noticed that the "sd_softdevice_enable" function refers to a sd_softdevice_enable to a 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?

Another file contains a pure C definition , it is located in the named "ser_softdevice_handler.c". Can it serve to implement Softdevice without in a single application file?

I know I ask a lot so I thank u a lot as well.

The best.

Seb

Parents
  • Hi Seb,  

    I want to mention that I compile the S140 file within my application so I did not flash independently the Softdevice hex previously into my target. Maybe my linker script file is not OK or my sdk_config.h file

     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. 

    My questions are: Is it possible to flash in one shot softdevice + application ?if yes, how must be configured the linker script file?

    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

     ble_app_blinky_gcc_nrf52.ld

    I have also noticed that the "sd_softdevice_enable" function refers to a sd_softdevice_enable to a 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?

     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.

    Another file contains a pure C definition , it is located in the named "ser_softdevice_handler.c". Can it serve to implement Softdevice without in a single application file?

    No, this is the serialization API that allows you to use the nRF52 SoCs as connectivity chips through a serial interface to another MCU. See Running a serialized application and Serialization for further documentation on serialization.

    Best regards

    Bjørn

  • Thank u a lot.

    Very clear explanations!

    I have still some issue to run the ble_blinky  example.

    I am currently flashing over a SAM -BA Bootloader (the one installed on my Arduino nano board) via USB serial.

    I am also running teh blinky example using SDK 15.0.0 with the corresponding Softdevice (6.0.0).

    However, it seems that nothing is happening (no Peripheral detected while scanning BLE).

    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.

    So, in a nutshell, I first flash Softdevice with "Bossac" command then perform hex2bin for the blinky app and then flash it again with "Bossac".

    Did u suspect something wrong in my procedure? Is Bossac recommended in that case? Or maybe I am missing something 

    to make compatible PCA10056 board with the Arduino Nano BLE one (pin configurations or sdk_config.h).

  • I have also tested with the XTAL clock source configuration, not successful

Reply Children
No Data
Related