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

DFU Bootloader with S340 Softdevice

Hi, I learned how to replace the softdevice for a normal application. I've replaced 140 with 340 in my app. However I don't know to do that for the boolloader.

What I want to achieve is

- Have a BLE bootloader with S340

- Have my app on top, which will support the Buttonless DFU (next step)

For now I'm struggling to make the step 1 work. The example works when I use the S140, but when I replace with S340 it does not. I guess I don't have to change the the target addresses, because the bootloader goes to it's place no matter the softdevice, but what should be changed? Are there major differences between 140 and 340? I thought it was just an addition of ANT+? Maybe I just to need to midify some macros? 

Please help. Thanks

Parents
  • Hi,

    what should be changed? Are there major differences between 140 and 340?

    Assuming the S340 SoftDevice you are using is the same major version as the S140 version and you only use a BLE bootloader in both cases, the API etc. is the same (so not just the nrf_sdm.h file). This should be enough, though there could be something I do not think about which you should see when you test.

    Regarding memory, the bootloader is located at the end of the flash, so flash start address will not be a problem even if the SoftDevice increases. If the version is the same and you only use BLE still, the RAM configuration should also be good. Alternatively you could increase the bootloader RAM start address and decrees the size a bit just to be on the safe side (you will get a runtime error when configuring the SoftDevice if this is a problem, though).

  • Hi, Thanks for your answer. This part of my question is clear. Can you please address the other part (buttonless dfu app does not work). 

    What I can say in addition is that the app does not go into the ble_dfu_evt_handler. It just resets.

    PS: I also implemented parts of the power management example app into my app, which I think might be in conflict.

  • When I click on "Start DFU", the app goes to ble_dfu_buttonless_on_ble_evt, then to on_rw_authorize_req

    and there it does not reach the code in the "iffs". p_auth_req->type is empty... hm

    This is how it looks:

  • Ok. I don't know why, but it doesn't work from "BLE" app (NRF Connect suit), but it does when I use the nRF Tools on my mobile. New firmware is installed and boots up.

    Should I do something extra on the BLE app?

  • Do you use DFU with bonding by any chance, and if so, could it be that you bond when you test on the phone but not when you test with nRF Connect for desktop?

  • I see. Did you look more into the debugger issue where you did not see the type field? Make sure you test with optimization disabled if you have not done so allready, as that will make debugging easier. The type should have been 2. Can you also check the handle and op fields, so that we can see if that makes sense?

Reply
  • I see. Did you look more into the debugger issue where you did not see the type field? Make sure you test with optimization disabled if you have not done so allready, as that will make debugging easier. The type should have been 2. Can you also check the handle and op fields, so that we can see if that makes sense?

Children
Related