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

BLE and RTC doesnt work simultaneously

I am trying to implement a scenario where the system will be sleeping for a mentioned period of time and then wake up and advertise and transfer data over BLE.

I am using RTC2 for this.

What I am currently facing is either the system doesnt go to sleep ie it gets interrupt other than RTC, which on debugging, i found is Radio interrupt.

If i disable this interrupt before going to sleep, the BLE stops working, it doesnt advertise and data is not sent.

Its the same when I disable soft device using function nrf_sdh_disable_request() and enable it again when required with nrf_sdh_continue().

What should I do to make both the things work together? Is anything needed to be done before the system enters sleep mode?

Parents
  • Hi, when you disable the softdevice the LF clock is probably stopped and therefore the RTC2 will stop as well.

    Not sure what you mean by "going to sleep". The softdevice is already power optimized so after advertising is stopped (or between the advertising events) the current consumption is as low as it can be while still having the LF clock and RTC running (~2uA). You should not disable the softdevice, just stop advertising.

Reply
  • Hi, when you disable the softdevice the LF clock is probably stopped and therefore the RTC2 will stop as well.

    Not sure what you mean by "going to sleep". The softdevice is already power optimized so after advertising is stopped (or between the advertising events) the current consumption is as low as it can be while still having the LF clock and RTC running (~2uA). You should not disable the softdevice, just stop advertising.

Children
Related