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

usb dfu bootloader with GPREGRET entrance Cause cannot get out the bootloader mode

hi,

I am working with usb dfu bootloader for nrf52833. I set the bootloader entrance mode to GPREGRET only. before enter bootloader, I set NRF_POWER->GPREGRET = 0x00000001, and I can enter the bootloader mode without problems. but after timeout reboot and flash finished reboot, the chip does not switch to application mode, it stay in bootloader mode. but it works for nrf52832. I know GPREGRET will reset when power off, but in my case, I cannot do that. is there any way I can get out of bootloader mode?

Parents
  • Hi,

    The function dfu_enter_flags_clear() should clear the GPREGRET BOOTLOADER_DFU_START field. You should use the debug variant of the bootloader, debug and check why the app won't start. It could be wrong CRC, wrong SoftDevice version used, etc.

    What nrfutil command did you use to generate the DFU package?

    What SDK version are you using? What SoftDevice version are you using ?

  • this cause clear gpregret never happened 

    if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &&
    ((nrf_power_gpregret_get() & BOOTLOADER_DFU_GPREGRET_MASK) == BOOTLOADER_DFU_GPREGRET)
    && (nrf_power_gpregret_get() & BOOTLOADER_DFU_START_BIT_MASK))
    {
    // Clear DFU mark in GPREGRET register.
    nrf_power_gpregret_set(nrf_power_gpregret_get() & ~BOOTLOADER_DFU_START);
    }

    I have no idea what should I set to NRF_POWER->GPREGRET, I tried 0x00000001 and 0xF8 | 0x01, and nothing changed

Reply
  • this cause clear gpregret never happened 

    if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &&
    ((nrf_power_gpregret_get() & BOOTLOADER_DFU_GPREGRET_MASK) == BOOTLOADER_DFU_GPREGRET)
    && (nrf_power_gpregret_get() & BOOTLOADER_DFU_START_BIT_MASK))
    {
    // Clear DFU mark in GPREGRET register.
    nrf_power_gpregret_set(nrf_power_gpregret_get() & ~BOOTLOADER_DFU_START);
    }

    I have no idea what should I set to NRF_POWER->GPREGRET, I tried 0x00000001 and 0xF8 | 0x01, and nothing changed

Children
No Data
Related