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

DFU-Failed to reopen transport backend

I've recently updated the hardware on a custom board, moving from the nrf51422 to the nrf52832 and migrated the code from SDK9 to SDK11. I've got most of the functionality back up and running with exception of the DFU. Here's the specific's:

  1. Soft device S132
  2. Dual-Bank S132 bootloader
  3. IAR compiler

Using nRFgo Studio, I'm able to first program the soft device then the bootloader code. I then switch over to MCP, connect to the board, and program the application file using OTA through the DFU function in MCP.

Once programming is finished, the application starts, is discoverable, and functions as normal. However, reconnecting to the board with MCP and then attempting to reprogram the application using the DFU function yields the following error message, "Error during firmware upload - Failed to reopen transport backend"

One thing I noticed is by default the bootloader project maps the bootloader code starting at 0x7a000 and ending at 0x7efff. Yet the memory layout of the nrf52 states the bootloader should start at 0x7b000 and end at 0x80000. If I change this only in the linker options, making the start 0x7b000 and end 7ffff, the bootloader no longer works.

I’m guessing I need to modify the following #defines found in dfu_types.h along with the memory settings in linker options, but not sure what to do with them given if I add 0x1000 to each, it bumps the BOOTLOADER_SETTINGS_ADDRESS up to 0x80000

define BOOTLOADER_REGION_START 0x0007A000

define BOOTLOADER_SETTINGS_ADDRESS 0x0007F000

define BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x0007E000

Or maybe this is not my problem at all. The bootloader works as expected the first time it is used, mapped starting at 0x7a000.

Any help would certainly be appreciated.

Related