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

FreeRTOS with DFU service

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?

Parents Reply Children
  • 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);
    
Related