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

DFU Timeout not Working

I'm having a weird issue where the stock sdk 8.1.0 DFU software is not timing out properly and getting stuck in the bootloader, advertising dfuTarg forever.

Our iOS app does the following to get the DFU app in this state:

Start value is written to control point which causes the device to enter the bootloader. Then the iOS app connects to dfuTarg and writes the start value to the control point again.Then the file size is written to the packet characteristic. After this two different things have occurred in testing. In one scenario the device disconnects and then begins advertising again and never times out.

The only change I made to the stock DFU code was to remove reference to the button press, and to change the following line as described in this post: devzone.nordicsemi.com/.../

Any idea why the DFU timeout would not work properly?

Thanks, Seth

  • @Seth: what did you try to update ? If you are trying to update Softdevice then it would be the normal behaviour when the application is already erased when you receive the image size. What DFU timeout does is to stop DFU process, check if the application is ready if not it will do a reset. And in this case most likely the application is corrupted, this explain it continue to advertise again and again regardless of advertising timeout.

    I think what you can do is to configure the bootloader to be friendly for debugging (Question #F in this blog) and then add a break point at bootloader_app_is_valid() to see what would go wrong.

    You can also try to read out the flash image and check if the application code is still there at BANK0 and how the bootloader setting looks like

Related