This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BSP driven buttons don't work with a bootloader

Situation

  1. I have an app, that use a BSP to detect pressing of the buttons. It works.

  2. I have a bootloader. It also works.

Problem

When I flash bootloader AND app simultaneously, BSP cannot handle button pressing. No errors during init - just bsp_button_event_handler() never fire.

Environment

  • SD 120 v.2.0
  • NDK 8.0.0
  • board PCA10001
  • compiler GCC 4.9 2014q4
  • I use a Hung Bui (@hungbui) proposed bootloader (see here), and memory values are as in answer here
  • my app is based on the ble_app_multilink_central example from NDK8

Note

Doesn't matter if I flash bootloader then app or vice versa. Also, I try to flash bootlader and then load app with bootloader DFU. The result is the same - app is flashed, started, but buttons do not work.

Thank you.

Parents
  • I've just obtained a positive result - bootloader works, and BSP also. Don't sure what was the problem - I just started from the @hungbui original example and modified it again (for my purposes). And it becomes work! Try it both from Windows and Android -app updated correctly. Thank you for your help.

    One thing, that I should note is: when use a bootloader, direct flashing an application with programmer becomes not useful. This is because bootloader starts in any case - if I hold the bootloader button or not (probably bootloader thinks, that it's no application in the device). So, I can correctly update app only with bootloader DFU, but not with JTAG.

Reply
  • I've just obtained a positive result - bootloader works, and BSP also. Don't sure what was the problem - I just started from the @hungbui original example and modified it again (for my purposes). And it becomes work! Try it both from Windows and Android -app updated correctly. Thank you for your help.

    One thing, that I should note is: when use a bootloader, direct flashing an application with programmer becomes not useful. This is because bootloader starts in any case - if I hold the bootloader button or not (probably bootloader thinks, that it's no application in the device). So, I can correctly update app only with bootloader DFU, but not with JTAG.

Children
No Data
Related