Hi!
We experience some problems with DFU, and while looking through the code, I saw the code copied below.
This is from the file dfu_req_handling.c from SDK14, and my question is regarding line 1157 in that file.
Just looking at the code, the second argument in the else-if statement should be "bank_1", is it so?
Could this be a copy-and-paste error, or is the intention to actually look at the bank_0 size at this point (and use bank_1 size after that)?
Best regards,
Thomas
uint32_t nrf_dfu_req_handler_init(void)
{
(some code removed)
// Get the previously stored firmware size
if (s_dfu_settings.bank_0.bank_code == NRF_DFU_BANK_INVALID && s_dfu_settings.bank_0.image_size != 0)
{
m_firmware_size_req = s_dfu_settings.bank_0.image_size;
}
else if (s_dfu_settings.bank_1.bank_code == NRF_DFU_BANK_INVALID && s_dfu_settings.bank_0.image_size != 0) <-- Line 1157
{
m_firmware_size_req = s_dfu_settings.bank_1.image_size;
}
else
{
return NRF_SUCCESS;
}