Hi,
I have a board using an off the shelf nrf52811 module (from raytac). The only things on the board are the recommended 32k crystal with 2x 12pF caps, as well as two decoupling caps and the two inductors for the DCDC converter. I have a simple "hello world" program and a custom board which basically just comes from the nrf52840dk_nrf52811, except I have disabled UART, emptied the CMakeLists.txt file which is used for emulating the device with an nrf52840 and removed all of the aliases in the dts.
The oscillator the manufacturer recommends is Epson FC-135 32.7680KA-AC3.
When I build the code with the following configuration:
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
it works fine. However, when I build with
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
it doesn't work. It gets stuck on startup and I don't even see the "Booting Zephyr" message in the RTT terminal.
I have examined the clock registers in Ozone and apparently the external clock is running:

I have also tried 5pF, 8pF, 10pF, 12pF and 22pF caps with no change in behaviour (I also tried no capacitors, but I don't really expect that to work). I have confirmed that the behaviour is the same on multiple boards, and I have also tried manually cutting away the GND plane that is kind of near the oscillator, but also no change.
According to my debugging, the block is in lfclk_spinwait so I assume it is waiting for the PLL or some other system to lock onto the XTAL.
Since there is no true reference board for the nrf52811, I am not sure if I am doing the right thing in the configuration. Could you please tell me if this is the correct way to enable the external 32k oscillator for the nrf52811? Are there any specific flags or configuration needed for this device to work?
I have attached the code I am using.
Thanks,
Jeremy