I'm using this example of code (nRF5_SDK_11.0.0_89a8197\examples\dfu\bootloader\pca10040\dual_bank_ble_s132\arm5_no_packs) with my custom board to perform a dfu. So in this it"s seems to support use of button but in my case there is no button on board so i disabled the below code:
//dfu_start |= ((nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0) ? true: false);
and all related function thats use BOOTLOADER_BUTTON.
1. is the desactivation of the button code can run the app as if there was no button on board or there is another trick to enter the DFUmode without using the button. ?
2. I have another issue ; i have downloaded an hex file over the air, the DFU work well , and bootloader give control to the application but stop advertinsing.as "DfuTrgt" si i can't perform another dfu . Do you have any idea where and how to change code in order to perform dfu again even if application ?
Yes, we have the buttonless example that can do exactly what you looking for. Read about it here and here. I have a note about it in my blog here as well.
Hi Hung Bui,
Actually i can perform with the example provideed in the sdk11, i have only disable the use of button and it work as i expected. I would like to use sdk11 not sdk13 with the buttonless exemple. So im looking for solution with the use of sdk11 exemple.
I have already read your article about buttonless dfu but it doesn't fit actually my need. So, i look for solution of why i can't perform more DFU and why my bootloader DFU stop adverttising once application start runing ?
When your application is running, your bootloader can't run. You can't run 2 application at the same time. What you need is to implement a service in the application to switch to bootloader, that what we called buttonless DFU.
If you are using SDK v11, please have a look here: https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_application.html?cp=5_5_10_4_2_3_2
The example is inside the _with_dfu projects inside \examples\ble_peripheral\ble_app_hrs
Thanks for replay,
Now i would like to extend my application to support DFU, So i would like to know how/where should i modifiy source files to add DFU to my application. It's not clear on infocenter documentation.
Have you try to follow this ? https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_appextending.html?cp=5_5_10_4_2_3_2_1