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

nRF52840 SDK16 s140 - Bootloader and Softdevice

Hi everyone,

I am a new developer and I am using the nRF52840 with SDK16 and s140 for prototyping and I have some questions about the bootloader and the softdevice.

Regarding the softdevice:

This getting started guide sais that if you want to run a BLE example you must program the softdevice first. From my experience, I never needed to program the softdevice before uploading a BLE example on nRF52840 DK. My guess is that your BLE examples incorporates the softdevice and it is programming automatically? If this is true why your guide sais that "you must program the softdevice on the board"? Another guess is that for older SDK versions, the BLE example didn't include the softdevice and hence it was necessary for the user to program the softdevice..

Regarding the bootloader:

I purchased a third-party nRF52840 module from Raytac. Before go ahead with flashing I came in contact with Raytac and I ask them If their modules are shipped with a bootloader or not. They respond back informing me that they ship their modules without a bootloader. So I was thinking that I have to program the bootloader on nRF52840 before attempting to upload my firmware. After searching I found the section programming the bootloader.  I am straggling to understand the procedure.. What I've done so far in order to program the board using the "programmer" app of nRF connect for Desktop platform is:

I erase the memory of nRF52840, then added the HEX file and finally pressing "erasing and write" I programmed the module with my firmware (I use an external J-Link programmer for this procedure).

Despite the fact that I have successfully program the module, I do not understand how the bootloader was programmed since I didn't follow the programming the bootloader procedure..

Could someone enlighten me?

Thanks in advance

Nick

Parents
  • Hi Nikos, 

    My guess is that your BLE examples incorporates the softdevice and it is programming automatically? If this is true why your guide sais that "you must program the softdevice on the board"?

    If you use a Segger example, it will also load the softdevice. When you use nrfjprog / nRF Connect Programmer programming directly, you have to load the softdevice manually. 

      

     

    I am straggling to understand the procedure.. What I've done so far in order to program the board using the "programmer" app of nRF connect for Desktop platform is:

     To use nRF connect Programmer, you have to load (Add HEX file) softdevice (under \nRF5_SDK\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex) and bootloader. 

    -Amanda H.

  • Thanks you for your responce Amanda,

    If you use a Segger example, it will also load the softdevice

    I didn't know that thanks!!

    When you use nrfjprog / nRF Connect Programmer programming directly, you have to load the softdevice manually. 

    Well I used the nrfjprog and the nRF Connect Programmer and I didn't have to upload the softdevice manually in any case. I just uploaded the .hex provided with your examples. Maybe when I buid the application with Segger IDE it merges the application with softdevice into a single .hex file? 

    To use nRF connect Programmer, you have to load (Add HEX file) softdevice (under \nRF5_SDK\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex) and bootloader. 

    As I mentioned before I didn't have to load the softdevice (it is likely was merged with the application file). Which one is the bootloader file (where can I find it)? I didn't loaded any bootloader file and the application was programmed fine.

    Thanks

    Nick

  • Hi Nick, 

    Nikosant03 said:
    Maybe when I buid the application with Segger IDE it merges the application with softdevice into a single .hex file? 

    No, the Segger doesn't merge the .hex file. It loads the softdevice and application images separately. 

    So I was thinking that I have to program the bootloader on nRF52840 before attempting to upload my firmware.

    It's the MBR which is to provide an interface to allow in-system updates of the application, the SoftDevice, and bootloader firmware. The softdevice is merged with the exact same MBR hex-file. See the Master boot record and bootloader documentation.  

    You can start from Template Application to see who it loads the softdevice and application. 

    -Amanda H.

Reply
  • Hi Nick, 

    Nikosant03 said:
    Maybe when I buid the application with Segger IDE it merges the application with softdevice into a single .hex file? 

    No, the Segger doesn't merge the .hex file. It loads the softdevice and application images separately. 

    So I was thinking that I have to program the bootloader on nRF52840 before attempting to upload my firmware.

    It's the MBR which is to provide an interface to allow in-system updates of the application, the SoftDevice, and bootloader firmware. The softdevice is merged with the exact same MBR hex-file. See the Master boot record and bootloader documentation.  

    You can start from Template Application to see who it loads the softdevice and application. 

    -Amanda H.

Children
No Data
Related