I'm doing some electrical investigation on my design, and I'm wondering when the SoftDevice turns on/off the external 32MHz crystal oscillator. Our application is a Bluetooth device based on the nRF52832, using nRF5 SDK v17.1.0 and s132 v7.3.0.
I've tried printing the state of the oscillator using sd_clock_hfclk_is_running(). I was expecting to see the oscillator disabled while Advertising is disabled, and then enabled when Advertising is enabled, however, the function outputs "0" before and after.
I suspect that the system is using the internal oscillator most of the time (or else the program would not run) and the SoftDevice uses the external oscillator only for the relatively infrequent Bluetooth events, e.g. transmitting an Advertising packet. The discussion in this question leads me to believe that the clock-switching is something that's done automatically by the SoftDevice.
Is it correct to say that if advertising is disabled and there's no active connection, the external oscillator is not running?