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

System auto reset when using DFU

Hi everybody.

I am making an application which combine ANCS and UART on PC100028 (nrf51 SDK 9.0.0). This program worked properly. However when I add DFU service (dfu_dual_bank) follow as this instruction the program automatically reset when I try to connect my phone to the circuit as in image bellow:

image description

Could you please help me to solve this problem.

Here is setting of DFU bootloader in dfu_type.h:

  1. #define BOOTLOADER_REGION_START 0x0003C000
  2. #define BOOTLOADER_SETTINGS_ADDRESS 0x0003FC00
  3. #define DFU_APP_DATA_RESERVED 0x1400
  4. #define DFU_BANK_PADDING (DFU_APP_DATA_RESERVED % (2 * CODE_PAGE_SIZE))

Thank you very much

Parents
  • Hi,

    Please make sure that you've allocated space for the application context in the device managers config file which used to set the service changed flag (device_manager_cnfg.h-> DEVICE_MANAGER_APP_CONTEXT_SIZE). If it's set to zero you will get an assert that causes a system reset as the application can't set the service changed flag.

    If you've already set the DEVICE_MANAGER_APP_CONTEXT_SIZE to more than 4 bytes the reset is caused by something else. Then I'd suggest to attach a debugger and see if app_error.c -> app_error_handler() is reached during program execution, and if it is, read the input arguments to determine the location and cause of the assert.

Reply
  • Hi,

    Please make sure that you've allocated space for the application context in the device managers config file which used to set the service changed flag (device_manager_cnfg.h-> DEVICE_MANAGER_APP_CONTEXT_SIZE). If it's set to zero you will get an assert that causes a system reset as the application can't set the service changed flag.

    If you've already set the DEVICE_MANAGER_APP_CONTEXT_SIZE to more than 4 bytes the reset is caused by something else. Then I'd suggest to attach a debugger and see if app_error.c -> app_error_handler() is reached during program execution, and if it is, read the input arguments to determine the location and cause of the assert.

Children
Related