NRF SDK 3.1.0: can't build radio_test if CONFIG_BT and CONFIG_COUNTER are used at the same time

Currently on NCS 2.9.2 and radio_test is buildable with CONFIG_BT=y and CONFIG_COUNTER=y. Trying to switch to 3.1.0 but getting an error that "MPSL reserves TIMER10 on this SoC" coming from the mpsl_init.c.

What are the options? At the moment, I've changed radio_test.c to use TIMER24, but this is a different PD and I am not sure it is correct way to fix it:

```

#elif defined(CONFIG_SOC_SERIES_NRF54LX) && !defined(CONFIG_NRFX_TIMER10)
#define RADIO_TEST_EGU NRF_EGU20
#define RADIO_TEST_TIMER_INSTANCE 24
#define RADIO_TEST_TIMER_IRQn TIMER24_IRQn
#define RADIO_TEST_RADIO_IRQn RADIO_0_IRQn
#define RADIO_TEST_SHORT_END_DISABLE_MASK NRF_RADIO_SHORT_PHYEND_DISABLE_MASK
#define RADIO_TEST_INT_END_MASK NRF_RADIO_INT_PHYEND_MASK
#define RADIO_TEST_EVENT_END NRF_RADIO_EVENT_PHYEND
```

Can you confirm or add anything to this solution? Do I need to worry that TIMER24 is in different PD and less precise (if I am not mistaken), or I better use TIMER00? Are any additional routing / tunnelling / etc required?

Parents
  • Hi artyom17,

    As you pointed out, TIMER24 is in a different power domain, so there will be additional delay between when the TIMER event is triggered to when the DPPI-connected task is triggered. This might affect the Radio Test performance.

    The main issue here, I believe, is with CONFIG_BT rather than CONFIG_COUNTER. The error you encountered say exactly what the problem is: The Multiprotocol Service Layer, MPSL, a part of the BT Controller, reserves TIMER10 to control the radio. The choice of TIMER10 is exactly because TIMER10 is on the same power domain as the radio.

    Why would you want to combine the radio test and CONFIG_BT? We recommend having a separated firmware for testing and certification purpose.

    Hieu

  • Thanks for the response!

    Yeah, the idea was to have the same FW for testing radio both ways - using Radio Test Mode and regular BLE tests. We might consider separating those, if needed, but wanted to know all the options first.

    Overall, replacing the TIMER10 by TIMER2x - it will work, with the aforementioned caveat, right?

  • There is also the issue of radio ownership and configuration. When you enable CONFIG_BT, MPSL is also controlling the radio and setup its own configurations, such as interrupt.

    Thus, when you want to switch from BT to Radio Test mode, you need to make sure Bluetooth is not working, and then reconfigure interrupts dynamically.
    It might be helpful to also disable the Bluetooth stack and MPSL with bt_disable() and mpsl_uninit(); or just bt_disable() if you enable CONFIG_BT_UNINIT_MPSL_ON_DISABLE.

    artyom17 said:
    Overall, replacing the TIMER10 by TIMER2x - it will work, with the aforementioned caveat, right?

    The caveat being further delay due to cross-domain DPPI, yes.

Reply
  • There is also the issue of radio ownership and configuration. When you enable CONFIG_BT, MPSL is also controlling the radio and setup its own configurations, such as interrupt.

    Thus, when you want to switch from BT to Radio Test mode, you need to make sure Bluetooth is not working, and then reconfigure interrupts dynamically.
    It might be helpful to also disable the Bluetooth stack and MPSL with bt_disable() and mpsl_uninit(); or just bt_disable() if you enable CONFIG_BT_UNINIT_MPSL_ON_DISABLE.

    artyom17 said:
    Overall, replacing the TIMER10 by TIMER2x - it will work, with the aforementioned caveat, right?

    The caveat being further delay due to cross-domain DPPI, yes.

Children
No Data
Related