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

How to use Watchdog timer in App and Bootloader?

Hi.

I have a few questions.

1. Init watchdog timer in Bootloader. After Run application Still running Watchdog Timer?

2. If Watchdog timer still is active. not init only use feed call?

3. Switching Bootloader <-> Application. Must be sd_softdevice_vector_table_base_set() call this function?

I use Google Translate. 

Thank you.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Use SDKs: 14.2 / 15.2

IDE : SEGGER Embedded Studio for ARM 4.12

Hardware : nRF52832(BMD-300, ISP1510)

Parents
  • Hi,

    1. You can initialize and start the watchdog in the bootloader if you like, but that is not done in any SDK example.

    2. The watchdog is only disabled after a power cycle or a watchdog reset. Therefore, the bootloader must continue to feed the watchdog if it was enabled in the application. Support for this was added in 15.0 (and improved in 15.2). See Automated feeding of the watchdog for details.

    3. No. Please refer to the bootloader example to see how it branches to the application. You can start by looking at nrf_bootloader_app_start.c (SDK 15.2) for how the bootloader starts the application. For seeing how the application start the bootloader in buttonless mode, you can refer to the implementation of ble_dfu_buttonless_bootloader_start_finalize() in ble_dfu.c. Note that this implements only the last stages, as informing the application, handling bond sharing if needed etc happens before. I recommend you look at the Buttonless DFU Template Application for a working example.

  • Thanks for Reply.

    sd_softdevice_vector_table_base_set(0x0007B000);
    nrf_sdh_disable_request();
    nrf_bootloader_app_start_impl(0x0007B000);

    This is my code(Base 14.2 SDK) that the application enters into the bootloader.

    I use SoftReset to re-enter the application.

    My question is, I want to know if the execution of the "sd_softdevice_vector_table_base_set ()" function is required to execute code in other areas.

Reply
  • Thanks for Reply.

    sd_softdevice_vector_table_base_set(0x0007B000);
    nrf_sdh_disable_request();
    nrf_bootloader_app_start_impl(0x0007B000);

    This is my code(Base 14.2 SDK) that the application enters into the bootloader.

    I use SoftReset to re-enter the application.

    My question is, I want to know if the execution of the "sd_softdevice_vector_table_base_set ()" function is required to execute code in other areas.

Children
Related