In SDK_v11.0.0-2.alpha, there is a project: examples\ble_peripheral\ble_app_hrs_freertos\pca10028\ble_app_hrs_freertos\s130_with_dfu_pca10028.
But I can't find DFU service in it, Where I can find the FreeRTOS with DFU service Demo?
In SDK_v11.0.0-2.alpha, there is a project: examples\ble_peripheral\ble_app_hrs_freertos\pca10028\ble_app_hrs_freertos\s130_with_dfu_pca10028.
But I can't find DFU service in it, Where I can find the FreeRTOS with DFU service Demo?
The DFU service is added in ble_dfu.c
, found under the nRF_BLE group in the Project Window in Keil.
I read the main.c code, there are nothing about dfu service. I also download the code (nRF5_SDK_11.0.0-2.alpha_bc3f6a0\examples\ble_peripheral\ble_app_hrs_freertos\pca10028\s130_with_dfu\arm5_no_packs\ble_app_hrs_freertos_s130_with_dfu_pca10028.uvprojx) to the pca10028 board, and use Master Control Panel to discover the service, there also no dfu service.
The DFU support is missing from that particular example and I have reported this internally. This hould be fixed in the next release.
Meanwhile, you can attempt to add the DFU support using this guide. I would also suggest using the S130_with_dfu example as a reference when adding the DFU support.
I had add the DFU service to the ble_app_hrs_freertos_s130_with_dfu_pca10028 project, and the Master Control Panel could find the DFU service, But when DFU start transfer, the nRF51822 would crash! I trace the bug, after the function "bootloader_util_reset(uint32_t start_addr)" (the end of the dfu service ), the code would jump to 0x3C440(part of the bootloader), and then the nRF51822 crash. I don't know what is wrong, Any suggestion?
@steven-lu: You have to edit the bootloader_util_reset
-function, see the code snippet below:
#if defined ( __CC_ARM )
__asm static void bootloader_util_reset(uint32_t start_addr)
{
#if defined ( FREERTOS )
MOVS R1, #1
MSR CONTROL, R1 ; Switch to MSP
#endif //FREERTOS
dfu_app_peer_data_set(conn_handle);
NVIC_ClearPendingIRQ(SWI2_IRQn);
interrupts_disable();
memset(NRF_RTC1,0,sizeof(NRF_RTC_Type));
bootloader_util_app_start(NRF_UICR->BOOTLOADERADDR);