Bluetooth code not working with LF-clock = RC-oscillator.

Getting even the simplest Bluetooth samples to work on our custom boards seem to be difficult. 

The 'Beacon' sample has no dependencies on buttons or LEDs - 

and in *theory SHOULD* work if I set target=nrf52840dk (in VScode's NRFConnect plugin, build-dialogue).

 The *only* difference is that our custom board has *no 32kHz XTAL*, so we instead use internal RC-osc.

Thus, I set these symbols in "prj.conf" (but nothing else from the sample's original config):

<<

CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_CONTROL_NRF=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

>>

However, this ends up in a hardfault - triggered from 'mpsl_init' it seems.

But strangely, this happens *AFTER* this code is taken (at least I can step over it):

<<

err = bt_enable(bt_ready);

>>

err = 0 after line taken.

But, as soon as I let the debugger continue (there is just a 'return 0' afterwards, so only kernel-threads running)

the CPU hangs at 'k_sys_fatal_error_handler()'.

Is this a configuration-related problem? If yes, what other symbols must be set/unset?? Is using internal RC-osc for LCclock NOT recommended at all when using BT/BLE???

Nordic documentation is vague or non-existent when it comes to 32kHz RC-osc usage restrictions.

NOTE;: I have tried to set these symbols as well - but to no avail:

<<

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_LF_ALWAYS_ON=y
CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_PERIOD=8000

>>

Parents Reply Children
No Data
Related