softdevice DFU not working with nrf52811

Hi,

We are trying to update the S112 softdevice on nrf52811 over serial DFU but it's not working and throwing the below errors.

Traceback (most recent call last):
  File "/usr/bin/nrfutil", line 11, in <module>
    load_entry_point('nrfutil==4.0.0', 'console_scripts', 'nrfutil')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 858, in serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, True)
  File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 793, in do_serial
    dfu.dfu_send_images()
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 121, in dfu_send_images
    self._dfu_send_image(self.manifest.softdevice)
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 97, in _dfu_send_image
    self.dfu_transport.send_init_packet(data)
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 253, in send_init_packet
    self.__execute()
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 370, in __execute
    self.__get_response(DfuTransportSerial.OP_CODE['Execute'])
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 454, in __get_response
    get_dict_key(DfuTransport.RES_CODE, resp[2])))
pc_ble_driver_py.exceptions.NordicSemiException: Response Code InsufficientResources

We are using nRF5_SDK_17.1.0 and soft device s112_nrf52_7.2.0. 

Hex files application sizes:

Bootloader size :

  

Application + softdevice size:

We are able to update the application successfully over serial DFU but softdevice always fails with the above errors. 

Questions:

  1. Can nrf52811 support DFU of softdevice over serial(considering only 192KB of flash)?
  2. Does it require any configuration?

  • Hi,

    This is odd. It should be possible to do single bank of the SoftDevice. You can see this for instance form the implementation of use_single_bank() in components\libraries\bootloader\dfu\nrf_dfu_validation.c and nrf_dfu_cache_prepare() in components\libraries\bootloader\dfu\nrf_dfu_utils.c. Then see that bank0 is defined like this, so it starts at 0x1000 (MBR_SIZE) when the bootloader does not depend on a SoftDevice:

    uint32_t nrf_dfu_bank0_start_addr(void)
    {
        if (SD_PRESENT)
        {
            return ALIGN_TO_PAGE(SD_SIZE_GET(MBR_SIZE));
        }
        else
        {
            return MBR_SIZE;
        }
    }

Related