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

How to add buttonless_dfu and serial_dfu functions at the same time.

Now the code in the application part has added the buttonless_dfu function, which has also been successfully implemented. But I ’m not familiar with serial_dfu, I don’t know how to continue to add serial_dfu function. And how to achieve coexistence of ble_dfu and serial_dfu in bootload code?

Parents Reply Children
  • Hi June, 
    I found that it was because of this definition NRF_DFU_PROTOCOL_REDUCED 1 in sdk_config.h in SDK v15.3 causing the issue. 

    Please set it to 0 if it's 1 in your sdk_config.h , after that it should work. 

    I attached here the hex file for bootloader and the Keil project in SDK v15.3 that I used. 

    It's the same private key as I sent earlier. pca10056_ble_uart_debug.zip

  • Hi Hung,

    Unfortunately, the problem still exists.

    Although I have executed MSDDisable, DFU still fails. The following is the error message, same as before:

    Traceback (most recent call last):
      File "D:\Application\Python38\Scripts\nrfutil-script.py", line 11, in <module>
        load_entry_point('nrfutil==6.0.1', 'console_scripts', 'nrfutil')()
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 782, in main
        rv = self.invoke(ctx)
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "D:\Application\Python38\lib\site-packages\click-7.1.1-py3.8.egg\click\core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\__main__.py", line 1055, in serial
        do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, True,
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\__main__.py", line 970, in do_serial
        dfu.dfu_send_images()
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
        self._dfu_send_image(self.manifest.application)
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\dfu\dfu.py", line 100, in _dfu_send_image
        self.dfu_transport.send_firmware(data)
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\dfu\dfu_transport_serial.py", line 301, in send_firmware
        response['crc'] = self.__stream_data(data=data, crc=response['crc'], offset=i)
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\dfu\dfu_transport_serial.py", line 474, in __stream_data
        response = self.__calculate_checksum()
      File "D:\Application\Python38\lib\site-packages\nrfutil-6.0.1-py3.8.egg\nordicsemi\dfu\dfu_transport_serial.py", line 412, in __calculate_checksum
        raise NordicSemiException('Did not receive checksum response from DFU target. '
    pc_ble_driver_py.exceptions.NordicSemiException: Did not receive checksum response from DFU target. If MSD is enabled on the target device, try to disable it ref. https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U

    But at the same time SDK15.2 is normal (SDK 15.2 and SDK 15.3 are configured with 115200 baud rate and HWFC is turned on). By the way, I used your 15.3 code project to compile without any changes (just replaced the key.c that matches my environment), the problem is still not solved.

  • Please capture the RTT log as well. 

    Which baudrate did you test ? Have you tested with or without HWFC ? Could you test with very small image ? 

  • Also please try testing with my bootloader.hex file inside the .zip. 

    When you test SDK v15.3 with the stock bootloader (not the combination) do you see the same issue with "Did not receive checksum response" ? 

  • When you test SDK v15.3 with the stock bootloader (not the combination), everything is normal.

    In addition, I cannot use bootload.hex to test directly, because the key in the project is different from the key in my environment.

    So I replaced the key in the project with a key that matches my environment and generated hex, and tested it with this hex.

Related