When I send the command to the 51822,so the 51822 ready to DFU,but wait for a long time,51822 is staying at a DFU state,that means 51822 can not work.How to solve this problem?
When I send the command to the 51822,so the 51822 ready to DFU,but wait for a long time,51822 is staying at a DFU state,that means 51822 can not work.How to solve this problem?
Hi Milk,
Please provide more information. Which DFU master app/device did you use to do DFU ?
How did you test?
The nRF51 will stay at DFU state if the DFU master do nothing, a timeout will occurs, and the nRF51 will return to normal mode.
Hi Hung Bui, DFU app is developped by our company,the device is 51822.DFU app is based on the code of Master Control Pannel.I test it by lightblue.Yesterday,I seek something from Internet.I found that if the device stayed the bootloader all the time instead of entering the application,it means the application corrupted.So I still do not understand,why does the application corrupt?
Hi Milk,
My suggestion for you is to test and make sure everything works first with the nRF Master Control Panel app.
After that you can test with your own app. Please list the process when you test DFU with your app, step by step. A sniffer trace would be very useful.
The problem may be with the NRF_POWER->GPREGRET register. In bootloader code you need to clear the register, if you don't, after timeout in bootloader, system will reboot and will again check for NRF_POWER->GPREGRET register and will remain in bootloader mode, and the process will continue.
So to resolve it, in bootloader's program in below section: if (dfu_start || (!bootloader_app_is_valid(DFU_BANK_0_REGION_START))) add "sd_power_gpregret_clr(0xFF);"
this will sort out your problem.