How to Enable DTM after BLE has been running (NCS)

Hi All,

How do I disable the BLE stack completely such that I can switch to the DTM stack (DTM example using direct nrf_radio calls)?

Current I disable advertising and then run DTM_init(); but zephyr crashes in the call to radio_reset().

mpsl_init: MPSL ASSERT: 112, 2236

My requirement is to switch between BLE and DTM, and them back to BLE during production testing.

I'm using SDK 1.9.1

Thanks

Simon

  • I am not sure if you can run DTM and BLE concurrently. Probably not. So your approach of disable BLE while using DTM seems sensible.

    Current I disable advertising and then run DTM_init(); but zephyr crashes in the call to radio_reset().

    Disabling advertising does not mean that you are disabling BLE, I am guessing that you are seeing this crash because you have not disable the BLE part yet. You would get more context on why the system crashes if you can debug the crash and get more context as to where the system is faulting.

  • Hi Susheel,

    I've been looking for a way to completely disable BLE, but from what I see and read on devzone bt_disable() is not implemented.  So my question should probably be how do I disable BLE and free up the resources that DTM needs?

    During debugging I get a Hardfault when irq_disable(RADIO_IRQn); is called inside radio_reset().

  • It looks like the bt_disable function not implemented on the Nordic side. We can try to approach this the other way. DTM needs exclusive access of NRF RADIO and while BT is enabled, this is not  directly allowed by our BLE  controller. 

    But I think we can request timeslots for the duration of the DTM tests and these requests of timeslots go through our BLE controller. If DTM is using the resources only within this timeslots then I think the BLE controller wont complain.

Related