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?
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.
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.