Can softdevice and cli module coexist?

Hi,

I'm trying to migrate bluetooth softdevice to a project contained cli module. I found cli module and softdevice would all create an app timer. The softdevice first created, then the cli module created would cause a crash.

My question is whether softdevice and cli module can coexist? How should the clock module be configured in this scenario? The app timers just only depend on RTC1, can this be configured ?

Thank you!

Parents
  • Hi,

    My question is whether softdevice and cli module can coexist?

    Yes, there is no problem combining CLI and SoftDevice. That is for instance done in the BLE Interactive Command Line Interface Example.

    How should the clock module be configured in this scenario?

    Like in any other example that use a SoftDevice. For the LFCLK this is started when the SoftDevice runs, and always continue to run. The HFXO can be requested if the application needs it, typically using the clock driver.

    The app timers just only depend on RTC1, can this be configured ?

    The app_timer implementation is hard coded to use RTC1. It would be possible to modify it to use another RTC, but I do not see a good reason for that. If you need to use an RTC in your app, pick a different one. The nRF52840 has three RTCs. RTC0 is reserved for the SoftDevice when that is used. RTC1 for the app_timer. RTC2 you can use for anything.

Reply
  • Hi,

    My question is whether softdevice and cli module can coexist?

    Yes, there is no problem combining CLI and SoftDevice. That is for instance done in the BLE Interactive Command Line Interface Example.

    How should the clock module be configured in this scenario?

    Like in any other example that use a SoftDevice. For the LFCLK this is started when the SoftDevice runs, and always continue to run. The HFXO can be requested if the application needs it, typically using the clock driver.

    The app timers just only depend on RTC1, can this be configured ?

    The app_timer implementation is hard coded to use RTC1. It would be possible to modify it to use another RTC, but I do not see a good reason for that. If you need to use an RTC in your app, pick a different one. The nRF52840 has three RTCs. RTC0 is reserved for the SoftDevice when that is used. RTC1 for the app_timer. RTC2 you can use for anything.

Children
No Data
Related