It seems that NimBLE does not play well with some others.  In particular,
when BLE_XTAL_SETTLE_TIME is non-zero, NimBLE turns off and on HFXO (the
nRF52 64 MHz crystal oscillator) as it sees fit.  But LoRa depends on
having HFXO enabled.

We see many failed LoRa join attempts as a result of the poor accuracy of
HFINT (the internal oscillator).  Setting BLE_XTAL_SETTLE_TIME to zero
fixes the problem because it disables this HFCLK source toggling, but then
we lose the power savings of disabling HFXO.

At the very least, this workaround should be documented.  I can submit a PR.

I guess there should be some management of this shared resource, so that it
is enabled while at least one client needs it.

And maybe LoRa should also toggle HFXO, for power savings?

Reply via email to