Boot up without SoftDevice possible? (nRF Connect)

Hello!

As part of our risk mitigation, we are interested to know whether during the boot up procedure, we can temporarily boot into a mode where the SoftDevice is fully disabled, with the customer application fully in control of the chip?

Within this state, we mean-

  • Application owns all interrupts (I assume we can configure the interrupt priorities?)
  • SoftDevice not started (so no events or interrupts generated)

To clarify, the boot sequence would look like so-

  1. Boot up
  2. Application initialises with highest priority interrupts. BLE unavailable.
  3. Application performs system integrity tests
  4. If all OK, hands over interrupts to SoftDevice (i.e. interrupts as normally configured on nRF platform)
  5. Initialise SoftDevice (if such an API call exists)
  6. Business as usual after this point until the next reset. BLE available.

Some specific questions-

  • Is it possible to configure the SoftDevice interrupt priorities by application, or its hardcoded?
  • Does the above (1-5) sequence make sense? Do you think its feasible?
  • Can a hypothetically faulty SoftDevice prevent reaching step 3 above?
  • Is not starting the SoftDevice a problem? Will it result in increased power consumption or any other unexpected issues?
  • Are there any reference examples that demonstrate operation with SoftDevice disabled (no BLE is necessary)?

Whilst I am posting this for nRF52840, this question is also relevant for nRF5340. And I ask this primarily for the nRF Connect SDK (where I understand SoftDevice controller is extracted, and SoftDevice as a whole no longer exists).

I know this image is from nRF5 SDK (I could not find one for nRF Connect SDK), but we mean the application would temporarily be assigned the interrupt priority 0 & 1-

Parents Reply Children
  • As far as I know, there are no samples that are doing this. The typical use case in our samples is to either use the radio stack, or not at all. Also, most customers use a different application to run radio tests, and when it passes, they flash the final application to the nRF. And I don't think they run the radio test on all devices. Just a selection.

    However, you should be able to just add a line saying CONFIG_MPSL_DYNAMIC_INTERRUPTS=y to your prj.conf. 

    Best regards,

    Edvin

  • Hello Edvin,

    Thanks for the response! Ok noted.

    For the samples that don't use the radio, am I correct in assuming mpsl_lib_uninit() will have to be called?

    I will be trying this out in the coming few days, and I will feedback on how I get on!

    Thank you

    Jose

  • jose321 said:
    For the samples that don't use the radio, am I correct in assuming mpsl_lib_uninit() will have to be called?

    If you are not using the radio at all, you can avoid including any stacks by just not including them (CONFIG_BT=y, CONFIG_THREAD=y, and so on). If they are not included, then you don't need to do anything. But if you want to include BT in your application, you need to set CONFIG_BT=y. By default, it is already enabled when you hit your main() function, so it is not possible to avoid it being enabled. If you want that option, you need to use MPSL, which then gives you the option to uninit itself.

    BR,
    Edvin

Related