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

Strange error with dfu_target_mcuboot

I'm developing an application for the nRF52833 using NCS 1.5.1, and currently working on performing a DFU using MCUBoot. I am sending the app_update.bin file over UART from a nRF9160 and using the dfu_target_mcuboot library to perform the DFU once fragments of the file are on the 833. I have successfully done this with a small application running on the chip, but being a 833 we would like to use BLE and must include the necessary libraries. I'm following the tutorial here: NCS BLE tutorial part 1: Custom Service in Peripheral role - Getting Started - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com) My problem is that specifically when the 833 is running the application with the Bluetooth libraries included, the DFU is unsuccessful. I can successfully perform a DFU when the small application is running and update it to the bigger application with Bluetooth libraries included which is strange. I have narrowed down my error to the first dfu_target_mcuboot_write() call which returns error code -11 (Not enough context). Further I've traced this down to the root call of flash_write() called in stream_flash_erase_page from the stream_flash library. Has anyone encountered this problem or am I missing something simple? I do not think it is an issue with the partitions because I've confirmed the offset defined by the partition manager is the same when the DFU is a success and a failure. It could be a lack of memory problem, but I seriously doubt it because the 833 has 512KB of flash, and the application I'm running is 125KB (very similar to app_update.bin size). 

Related