DFU error Selected firmware is not compatible with the device

Attempting to use Nodic's DFU app to update the device firmware OTA. I've gone through the following steps:

  1. Generated keys "nrfutil nrf5sdk-tools keys generate private_key.pem"
  2. placed the public_key.c to compile with the bootloader
  3. Compiled the bootloader using nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_bootloader\pca10056_s140_ble_debug
  4. generated settings file "nrfutil settings generate --family NRF52840 --application gestr1.hex --application-version 6 --bootloader-version 1 --bl-settings-version 1 bl_settings_gestr1_av6_bv1_sv1.hex"
  5. merged bootloader, settings file and SD: "mergehex --merge secure_bootloader_ble_s140_pca10056.hex s140_nrf52_6.1.0_softdevice.hex bl_settings_gestr1_av6_bv1_sv1.hex --output bl_sd_set1_merged.hex"
  6. Used nRFConnect programmer to erase and program this merged hex file. In this case, nRFConnect is telling me that "part of the hex regions are out of device memory size"
  7. create the pkg zip file: "nrfutil nrf5sdk-tools pkg generate --hw-version 52 --application gestr1.hex --application-version 6 --sd-req 0xCAFE,0xae --key-file private_key.pem gestr1_pkg.zip"
  8. upload this zip file to smartphone
  9. When I attempt to use the DFU app to program this package file, no dfrTarg is advertising
  10. When I leave the settings file out of the merge, dfuTarg does indeed start advertising.
  11. In either case the DFU app errors out with the error message in the subject (selected firmware is not compatible with the device)

The application that I'm trying to program runs just fine in SES. What am I doing wrong?

Parents
  • I've gotten a bit further but I'm still getting the "Selected firmware is not compatible" error when using the DFU app. Here is a link to a file where I describe everything I've done. The only things I've added to the application code are setting BLE_DJU_ENABLED to 1 in sdk_config.h and adding this code to a trigger point that I can reach by basically pushing a button. I clear the GPREGRET register in main. To be clear, I am getting the DfuTarg advertisement as expected when DFU is triggered on the device, but the DFU app still sees the package as incompatible.

    static void dfu_start()
    {
      uint32_t gpregret_reg;
      sd_power_gpregret_get(0, &gpregret_reg);
      NRF_LOG_INFO("[1]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      gpregret_reg |= BOOTLOADER_DFU_START;
      sd_power_gpregret_set(0, gpregret_reg);
      NRF_LOG_INFO("[2]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      sd_power_gpregret_get(0, &gpregret_reg);
      NRF_LOG_INFO("[3]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      NRF_LOG_FLUSH();
    
      sd_nvic_SystemReset();
    }

Reply
  • I've gotten a bit further but I'm still getting the "Selected firmware is not compatible" error when using the DFU app. Here is a link to a file where I describe everything I've done. The only things I've added to the application code are setting BLE_DJU_ENABLED to 1 in sdk_config.h and adding this code to a trigger point that I can reach by basically pushing a button. I clear the GPREGRET register in main. To be clear, I am getting the DfuTarg advertisement as expected when DFU is triggered on the device, but the DFU app still sees the package as incompatible.

    static void dfu_start()
    {
      uint32_t gpregret_reg;
      sd_power_gpregret_get(0, &gpregret_reg);
      NRF_LOG_INFO("[1]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      gpregret_reg |= BOOTLOADER_DFU_START;
      sd_power_gpregret_set(0, gpregret_reg);
      NRF_LOG_INFO("[2]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      sd_power_gpregret_get(0, &gpregret_reg);
      NRF_LOG_INFO("[3]The gpregret gpregret_reg is: %x", gpregret_reg);
    
      NRF_LOG_FLUSH();
    
      sd_nvic_SystemReset();
    }

Children
Related