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

Possible to shutdown DFU Bluetooth after a few seconds and then boot into program

Hi,

 We have a program that uses the radio driver for IEEE 15.4. Currently we do not need Bluetooth and IEEE 15.4 working simultaneously but we do need Bluetooth DFU. When our code is running I would like the softdevice shutdown. When I tried this the IEEE 15.4 stopped working.

Would it be possible to develope our application as a SINGLE PHY radio driver and have the bootloader 'hand' over it after a period of time? This period would be long enough to check for a bluetooth connection.

So our main firmware would be unaware there is a softdevice at all and all the bluetooth bits would be done in the bootloader.

regards

Liam

  • Hi Liam,

    Yes, this shouldn't be a problem. You can use our standard BLE bootloader to handle firmware updates over BLE while having an application that is not dependent on the Softdevice. 

    When I tried this the IEEE 15.4 stopped working.

     Are you using the Softdevice in your current 15.4 FW (i.e., is it enabled)? 

    Would it be possible to develope our application as a SINGLE PHY radio driver and have the bootloader 'hand' over it after a period of time? This period would be long enough to check for a bluetooth connection.

    There's a configurable timeout that determines how long the bootloader is going to stay in DFU mode. It's 2 min by default. When the timeout timer expires, it will boot the main app.

    Also, to enter DFU mode you need to signal the bootloader to do so. One option is to enter DFU mode upon a pinreset. See bootloader configuration sdk_config.h for various "DFU enter methods". 

    The Memory layout should look something like this:

    Regards,

    Vidar

  • Thanks for the info

    What I'm trying to do is stop the softdevice stealling time from my app especially as I only require bluetooth for a DFU.

    So if I set the advertising time out to 30 seconds with BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE set then BT will stop advertising and also stop interrupting my program after 30 seconds?

    This is probably preferable than doing it all in the bootloader because I would not have a long timeout so the person doing the uploading would have to be very quick to trigger a BT connection.

    regards

    Liam

  • Sorry, but it's not clear to me why the Softdevice is started if you are application is not using it?  

    Liam said:
    So if I set the advertising time out to 30 seconds with BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE set then BT will stop advertising and also stop interrupting my program after 30 seconds?

     Yes, you should not get interrupted by the Softdevice as long as you don't do advertising.

    Liam said:
    This is probably preferable than doing it all in the bootloader because I would not have a long timeout so the person doing the uploading would have to be very quick to trigger a BT connection.

     You could enter DFU mode from the app by through a button press or maybe with a command sent over 15.4. The bootloader will stay in DFU mode waiting for a controller to connect until it times out, which is 2 minutes by default.  

    Regards,

    Vidar

Related