Hi Nordic Tech support team, I have some problems with nrf51822 OTA. My Bootloader is single bank Bootloader。When I update nrf51822 firmware by OTA with android apk, I found ota failure rate is higher. Then, someone give me suggestion as follow code
uint32_t dfu_ble_peer_data_get(dfu_ble_peer_data_t * p_peer_data)
{
uint16_t crc;
if (p_peer_data == NULL)
{
return NRF_ERROR_NULL;
}
crc = crc16_compute((uint8_t *)&m_peer_data, sizeof(m_peer_data), NULL);
if (crc != m_peer_data_crc)
{
return NRF_ERROR_INVALID_DATA;
}
*p_peer_data = m_peer_data;
// corrupt CRC to invalidate shared information.
m_peer_data_crc++;
return NRF_SUCCESS;
}
when I delete code “m_peer_data_crc++;”, I found ota failure rate is low. But if that,
When OTA failed, nrf51822 can not advertise . Reset nrf51822, nrf51822 advertises normally again.
What causes this problem?
Thanks