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

ble_buttonless_dfu SVC handler missing on nrf52840

Hello,

I have been using the buttonless DFU method for a while on the nrf52832 Chip. 
Due to performances need we changed the chip for our product from nrf52832 to nrf52840.

I have trouble porting the buttonless dfu to this chip and I don't understand why.
The problem is about the SVC interface between App and Bootloader. Here are some logs about my issue : 

<info> app: Setting vector table to bootloader: 0x000F7000
<info> app: nrf_dfu_svci_vector_table_set() -> success
<info> app: nrf_dfu_set_peer_data_init() -> NRF_ERROR_SVC_HANDLER_MISSING
<info> app: Setting vector table to main app: 0x00027000

I saw a lot of tickets about this issue on the forum but none of them provided an answer for me.
My configuration is good concerning BONDS requirement of DFU.

My app is still working on nrf52832. I suspect the config due to this change of target is in fault but I don't know where to look.
Everything is working except for this issue.

I hope someone will be able to help me.

Regards,

Loick Calvez

  • Hi Loick,

    Which SDK version are you using? It should only be the matter of changing the flash and RAM config, edit the preprocessor definitions( e.g. S132 to S140 and NRF52832_XXAA to NRF52840_XXAA etc) and  replacing the startup files. The bootloader example already contains the SVC handler for the nrf_dfu_set_peer_data_xxxx API, so there should not be any issues with the SVC handler missing. 

    What does your flash and ram settings look like for your ported bootloader?

    Best regards

    Bjørn

  • Hi,

    Sorry for the late reply. I am using SDK 16.

    I understand this should not be a problem. I forgot to mention I use freeRTOS for my application but I don't think that is an issue since it works on nrf52832.

    My flash and ram settings for the differents bootloader are : 

    nrf52832 : 

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x77000, LENGTH = 0x7000
      CONFIG (rw) : ORIGIN = 0x76000, LENGTH = 0x1000
      RAM (rwx) :  ORIGIN = 0x20002AA8, LENGTH = 0xD558
      uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
      mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
      bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
    }

    nrf52840 : 

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0xF7000, LENGTH = 0x7000
      CONFIG (rw) : ORIGIN = 0xF6000, LENGTH = 0x1000
      RAM (rwx) :  ORIGIN = 0x20005968, LENGTH = 0x3a698
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
      bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
      uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
      mbr_params_page (r) : ORIGIN = 0x000FE000, LENGTH = 0x1000
    }



    For my application those settings are : 

    nrf52832 : 

    MEMORY
    {
      FLASH (rx) :  ORIGIN = 0x26000, LENGTH = 0x75000 - 0x26000
      CONFIG (rw) : ORIGIN = 0x76000, LENGTH = 0x1000
      AREAS (rw) : ORIGIN = 0x75000, LENGTH = 0x1000
      RAM (rwx) :  ORIGIN = 0x200039A0, LENGTH = 0xC660
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
    }

    nrf52840 : 

    MEMORY
    {
      FLASH (rx) :  ORIGIN = 0x27000, LENGTH = 0xC7000
      CONFIG (rw) : ORIGIN = 0xF6000, LENGTH = 0x1000
      AREAS (rw) : ORIGIN = 0xF5000, LENGTH = 0x1000
      RAM (rwx) :  ORIGIN = 0x200039F8, LENGTH = 0x20040000 - 0x200039F8
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
    }

    Please tell me if something seems wrong to you.
    I will restart investigation on this issues in the next few days. I will come back to you if I find anything.

    Regards,

    Loick

  • Hi Loick, 

    lcalvez said:
    I understand this should not be a problem. I forgot to mention I use freeRTOS for my application but I don't think that is an issue since it works on nrf52832.

    Yes, we support FreeRTOS on both the nRF52832 and the nRF52840. 

    lcalvez said:
    Please tell me if something seems wrong to you.
    I will restart investigation on this issues in the next few days. I will come back to you if I find anything.

    The application and bootloader flash and RAM settings look ok. 

    Just checking, the ported bootloader compiled against the S140 v7.0.1 header files and the bootloader has been flashed to the device when you get the SVC handler missing error?

     

Related