Chip nrf51822 S110 nrf51_sdk_v6_1_0_b2ec2e6 Softdevice s110_nrf51822_7.0.0_softdevice.hex
I use "nrf51_sdk_v6_1_0_b2ec2e6\nrf51822\Board\pub\device_firmware_updates" for dual dfu update. It works will most of time. But sometimes when I finish dfu updata I get different m_image_crc from when update is success.
code:(dfu_dual_bank.c)
m_image_crc = crc16_compute((uint8_t *)mp_storage_handle_active->block_id,
m_image_size,
NULL);
received_crc = uint16_decode((uint8_t *)&m_init_packet[0]);
if ((m_init_packet_length != 0) && (m_image_crc != received_crc))
{
return NRF_ERROR_INVALID_DATA;
}
I found that m_init_packet_length = 0, it means during dfu update I had not receive "m_init_packet" and can not compare crc with Android or iOS APP
So how can I make my owm m_init_packet[16] and send it from App to ble device when it works under dfu mode?